diff --git a/demo_shared_js@750779dffd1e/Align/index.html b/demo_shared_js@750779dffd1e/Align/index.html new file mode 100644 index 000000000..eb86941af --- /dev/null +++ b/demo_shared_js@750779dffd1e/Align/index.html @@ -0,0 +1,16 @@ + +Align (docs.demo_shared_js@750779dffd1e.Align)

Module Align

type verticalAlign = [
  1. | `top
  2. | `center
  3. | `bottom
]
type horizontalAlign = [
  1. | `left
  2. | `center
  3. | `right
]
val makeProps : + ?h:horizontalAlign -> + ?v:verticalAlign -> + children:'children -> + ?key:string -> + unit -> + < h : horizontalAlign option + ; v : verticalAlign option + ; children : 'children > + Js.t
val make : + < children : React.element + ; h : horizontalAlign option + ; v : verticalAlign option > + Js.t -> + React.element
diff --git a/demo_shared_js@750779dffd1e/App/Hr/index.html b/demo_shared_js@750779dffd1e/App/Hr/index.html new file mode 100644 index 000000000..063d5c4e9 --- /dev/null +++ b/demo_shared_js@750779dffd1e/App/Hr/index.html @@ -0,0 +1,2 @@ + +Hr (docs.demo_shared_js@750779dffd1e.App.Hr)

Module App.Hr

val makeProps : ?key:string -> unit -> < > Js.t
val make : < > Js.t -> React.element
diff --git a/demo_shared_js@750779dffd1e/App/Title/Menu/index.html b/demo_shared_js@750779dffd1e/App/Title/Menu/index.html new file mode 100644 index 000000000..5d244a8ad --- /dev/null +++ b/demo_shared_js@750779dffd1e/App/Title/Menu/index.html @@ -0,0 +1,2 @@ + +Menu (docs.demo_shared_js@750779dffd1e.App.Title.Menu)

Module Title.Menu

val makeProps : ?key:string -> unit -> < > Js.t
val make : < > Js.t -> React.element
diff --git a/demo_shared_js@750779dffd1e/App/Title/index.html b/demo_shared_js@750779dffd1e/App/Title/index.html new file mode 100644 index 000000000..e75710ca5 --- /dev/null +++ b/demo_shared_js@750779dffd1e/App/Title/index.html @@ -0,0 +1,2 @@ + +Title (docs.demo_shared_js@750779dffd1e.App.Title)

Module App.Title

type item = {
  1. label : string;
}
module Menu : sig ... end
val makeProps : ?key:string -> unit -> < > Js.t
val make : < > Js.t -> React.element
diff --git a/demo_shared_js@750779dffd1e/App/index.html b/demo_shared_js@750779dffd1e/App/index.html new file mode 100644 index 000000000..d0de12db2 --- /dev/null +++ b/demo_shared_js@750779dffd1e/App/index.html @@ -0,0 +1,2 @@ + +App (docs.demo_shared_js@750779dffd1e.App)

Module App

module Hr : sig ... end
module Title : sig ... end
val makeProps : ?key:string -> unit -> < > Js.t
val make : < > Js.t -> React.element
diff --git a/demo_shared_js@750779dffd1e/Arrow/index.html b/demo_shared_js@750779dffd1e/Arrow/index.html new file mode 100644 index 000000000..7a417365a --- /dev/null +++ b/demo_shared_js@750779dffd1e/Arrow/index.html @@ -0,0 +1,6 @@ + +Arrow (docs.demo_shared_js@750779dffd1e.Arrow)

Module Arrow

type direction =
  1. | Left
  2. | Right
val makeProps : + ?direction:direction -> + ?key:string -> + unit -> + < direction : direction option > Js.t
val make : < direction : direction option > Js.t -> React.element
diff --git a/demo_shared_js@750779dffd1e/Context/Provider/index.html b/demo_shared_js@750779dffd1e/Context/Provider/index.html new file mode 100644 index 000000000..8061db0a1 --- /dev/null +++ b/demo_shared_js@750779dffd1e/Context/Provider/index.html @@ -0,0 +1,8 @@ + +Provider (docs.demo_shared_js@750779dffd1e.Context.Provider)

Module Context.Provider

include module type of struct include React.Context end
type 'props t = 'props React.Context.t
val makeProps : + value:'props -> + children:React.element -> + unit -> + < value : 'props ; children : React.element > Js.t
val provider : + 'props t -> + < value : 'props ; children : React.element > Js.t React.component
val context : int React.Context.t
val make : < children : React.element ; value : int > Js.t React.component
diff --git a/demo_shared_js@750779dffd1e/Context/index.html b/demo_shared_js@750779dffd1e/Context/index.html new file mode 100644 index 000000000..7570cb096 --- /dev/null +++ b/demo_shared_js@750779dffd1e/Context/index.html @@ -0,0 +1,2 @@ + +Context (docs.demo_shared_js@750779dffd1e.Context)

Module Context

module Provider : sig ... end
diff --git a/demo_shared_js@750779dffd1e/Counter/index.html b/demo_shared_js@750779dffd1e/Counter/index.html new file mode 100644 index 000000000..d407dcd81 --- /dev/null +++ b/demo_shared_js@750779dffd1e/Counter/index.html @@ -0,0 +1,6 @@ + +Counter (docs.demo_shared_js@750779dffd1e.Counter)

Module Counter

val makeProps : + initial:'initial -> + ?key:string -> + unit -> + < initial : 'initial > Js.t
val make : < initial : int > Js.t -> React.element
diff --git a/demo_shared_js@750779dffd1e/Cx/index.html b/demo_shared_js@750779dffd1e/Cx/index.html new file mode 100644 index 000000000..7a8fa0ed8 --- /dev/null +++ b/demo_shared_js@750779dffd1e/Cx/index.html @@ -0,0 +1,2 @@ + +Cx (docs.demo_shared_js@750779dffd1e.Cx)

Module Cx

val make : string Belt.List.t -> string
val ifTrue : string -> bool -> string
val ifSome : string -> 'a option -> string
val mapSome : 'a option -> ('b -> string) -> string
val unpack : string option -> string
diff --git a/demo_shared_js@750779dffd1e/HelloWorld/index.html b/demo_shared_js@750779dffd1e/HelloWorld/index.html new file mode 100644 index 000000000..f604f2f3c --- /dev/null +++ b/demo_shared_js@750779dffd1e/HelloWorld/index.html @@ -0,0 +1,2 @@ + +HelloWorld (docs.demo_shared_js@750779dffd1e.HelloWorld)

Module HelloWorld

val makeProps : ?key:string -> unit -> < > Js.t
val make : < > Js.t -> React.element
diff --git a/demo_shared_js@750779dffd1e/Layout/index.html b/demo_shared_js@750779dffd1e/Layout/index.html new file mode 100644 index 000000000..901f9cddf --- /dev/null +++ b/demo_shared_js@750779dffd1e/Layout/index.html @@ -0,0 +1,9 @@ + +Layout (docs.demo_shared_js@750779dffd1e.Layout)

Module Layout

val makeProps : + children:'children -> + background:'background -> + ?key:string -> + unit -> + < children : 'children ; background : 'background > Js.t
val make : + < background : string ; children : React.element > Js.t -> + React.element
diff --git a/demo_shared_js@750779dffd1e/Link/Base/index.html b/demo_shared_js@750779dffd1e/Link/Base/index.html new file mode 100644 index 000000000..716e03866 --- /dev/null +++ b/demo_shared_js@750779dffd1e/Link/Base/index.html @@ -0,0 +1,7 @@ + +Base (docs.demo_shared_js@750779dffd1e.Link.Base)

Module Link.Base

val makeProps : + href:'href -> + children:'children -> + ?key:string -> + unit -> + < href : 'href ; children : 'children > Js.t
val make : < children : React.element ; href : string > Js.t -> React.element
diff --git a/demo_shared_js@750779dffd1e/Link/Text/index.html b/demo_shared_js@750779dffd1e/Link/Text/index.html new file mode 100644 index 000000000..637c668d1 --- /dev/null +++ b/demo_shared_js@750779dffd1e/Link/Text/index.html @@ -0,0 +1,7 @@ + +Text (docs.demo_shared_js@750779dffd1e.Link.Text)

Module Link.Text

val makeProps : + href:'href -> + children:'children -> + ?key:string -> + unit -> + < href : 'href ; children : 'children > Js.t
val make : < children : string ; href : string > Js.t -> React.element
diff --git a/demo_shared_js@750779dffd1e/Link/WithArrow/index.html b/demo_shared_js@750779dffd1e/Link/WithArrow/index.html new file mode 100644 index 000000000..dc3613131 --- /dev/null +++ b/demo_shared_js@750779dffd1e/Link/WithArrow/index.html @@ -0,0 +1,7 @@ + +WithArrow (docs.demo_shared_js@750779dffd1e.Link.WithArrow)

Module Link.WithArrow

val makeProps : + href:'href -> + children:'children -> + ?key:string -> + unit -> + < href : 'href ; children : 'children > Js.t
val make : < children : string ; href : string > Js.t -> React.element
diff --git a/demo_shared_js@750779dffd1e/Link/index.html b/demo_shared_js@750779dffd1e/Link/index.html new file mode 100644 index 000000000..9cc82a836 --- /dev/null +++ b/demo_shared_js@750779dffd1e/Link/index.html @@ -0,0 +1,2 @@ + +Link (docs.demo_shared_js@750779dffd1e.Link)

Module Link

module Base : sig ... end
module Text : sig ... end
module WithArrow : sig ... end
diff --git a/demo_shared_js@750779dffd1e/MelRaw/index.html b/demo_shared_js@750779dffd1e/MelRaw/index.html new file mode 100644 index 000000000..e9964a98e --- /dev/null +++ b/demo_shared_js@750779dffd1e/MelRaw/index.html @@ -0,0 +1,2 @@ + +MelRaw (docs.demo_shared_js@750779dffd1e.MelRaw)

Module MelRaw

val mockInitWebsocket : unit -> 'a
val initWebsocket : unit -> 'a
val x : int
diff --git a/demo_shared_js@750779dffd1e/RR/index.html b/demo_shared_js@750779dffd1e/RR/index.html new file mode 100644 index 000000000..1583768fe --- /dev/null +++ b/demo_shared_js@750779dffd1e/RR/index.html @@ -0,0 +1,2 @@ + +RR (docs.demo_shared_js@750779dffd1e.RR)

Module RR

val useStateValue : 'a -> 'b * ('c -> unit)
diff --git a/demo_shared_js@750779dffd1e/Router/index.html b/demo_shared_js@750779dffd1e/Router/index.html new file mode 100644 index 000000000..d9ef52ff1 --- /dev/null +++ b/demo_shared_js@750779dffd1e/Router/index.html @@ -0,0 +1,2 @@ + +Router (docs.demo_shared_js@750779dffd1e.Router)

Module Router

val home : string
val renderToStaticMarkup : string
val renderToString : string
val renderToLwtStream : string
diff --git a/demo_shared_js@750779dffd1e/Row/index.html b/demo_shared_js@750779dffd1e/Row/index.html new file mode 100644 index 000000000..a024975c8 --- /dev/null +++ b/demo_shared_js@750779dffd1e/Row/index.html @@ -0,0 +1,25 @@ + +Row (docs.demo_shared_js@750779dffd1e.Row)

Module Row

val makeProps : + ?gap:'gap -> + ?align:Theme.align -> + ?justify:Theme.justify -> + ?fullHeight:'fullHeight -> + ?fullWidth:'fullWidth -> + children:'children -> + ?key:string -> + unit -> + < gap : 'gap option + ; align : Theme.align option + ; justify : Theme.justify option + ; fullHeight : 'fullHeight option + ; fullWidth : 'fullWidth option + ; children : 'children > + Js.t
val make : + < align : Theme.align option + ; children : React.element + ; fullHeight : bool option + ; fullWidth : bool option + ; gap : int option + ; justify : Theme.justify option > + Js.t -> + React.element
diff --git a/demo_shared_js@750779dffd1e/Spacer/index.html b/demo_shared_js@750779dffd1e/Spacer/index.html new file mode 100644 index 000000000..0def8a0c2 --- /dev/null +++ b/demo_shared_js@750779dffd1e/Spacer/index.html @@ -0,0 +1,25 @@ + +Spacer (docs.demo_shared_js@750779dffd1e.Spacer)

Module Spacer

val unsafeWhenNotZero : string -> int -> string list
val makeProps : + ?children:'children -> + ?top:'top -> + ?left:'left -> + ?right:'right -> + ?bottom:'bottom -> + ?all:'all -> + ?key:string -> + unit -> + < children : 'children option + ; top : 'top option + ; left : 'left option + ; right : 'right option + ; bottom : 'bottom option + ; all : 'all option > + Js.t
val make : + < all : int option + ; bottom : int option + ; children : React.element option + ; left : int option + ; right : int option + ; top : int option > + Js.t -> + React.element
diff --git a/demo_shared_js@750779dffd1e/Stack/index.html b/demo_shared_js@750779dffd1e/Stack/index.html new file mode 100644 index 000000000..32972b9e6 --- /dev/null +++ b/demo_shared_js@750779dffd1e/Stack/index.html @@ -0,0 +1,24 @@ + +Stack (docs.demo_shared_js@750779dffd1e.Stack)

Module Stack

val makeProps : + ?gap:'gap -> + ?align:'align -> + ?justify:'justify -> + ?fullHeight:'fullHeight -> + children:'children -> + ?key:string -> + unit -> + < gap : 'gap option + ; align : 'align option + ; justify : 'justify option + ; fullHeight : 'fullHeight option + ; children : 'children > + Js.t
val make : + < align : [< `center | `end_ | `start start ] option + ; children : React.element + ; fullHeight : bool option + ; gap : int option + ; justify : + [< `around | `between | `center | `end_ | `evenly | `start around ] + option > + Js.t -> + React.element
diff --git a/demo_shared_js@750779dffd1e/Text/index.html b/demo_shared_js@750779dffd1e/Text/index.html new file mode 100644 index 000000000..9202cad29 --- /dev/null +++ b/demo_shared_js@750779dffd1e/Text/index.html @@ -0,0 +1,22 @@ + +Text (docs.demo_shared_js@750779dffd1e.Text)

Module Text

type size =
  1. | XSmall
  2. | Small
  3. | Medium
  4. | Large
  5. | XLarge
  6. | XXLarge
  7. | XXXLarge
type weight =
  1. | Thin
  2. | Light
  3. | Regular
  4. | Medium
  5. | Semibold
  6. | Bold
  7. | Extrabold
  8. | Black
type align =
  1. | Left
  2. | Center
  3. | Right
  4. | Justify
val makeProps : + color:'color -> + ?size:size -> + ?weight:weight -> + ?align:'align -> + children:'children -> + ?key:string -> + unit -> + < color : 'color + ; size : size option + ; weight : weight option + ; align : 'align option + ; children : 'children > + Js.t
val make : + < align : align option + ; children : string + ; color : string + ; size : size option + ; weight : weight option > + Js.t -> + React.element
diff --git a/demo_shared_js@750779dffd1e/Theme/Color/index.html b/demo_shared_js@750779dffd1e/Theme/Color/index.html new file mode 100644 index 000000000..a7df4bc6f --- /dev/null +++ b/demo_shared_js@750779dffd1e/Theme/Color/index.html @@ -0,0 +1,2 @@ + +Color (docs.demo_shared_js@750779dffd1e.Theme.Color)

Module Theme.Color

val brokenWhite : string
val white : string
val yellow : string
val darkYellow : string
val black : string
val reason : string
val react : string
val ahrefs : string
diff --git a/demo_shared_js@750779dffd1e/Theme/Media/index.html b/demo_shared_js@750779dffd1e/Theme/Media/index.html new file mode 100644 index 000000000..090bda56a --- /dev/null +++ b/demo_shared_js@750779dffd1e/Theme/Media/index.html @@ -0,0 +1,2 @@ + +Media (docs.demo_shared_js@750779dffd1e.Theme.Media)

Module Theme.Media

val onDesktop : string list -> string
diff --git a/demo_shared_js@750779dffd1e/Theme/index.html b/demo_shared_js@750779dffd1e/Theme/index.html new file mode 100644 index 000000000..8fa589601 --- /dev/null +++ b/demo_shared_js@750779dffd1e/Theme/index.html @@ -0,0 +1,2 @@ + +Theme (docs.demo_shared_js@750779dffd1e.Theme)

Module Theme

type align = [
  1. | `start
  2. | `center
  3. | `end_
]
type justify = [
  1. | `around
  2. | `between
  3. | `evenly
  4. | `start
  5. | `center
  6. | `end_
]
module Media : sig ... end
module Color : sig ... end
val text : string -> string
val background : string -> string
val hover : string list -> string
diff --git a/demo_shared_js@750779dffd1e/index.html b/demo_shared_js@750779dffd1e/index.html new file mode 100644 index 000000000..b6bb319ed --- /dev/null +++ b/demo_shared_js@750779dffd1e/index.html @@ -0,0 +1,2 @@ + +demo_shared_js@750779dffd1e (docs.demo_shared_js@750779dffd1e)

Private library demo_shared_js@750779dffd1e

Library demo_shared_js

This library exposes the following toplevel modules:

diff --git a/demo_shared_native@750779dffd1e/Align/index.html b/demo_shared_native@750779dffd1e/Align/index.html new file mode 100644 index 000000000..a1d42d78c --- /dev/null +++ b/demo_shared_native@750779dffd1e/Align/index.html @@ -0,0 +1,8 @@ + +Align (docs.demo_shared_native@750779dffd1e.Align)

Module Align

type verticalAlign = [
  1. | `top
  2. | `center
  3. | `bottom
]
type horizontalAlign = [
  1. | `left
  2. | `center
  3. | `right
]
val make : + ?key:string -> + ?h:horizontalAlign -> + ?v:verticalAlign -> + children:React.element -> + unit -> + React.element
diff --git a/demo_shared_native@750779dffd1e/App/Hr/index.html b/demo_shared_native@750779dffd1e/App/Hr/index.html new file mode 100644 index 000000000..621f5d2ed --- /dev/null +++ b/demo_shared_native@750779dffd1e/App/Hr/index.html @@ -0,0 +1,2 @@ + +Hr (docs.demo_shared_native@750779dffd1e.App.Hr)

Module App.Hr

val make : ?key:string -> unit -> React.element
diff --git a/demo_shared_native@750779dffd1e/App/Title/Menu/index.html b/demo_shared_native@750779dffd1e/App/Title/Menu/index.html new file mode 100644 index 000000000..d1a23bcc3 --- /dev/null +++ b/demo_shared_native@750779dffd1e/App/Title/Menu/index.html @@ -0,0 +1,2 @@ + +Menu (docs.demo_shared_native@750779dffd1e.App.Title.Menu)

Module Title.Menu

val make : ?key:string -> unit -> React.element
diff --git a/demo_shared_native@750779dffd1e/App/Title/index.html b/demo_shared_native@750779dffd1e/App/Title/index.html new file mode 100644 index 000000000..91e345e45 --- /dev/null +++ b/demo_shared_native@750779dffd1e/App/Title/index.html @@ -0,0 +1,2 @@ + +Title (docs.demo_shared_native@750779dffd1e.App.Title)

Module App.Title

type item = {
  1. label : string;
}
module Menu : sig ... end
val make : ?key:string -> unit -> React.element
diff --git a/demo_shared_native@750779dffd1e/App/index.html b/demo_shared_native@750779dffd1e/App/index.html new file mode 100644 index 000000000..5a73573c2 --- /dev/null +++ b/demo_shared_native@750779dffd1e/App/index.html @@ -0,0 +1,2 @@ + +App (docs.demo_shared_native@750779dffd1e.App)

Module App

module Hr : sig ... end
module Title : sig ... end
val make : ?key:string -> unit -> React.element
diff --git a/demo_shared_native@750779dffd1e/Arrow/index.html b/demo_shared_native@750779dffd1e/Arrow/index.html new file mode 100644 index 000000000..ea39d2775 --- /dev/null +++ b/demo_shared_native@750779dffd1e/Arrow/index.html @@ -0,0 +1,2 @@ + +Arrow (docs.demo_shared_native@750779dffd1e.Arrow)

Module Arrow

type direction =
  1. | Left
  2. | Right
val make : ?key:string -> ?direction:direction -> unit -> React.element
diff --git a/demo_shared_native@750779dffd1e/Context/Provider/index.html b/demo_shared_native@750779dffd1e/Context/Provider/index.html new file mode 100644 index 000000000..5eeaa5e86 --- /dev/null +++ b/demo_shared_native@750779dffd1e/Context/Provider/index.html @@ -0,0 +1,2 @@ + +Provider (docs.demo_shared_native@750779dffd1e.Context.Provider)

Module Context.Provider

include module type of struct include React.Context end
type 'a t = 'a React.context
val provider : 'a t -> 'a React.provider
val context : int React.Context.t
val make : int React.provider
diff --git a/demo_shared_native@750779dffd1e/Context/index.html b/demo_shared_native@750779dffd1e/Context/index.html new file mode 100644 index 000000000..a3b2f7678 --- /dev/null +++ b/demo_shared_native@750779dffd1e/Context/index.html @@ -0,0 +1,2 @@ + +Context (docs.demo_shared_native@750779dffd1e.Context)

Module Context

module Provider : sig ... end
diff --git a/demo_shared_native@750779dffd1e/Counter/index.html b/demo_shared_native@750779dffd1e/Counter/index.html new file mode 100644 index 000000000..7c9c64554 --- /dev/null +++ b/demo_shared_native@750779dffd1e/Counter/index.html @@ -0,0 +1,2 @@ + +Counter (docs.demo_shared_native@750779dffd1e.Counter)

Module Counter

val make : ?key:string -> initial:int -> unit -> React.element
diff --git a/demo_shared_native@750779dffd1e/Cx/index.html b/demo_shared_native@750779dffd1e/Cx/index.html new file mode 100644 index 000000000..1600f9b8b --- /dev/null +++ b/demo_shared_native@750779dffd1e/Cx/index.html @@ -0,0 +1,2 @@ + +Cx (docs.demo_shared_native@750779dffd1e.Cx)

Module Cx

val make : string Belt.List.t -> string
val ifTrue : string -> bool -> string
val ifSome : string -> 'a option -> string
val mapSome : 'a option -> ('b -> string) -> string
val unpack : string option -> string
diff --git a/demo_shared_native@750779dffd1e/HelloWorld/index.html b/demo_shared_native@750779dffd1e/HelloWorld/index.html new file mode 100644 index 000000000..94e70e579 --- /dev/null +++ b/demo_shared_native@750779dffd1e/HelloWorld/index.html @@ -0,0 +1,2 @@ + +HelloWorld (docs.demo_shared_native@750779dffd1e.HelloWorld)

Module HelloWorld

val make : ?key:string -> unit -> React.element
diff --git a/demo_shared_native@750779dffd1e/Layout/index.html b/demo_shared_native@750779dffd1e/Layout/index.html new file mode 100644 index 000000000..348507619 --- /dev/null +++ b/demo_shared_native@750779dffd1e/Layout/index.html @@ -0,0 +1,7 @@ + +Layout (docs.demo_shared_native@750779dffd1e.Layout)

Module Layout

val make : + ?key:string -> + children:React.element -> + background:string -> + unit -> + React.element
diff --git a/demo_shared_native@750779dffd1e/Link/Base/index.html b/demo_shared_native@750779dffd1e/Link/Base/index.html new file mode 100644 index 000000000..3901dd9b2 --- /dev/null +++ b/demo_shared_native@750779dffd1e/Link/Base/index.html @@ -0,0 +1,7 @@ + +Base (docs.demo_shared_native@750779dffd1e.Link.Base)

Module Link.Base

val make : + ?key:string -> + href:string -> + children:React.element -> + unit -> + React.element
diff --git a/demo_shared_native@750779dffd1e/Link/Text/index.html b/demo_shared_native@750779dffd1e/Link/Text/index.html new file mode 100644 index 000000000..363a260f8 --- /dev/null +++ b/demo_shared_native@750779dffd1e/Link/Text/index.html @@ -0,0 +1,7 @@ + +Text (docs.demo_shared_native@750779dffd1e.Link.Text)

Module Link.Text

val make : + ?key:string -> + href:string -> + children:string -> + unit -> + React.element
diff --git a/demo_shared_native@750779dffd1e/Link/WithArrow/index.html b/demo_shared_native@750779dffd1e/Link/WithArrow/index.html new file mode 100644 index 000000000..82e537f7c --- /dev/null +++ b/demo_shared_native@750779dffd1e/Link/WithArrow/index.html @@ -0,0 +1,7 @@ + +WithArrow (docs.demo_shared_native@750779dffd1e.Link.WithArrow)

Module Link.WithArrow

val make : + ?key:string -> + href:string -> + children:string -> + unit -> + React.element
diff --git a/demo_shared_native@750779dffd1e/Link/index.html b/demo_shared_native@750779dffd1e/Link/index.html new file mode 100644 index 000000000..9af26cfc2 --- /dev/null +++ b/demo_shared_native@750779dffd1e/Link/index.html @@ -0,0 +1,2 @@ + +Link (docs.demo_shared_native@750779dffd1e.Link)

Module Link

module Base : sig ... end
module Text : sig ... end
module WithArrow : sig ... end
diff --git a/demo_shared_native@750779dffd1e/MelRaw/index.html b/demo_shared_native@750779dffd1e/MelRaw/index.html new file mode 100644 index 000000000..9f8c609c7 --- /dev/null +++ b/demo_shared_native@750779dffd1e/MelRaw/index.html @@ -0,0 +1,2 @@ + +MelRaw (docs.demo_shared_native@750779dffd1e.MelRaw)

Module MelRaw

val mockInitWebsocket : unit -> 'a
val initWebsocket : unit -> 'a
val x : int
diff --git a/demo_shared_native@750779dffd1e/RR/index.html b/demo_shared_native@750779dffd1e/RR/index.html new file mode 100644 index 000000000..21478901d --- /dev/null +++ b/demo_shared_native@750779dffd1e/RR/index.html @@ -0,0 +1,2 @@ + +RR (docs.demo_shared_native@750779dffd1e.RR)

Module RR

val useStateValue : 'a -> 'b * ('c -> unit)
diff --git a/demo_shared_native@750779dffd1e/Router/index.html b/demo_shared_native@750779dffd1e/Router/index.html new file mode 100644 index 000000000..74959b11b --- /dev/null +++ b/demo_shared_native@750779dffd1e/Router/index.html @@ -0,0 +1,2 @@ + +Router (docs.demo_shared_native@750779dffd1e.Router)

Module Router

val home : string
val renderToStaticMarkup : string
val renderToString : string
val renderToLwtStream : string
diff --git a/demo_shared_native@750779dffd1e/Row/index.html b/demo_shared_native@750779dffd1e/Row/index.html new file mode 100644 index 000000000..968028074 --- /dev/null +++ b/demo_shared_native@750779dffd1e/Row/index.html @@ -0,0 +1,11 @@ + +Row (docs.demo_shared_native@750779dffd1e.Row)

Module Row

val make : + ?key:string -> + ?gap:int -> + ?align:Theme.align -> + ?justify:Theme.justify -> + ?fullHeight:bool -> + ?fullWidth:bool -> + children:React.element -> + unit -> + React.element
diff --git a/demo_shared_native@750779dffd1e/Spacer/index.html b/demo_shared_native@750779dffd1e/Spacer/index.html new file mode 100644 index 000000000..88d8ec7e7 --- /dev/null +++ b/demo_shared_native@750779dffd1e/Spacer/index.html @@ -0,0 +1,11 @@ + +Spacer (docs.demo_shared_native@750779dffd1e.Spacer)

Module Spacer

val unsafeWhenNotZero : string -> int -> string list
val make : + ?key:string -> + ?children:React.element -> + ?top:int -> + ?left:int -> + ?right:int -> + ?bottom:int -> + ?all:int -> + unit -> + React.element
diff --git a/demo_shared_native@750779dffd1e/Stack/index.html b/demo_shared_native@750779dffd1e/Stack/index.html new file mode 100644 index 000000000..998827b05 --- /dev/null +++ b/demo_shared_native@750779dffd1e/Stack/index.html @@ -0,0 +1,10 @@ + +Stack (docs.demo_shared_native@750779dffd1e.Stack)

Module Stack

val make : + ?key:string -> + ?gap:int -> + ?align:[< `center | `end_ | `start start ] -> + ?justify:[< `around | `between | `center | `end_ | `evenly | `start around ] -> + ?fullHeight:bool -> + children:React.element -> + unit -> + React.element
diff --git a/demo_shared_native@750779dffd1e/Text/index.html b/demo_shared_native@750779dffd1e/Text/index.html new file mode 100644 index 000000000..b720baa9f --- /dev/null +++ b/demo_shared_native@750779dffd1e/Text/index.html @@ -0,0 +1,10 @@ + +Text (docs.demo_shared_native@750779dffd1e.Text)

Module Text

type size =
  1. | XSmall
  2. | Small
  3. | Medium
  4. | Large
  5. | XLarge
  6. | XXLarge
  7. | XXXLarge
type weight =
  1. | Thin
  2. | Light
  3. | Regular
  4. | Medium
  5. | Semibold
  6. | Bold
  7. | Extrabold
  8. | Black
type align =
  1. | Left
  2. | Center
  3. | Right
  4. | Justify
val make : + ?key:string -> + color:string -> + ?size:size -> + ?weight:weight -> + ?align:align -> + children:string -> + unit -> + React.element
diff --git a/demo_shared_native@750779dffd1e/Theme/Color/index.html b/demo_shared_native@750779dffd1e/Theme/Color/index.html new file mode 100644 index 000000000..2a9f11b8b --- /dev/null +++ b/demo_shared_native@750779dffd1e/Theme/Color/index.html @@ -0,0 +1,2 @@ + +Color (docs.demo_shared_native@750779dffd1e.Theme.Color)

Module Theme.Color

val brokenWhite : string
val white : string
val yellow : string
val darkYellow : string
val black : string
val reason : string
val react : string
val ahrefs : string
diff --git a/demo_shared_native@750779dffd1e/Theme/Media/index.html b/demo_shared_native@750779dffd1e/Theme/Media/index.html new file mode 100644 index 000000000..caddfbc6a --- /dev/null +++ b/demo_shared_native@750779dffd1e/Theme/Media/index.html @@ -0,0 +1,2 @@ + +Media (docs.demo_shared_native@750779dffd1e.Theme.Media)

Module Theme.Media

val onDesktop : string list -> string
diff --git a/demo_shared_native@750779dffd1e/Theme/index.html b/demo_shared_native@750779dffd1e/Theme/index.html new file mode 100644 index 000000000..a4b98e768 --- /dev/null +++ b/demo_shared_native@750779dffd1e/Theme/index.html @@ -0,0 +1,2 @@ + +Theme (docs.demo_shared_native@750779dffd1e.Theme)

Module Theme

type align = [
  1. | `start
  2. | `center
  3. | `end_
]
type justify = [
  1. | `around
  2. | `between
  3. | `evenly
  4. | `start
  5. | `center
  6. | `end_
]
module Media : sig ... end
module Color : sig ... end
val text : string -> string
val background : string -> string
val hover : string list -> string
diff --git a/demo_shared_native@750779dffd1e/index.html b/demo_shared_native@750779dffd1e/index.html new file mode 100644 index 000000000..1c6bce8c2 --- /dev/null +++ b/demo_shared_native@750779dffd1e/index.html @@ -0,0 +1,2 @@ + +demo_shared_native@750779dffd1e (docs.demo_shared_native@750779dffd1e)

Private library demo_shared_native@750779dffd1e

Library demo_shared_native

This library exposes the following toplevel modules:

diff --git a/findlib-0/compiler-libs/Afl_instrument/index.html b/findlib-0/compiler-libs/Afl_instrument/index.html new file mode 100644 index 000000000..5a6cb1064 --- /dev/null +++ b/findlib-0/compiler-libs/Afl_instrument/index.html @@ -0,0 +1,5 @@ + +Afl_instrument (docs.findlib-0.compiler-libs.Afl_instrument)

Module Afl_instrument

Instrumentation for afl-fuzz.

val instrument_function : Cmm.expression -> Debuginfo.t -> Cmm.expression
val instrument_initialiser : + Cmm.expression -> + (unit -> Debuginfo.t) -> + Cmm.expression
diff --git a/findlib-0/compiler-libs/Alias_analysis/index.html b/findlib-0/compiler-libs/Alias_analysis/index.html new file mode 100644 index 000000000..d78ce42da --- /dev/null +++ b/findlib-0/compiler-libs/Alias_analysis/index.html @@ -0,0 +1,10 @@ + +Alias_analysis (docs.findlib-0.compiler-libs.Alias_analysis)

Module Alias_analysis

type allocation_point =
  1. | Symbol of Symbol.t
  2. | Variable of Variable.t
type allocated_const =
  1. | Normal of Allocated_const.t
  2. | Array of Lambda.array_kind * Asttypes.mutable_flag * Variable.t list
  3. | Duplicate_array of Lambda.array_kind * Asttypes.mutable_flag * Variable.t
type constant_defining_value =
  1. | Allocated_const of allocated_const
  2. | Block of Tag.t * Variable.t list
  3. | Set_of_closures of Flambda.set_of_closures
  4. | Project_closure of Flambda.project_closure
  5. | Move_within_set_of_closures of Flambda.move_within_set_of_closures
  6. | Project_var of Flambda.project_var
  7. | Field of Variable.t * int
  8. | Symbol_field of Symbol.t * int
  9. | Const of Flambda.const
  10. | Symbol of Symbol.t
  11. | Variable of Variable.t
type initialize_symbol_field = Variable.t option

Simple alias analysis working over information about which symbols have been assigned to variables; and which constants have been assigned to symbols. The return value gives the assignment of the defining values of constants to variables. Also see comments for Lift_constants, whose input feeds this pass.

Variables found to be ill-typed accesses to other constants, for example arising from dead code, will be pointed at the_dead_constant.

val print_constant_defining_value : + Format.formatter -> + constant_defining_value -> + unit
diff --git a/findlib-0/compiler-libs/Allocated_const/index.html b/findlib-0/compiler-libs/Allocated_const/index.html new file mode 100644 index 000000000..d6cca8f8a --- /dev/null +++ b/findlib-0/compiler-libs/Allocated_const/index.html @@ -0,0 +1,2 @@ + +Allocated_const (docs.findlib-0.compiler-libs.Allocated_const)

Module Allocated_const

Constants that are always allocated (possibly statically). Blocks are not included here since they are always encoded using Prim (Pmakeblock, ...).

type t =
  1. | Float of float
  2. | Int32 of int32
  3. | Int64 of int64
  4. | Nativeint of nativeint
  5. | Float_array of float list
  6. | Immutable_float_array of float list
  7. | String of string
  8. | Immutable_string of string
val compare_floats : float -> float -> int
val compare : t -> t -> int
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Annot/index.html b/findlib-0/compiler-libs/Annot/index.html new file mode 100644 index 000000000..eafb6430a --- /dev/null +++ b/findlib-0/compiler-libs/Annot/index.html @@ -0,0 +1,2 @@ + +Annot (docs.findlib-0.compiler-libs.Annot)

Module Annot

type call =
  1. | Tail
  2. | Stack
  3. | Inline
type ident =
  1. | Iref_internal of Location.t
  2. | Iref_external
  3. | Idef of Location.t
diff --git a/findlib-0/compiler-libs/Arch/index.html b/findlib-0/compiler-libs/Arch/index.html new file mode 100644 index 000000000..1f4ab230d --- /dev/null +++ b/findlib-0/compiler-libs/Arch/index.html @@ -0,0 +1,14 @@ + +Arch (docs.findlib-0.compiler-libs.Arch)

Module Arch

val command_line_options : (string * Arg.spec * string) list
type addressing_mode =
  1. | Ibased of string * int
  2. | Iindexed of int
  3. | Iindexed2 of int
  4. | Iscaled of int * int
  5. | Iindexed2scaled of int * int
type specific_operation =
  1. | Ilea of addressing_mode
  2. | Istore_int of nativeint * addressing_mode * bool
  3. | Ioffset_loc of int * addressing_mode
  4. | Ifloatarithmem of float_operation * addressing_mode
  5. | Ibswap of int
  6. | Isqrtf
  7. | Ifloatsqrtf of addressing_mode
  8. | Isextend32
  9. | Izextend32
and float_operation =
  1. | Ifloatadd
  2. | Ifloatsub
  3. | Ifloatmul
  4. | Ifloatdiv
val big_endian : bool
val size_addr : int
val size_int : int
val size_float : int
val allow_unaligned_access : bool
val division_crashes_on_overflow : bool
val identity_addressing : addressing_mode
val offset_addressing : addressing_mode -> int -> addressing_mode
val num_args_addressing : addressing_mode -> int
val print_addressing : + (Format.formatter -> 'a -> unit) -> + addressing_mode -> + Format.formatter -> + 'a array -> + unit
val print_specific_operation : + (Format.formatter -> 'a -> unit) -> + specific_operation -> + Format.formatter -> + 'a array -> + unit
val win64 : bool
val operation_is_pure : specific_operation -> bool
val operation_can_raise : specific_operation -> bool
val float_cond_and_need_swap : + Lambda.float_comparison -> + X86_ast.float_condition * bool
diff --git a/findlib-0/compiler-libs/Arg_helper/Make/argument-1-S/Key/Map/index.html b/findlib-0/compiler-libs/Arg_helper/Make/argument-1-S/Key/Map/index.html new file mode 100644 index 000000000..9ed576160 --- /dev/null +++ b/findlib-0/compiler-libs/Arg_helper/Make/argument-1-S/Key/Map/index.html @@ -0,0 +1,8 @@ + +Map (docs.findlib-0.compiler-libs.Arg_helper.Make.S.Key.Map)

Module Key.Map

Maps

type key = t

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Arg_helper/Make/argument-1-S/Key/index.html b/findlib-0/compiler-libs/Arg_helper/Make/argument-1-S/Key/index.html new file mode 100644 index 000000000..d4aa71e3c --- /dev/null +++ b/findlib-0/compiler-libs/Arg_helper/Make/argument-1-S/Key/index.html @@ -0,0 +1,2 @@ + +Key (docs.findlib-0.compiler-libs.Arg_helper.Make.S.Key)

Module S.Key

type t
val of_string : string -> t

The textual representation of a key must not contain '=' or ','.

module Map : Map.S with type key = t
diff --git a/findlib-0/compiler-libs/Arg_helper/Make/argument-1-S/Value/index.html b/findlib-0/compiler-libs/Arg_helper/Make/argument-1-S/Value/index.html new file mode 100644 index 000000000..f657fd7d8 --- /dev/null +++ b/findlib-0/compiler-libs/Arg_helper/Make/argument-1-S/Value/index.html @@ -0,0 +1,2 @@ + +Value (docs.findlib-0.compiler-libs.Arg_helper.Make.S.Value)

Module S.Value

type t
val of_string : string -> t

The textual representation of a value must not contain ','.

diff --git a/findlib-0/compiler-libs/Arg_helper/Make/argument-1-S/index.html b/findlib-0/compiler-libs/Arg_helper/Make/argument-1-S/index.html new file mode 100644 index 000000000..de59183fc --- /dev/null +++ b/findlib-0/compiler-libs/Arg_helper/Make/argument-1-S/index.html @@ -0,0 +1,2 @@ + +S (docs.findlib-0.compiler-libs.Arg_helper.Make.S)

Parameter Make.S

module Key : sig ... end
module Value : sig ... end
diff --git a/findlib-0/compiler-libs/Arg_helper/Make/index.html b/findlib-0/compiler-libs/Arg_helper/Make/index.html new file mode 100644 index 000000000..d93347e30 --- /dev/null +++ b/findlib-0/compiler-libs/Arg_helper/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.findlib-0.compiler-libs.Arg_helper.Make)

Module Arg_helper.Make

Parameters

module S : sig ... end

Signature

type parsed
val default : S.Value.t -> parsed
val set_base_default : S.Value.t -> parsed -> parsed
val add_base_override : S.Key.t -> S.Value.t -> parsed -> parsed
val reset_base_overrides : parsed -> parsed
val set_user_default : S.Value.t -> parsed -> parsed
val add_user_override : S.Key.t -> S.Value.t -> parsed -> parsed
val parse : string -> string -> parsed ref -> unit
type parse_result =
  1. | Ok
  2. | Parse_failed of exn
val parse_no_error : string -> parsed ref -> parse_result
val get : key:S.Key.t -> parsed -> S.Value.t
diff --git a/findlib-0/compiler-libs/Arg_helper/index.html b/findlib-0/compiler-libs/Arg_helper/index.html new file mode 100644 index 000000000..7c80f6ba4 --- /dev/null +++ b/findlib-0/compiler-libs/Arg_helper/index.html @@ -0,0 +1,2 @@ + +Arg_helper (docs.findlib-0.compiler-libs.Arg_helper)

Module Arg_helper

Decipher command line arguments of the form <value> | <key>=<value>,...

(as used for example for the specification of inlining parameters varying by simplification round).

Warning: this module is unstable and part of compiler-libs.

module Make (S : sig ... end) : sig ... end
diff --git a/findlib-0/compiler-libs/Asmgen/index.html b/findlib-0/compiler-libs/Asmgen/index.html new file mode 100644 index 000000000..81fc463e3 --- /dev/null +++ b/findlib-0/compiler-libs/Asmgen/index.html @@ -0,0 +1,20 @@ + +Asmgen (docs.findlib-0.compiler-libs.Asmgen)

Module Asmgen

From Lambda to assembly code

type middle_end = + backend:(module Backend_intf.S) -> + prefixname:string -> + ppf_dump:Format.formatter -> + Lambda.program -> + Clambda.with_constants

The type of converters from Lambda to Clambda.

val compile_implementation : + ?toplevel:(string -> bool) -> + backend:(module Backend_intf.S) -> + prefixname:string -> + middle_end:middle_end -> + ppf_dump:Format.formatter -> + Lambda.program -> + unit

Compile an implementation from Lambda using the given middle end.

val compile_implementation_linear : string -> progname:string -> unit
val compile_phrase : ppf_dump:Format.formatter -> Cmm.phrase -> unit
type error =
  1. | Assembler_error of string
  2. | Mismatched_for_pack of string option
  3. | Asm_generation of string * Emitaux.error
exception Error of error
val report_error : Format.formatter -> error -> unit
val compile_unit : + output_prefix:string -> + asm_filename:string -> + keep_asm:bool -> + obj_filename:string -> + (unit -> unit) -> + unit
diff --git a/findlib-0/compiler-libs/Asmlibrarian/index.html b/findlib-0/compiler-libs/Asmlibrarian/index.html new file mode 100644 index 000000000..0d63317b4 --- /dev/null +++ b/findlib-0/compiler-libs/Asmlibrarian/index.html @@ -0,0 +1,2 @@ + +Asmlibrarian (docs.findlib-0.compiler-libs.Asmlibrarian)

Module Asmlibrarian

val create_archive : string list -> string -> unit
type error =
  1. | File_not_found of string
  2. | Archiver_error of string
exception Error of error
val report_error : Format.formatter -> error -> unit
diff --git a/findlib-0/compiler-libs/Asmlink/index.html b/findlib-0/compiler-libs/Asmlink/index.html new file mode 100644 index 000000000..c45d3c09f --- /dev/null +++ b/findlib-0/compiler-libs/Asmlink/index.html @@ -0,0 +1,6 @@ + +Asmlink (docs.findlib-0.compiler-libs.Asmlink)

Module Asmlink

val call_linker_shared : string list -> string -> unit
val reset : unit -> unit
val check_consistency : + Misc.filepath -> + Cmx_format.unit_infos -> + Digest.t -> + unit
val extract_crc_interfaces : unit -> Misc.crcs
val extract_crc_implementations : unit -> Misc.crcs
type error =
  1. | File_not_found of Misc.filepath
  2. | Not_an_object_file of Misc.filepath
  3. | Missing_implementations of (Misc.modname * string list) list
  4. | Inconsistent_interface of Misc.modname * Misc.filepath * Misc.filepath
  5. | Inconsistent_implementation of Misc.modname * Misc.filepath * Misc.filepath
  6. | Assembler_error of Misc.filepath
  7. | Linking_error of int
  8. | Multiple_definition of Misc.modname * Misc.filepath * Misc.filepath
  9. | Missing_cmx of Misc.filepath * Misc.modname
exception Error of error
val report_error : Format.formatter -> error -> unit
diff --git a/findlib-0/compiler-libs/Asmpackager/index.html b/findlib-0/compiler-libs/Asmpackager/index.html new file mode 100644 index 000000000..524c1f9b4 --- /dev/null +++ b/findlib-0/compiler-libs/Asmpackager/index.html @@ -0,0 +1,8 @@ + +Asmpackager (docs.findlib-0.compiler-libs.Asmpackager)

Module Asmpackager

val package_files : + ppf_dump:Format.formatter -> + Env.t -> + string list -> + string -> + backend:(module Backend_intf.S) -> + unit
type error =
  1. | Illegal_renaming of string * string * string
  2. | Forward_reference of string * string
  3. | Wrong_for_pack of string * string
  4. | Linking_error
  5. | Assembler_error of string
  6. | File_not_found of string
exception Error of error
val report_error : Format.formatter -> error -> unit
diff --git a/findlib-0/compiler-libs/Ast_helper/Attr/index.html b/findlib-0/compiler-libs/Ast_helper/Attr/index.html new file mode 100644 index 000000000..e5348b622 --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Attr/index.html @@ -0,0 +1,2 @@ + +Attr (docs.findlib-0.compiler-libs.Ast_helper.Attr)

Module Ast_helper.Attr

Attributes

diff --git a/findlib-0/compiler-libs/Ast_helper/Cf/index.html b/findlib-0/compiler-libs/Ast_helper/Cf/index.html new file mode 100644 index 000000000..fe9f73aab --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Cf/index.html @@ -0,0 +1,44 @@ + +Cf (docs.findlib-0.compiler-libs.Ast_helper.Cf)

Module Ast_helper.Cf

Class fields

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + Parsetree.class_field_desc -> + Parsetree.class_field
val inherit_ : + ?loc:loc -> + ?attrs:attrs -> + Asttypes.override_flag -> + Parsetree.class_expr -> + str option -> + Parsetree.class_field
val val_ : + ?loc:loc -> + ?attrs:attrs -> + str -> + Asttypes.mutable_flag -> + Parsetree.class_field_kind -> + Parsetree.class_field
val method_ : + ?loc:loc -> + ?attrs:attrs -> + str -> + Asttypes.private_flag -> + Parsetree.class_field_kind -> + Parsetree.class_field
val constraint_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.core_type -> + Parsetree.core_type -> + Parsetree.class_field
val initializer_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression -> + Parsetree.class_field
val extension : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.extension -> + Parsetree.class_field
val attribute : ?loc:loc -> Parsetree.attribute -> Parsetree.class_field
diff --git a/findlib-0/compiler-libs/Ast_helper/Ci/index.html b/findlib-0/compiler-libs/Ast_helper/Ci/index.html new file mode 100644 index 000000000..b8ce24e3b --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Ci/index.html @@ -0,0 +1,12 @@ + +Ci (docs.findlib-0.compiler-libs.Ast_helper.Ci)

Module Ast_helper.Ci

Classes

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?text:Docstrings.text -> + ?virt:Asttypes.virtual_flag -> + ?params: + (Parsetree.core_type * (Asttypes.variance * Asttypes.injectivity)) list -> + str -> + 'a -> + 'a Parsetree.class_infos
diff --git a/findlib-0/compiler-libs/Ast_helper/Cl/index.html b/findlib-0/compiler-libs/Ast_helper/Cl/index.html new file mode 100644 index 000000000..4ddd95d6d --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Cl/index.html @@ -0,0 +1,47 @@ + +Cl (docs.findlib-0.compiler-libs.Ast_helper.Cl)

Module Ast_helper.Cl

Class expressions

val mk : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.class_expr_desc -> + Parsetree.class_expr
val constr : + ?loc:loc -> + ?attrs:attrs -> + lid -> + Parsetree.core_type list -> + Parsetree.class_expr
val structure : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.class_structure -> + Parsetree.class_expr
val apply : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.class_expr -> + (Asttypes.arg_label * Parsetree.expression) list -> + Parsetree.class_expr
val let_ : + ?loc:loc -> + ?attrs:attrs -> + Asttypes.rec_flag -> + Parsetree.value_binding list -> + Parsetree.class_expr -> + Parsetree.class_expr
val constraint_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.class_expr -> + Parsetree.class_type -> + Parsetree.class_expr
val extension : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.extension -> + Parsetree.class_expr
val open_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.open_description -> + Parsetree.class_expr -> + Parsetree.class_expr
diff --git a/findlib-0/compiler-libs/Ast_helper/Const/index.html b/findlib-0/compiler-libs/Ast_helper/Const/index.html new file mode 100644 index 000000000..cd491e47f --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Const/index.html @@ -0,0 +1,6 @@ + +Const (docs.findlib-0.compiler-libs.Ast_helper.Const)

Module Ast_helper.Const

val char : char -> Parsetree.constant
val string : + ?quotation_delimiter:string -> + ?loc:Location.t -> + string -> + Parsetree.constant
val integer : ?suffix:char -> string -> Parsetree.constant
val int : ?suffix:char -> int -> Parsetree.constant
val int32 : ?suffix:char -> int32 -> Parsetree.constant
val int64 : ?suffix:char -> int64 -> Parsetree.constant
val nativeint : ?suffix:char -> nativeint -> Parsetree.constant
val float : ?suffix:char -> string -> Parsetree.constant
diff --git a/findlib-0/compiler-libs/Ast_helper/Csig/index.html b/findlib-0/compiler-libs/Ast_helper/Csig/index.html new file mode 100644 index 000000000..a5ce1504f --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Csig/index.html @@ -0,0 +1,5 @@ + +Csig (docs.findlib-0.compiler-libs.Ast_helper.Csig)

Module Ast_helper.Csig

Class signatures

diff --git a/findlib-0/compiler-libs/Ast_helper/Cstr/index.html b/findlib-0/compiler-libs/Ast_helper/Cstr/index.html new file mode 100644 index 000000000..c049f0498 --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Cstr/index.html @@ -0,0 +1,5 @@ + +Cstr (docs.findlib-0.compiler-libs.Ast_helper.Cstr)

Module Ast_helper.Cstr

Class structures

diff --git a/findlib-0/compiler-libs/Ast_helper/Ctf/index.html b/findlib-0/compiler-libs/Ast_helper/Ctf/index.html new file mode 100644 index 000000000..c92aada67 --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Ctf/index.html @@ -0,0 +1,37 @@ + +Ctf (docs.findlib-0.compiler-libs.Ast_helper.Ctf)

Module Ast_helper.Ctf

Class type fields

val inherit_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.class_type -> + Parsetree.class_type_field
val constraint_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.core_type -> + Parsetree.core_type -> + Parsetree.class_type_field
val extension : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.extension -> + Parsetree.class_type_field
diff --git a/findlib-0/compiler-libs/Ast_helper/Cty/index.html b/findlib-0/compiler-libs/Ast_helper/Cty/index.html new file mode 100644 index 000000000..f19b48ae5 --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Cty/index.html @@ -0,0 +1,30 @@ + +Cty (docs.findlib-0.compiler-libs.Ast_helper.Cty)

Module Ast_helper.Cty

Class type expressions

val mk : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.class_type_desc -> + Parsetree.class_type
val constr : + ?loc:loc -> + ?attrs:attrs -> + lid -> + Parsetree.core_type list -> + Parsetree.class_type
val signature : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.class_signature -> + Parsetree.class_type
val extension : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.extension -> + Parsetree.class_type
val open_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.open_description -> + Parsetree.class_type -> + Parsetree.class_type
diff --git a/findlib-0/compiler-libs/Ast_helper/Exp/index.html b/findlib-0/compiler-libs/Ast_helper/Exp/index.html new file mode 100644 index 000000000..cf6e768bf --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Exp/index.html @@ -0,0 +1,186 @@ + +Exp (docs.findlib-0.compiler-libs.Ast_helper.Exp)

Module Ast_helper.Exp

Expressions

val mk : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression_desc -> + Parsetree.expression
val ident : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.expression
val constant : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.constant -> + Parsetree.expression
val let_ : + ?loc:loc -> + ?attrs:attrs -> + Asttypes.rec_flag -> + Parsetree.value_binding list -> + Parsetree.expression -> + Parsetree.expression
val function_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.case list -> + Parsetree.expression
val apply : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression -> + (Asttypes.arg_label * Parsetree.expression) list -> + Parsetree.expression
val match_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression -> + Parsetree.case list -> + Parsetree.expression
val try_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression -> + Parsetree.case list -> + Parsetree.expression
val tuple : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression list -> + Parsetree.expression
val construct : + ?loc:loc -> + ?attrs:attrs -> + lid -> + Parsetree.expression option -> + Parsetree.expression
val variant : + ?loc:loc -> + ?attrs:attrs -> + Asttypes.label -> + Parsetree.expression option -> + Parsetree.expression
val record : + ?loc:loc -> + ?attrs:attrs -> + (lid * Parsetree.expression) list -> + Parsetree.expression option -> + Parsetree.expression
val field : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression -> + lid -> + Parsetree.expression
val setfield : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression -> + lid -> + Parsetree.expression -> + Parsetree.expression
val array : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression list -> + Parsetree.expression
val ifthenelse : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression -> + Parsetree.expression -> + Parsetree.expression option -> + Parsetree.expression
val sequence : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression -> + Parsetree.expression -> + Parsetree.expression
val while_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression -> + Parsetree.expression -> + Parsetree.expression
val coerce : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression -> + Parsetree.core_type option -> + Parsetree.core_type -> + Parsetree.expression
val constraint_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression -> + Parsetree.core_type -> + Parsetree.expression
val send : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression -> + str -> + Parsetree.expression
val new_ : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.expression
val setinstvar : + ?loc:loc -> + ?attrs:attrs -> + str -> + Parsetree.expression -> + Parsetree.expression
val override : + ?loc:loc -> + ?attrs:attrs -> + (str * Parsetree.expression) list -> + Parsetree.expression
val letmodule : + ?loc:loc -> + ?attrs:attrs -> + str_opt -> + Parsetree.module_expr -> + Parsetree.expression -> + Parsetree.expression
val letexception : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.extension_constructor -> + Parsetree.expression -> + Parsetree.expression
val assert_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression -> + Parsetree.expression
val lazy_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression -> + Parsetree.expression
val poly : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression -> + Parsetree.core_type option -> + Parsetree.expression
val object_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.class_structure -> + Parsetree.expression
val newtype : + ?loc:loc -> + ?attrs:attrs -> + str -> + Parsetree.expression -> + Parsetree.expression
val pack : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.module_expr -> + Parsetree.expression
val open_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.open_declaration -> + Parsetree.expression -> + Parsetree.expression
val letop : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.binding_op -> + Parsetree.binding_op list -> + Parsetree.expression -> + Parsetree.expression
val extension : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.extension -> + Parsetree.expression
val unreachable : ?loc:loc -> ?attrs:attrs -> unit -> Parsetree.expression
val binding_op : + str -> + Parsetree.pattern -> + Parsetree.expression -> + loc -> + Parsetree.binding_op
diff --git a/findlib-0/compiler-libs/Ast_helper/Incl/index.html b/findlib-0/compiler-libs/Ast_helper/Incl/index.html new file mode 100644 index 000000000..215ae2453 --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Incl/index.html @@ -0,0 +1,7 @@ + +Incl (docs.findlib-0.compiler-libs.Ast_helper.Incl)

Module Ast_helper.Incl

Includes

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + 'a -> + 'a Parsetree.include_infos
diff --git a/findlib-0/compiler-libs/Ast_helper/Mb/index.html b/findlib-0/compiler-libs/Ast_helper/Mb/index.html new file mode 100644 index 000000000..c034da755 --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Mb/index.html @@ -0,0 +1,9 @@ + +Mb (docs.findlib-0.compiler-libs.Ast_helper.Mb)

Module Ast_helper.Mb

Module bindings

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?text:Docstrings.text -> + str_opt -> + Parsetree.module_expr -> + Parsetree.module_binding
diff --git a/findlib-0/compiler-libs/Ast_helper/Md/index.html b/findlib-0/compiler-libs/Ast_helper/Md/index.html new file mode 100644 index 000000000..46cffdd6e --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Md/index.html @@ -0,0 +1,9 @@ + +Md (docs.findlib-0.compiler-libs.Ast_helper.Md)

Module Ast_helper.Md

Module declarations

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?text:Docstrings.text -> + str_opt -> + Parsetree.module_type -> + Parsetree.module_declaration
diff --git a/findlib-0/compiler-libs/Ast_helper/Mod/index.html b/findlib-0/compiler-libs/Ast_helper/Mod/index.html new file mode 100644 index 000000000..fbf142ac1 --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Mod/index.html @@ -0,0 +1,40 @@ + +Mod (docs.findlib-0.compiler-libs.Ast_helper.Mod)

Module Ast_helper.Mod

Module expressions

val mk : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.module_expr_desc -> + Parsetree.module_expr
val ident : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.module_expr
val structure : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.structure -> + Parsetree.module_expr
val functor_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.functor_parameter -> + Parsetree.module_expr -> + Parsetree.module_expr
val apply : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.module_expr -> + Parsetree.module_expr -> + Parsetree.module_expr
val apply_unit : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.module_expr -> + Parsetree.module_expr
val constraint_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.module_expr -> + Parsetree.module_type -> + Parsetree.module_expr
val unpack : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.expression -> + Parsetree.module_expr
val extension : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.extension -> + Parsetree.module_expr
diff --git a/findlib-0/compiler-libs/Ast_helper/Ms/index.html b/findlib-0/compiler-libs/Ast_helper/Ms/index.html new file mode 100644 index 000000000..09c701805 --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Ms/index.html @@ -0,0 +1,9 @@ + +Ms (docs.findlib-0.compiler-libs.Ast_helper.Ms)

Module Ast_helper.Ms

Module substitutions

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?text:Docstrings.text -> + str -> + lid -> + Parsetree.module_substitution
diff --git a/findlib-0/compiler-libs/Ast_helper/Mtd/index.html b/findlib-0/compiler-libs/Ast_helper/Mtd/index.html new file mode 100644 index 000000000..98969ff28 --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Mtd/index.html @@ -0,0 +1,9 @@ + +Mtd (docs.findlib-0.compiler-libs.Ast_helper.Mtd)

Module Ast_helper.Mtd

Module type declarations

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?text:Docstrings.text -> + ?typ:Parsetree.module_type -> + str -> + Parsetree.module_type_declaration
diff --git a/findlib-0/compiler-libs/Ast_helper/Mty/index.html b/findlib-0/compiler-libs/Ast_helper/Mty/index.html new file mode 100644 index 000000000..675016925 --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Mty/index.html @@ -0,0 +1,31 @@ + +Mty (docs.findlib-0.compiler-libs.Ast_helper.Mty)

Module Ast_helper.Mty

Module type expressions

val mk : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.module_type_desc -> + Parsetree.module_type
val ident : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.module_type
val alias : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.module_type
val signature : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.signature -> + Parsetree.module_type
val functor_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.functor_parameter -> + Parsetree.module_type -> + Parsetree.module_type
val with_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.module_type -> + Parsetree.with_constraint list -> + Parsetree.module_type
val typeof_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.module_expr -> + Parsetree.module_type
val extension : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.extension -> + Parsetree.module_type
diff --git a/findlib-0/compiler-libs/Ast_helper/Of/index.html b/findlib-0/compiler-libs/Ast_helper/Of/index.html new file mode 100644 index 000000000..0626bf97a --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Of/index.html @@ -0,0 +1,11 @@ + +Of (docs.findlib-0.compiler-libs.Ast_helper.Of)

Module Ast_helper.Of

Object fields

val mk : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.object_field_desc -> + Parsetree.object_field
val tag : + ?loc:loc -> + ?attrs:attrs -> + Asttypes.label with_loc -> + Parsetree.core_type -> + Parsetree.object_field
diff --git a/findlib-0/compiler-libs/Ast_helper/Opn/index.html b/findlib-0/compiler-libs/Ast_helper/Opn/index.html new file mode 100644 index 000000000..0354edd3d --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Opn/index.html @@ -0,0 +1,8 @@ + +Opn (docs.findlib-0.compiler-libs.Ast_helper.Opn)

Module Ast_helper.Opn

Opens

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?override:Asttypes.override_flag -> + 'a -> + 'a Parsetree.open_infos
diff --git a/findlib-0/compiler-libs/Ast_helper/Pat/index.html b/findlib-0/compiler-libs/Ast_helper/Pat/index.html new file mode 100644 index 000000000..91611e8ce --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Pat/index.html @@ -0,0 +1,66 @@ + +Pat (docs.findlib-0.compiler-libs.Ast_helper.Pat)

Module Ast_helper.Pat

Patterns

val mk : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.pattern_desc -> + Parsetree.pattern
val any : ?loc:loc -> ?attrs:attrs -> unit -> Parsetree.pattern
val var : ?loc:loc -> ?attrs:attrs -> str -> Parsetree.pattern
val alias : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.pattern -> + str -> + Parsetree.pattern
val constant : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.constant -> + Parsetree.pattern
val interval : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.constant -> + Parsetree.constant -> + Parsetree.pattern
val tuple : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.pattern list -> + Parsetree.pattern
val construct : + ?loc:loc -> + ?attrs:attrs -> + lid -> + (str list * Parsetree.pattern) option -> + Parsetree.pattern
val variant : + ?loc:loc -> + ?attrs:attrs -> + Asttypes.label -> + Parsetree.pattern option -> + Parsetree.pattern
val record : + ?loc:loc -> + ?attrs:attrs -> + (lid * Parsetree.pattern) list -> + Asttypes.closed_flag -> + Parsetree.pattern
val array : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.pattern list -> + Parsetree.pattern
val or_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.pattern -> + Parsetree.pattern -> + Parsetree.pattern
val constraint_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.pattern -> + Parsetree.core_type -> + Parsetree.pattern
val type_ : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.pattern
val lazy_ : ?loc:loc -> ?attrs:attrs -> Parsetree.pattern -> Parsetree.pattern
val unpack : ?loc:loc -> ?attrs:attrs -> str_opt -> Parsetree.pattern
val open_ : + ?loc:loc -> + ?attrs:attrs -> + lid -> + Parsetree.pattern -> + Parsetree.pattern
val exception_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.pattern -> + Parsetree.pattern
val extension : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.extension -> + Parsetree.pattern
diff --git a/findlib-0/compiler-libs/Ast_helper/Rf/index.html b/findlib-0/compiler-libs/Ast_helper/Rf/index.html new file mode 100644 index 000000000..2b463a6e1 --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Rf/index.html @@ -0,0 +1,12 @@ + +Rf (docs.findlib-0.compiler-libs.Ast_helper.Rf)

Module Ast_helper.Rf

Row fields

val mk : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.row_field_desc -> + Parsetree.row_field
val tag : + ?loc:loc -> + ?attrs:attrs -> + Asttypes.label with_loc -> + bool -> + Parsetree.core_type list -> + Parsetree.row_field
val inherit_ : ?loc:loc -> Parsetree.core_type -> Parsetree.row_field
diff --git a/findlib-0/compiler-libs/Ast_helper/Sig/index.html b/findlib-0/compiler-libs/Ast_helper/Sig/index.html new file mode 100644 index 000000000..fad96d7ba --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Sig/index.html @@ -0,0 +1,43 @@ + +Sig (docs.findlib-0.compiler-libs.Ast_helper.Sig)

Module Ast_helper.Sig

Signature items

val type_subst : + ?loc:loc -> + Parsetree.type_declaration list -> + Parsetree.signature_item
val type_extension : + ?loc:loc -> + Parsetree.type_extension -> + Parsetree.signature_item
val exception_ : + ?loc:loc -> + Parsetree.type_exception -> + Parsetree.signature_item
val rec_module : + ?loc:loc -> + Parsetree.module_declaration list -> + Parsetree.signature_item
val class_ : + ?loc:loc -> + Parsetree.class_description list -> + Parsetree.signature_item
val class_type : + ?loc:loc -> + Parsetree.class_type_declaration list -> + Parsetree.signature_item
val extension : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.extension -> + Parsetree.signature_item
diff --git a/findlib-0/compiler-libs/Ast_helper/Str/index.html b/findlib-0/compiler-libs/Ast_helper/Str/index.html new file mode 100644 index 000000000..7985ebebd --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Str/index.html @@ -0,0 +1,42 @@ + +Str (docs.findlib-0.compiler-libs.Ast_helper.Str)

Module Ast_helper.Str

Structure items

val type_extension : + ?loc:loc -> + Parsetree.type_extension -> + Parsetree.structure_item
val exception_ : + ?loc:loc -> + Parsetree.type_exception -> + Parsetree.structure_item
val rec_module : + ?loc:loc -> + Parsetree.module_binding list -> + Parsetree.structure_item
val class_ : + ?loc:loc -> + Parsetree.class_declaration list -> + Parsetree.structure_item
val class_type : + ?loc:loc -> + Parsetree.class_type_declaration list -> + Parsetree.structure_item
val extension : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.extension -> + Parsetree.structure_item
diff --git a/findlib-0/compiler-libs/Ast_helper/Te/index.html b/findlib-0/compiler-libs/Ast_helper/Te/index.html new file mode 100644 index 000000000..2b29e4eed --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Te/index.html @@ -0,0 +1,39 @@ + +Te (docs.findlib-0.compiler-libs.Ast_helper.Te)

Module Ast_helper.Te

Type extensions

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?params: + (Parsetree.core_type * (Asttypes.variance * Asttypes.injectivity)) list -> + ?priv:Asttypes.private_flag -> + lid -> + Parsetree.extension_constructor list -> + Parsetree.type_extension
val mk_exception : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + Parsetree.extension_constructor -> + Parsetree.type_exception
val constructor : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?info:Docstrings.info -> + str -> + Parsetree.extension_constructor_kind -> + Parsetree.extension_constructor
val decl : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?info:Docstrings.info -> + ?vars:str list -> + ?args:Parsetree.constructor_arguments -> + ?res:Parsetree.core_type -> + str -> + Parsetree.extension_constructor
val rebind : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?info:Docstrings.info -> + str -> + lid -> + Parsetree.extension_constructor
diff --git a/findlib-0/compiler-libs/Ast_helper/Typ/index.html b/findlib-0/compiler-libs/Ast_helper/Typ/index.html new file mode 100644 index 000000000..514b9f43f --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Typ/index.html @@ -0,0 +1,59 @@ + +Typ (docs.findlib-0.compiler-libs.Ast_helper.Typ)

Module Ast_helper.Typ

Type expressions

val mk : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.core_type_desc -> + Parsetree.core_type
val any : ?loc:loc -> ?attrs:attrs -> unit -> Parsetree.core_type
val var : ?loc:loc -> ?attrs:attrs -> string -> Parsetree.core_type
val arrow : + ?loc:loc -> + ?attrs:attrs -> + Asttypes.arg_label -> + Parsetree.core_type -> + Parsetree.core_type -> + Parsetree.core_type
val tuple : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.core_type list -> + Parsetree.core_type
val constr : + ?loc:loc -> + ?attrs:attrs -> + lid -> + Parsetree.core_type list -> + Parsetree.core_type
val object_ : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.object_field list -> + Asttypes.closed_flag -> + Parsetree.core_type
val class_ : + ?loc:loc -> + ?attrs:attrs -> + lid -> + Parsetree.core_type list -> + Parsetree.core_type
val alias : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.core_type -> + string -> + Parsetree.core_type
val variant : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.row_field list -> + Asttypes.closed_flag -> + Asttypes.label list option -> + Parsetree.core_type
val poly : + ?loc:loc -> + ?attrs:attrs -> + str list -> + Parsetree.core_type -> + Parsetree.core_type
val package : + ?loc:loc -> + ?attrs:attrs -> + lid -> + (lid * Parsetree.core_type) list -> + Parsetree.core_type
val extension : + ?loc:loc -> + ?attrs:attrs -> + Parsetree.extension -> + Parsetree.core_type
val varify_constructors : + str list -> + Parsetree.core_type -> + Parsetree.core_type

varify_constructors newtypes te is type expression te, of which any of nullary type constructor tc is replaced by type variable of the same name, if tc's name appears in newtypes. Raise Syntaxerr.Variable_in_scope if any type variable inside te appears in newtypes.

  • since 4.05
diff --git a/findlib-0/compiler-libs/Ast_helper/Type/index.html b/findlib-0/compiler-libs/Ast_helper/Type/index.html new file mode 100644 index 000000000..3be5b0c44 --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Type/index.html @@ -0,0 +1,29 @@ + +Type (docs.findlib-0.compiler-libs.Ast_helper.Type)

Module Ast_helper.Type

Type declarations

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?text:Docstrings.text -> + ?params: + (Parsetree.core_type * (Asttypes.variance * Asttypes.injectivity)) list -> + ?cstrs:(Parsetree.core_type * Parsetree.core_type * loc) list -> + ?kind:Parsetree.type_kind -> + ?priv:Asttypes.private_flag -> + ?manifest:Parsetree.core_type -> + str -> + Parsetree.type_declaration
val constructor : + ?loc:loc -> + ?attrs:attrs -> + ?info:Docstrings.info -> + ?vars:str list -> + ?args:Parsetree.constructor_arguments -> + ?res:Parsetree.core_type -> + str -> + Parsetree.constructor_declaration
val field : + ?loc:loc -> + ?attrs:attrs -> + ?info:Docstrings.info -> + ?mut:Asttypes.mutable_flag -> + str -> + Parsetree.core_type -> + Parsetree.label_declaration
diff --git a/findlib-0/compiler-libs/Ast_helper/Val/index.html b/findlib-0/compiler-libs/Ast_helper/Val/index.html new file mode 100644 index 000000000..fe3a7980b --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Val/index.html @@ -0,0 +1,9 @@ + +Val (docs.findlib-0.compiler-libs.Ast_helper.Val)

Module Ast_helper.Val

Value declarations

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?prim:string list -> + str -> + Parsetree.core_type -> + Parsetree.value_description
diff --git a/findlib-0/compiler-libs/Ast_helper/Vb/index.html b/findlib-0/compiler-libs/Ast_helper/Vb/index.html new file mode 100644 index 000000000..60a538da2 --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/Vb/index.html @@ -0,0 +1,10 @@ + +Vb (docs.findlib-0.compiler-libs.Ast_helper.Vb)

Module Ast_helper.Vb

Value bindings

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?text:Docstrings.text -> + ?value_constraint:Parsetree.value_constraint -> + Parsetree.pattern -> + Parsetree.expression -> + Parsetree.value_binding
diff --git a/findlib-0/compiler-libs/Ast_helper/index.html b/findlib-0/compiler-libs/Ast_helper/index.html new file mode 100644 index 000000000..a1f9b03ee --- /dev/null +++ b/findlib-0/compiler-libs/Ast_helper/index.html @@ -0,0 +1,2 @@ + +Ast_helper (docs.findlib-0.compiler-libs.Ast_helper)

Module Ast_helper

Helpers to produce Parsetree fragments

Warning This module is unstable and part of compiler-libs.

type 'a with_loc = 'a Location.loc
type loc = Location.t
type str = string with_loc
type str_opt = string option with_loc
type attrs = Parsetree.attribute list

Default locations

val default_loc : loc ref

Default value for all optional location arguments.

val with_default_loc : loc -> (unit -> 'a) -> 'a

Set the default_loc within the scope of the execution of the provided function.

Constants

module Const : sig ... end
module Attr : sig ... end

Core language

module Typ : sig ... end

Type expressions

module Pat : sig ... end

Patterns

module Exp : sig ... end

Expressions

module Val : sig ... end

Value declarations

module Type : sig ... end

Type declarations

module Te : sig ... end

Type extensions

Module language

module Mty : sig ... end

Module type expressions

module Mod : sig ... end

Module expressions

module Sig : sig ... end

Signature items

module Str : sig ... end

Structure items

module Md : sig ... end

Module declarations

module Ms : sig ... end

Module substitutions

module Mtd : sig ... end

Module type declarations

module Mb : sig ... end

Module bindings

module Opn : sig ... end

Opens

module Incl : sig ... end

Includes

module Vb : sig ... end

Value bindings

Class language

module Cty : sig ... end

Class type expressions

module Ctf : sig ... end

Class type fields

module Cl : sig ... end

Class expressions

module Cf : sig ... end

Class fields

module Ci : sig ... end

Classes

module Csig : sig ... end

Class signatures

module Cstr : sig ... end

Class structures

module Rf : sig ... end

Row fields

module Of : sig ... end

Object fields

diff --git a/findlib-0/compiler-libs/Ast_invariants/index.html b/findlib-0/compiler-libs/Ast_invariants/index.html new file mode 100644 index 000000000..a0f68f1f1 --- /dev/null +++ b/findlib-0/compiler-libs/Ast_invariants/index.html @@ -0,0 +1,2 @@ + +Ast_invariants (docs.findlib-0.compiler-libs.Ast_invariants)

Module Ast_invariants

Check AST invariants

Warning: this module is unstable and part of compiler-libs.

val structure : Parsetree.structure -> unit
val signature : Parsetree.signature -> unit
diff --git a/findlib-0/compiler-libs/Ast_iterator/index.html b/findlib-0/compiler-libs/Ast_iterator/index.html new file mode 100644 index 000000000..b1cadb984 --- /dev/null +++ b/findlib-0/compiler-libs/Ast_iterator/index.html @@ -0,0 +1,6 @@ + +Ast_iterator (docs.findlib-0.compiler-libs.Ast_iterator)

Module Ast_iterator

Ast_iterator.iterator enables AST inspection using open recursion. A typical mapper would be based on Ast_iterator.default_iterator, a trivial iterator, and will fall back on it for handling the syntax it does not modify.

Warning: this module is unstable and part of compiler-libs.

A generic Parsetree iterator

type iterator = {
  1. attribute : iterator -> Parsetree.attribute -> unit;
  2. attributes : iterator -> Parsetree.attribute list -> unit;
  3. binding_op : iterator -> Parsetree.binding_op -> unit;
  4. case : iterator -> Parsetree.case -> unit;
  5. cases : iterator -> Parsetree.case list -> unit;
  6. class_declaration : iterator -> Parsetree.class_declaration -> unit;
  7. class_description : iterator -> Parsetree.class_description -> unit;
  8. class_expr : iterator -> Parsetree.class_expr -> unit;
  9. class_field : iterator -> Parsetree.class_field -> unit;
  10. class_signature : iterator -> Parsetree.class_signature -> unit;
  11. class_structure : iterator -> Parsetree.class_structure -> unit;
  12. class_type : iterator -> Parsetree.class_type -> unit;
  13. class_type_declaration : iterator -> Parsetree.class_type_declaration -> unit;
  14. class_type_field : iterator -> Parsetree.class_type_field -> unit;
  15. constructor_declaration : iterator -> + Parsetree.constructor_declaration -> + unit;
  16. expr : iterator -> Parsetree.expression -> unit;
  17. extension : iterator -> Parsetree.extension -> unit;
  18. extension_constructor : iterator -> Parsetree.extension_constructor -> unit;
  19. include_declaration : iterator -> Parsetree.include_declaration -> unit;
  20. include_description : iterator -> Parsetree.include_description -> unit;
  21. label_declaration : iterator -> Parsetree.label_declaration -> unit;
  22. location : iterator -> Location.t -> unit;
  23. module_binding : iterator -> Parsetree.module_binding -> unit;
  24. module_declaration : iterator -> Parsetree.module_declaration -> unit;
  25. module_substitution : iterator -> Parsetree.module_substitution -> unit;
  26. module_expr : iterator -> Parsetree.module_expr -> unit;
  27. module_type : iterator -> Parsetree.module_type -> unit;
  28. module_type_declaration : iterator -> + Parsetree.module_type_declaration -> + unit;
  29. open_declaration : iterator -> Parsetree.open_declaration -> unit;
  30. open_description : iterator -> Parsetree.open_description -> unit;
  31. pat : iterator -> Parsetree.pattern -> unit;
  32. payload : iterator -> Parsetree.payload -> unit;
  33. signature : iterator -> Parsetree.signature -> unit;
  34. signature_item : iterator -> Parsetree.signature_item -> unit;
  35. structure : iterator -> Parsetree.structure -> unit;
  36. structure_item : iterator -> Parsetree.structure_item -> unit;
  37. typ : iterator -> Parsetree.core_type -> unit;
  38. row_field : iterator -> Parsetree.row_field -> unit;
  39. object_field : iterator -> Parsetree.object_field -> unit;
  40. type_declaration : iterator -> Parsetree.type_declaration -> unit;
  41. type_extension : iterator -> Parsetree.type_extension -> unit;
  42. type_exception : iterator -> Parsetree.type_exception -> unit;
  43. type_kind : iterator -> Parsetree.type_kind -> unit;
  44. value_binding : iterator -> Parsetree.value_binding -> unit;
  45. value_description : iterator -> Parsetree.value_description -> unit;
  46. with_constraint : iterator -> Parsetree.with_constraint -> unit;
}

A iterator record implements one "method" per syntactic category, using an open recursion style: each method takes as its first argument the iterator to be applied to children in the syntax tree.

val default_iterator : iterator

A default iterator, which implements a "do not do anything" mapping.

diff --git a/findlib-0/compiler-libs/Ast_mapper/index.html b/findlib-0/compiler-libs/Ast_mapper/index.html new file mode 100644 index 000000000..d4b22924c --- /dev/null +++ b/findlib-0/compiler-libs/Ast_mapper/index.html @@ -0,0 +1,75 @@ + +Ast_mapper (docs.findlib-0.compiler-libs.Ast_mapper)

Module Ast_mapper

The interface of a -ppx rewriter

A -ppx rewriter is a program that accepts a serialized abstract syntax tree and outputs another, possibly modified, abstract syntax tree. This module encapsulates the interface between the compiler and the -ppx rewriters, handling such details as the serialization format, forwarding of command-line flags, and storing state.

mapper enables AST rewriting using open recursion. A typical mapper would be based on default_mapper, a deep identity mapper, and will fall back on it for handling the syntax it does not modify. For example:

open Asttypes
+open Parsetree
+open Ast_mapper
+
+let test_mapper argv =
+  { default_mapper with
+    expr = fun mapper expr ->
+      match expr with
+      | { pexp_desc = Pexp_extension ({ txt = "test" }, PStr [])} ->
+        Ast_helper.Exp.constant (Const_int 42)
+      | other -> default_mapper.expr mapper other; }
+
+let () =
+  register "ppx_test" test_mapper

This -ppx rewriter, which replaces [%test] in expressions with the constant 42, can be compiled using ocamlc -o ppx_test -I +compiler-libs ocamlcommon.cma ppx_test.ml.

Warning: this module is unstable and part of compiler-libs.

A generic Parsetree mapper

type mapper = {
  1. attribute : mapper -> Parsetree.attribute -> Parsetree.attribute;
  2. attributes : mapper -> Parsetree.attribute list -> Parsetree.attribute list;
  3. binding_op : mapper -> Parsetree.binding_op -> Parsetree.binding_op;
  4. case : mapper -> Parsetree.case -> Parsetree.case;
  5. cases : mapper -> Parsetree.case list -> Parsetree.case list;
  6. class_declaration : mapper -> + Parsetree.class_declaration -> + Parsetree.class_declaration;
  7. class_description : mapper -> + Parsetree.class_description -> + Parsetree.class_description;
  8. class_expr : mapper -> Parsetree.class_expr -> Parsetree.class_expr;
  9. class_field : mapper -> Parsetree.class_field -> Parsetree.class_field;
  10. class_signature : mapper -> + Parsetree.class_signature -> + Parsetree.class_signature;
  11. class_structure : mapper -> + Parsetree.class_structure -> + Parsetree.class_structure;
  12. class_type : mapper -> Parsetree.class_type -> Parsetree.class_type;
  13. class_type_declaration : mapper -> + Parsetree.class_type_declaration -> + Parsetree.class_type_declaration;
  14. class_type_field : mapper -> + Parsetree.class_type_field -> + Parsetree.class_type_field;
  15. constant : mapper -> Parsetree.constant -> Parsetree.constant;
  16. constructor_declaration : mapper -> + Parsetree.constructor_declaration -> + Parsetree.constructor_declaration;
  17. expr : mapper -> Parsetree.expression -> Parsetree.expression;
  18. extension : mapper -> Parsetree.extension -> Parsetree.extension;
  19. extension_constructor : mapper -> + Parsetree.extension_constructor -> + Parsetree.extension_constructor;
  20. include_declaration : mapper -> + Parsetree.include_declaration -> + Parsetree.include_declaration;
  21. include_description : mapper -> + Parsetree.include_description -> + Parsetree.include_description;
  22. label_declaration : mapper -> + Parsetree.label_declaration -> + Parsetree.label_declaration;
  23. location : mapper -> Location.t -> Location.t;
  24. module_binding : mapper -> + Parsetree.module_binding -> + Parsetree.module_binding;
  25. module_declaration : mapper -> + Parsetree.module_declaration -> + Parsetree.module_declaration;
  26. module_substitution : mapper -> + Parsetree.module_substitution -> + Parsetree.module_substitution;
  27. module_expr : mapper -> Parsetree.module_expr -> Parsetree.module_expr;
  28. module_type : mapper -> Parsetree.module_type -> Parsetree.module_type;
  29. module_type_declaration : mapper -> + Parsetree.module_type_declaration -> + Parsetree.module_type_declaration;
  30. open_declaration : mapper -> + Parsetree.open_declaration -> + Parsetree.open_declaration;
  31. open_description : mapper -> + Parsetree.open_description -> + Parsetree.open_description;
  32. pat : mapper -> Parsetree.pattern -> Parsetree.pattern;
  33. payload : mapper -> Parsetree.payload -> Parsetree.payload;
  34. signature : mapper -> Parsetree.signature -> Parsetree.signature;
  35. signature_item : mapper -> + Parsetree.signature_item -> + Parsetree.signature_item;
  36. structure : mapper -> Parsetree.structure -> Parsetree.structure;
  37. structure_item : mapper -> + Parsetree.structure_item -> + Parsetree.structure_item;
  38. typ : mapper -> Parsetree.core_type -> Parsetree.core_type;
  39. type_declaration : mapper -> + Parsetree.type_declaration -> + Parsetree.type_declaration;
  40. type_extension : mapper -> + Parsetree.type_extension -> + Parsetree.type_extension;
  41. type_exception : mapper -> + Parsetree.type_exception -> + Parsetree.type_exception;
  42. type_kind : mapper -> Parsetree.type_kind -> Parsetree.type_kind;
  43. value_binding : mapper -> Parsetree.value_binding -> Parsetree.value_binding;
  44. value_description : mapper -> + Parsetree.value_description -> + Parsetree.value_description;
  45. with_constraint : mapper -> + Parsetree.with_constraint -> + Parsetree.with_constraint;
}

A mapper record implements one "method" per syntactic category, using an open recursion style: each method takes as its first argument the mapper to be applied to children in the syntax tree.

val default_mapper : mapper

A default mapper, which implements a "deep identity" mapping.

Apply mappers to compilation units

val tool_name : unit -> string

Can be used within a ppx preprocessor to know which tool is calling it "ocamlc", "ocamlopt", "ocamldoc", "ocamldep", "ocaml", ... Some global variables that reflect command-line options are automatically synchronized between the calling tool and the ppx preprocessor: Clflags.include_dirs, Load_path, Clflags.open_modules, Clflags.for_package, Clflags.debug.

val apply : source:string -> target:string -> mapper -> unit

Apply a mapper (parametrized by the unit name) to a dumped parsetree found in the source file and put the result in the target file. The structure or signature field of the mapper is applied to the implementation or interface.

val run_main : (string list -> mapper) -> unit

Entry point to call to implement a standalone -ppx rewriter from a mapper, parametrized by the command line arguments. The current unit name can be obtained from Location.input_name. This function implements proper error reporting for uncaught exceptions.

Registration API

val register_function : (string -> (string list -> mapper) -> unit) ref
val register : string -> (string list -> mapper) -> unit

Apply the register_function. The default behavior is to run the mapper immediately, taking arguments from the process command line. This is to support a scenario where a mapper is linked as a stand-alone executable.

It is possible to overwrite the register_function to define "-ppx drivers", which combine several mappers in a single process. Typically, a driver starts by defining register_function to a custom implementation, then lets ppx rewriters (linked statically or dynamically) register themselves, and then run all or some of them. It is also possible to have -ppx drivers apply rewriters to only specific parts of an AST.

The first argument to register is a symbolic name to be used by the ppx driver.

Convenience functions to write mappers

val map_opt : ('a -> 'b) -> 'a option -> 'b option
val extension_of_error : Location.error -> Parsetree.extension

Encode an error into an 'ocaml.error' extension node which can be inserted in a generated Parsetree. The compiler will be responsible for reporting the error.

val attribute_of_warning : Location.t -> string -> Parsetree.attribute

Encode a warning message into an 'ocaml.ppwarning' attribute which can be inserted in a generated Parsetree. The compiler will be responsible for reporting the warning.

Helper functions to call external mappers

val add_ppx_context_str : + tool_name:string -> + Parsetree.structure -> + Parsetree.structure

Extract information from the current environment and encode it into an attribute which is prepended to the list of structure items in order to pass the information to an external processor.

val add_ppx_context_sig : + tool_name:string -> + Parsetree.signature -> + Parsetree.signature

Same as add_ppx_context_str, but for signatures.

val drop_ppx_context_str : + restore:bool -> + Parsetree.structure -> + Parsetree.structure

Drop the ocaml.ppx.context attribute from a structure. If restore is true, also restore the associated data in the current process.

val drop_ppx_context_sig : + restore:bool -> + Parsetree.signature -> + Parsetree.signature

Same as drop_ppx_context_str, but for signatures.

Cookies

Cookies are used to pass information from a ppx processor to a further invocation of itself, when called from the OCaml toplevel (or other tools that support cookies).

diff --git a/findlib-0/compiler-libs/Asttypes/index.html b/findlib-0/compiler-libs/Asttypes/index.html new file mode 100644 index 000000000..a59679655 --- /dev/null +++ b/findlib-0/compiler-libs/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-0.compiler-libs.Asttypes)

Module Asttypes

Auxiliary AST types used by parsetree and typedtree.

Warning: this module is unstable and part of compiler-libs.

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * Location.t * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
    (*

    label:T -> ...

    *)
  3. | Optional of string
    (*

    ?label:T -> ...

    *)
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | NoVariance
type injectivity =
  1. | Injective
  2. | NoInjectivity
diff --git a/findlib-0/compiler-libs/Attr_helper/index.html b/findlib-0/compiler-libs/Attr_helper/index.html new file mode 100644 index 000000000..bd0f60dbd --- /dev/null +++ b/findlib-0/compiler-libs/Attr_helper/index.html @@ -0,0 +1,5 @@ + +Attr_helper (docs.findlib-0.compiler-libs.Attr_helper)

Module Attr_helper

Helpers for attributes

Warning: this module is unstable and part of compiler-libs.

type error =
  1. | Multiple_attributes of string
  2. | No_payload_expected of string
val get_no_payload_attribute : + string list -> + Parsetree.attributes -> + string Asttypes.loc option

The string list argument of the following functions is a list of alternative names for the attribute we are looking for. For instance:

["foo"; "ocaml.foo"]
val has_no_payload_attribute : string list -> Parsetree.attributes -> bool
exception Error of Location.t * error
val report_error : Format.formatter -> error -> unit
diff --git a/findlib-0/compiler-libs/Augment_specialised_args/Definition/index.html b/findlib-0/compiler-libs/Augment_specialised_args/Definition/index.html new file mode 100644 index 000000000..74f60acac --- /dev/null +++ b/findlib-0/compiler-libs/Augment_specialised_args/Definition/index.html @@ -0,0 +1,2 @@ + +Definition (docs.findlib-0.compiler-libs.Augment_specialised_args.Definition)

Module Augment_specialised_args.Definition

type t =
  1. | Existing_inner_free_var of Variable.t
  2. | Projection_from_existing_specialised_arg of Projection.t
diff --git a/findlib-0/compiler-libs/Augment_specialised_args/Make/argument-1-_/index.html b/findlib-0/compiler-libs/Augment_specialised_args/Make/argument-1-_/index.html new file mode 100644 index 000000000..31813e007 --- /dev/null +++ b/findlib-0/compiler-libs/Augment_specialised_args/Make/argument-1-_/index.html @@ -0,0 +1,5 @@ + +_ (docs.findlib-0.compiler-libs.Augment_specialised_args.Make._)

Parameter Make._

val pass_name : string
val what_to_specialise : + env:Inline_and_simplify_aux.Env.t -> + set_of_closures:Flambda.set_of_closures -> + What_to_specialise.t
diff --git a/findlib-0/compiler-libs/Augment_specialised_args/Make/index.html b/findlib-0/compiler-libs/Augment_specialised_args/Make/index.html new file mode 100644 index 000000000..62965032a --- /dev/null +++ b/findlib-0/compiler-libs/Augment_specialised_args/Make/index.html @@ -0,0 +1,11 @@ + +Make (docs.findlib-0.compiler-libs.Augment_specialised_args.Make)

Module Augment_specialised_args.Make

Parameters

module _ : S

Signature

val rewrite_set_of_closures : + env:Inline_and_simplify_aux.Env.t -> + duplicate_function: + (env:Inline_and_simplify_aux.Env.t -> + set_of_closures:Flambda.set_of_closures -> + fun_var:Variable.t -> + new_fun_var:Variable.t -> + Flambda.function_declaration * Flambda.specialised_to Variable.Map.t) -> + set_of_closures:Flambda.set_of_closures -> + (Flambda.expr * Inlining_cost.Benefit.t) option

duplicate_function should be Inline_and_simplify.duplicate_function.

diff --git a/findlib-0/compiler-libs/Augment_specialised_args/What_to_specialise/index.html b/findlib-0/compiler-libs/Augment_specialised_args/What_to_specialise/index.html new file mode 100644 index 000000000..39dbc0109 --- /dev/null +++ b/findlib-0/compiler-libs/Augment_specialised_args/What_to_specialise/index.html @@ -0,0 +1,7 @@ + +What_to_specialise (docs.findlib-0.compiler-libs.Augment_specialised_args.What_to_specialise)

Module Augment_specialised_args.What_to_specialise

type t
val create : set_of_closures:Flambda.set_of_closures -> t
val new_specialised_arg : + t -> + fun_var:Variable.t -> + group:Variable.t -> + definition:Definition.t -> + t
val make_direct_call_surrogate_for : t -> fun_var:Variable.t -> t
diff --git a/findlib-0/compiler-libs/Augment_specialised_args/index.html b/findlib-0/compiler-libs/Augment_specialised_args/index.html new file mode 100644 index 000000000..d657dce43 --- /dev/null +++ b/findlib-0/compiler-libs/Augment_specialised_args/index.html @@ -0,0 +1,2 @@ + +Augment_specialised_args (docs.findlib-0.compiler-libs.Augment_specialised_args)

Module Augment_specialised_args

Helper module for adding specialised arguments to sets of closures.

module Definition : sig ... end
module What_to_specialise : sig ... end
module type S = sig ... end
module Make (_ : S) : sig ... end
diff --git a/findlib-0/compiler-libs/Augment_specialised_args/module-type-S/index.html b/findlib-0/compiler-libs/Augment_specialised_args/module-type-S/index.html new file mode 100644 index 000000000..55bd70e52 --- /dev/null +++ b/findlib-0/compiler-libs/Augment_specialised_args/module-type-S/index.html @@ -0,0 +1,5 @@ + +S (docs.findlib-0.compiler-libs.Augment_specialised_args.S)

Module type Augment_specialised_args.S

val pass_name : string
val what_to_specialise : + env:Inline_and_simplify_aux.Env.t -> + set_of_closures:Flambda.set_of_closures -> + What_to_specialise.t
diff --git a/findlib-0/compiler-libs/Backend_intf/index.html b/findlib-0/compiler-libs/Backend_intf/index.html new file mode 100644 index 000000000..1b347da22 --- /dev/null +++ b/findlib-0/compiler-libs/Backend_intf/index.html @@ -0,0 +1,2 @@ + +Backend_intf (docs.findlib-0.compiler-libs.Backend_intf)

Module Backend_intf

Knowledge that the middle end needs about the backend.

module type S = sig ... end
diff --git a/findlib-0/compiler-libs/Backend_intf/module-type-S/index.html b/findlib-0/compiler-libs/Backend_intf/module-type-S/index.html new file mode 100644 index 000000000..02951d5e8 --- /dev/null +++ b/findlib-0/compiler-libs/Backend_intf/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (docs.findlib-0.compiler-libs.Backend_intf.S)

Module type Backend_intf.S

val symbol_for_global' : Ident.t -> Symbol.t

Compute the symbol for the given identifier.

val really_import_approx : Simple_value_approx.t -> Simple_value_approx.t

If the given approximation is that of a symbol (Value_symbol) or an external (Value_extern), attempt to find a more informative approximation from a previously-written compilation artifact. In the native code backend, for example, this might consult a .cmx file.

val import_symbol : Symbol.t -> Simple_value_approx.t
val closure_symbol : Closure_id.t -> Symbol.t
val size_int : int

The natural size of an integer on the target architecture (cf. Arch.size_int in the native code backend).

val big_endian : bool

true iff the target architecture is big endian.

val max_sensible_number_of_arguments : int

The maximum number of arguments that is reasonable for a function to have. This should be fewer than the threshold that causes non-self tail call optimization to be inhibited (in particular, if it would entail passing arguments on the stack; see Selectgen).

diff --git a/findlib-0/compiler-libs/Backend_var/Provenance/index.html b/findlib-0/compiler-libs/Backend_var/Provenance/index.html new file mode 100644 index 000000000..8fc98943f --- /dev/null +++ b/findlib-0/compiler-libs/Backend_var/Provenance/index.html @@ -0,0 +1,6 @@ + +Provenance (docs.findlib-0.compiler-libs.Backend_var.Provenance)

Module Backend_var.Provenance

type t
val create : + module_path:Path.t -> + location:Debuginfo.t -> + original_ident:Ident.t -> + t
val module_path : t -> Path.t
val location : t -> Debuginfo.t
val original_ident : t -> Ident.t
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Backend_var/With_provenance/index.html b/findlib-0/compiler-libs/Backend_var/With_provenance/index.html new file mode 100644 index 000000000..d06e76d40 --- /dev/null +++ b/findlib-0/compiler-libs/Backend_var/With_provenance/index.html @@ -0,0 +1,2 @@ + +With_provenance (docs.findlib-0.compiler-libs.Backend_var.With_provenance)

Module Backend_var.With_provenance

type t

Values of type t should be used for variables in binding position.

val print : Format.formatter -> t -> unit
val create : ?provenance:Provenance.t -> backend_var -> t
val var : t -> backend_var
val provenance : t -> Provenance.t option
val name : t -> string
val rename : t -> t
diff --git a/findlib-0/compiler-libs/Backend_var/index.html b/findlib-0/compiler-libs/Backend_var/index.html new file mode 100644 index 000000000..005e2eb26 --- /dev/null +++ b/findlib-0/compiler-libs/Backend_var/index.html @@ -0,0 +1,2 @@ + +Backend_var (docs.findlib-0.compiler-libs.Backend_var)

Module Backend_var

Variables used in the backend, optionally equipped with "provenance" information, used for the emission of debugging information.

include module type of struct include Ident end
type t = Ident.t
include Identifiable.S with type t := t
module T = Ident.T
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set = Ident.Set
module Map = Ident.Map
module Tbl = Ident.Tbl
val print_with_scope : Format.formatter -> t -> unit

Same as print except that it will also add a "n" suffix if the scope of the argument is n.

val create_scoped : scope:int -> string -> t
val create_local : string -> t
val create_persistent : string -> t
val create_predef : string -> t
val rename : t -> t

Creates an identifier with the same name as the input, a fresh stamp, and no scope.

  • raises [Fatal_error]

    if called on a persistent / predef ident.

val name : t -> string
val unique_name : t -> string
val unique_toplevel_name : t -> string
val persistent : t -> bool
val same : t -> t -> bool

Compare identifiers by binding location. Two identifiers are the same either if they are both non-persistent and have been created by the same call to create_*, or if they are both persistent and have the same name.

val compare : t -> t -> int
val global : t -> bool
val is_predef : t -> bool
val scope : t -> int
val lowest_scope : int
val highest_scope : int
val reinit : unit -> unit
type 'a tbl = 'a Ident.tbl

'a tbl represents association tables from identifiers to values of type 'a.

'a tbl plays the role of map, but bindings can be looked up from either the full Ident using find_same, or just its user-visible name using find_name. In general the two lookups may not return the same result, as an identifier may have been shadowed in the environment by a distinct identifier with the same name.

find_all returns the bindings for all idents of a given name, most recently introduced first.

In other words, 'a tbl corresponds to (Ident.t * 'a) list Map.Make(String) and the implementation is very close to that representation.

Note in particular that searching among idents of the same name takes linear time, and that add simply extends the list without checking for duplicates. So it is not a good idea to implement union by repeated add calls, which may result in many duplicated identifiers and poor find_same performance. It is even possible to build overly large same-name lists such that non-recursive functions like find_all or fold_all blow the stack.

You should probably use Map.Make(Ident) instead, unless you really need to query bindings by user-visible name, not just by unique identifiers.

val empty : 'a tbl
val add : t -> 'a -> 'a tbl -> 'a tbl
val find_same : t -> 'a tbl -> 'a
val find_name : string -> 'a tbl -> t * 'a
val find_all : string -> 'a tbl -> (t * 'a) list
val find_all_seq : string -> 'a tbl -> (t * 'a) Seq.t
val fold_name : (t -> 'a -> 'b -> 'b) -> 'a tbl -> 'b -> 'b
val fold_all : (t -> 'a -> 'b -> 'b) -> 'a tbl -> 'b -> 'b
val iter : (t -> 'a -> unit) -> 'a tbl -> unit
val remove : t -> 'a tbl -> 'a tbl
val make_key_generator : unit -> t -> t
type backend_var = t
module Provenance : sig ... end
module With_provenance : sig ... end
diff --git a/findlib-0/compiler-libs/Binutils/index.html b/findlib-0/compiler-libs/Binutils/index.html new file mode 100644 index 000000000..bc2f776dc --- /dev/null +++ b/findlib-0/compiler-libs/Binutils/index.html @@ -0,0 +1,2 @@ + +Binutils (docs.findlib-0.compiler-libs.Binutils)

Module Binutils

type error =
  1. | Truncated_file
  2. | Unrecognized of string
  3. | Unsupported of string * int64
  4. | Out_of_range of string
val error_to_string : error -> string
type t
val read : string -> (t, error) Result.t
val defines_symbol : t -> string -> bool
val symbol_offset : t -> string -> int64 option
diff --git a/findlib-0/compiler-libs/Branch_relaxation/Make/argument-1-T/Cond_branch/index.html b/findlib-0/compiler-libs/Branch_relaxation/Make/argument-1-T/Cond_branch/index.html new file mode 100644 index 000000000..089093385 --- /dev/null +++ b/findlib-0/compiler-libs/Branch_relaxation/Make/argument-1-T/Cond_branch/index.html @@ -0,0 +1,2 @@ + +Cond_branch (docs.findlib-0.compiler-libs.Branch_relaxation.Make.T.Cond_branch)

Module T.Cond_branch

type t
val all : t list
val max_displacement : t -> distance
val classify_instr : Linear.instruction_desc -> t option
diff --git a/findlib-0/compiler-libs/Branch_relaxation/Make/argument-1-T/index.html b/findlib-0/compiler-libs/Branch_relaxation/Make/argument-1-T/index.html new file mode 100644 index 000000000..1d41920f5 --- /dev/null +++ b/findlib-0/compiler-libs/Branch_relaxation/Make/argument-1-T/index.html @@ -0,0 +1,5 @@ + +T (docs.findlib-0.compiler-libs.Branch_relaxation.Make.T)

Parameter Make.T

type distance = int
module Cond_branch : sig ... end
val offset_pc_at_branch : distance
val relax_allocation : + num_bytes:int -> + dbginfo:Debuginfo.alloc_dbginfo -> + Linear.instruction_desc
val relax_poll : return_label:Cmm.label option -> Linear.instruction_desc
val relax_intop_checkbound : unit -> Linear.instruction_desc
val relax_intop_imm_checkbound : bound:int -> Linear.instruction_desc
diff --git a/findlib-0/compiler-libs/Branch_relaxation/Make/index.html b/findlib-0/compiler-libs/Branch_relaxation/Make/index.html new file mode 100644 index 000000000..29c91c2e3 --- /dev/null +++ b/findlib-0/compiler-libs/Branch_relaxation/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.findlib-0.compiler-libs.Branch_relaxation.Make)

Module Branch_relaxation.Make

Parameters

Signature

val relax : Linear.fundecl -> max_out_of_line_code_offset:T.distance -> unit
diff --git a/findlib-0/compiler-libs/Branch_relaxation/index.html b/findlib-0/compiler-libs/Branch_relaxation/index.html new file mode 100644 index 000000000..a6bde17f9 --- /dev/null +++ b/findlib-0/compiler-libs/Branch_relaxation/index.html @@ -0,0 +1,2 @@ + +Branch_relaxation (docs.findlib-0.compiler-libs.Branch_relaxation)

Module Branch_relaxation

module Make (T : Branch_relaxation_intf.S) : sig ... end
diff --git a/findlib-0/compiler-libs/Branch_relaxation_intf/index.html b/findlib-0/compiler-libs/Branch_relaxation_intf/index.html new file mode 100644 index 000000000..7bfa48470 --- /dev/null +++ b/findlib-0/compiler-libs/Branch_relaxation_intf/index.html @@ -0,0 +1,2 @@ + +Branch_relaxation_intf (docs.findlib-0.compiler-libs.Branch_relaxation_intf)

Module Branch_relaxation_intf

module type S = sig ... end
diff --git a/findlib-0/compiler-libs/Branch_relaxation_intf/module-type-S/Cond_branch/index.html b/findlib-0/compiler-libs/Branch_relaxation_intf/module-type-S/Cond_branch/index.html new file mode 100644 index 000000000..a8b24d36d --- /dev/null +++ b/findlib-0/compiler-libs/Branch_relaxation_intf/module-type-S/Cond_branch/index.html @@ -0,0 +1,2 @@ + +Cond_branch (docs.findlib-0.compiler-libs.Branch_relaxation_intf.S.Cond_branch)

Module S.Cond_branch

type t
val all : t list
val max_displacement : t -> distance
val classify_instr : Linear.instruction_desc -> t option
diff --git a/findlib-0/compiler-libs/Branch_relaxation_intf/module-type-S/index.html b/findlib-0/compiler-libs/Branch_relaxation_intf/module-type-S/index.html new file mode 100644 index 000000000..e62952cea --- /dev/null +++ b/findlib-0/compiler-libs/Branch_relaxation_intf/module-type-S/index.html @@ -0,0 +1,5 @@ + +S (docs.findlib-0.compiler-libs.Branch_relaxation_intf.S)

Module type Branch_relaxation_intf.S

type distance = int
module Cond_branch : sig ... end
val offset_pc_at_branch : distance
val relax_allocation : + num_bytes:int -> + dbginfo:Debuginfo.alloc_dbginfo -> + Linear.instruction_desc
val relax_poll : return_label:Cmm.label option -> Linear.instruction_desc
val relax_intop_checkbound : unit -> Linear.instruction_desc
val relax_intop_imm_checkbound : bound:int -> Linear.instruction_desc
diff --git a/findlib-0/compiler-libs/Btype/For_copy/index.html b/findlib-0/compiler-libs/Btype/For_copy/index.html new file mode 100644 index 000000000..7aa07311e --- /dev/null +++ b/findlib-0/compiler-libs/Btype/For_copy/index.html @@ -0,0 +1,2 @@ + +For_copy (docs.findlib-0.compiler-libs.Btype.For_copy)

Module Btype.For_copy

type copy_scope
val redirect_desc : copy_scope -> Types.type_expr -> Types.type_desc -> unit
val with_scope : (copy_scope -> 'a) -> 'a
diff --git a/findlib-0/compiler-libs/Btype/TransientTypeMap/index.html b/findlib-0/compiler-libs/Btype/TransientTypeMap/index.html new file mode 100644 index 000000000..982ad1162 --- /dev/null +++ b/findlib-0/compiler-libs/Btype/TransientTypeMap/index.html @@ -0,0 +1,8 @@ + +TransientTypeMap (docs.findlib-0.compiler-libs.Btype.TransientTypeMap)

Module Btype.TransientTypeMap

Maps

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Btype/TypeHash/index.html b/findlib-0/compiler-libs/Btype/TypeHash/index.html new file mode 100644 index 000000000..6dd4ee544 --- /dev/null +++ b/findlib-0/compiler-libs/Btype/TypeHash/index.html @@ -0,0 +1,2 @@ + +TypeHash (docs.findlib-0.compiler-libs.Btype.TypeHash)

Module Btype.TypeHash

include Hashtbl.S with type key = Types.transient_expr
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val add : 'a t -> Types.type_expr -> 'a -> unit
val remove : 'a t -> Types.type_expr -> unit
val find : 'a t -> Types.type_expr -> 'a
val iter : (Types.type_expr -> 'a -> unit) -> 'a t -> unit
diff --git a/findlib-0/compiler-libs/Btype/TypeMap/index.html b/findlib-0/compiler-libs/Btype/TypeMap/index.html new file mode 100644 index 000000000..6f32a7861 --- /dev/null +++ b/findlib-0/compiler-libs/Btype/TypeMap/index.html @@ -0,0 +1,10 @@ + +TypeMap (docs.findlib-0.compiler-libs.Btype.TypeMap)

Module Btype.TypeMap

include Map.S + with type key = Types.transient_expr + and type 'a t = 'a TransientTypeMap.t

Maps

The type of the map keys.

type 'a t = 'a TransientTypeMap.t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val add : Types.type_expr -> 'a -> 'a t -> 'a t
val find : Types.type_expr -> 'a t -> 'a
val singleton : Types.type_expr -> 'a -> 'a t
val fold : (Types.type_expr -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
diff --git a/findlib-0/compiler-libs/Btype/TypePairs/index.html b/findlib-0/compiler-libs/Btype/TypePairs/index.html new file mode 100644 index 000000000..18460484d --- /dev/null +++ b/findlib-0/compiler-libs/Btype/TypePairs/index.html @@ -0,0 +1,2 @@ + +TypePairs (docs.findlib-0.compiler-libs.Btype.TypePairs)

Module Btype.TypePairs

type t
val create : int -> t
val clear : t -> unit
val add : t -> (Types.type_expr * Types.type_expr) -> unit
val mem : t -> (Types.type_expr * Types.type_expr) -> bool
val iter : ((Types.type_expr * Types.type_expr) -> unit) -> t -> unit
diff --git a/findlib-0/compiler-libs/Btype/TypeSet/index.html b/findlib-0/compiler-libs/Btype/TypeSet/index.html new file mode 100644 index 000000000..78653b492 --- /dev/null +++ b/findlib-0/compiler-libs/Btype/TypeSet/index.html @@ -0,0 +1,3 @@ + +TypeSet (docs.findlib-0.compiler-libs.Btype.TypeSet)

Module Btype.TypeSet

include Set.S with type elt = Types.transient_expr

Sets

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val add : Types.type_expr -> t -> t
val mem : Types.type_expr -> t -> bool
val singleton : Types.type_expr -> t
val exists : (Types.type_expr -> bool) -> t -> bool
val elements : t -> Types.type_expr list
diff --git a/findlib-0/compiler-libs/Btype/index.html b/findlib-0/compiler-libs/Btype/index.html new file mode 100644 index 000000000..9d7d5efb6 --- /dev/null +++ b/findlib-0/compiler-libs/Btype/index.html @@ -0,0 +1,52 @@ + +Btype (docs.findlib-0.compiler-libs.Btype)

Module Btype

module TypeSet : sig ... end
module TypeMap : sig ... end
module TypeHash : sig ... end
module TypePairs : sig ... end
val generic_level : int
val newgenvar : ?name:string -> unit -> Types.type_expr
val newgenstub : scope:int -> Types.type_expr
val is_Tvar : Types.type_expr -> bool
val is_Tunivar : Types.type_expr -> bool
val is_Tconstr : Types.type_expr -> bool
val dummy_method : Asttypes.label
val is_fixed : Types.row_desc -> bool
val has_fixed_explanation : Types.row_desc -> bool
val fixed_explanation : Types.row_desc -> Types.fixed_explanation option
val merge_fixed_explanation : + Types.fixed_explanation option -> + Types.fixed_explanation option -> + Types.fixed_explanation option
val static_row : Types.row_desc -> bool
val hash_variant : Asttypes.label -> int
val row_of_type : Types.type_expr -> Types.type_expr
val has_constr_row : Types.type_expr -> bool
val is_row_name : string -> bool
val is_constr_row : allow_ident:bool -> Types.type_expr -> bool
val set_static_row_name : Types.type_declaration -> Path.t -> unit
val iter_type_expr : (Types.type_expr -> unit) -> Types.type_expr -> unit
val fold_type_expr : + ('a -> Types.type_expr -> 'a) -> + 'a -> + Types.type_expr -> + 'a
val iter_row : (Types.type_expr -> unit) -> Types.row_desc -> unit
val fold_row : ('a -> Types.type_expr -> 'a) -> 'a -> Types.row_desc -> 'a
val iter_abbrev : (Types.type_expr -> unit) -> Types.abbrev_memo -> unit
val iter_type_expr_kind : + (Types.type_expr -> unit) -> + Types.type_decl_kind -> + unit
val iter_type_expr_cstr_args : + (Types.type_expr -> unit) -> + Types.constructor_arguments -> + unit
type type_iterators = {
  1. it_signature : type_iterators -> Types.signature -> unit;
  2. it_signature_item : type_iterators -> Types.signature_item -> unit;
  3. it_value_description : type_iterators -> Types.value_description -> unit;
  4. it_type_declaration : type_iterators -> Types.type_declaration -> unit;
  5. it_extension_constructor : type_iterators -> + Types.extension_constructor -> + unit;
  6. it_module_declaration : type_iterators -> Types.module_declaration -> unit;
  7. it_modtype_declaration : type_iterators -> Types.modtype_declaration -> unit;
  8. it_class_declaration : type_iterators -> Types.class_declaration -> unit;
  9. it_class_type_declaration : type_iterators -> + Types.class_type_declaration -> + unit;
  10. it_functor_param : type_iterators -> Types.functor_parameter -> unit;
  11. it_module_type : type_iterators -> Types.module_type -> unit;
  12. it_class_type : type_iterators -> Types.class_type -> unit;
  13. it_type_kind : type_iterators -> Types.type_decl_kind -> unit;
  14. it_do_type_expr : type_iterators -> Types.type_expr -> unit;
  15. it_type_expr : type_iterators -> Types.type_expr -> unit;
  16. it_path : Path.t -> unit;
}
val type_iterators : type_iterators
val unmark_iterators : type_iterators
val copy_type_desc : + ?keep_names:bool -> + (Types.type_expr -> Types.type_expr) -> + Types.type_desc -> + Types.type_desc
val copy_row : + (Types.type_expr -> Types.type_expr) -> + bool -> + Types.row_desc -> + bool -> + Types.type_expr -> + Types.row_desc
module For_copy : sig ... end
val lowest_level : int
val not_marked_node : Types.type_expr -> bool
val logged_mark_node : Types.type_expr -> unit
val try_logged_mark_node : Types.type_expr -> bool
val flip_mark_node : Types.type_expr -> unit
val try_mark_node : Types.type_expr -> bool
val mark_type : Types.type_expr -> unit
val mark_type_params : Types.type_expr -> unit
val unmark_type : Types.type_expr -> unit
val unmark_type_decl : Types.type_declaration -> unit
val unmark_extension_constructor : Types.extension_constructor -> unit
val unmark_class_type : Types.class_type -> unit
val unmark_class_signature : Types.class_signature -> unit
val find_expans : + Asttypes.private_flag -> + Path.t -> + Types.abbrev_memo -> + Types.type_expr option
val cleanup_abbrev : unit -> unit
val memorize_abbrev : + Types.abbrev_memo ref -> + Asttypes.private_flag -> + Path.t -> + Types.type_expr -> + Types.type_expr -> + unit
val forget_abbrev : Types.abbrev_memo ref -> Path.t -> unit
val snapshot : unit -> Types.snapshot
val backtrack : Types.snapshot -> unit
val is_optional : Asttypes.arg_label -> bool
val prefixed_label_name : Asttypes.arg_label -> Asttypes.label
val extract_label : + Asttypes.label -> + (Asttypes.arg_label * 'a) list -> + (Asttypes.arg_label * 'a * bool * (Asttypes.arg_label * 'a) list) option
val signature_of_class_type : Types.class_type -> Types.class_signature
val scrape_class_type : Types.class_type -> Types.class_type
val class_type_arity : Types.class_type -> int
val abbreviate_class_type : + Path.t -> + Types.type_expr list -> + Types.class_type -> + Types.class_type
val self_type_row : Types.class_type -> Types.type_expr
val methods : Types.class_signature -> string list
val virtual_methods : Types.class_signature -> string list
val concrete_methods : Types.class_signature -> Types.MethSet.t
val public_methods : Types.class_signature -> string list
val instance_vars : Types.class_signature -> string list
val virtual_instance_vars : Types.class_signature -> string list
val concrete_instance_vars : Types.class_signature -> Types.VarSet.t
val instance_variable_type : + Asttypes.label -> + Types.class_signature -> + Types.type_expr
val print_raw : (Format.formatter -> Types.type_expr -> unit) ref
val cstr_type_path : Types.constructor_description -> Path.t
diff --git a/findlib-0/compiler-libs/Build_export_info/index.html b/findlib-0/compiler-libs/Build_export_info/index.html new file mode 100644 index 000000000..01d96ebec --- /dev/null +++ b/findlib-0/compiler-libs/Build_export_info/index.html @@ -0,0 +1,5 @@ + +Build_export_info (docs.findlib-0.compiler-libs.Build_export_info)

Module Build_export_info

Construct export information, for emission into .cmx files, from an Flambda program.

val build_transient : + backend:(module Backend_intf.S) -> + Flambda.program -> + Export_info.transient
diff --git a/findlib-0/compiler-libs/Build_path_prefix_map/index.html b/findlib-0/compiler-libs/Build_path_prefix_map/index.html new file mode 100644 index 000000000..5cd9692e4 --- /dev/null +++ b/findlib-0/compiler-libs/Build_path_prefix_map/index.html @@ -0,0 +1,2 @@ + +Build_path_prefix_map (docs.findlib-0.compiler-libs.Build_path_prefix_map)

Module Build_path_prefix_map

Rewrite paths for reproducible builds

Warning: this module is unstable and part of compiler-libs.

See the BUILD_PATH_PREFIX_MAP spec

type path = string
type path_prefix = string
type error_message = string
val encode_prefix : path_prefix -> string
val decode_prefix : string -> (path_prefix, error_message) result
type pair = {
  1. target : path_prefix;
  2. source : path_prefix;
}
val encode_pair : pair -> string
val decode_pair : string -> (pair, error_message) result
type map = pair option list
val encode_map : map -> string
val decode_map : string -> (map, error_message) result
val rewrite_first : map -> path -> path option

rewrite_first map path tries to find a source in map that is a prefix of the input path. If it succeeds, it replaces this prefix with the corresponding target. If it fails, it just returns None.

val rewrite_all : map -> path -> path list

rewrite_all map path finds all sources in map that are a prefix of the input path. For each matching source, in priority order, it replaces this prefix with the corresponding target and adds the result to the returned list. If there are no matches, it just returns [].

val rewrite : map -> path -> path

rewrite path uses rewrite_first to try to find a mapping for path. If found, it returns that, otherwise it just returns path.

diff --git a/findlib-0/compiler-libs/Builtin_attributes/index.html b/findlib-0/compiler-libs/Builtin_attributes/index.html new file mode 100644 index 000000000..2a4b3d67d --- /dev/null +++ b/findlib-0/compiler-libs/Builtin_attributes/index.html @@ -0,0 +1,24 @@ + +Builtin_attributes (docs.findlib-0.compiler-libs.Builtin_attributes)

Module Builtin_attributes

Support for some of the builtin attributes

Warning: this module is unstable and part of compiler-libs.

val check_alerts : Location.t -> Parsetree.attributes -> string -> unit
val check_alerts_inclusion : + def:Location.t -> + use:Location.t -> + Location.t -> + Parsetree.attributes -> + Parsetree.attributes -> + string -> + unit
val alerts_of_attrs : Parsetree.attributes -> Misc.alerts
val alerts_of_sig : Parsetree.signature -> Misc.alerts
val alerts_of_str : Parsetree.structure -> Misc.alerts
val check_deprecated_mutable : + Location.t -> + Parsetree.attributes -> + string -> + unit
val check_deprecated_mutable_inclusion : + def:Location.t -> + use:Location.t -> + Location.t -> + Parsetree.attributes -> + Parsetree.attributes -> + string -> + unit
val check_no_alert : Parsetree.attributes -> unit
val error_of_extension : Parsetree.extension -> Location.error
val warning_attribute : ?ppwarning:bool -> Parsetree.attribute -> unit

Apply warning settings from the specified attribute. "ocaml.warning"/"ocaml.warnerror" (and variants without the prefix) are processed and other attributes are ignored.

Also implement ocaml.ppwarning (unless ~ppwarning:false is passed).

val warning_scope : + ?ppwarning:bool -> + Parsetree.attributes -> + (unit -> 'a) -> + 'a

Execute a function in a new scope for warning settings. This means that the effect of any call to warning_attribute during the execution of this function will be discarded after execution.

The function also takes a list of attributes which are processed with warning_attribute in the fresh scope before the function is executed.

val warn_on_literal_pattern : Parsetree.attributes -> bool
val explicit_arity : Parsetree.attributes -> bool
val immediate : Parsetree.attributes -> bool
val immediate64 : Parsetree.attributes -> bool
val has_unboxed : Parsetree.attributes -> bool
val has_boxed : Parsetree.attributes -> bool
diff --git a/findlib-0/compiler-libs/Bytegen/index.html b/findlib-0/compiler-libs/Bytegen/index.html new file mode 100644 index 000000000..5405fd86e --- /dev/null +++ b/findlib-0/compiler-libs/Bytegen/index.html @@ -0,0 +1,10 @@ + +Bytegen (docs.findlib-0.compiler-libs.Bytegen)

Module Bytegen

val compile_implementation : + string -> + Lambda.lambda -> + Instruct.instruction list
val compile_phrase : + Lambda.lambda -> + Instruct.instruction list * Instruct.instruction list
diff --git a/findlib-0/compiler-libs/Bytelibrarian/index.html b/findlib-0/compiler-libs/Bytelibrarian/index.html new file mode 100644 index 000000000..c71712f04 --- /dev/null +++ b/findlib-0/compiler-libs/Bytelibrarian/index.html @@ -0,0 +1,2 @@ + +Bytelibrarian (docs.findlib-0.compiler-libs.Bytelibrarian)

Module Bytelibrarian

val create_archive : string list -> string -> unit
type error =
  1. | File_not_found of string
  2. | Not_an_object_file of string
exception Error of error
val report_error : Format.formatter -> error -> unit
val reset : unit -> unit
diff --git a/findlib-0/compiler-libs/Bytelink/Dep/index.html b/findlib-0/compiler-libs/Bytelink/Dep/index.html new file mode 100644 index 000000000..48665fbad --- /dev/null +++ b/findlib-0/compiler-libs/Bytelink/Dep/index.html @@ -0,0 +1,2 @@ + +Dep (docs.findlib-0.compiler-libs.Bytelink.Dep)

Module Bytelink.Dep

The type of the set elements.

val compare : t -> t -> int

A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/findlib-0/compiler-libs/Bytelink/DepSet/index.html b/findlib-0/compiler-libs/Bytelink/DepSet/index.html new file mode 100644 index 000000000..78478fffe --- /dev/null +++ b/findlib-0/compiler-libs/Bytelink/DepSet/index.html @@ -0,0 +1,3 @@ + +DepSet (docs.findlib-0.compiler-libs.Bytelink.DepSet)

Module Bytelink.DepSet

Sets

type elt = Dep.t

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Bytelink/index.html b/findlib-0/compiler-libs/Bytelink/index.html new file mode 100644 index 000000000..9b9f247cf --- /dev/null +++ b/findlib-0/compiler-libs/Bytelink/index.html @@ -0,0 +1,2 @@ + +Bytelink (docs.findlib-0.compiler-libs.Bytelink)

Module Bytelink

module DepSet : Set.S with type elt = Dep.t
val reset : unit -> unit
val check_consistency : Misc.filepath -> Cmo_format.compilation_unit -> unit
val extract_crc_interfaces : unit -> Misc.crcs
type error =
  1. | File_not_found of Misc.filepath
  2. | Not_an_object_file of Misc.filepath
  3. | Wrong_object_name of Misc.filepath
  4. | Symbol_error of Misc.filepath * Symtable.error
  5. | Inconsistent_import of Misc.modname * Misc.filepath * Misc.filepath
  6. | Custom_runtime
  7. | File_exists of Misc.filepath
  8. | Cannot_open_dll of Misc.filepath
  9. | Required_module_unavailable of Misc.modname * Misc.modname
  10. | Camlheader of string * Misc.filepath
  11. | Multiple_definition of Misc.modname * Misc.filepath * Misc.filepath
exception Error of error
val report_error : Format.formatter -> error -> unit
diff --git a/findlib-0/compiler-libs/Bytepackager/index.html b/findlib-0/compiler-libs/Bytepackager/index.html new file mode 100644 index 000000000..20b4ad0c7 --- /dev/null +++ b/findlib-0/compiler-libs/Bytepackager/index.html @@ -0,0 +1,7 @@ + +Bytepackager (docs.findlib-0.compiler-libs.Bytepackager)

Module Bytepackager

val package_files : + ppf_dump:Format.formatter -> + Env.t -> + string list -> + string -> + unit
type error =
  1. | Forward_reference of string * Ident.t
  2. | Multiple_definition of string * Ident.t
  3. | Not_an_object_file of string
  4. | Illegal_renaming of string * string * string
  5. | File_not_found of string
exception Error of error
val report_error : Format.formatter -> error -> unit
diff --git a/findlib-0/compiler-libs/Bytesections/Name/index.html b/findlib-0/compiler-libs/Bytesections/Name/index.html new file mode 100644 index 000000000..909bdd3d8 --- /dev/null +++ b/findlib-0/compiler-libs/Bytesections/Name/index.html @@ -0,0 +1,2 @@ + +Name (docs.findlib-0.compiler-libs.Bytesections.Name)

Module Bytesections.Name

type raw_name = private string
type t =
  1. | CODE
    (*

    bytecode

    *)
  2. | CRCS
    (*

    crcs for modules

    *)
  3. | DATA
    (*

    global data (constant)

    *)
  4. | DBUG
    (*

    debug info

    *)
  5. | DLLS
    (*

    dll names

    *)
  6. | DLPT
    (*

    dll paths

    *)
  7. | PRIM
    (*

    primitives names

    *)
  8. | RNTM
    (*

    The path to the bytecode interpreter (use_runtime mode)

    *)
  9. | SYMB
    (*

    global identifiers

    *)
  10. | Other of raw_name
val of_string : string -> t
val to_string : t -> string
diff --git a/findlib-0/compiler-libs/Bytesections/index.html b/findlib-0/compiler-libs/Bytesections/index.html new file mode 100644 index 000000000..0527c0d05 --- /dev/null +++ b/findlib-0/compiler-libs/Bytesections/index.html @@ -0,0 +1,2 @@ + +Bytesections (docs.findlib-0.compiler-libs.Bytesections)

Module Bytesections

module Name : sig ... end

Recording sections written to a bytecode executable file

type toc_writer
val init_record : out_channel -> toc_writer

Start recording sections from the current position in out_channel

val record : toc_writer -> Name.t -> unit

Record the current position in the out_channel as the end of the section with the given name.

val write_toc_and_trailer : toc_writer -> unit

Write the table of contents and the standard trailer for bytecode executable files

Reading sections from a bytecode executable file

type section_entry = {
  1. name : Name.t;
    (*

    name of the section.

    *)
  2. pos : int;
    (*

    byte offset at which the section starts.

    *)
  3. len : int;
    (*

    length of the section.

    *)
}
type section_table
exception Bad_magic_number
val read_toc : in_channel -> section_table

Read the table of sections from a bytecode executable. Raise Bad_magic_number if magic number doesn't match

val seek_section : section_table -> in_channel -> Name.t -> int

Position the input channel at the beginning of the section named "name", and return the length of that section. Raise Not_found if no such section exists.

val read_section_string : section_table -> in_channel -> Name.t -> string

Return the contents of a section, as a string.

val read_section_struct : section_table -> in_channel -> Name.t -> 'a

Return the contents of a section, as marshalled data.

val all : section_table -> section_entry list

Returns all section_entry from a section_table in increasing position order.

val pos_first_section : section_table -> int

Return the position of the beginning of the first section

diff --git a/findlib-0/compiler-libs/CSE/index.html b/findlib-0/compiler-libs/CSE/index.html new file mode 100644 index 000000000..828441ac8 --- /dev/null +++ b/findlib-0/compiler-libs/CSE/index.html @@ -0,0 +1,2 @@ + +CSE (docs.findlib-0.compiler-libs.CSE)

Module CSE

Common interface to all architecture-specific CSE modules

val fundecl : Mach.fundecl -> Mach.fundecl
diff --git a/findlib-0/compiler-libs/CSEgen/class-cse_generic/index.html b/findlib-0/compiler-libs/CSEgen/class-cse_generic/index.html new file mode 100644 index 000000000..b67598676 --- /dev/null +++ b/findlib-0/compiler-libs/CSEgen/class-cse_generic/index.html @@ -0,0 +1,2 @@ + +cse_generic (docs.findlib-0.compiler-libs.CSEgen.cse_generic)

Class CSEgen.cse_generic

method class_of_operation : Mach.operation -> op_class
method is_cheap_operation : Mach.operation -> bool
method fundecl : Mach.fundecl -> Mach.fundecl
diff --git a/findlib-0/compiler-libs/CSEgen/index.html b/findlib-0/compiler-libs/CSEgen/index.html new file mode 100644 index 000000000..041150c8d --- /dev/null +++ b/findlib-0/compiler-libs/CSEgen/index.html @@ -0,0 +1,2 @@ + +CSEgen (docs.findlib-0.compiler-libs.CSEgen)

Module CSEgen

type op_class =
  1. | Op_pure
  2. | Op_checkbound
  3. | Op_load of Asttypes.mutable_flag
  4. | Op_store of bool
  5. | Op_other
class cse_generic : object ... end
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/Convert/Simplified/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/Convert/Simplified/index.html new file mode 100644 index 000000000..a29bb5929 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/Convert/Simplified/index.html @@ -0,0 +1,6 @@ + +Simplified (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.Convert.Simplified)

Module Convert.Simplified

val traditional2revised : + ('token, 'semantic_value) traditional -> + ('token * Lexing.position * Lexing.position, 'semantic_value) revised
val revised2traditional : + ('token * Lexing.position * Lexing.position, 'semantic_value) revised -> + ('token, 'semantic_value) traditional
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/Convert/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/Convert/index.html new file mode 100644 index 000000000..e764ffd62 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/Convert/index.html @@ -0,0 +1,13 @@ + +Convert (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.Convert)

Module CamlinternalMenhirLib.Convert

type ('token, 'semantic_value) traditional = + (Lexing.lexbuf -> 'token) -> + Lexing.lexbuf -> + 'semantic_value
type ('token, 'semantic_value) revised = (unit -> 'token) -> 'semantic_value
val traditional2revised : + ('token -> 'raw_token) -> + ('token -> Lexing.position) -> + ('token -> Lexing.position) -> + ('raw_token, 'semantic_value) traditional -> + ('token, 'semantic_value) revised
val revised2traditional : + ('raw_token -> Lexing.position -> Lexing.position -> 'token) -> + ('token, 'semantic_value) revised -> + ('raw_token, 'semantic_value) traditional
module Simplified : sig ... end
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/Engine/Make/argument-1-T/Log/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/Engine/Make/argument-1-T/Log/index.html new file mode 100644 index 000000000..a84f79bb2 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/Engine/Make/argument-1-T/Log/index.html @@ -0,0 +1,2 @@ + +Log (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.Engine.Make.T.Log)

Module T.Log

val state : state -> unit
val shift : terminal -> state -> unit
val reduce_or_accept : production -> unit
val lookahead_token : terminal -> Lexing.position -> Lexing.position -> unit
val initiating_error_handling : unit -> unit
val resuming_error_handling : unit -> unit
val handling_error : state -> unit
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/Engine/Make/argument-1-T/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/Engine/Make/argument-1-T/index.html new file mode 100644 index 000000000..3409f138a --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/Engine/Make/argument-1-T/index.html @@ -0,0 +1,17 @@ + +T (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.Engine.Make.T)

Parameter Make.T

type state
val number : state -> int
type token
type terminal
type nonterminal
type semantic_value
val token2terminal : token -> terminal
val token2value : token -> semantic_value
val error_terminal : terminal
val error_value : semantic_value
val foreach_terminal : (terminal -> 'a -> 'a) -> 'a -> 'a
type production
val production_index : production -> int
val find_production : int -> production
val default_reduction : + state -> + ('env -> production -> 'answer) -> + ('env -> 'answer) -> + 'env -> + 'answer
val action : + state -> + terminal -> + semantic_value -> + ('env -> bool -> terminal -> semantic_value -> state -> 'answer) -> + ('env -> production -> 'answer) -> + ('env -> 'answer) -> + 'env -> + 'answer
val goto_nt : state -> nonterminal -> state
val goto_prod : state -> production -> state
val maybe_goto_nt : state -> nonterminal -> state option
val is_start : production -> bool
exception Error
val semantic_action : production -> semantic_action
val may_reduce : state -> production -> bool
val log : bool
module Log : sig ... end
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/Engine/Make/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/Engine/Make/index.html new file mode 100644 index 000000000..b64d27fcd --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/Engine/Make/index.html @@ -0,0 +1,40 @@ + +Make (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.Engine.Make)

Module Engine.Make

Parameters

Signature

include EngineTypes.MONOLITHIC_ENGINE + with type state = T.state + with type token = T.token + with type semantic_value = T.semantic_value
type state = T.state
type token = T.token
type semantic_value = T.semantic_value
exception Error
val entry : + [ `Legacy | `Simplified ] -> + state -> + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + semantic_value
include IncrementalEngine.INCREMENTAL_ENGINE + with type token := token + and type 'a lr1state = state + with type production = T.production + with type 'a env = (T.state, T.semantic_value, T.token) EngineTypes.env
type production = T.production
type 'a checkpoint = private
  1. | InputNeeded of 'a env
  2. | Shifting of 'a env * 'a env * bool
  3. | AboutToReduce of 'a env * production
  4. | HandlingError of 'a env
  5. | Accepted of 'a
  6. | Rejected
type strategy = [
  1. | `Legacy
  2. | `Simplified
]
val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
val lexer_lexbuf_to_supplier : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + supplier
val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
val loop_handle : + ('a -> 'answer) -> + ('a checkpoint -> 'answer) -> + supplier -> + 'a checkpoint -> + 'answer
val loop_handle_undo : + ('a -> 'answer) -> + ('a checkpoint -> 'a checkpoint -> 'answer) -> + supplier -> + 'a checkpoint -> + 'answer
val shifts : 'a checkpoint -> 'a env option
val acceptable : 'a checkpoint -> token -> IncrementalEngine.position -> bool
type 'a lr1state = state
val number : _ lr1state -> int
val production_index : production -> int
val find_production : int -> production
type element =
  1. | Element : 'a lr1state + * 'a + * IncrementalEngine.position + * IncrementalEngine.position -> element
type stack = element General.stream
val stack : 'a env -> stack
val top : 'a env -> element option
val pop_many : int -> 'a env -> 'a env option
val get : int -> 'a env -> element option
val current_state_number : 'a env -> int
val equal : 'a env -> 'a env -> bool
val env_has_default_reduction : 'a env -> bool
val state_has_default_reduction : _ lr1state -> bool
val pop : 'a env -> 'a env option
val force_reduction : production -> 'a env -> 'a env
val input_needed : 'a env -> 'a checkpoint
include EngineTypes.INCREMENTAL_ENGINE_START + with type state := state + and type semantic_value := semantic_value + and type 'a checkpoint := 'a checkpoint
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/Engine/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/Engine/index.html new file mode 100644 index 000000000..cb5e61c3a --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/Engine/index.html @@ -0,0 +1,9 @@ + +Engine (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.Engine)

Module CamlinternalMenhirLib.Engine

diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/index.html new file mode 100644 index 000000000..165497b4e --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/index.html @@ -0,0 +1,2 @@ + +EngineTypes (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.EngineTypes)

Module CamlinternalMenhirLib.EngineTypes

type ('state, 'semantic_value) stack = {
  1. state : 'state;
  2. semv : 'semantic_value;
  3. startp : Lexing.position;
  4. endp : Lexing.position;
  5. next : ('state, 'semantic_value) stack;
}
type ('state, 'semantic_value, 'token) env = {
  1. error : bool;
  2. triple : 'token * Lexing.position * Lexing.position;
  3. stack : ('state, 'semantic_value) stack;
  4. current : 'state;
}
module type TABLE = sig ... end
module type MONOLITHIC_ENGINE = sig ... end
module type INCREMENTAL_ENGINE_START = sig ... end
module type ENGINE = sig ... end
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/module-type-ENGINE/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/module-type-ENGINE/index.html new file mode 100644 index 000000000..64d48ea16 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/module-type-ENGINE/index.html @@ -0,0 +1,35 @@ + +ENGINE (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.EngineTypes.ENGINE)

Module type EngineTypes.ENGINE

include MONOLITHIC_ENGINE
type state
type token
type semantic_value
exception Error
val entry : + [ `Legacy | `Simplified ] -> + state -> + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + semantic_value
include IncrementalEngine.INCREMENTAL_ENGINE + with type token := token + and type 'a lr1state = state
type production
type 'a env
type 'a checkpoint = private
  1. | InputNeeded of 'a env
  2. | Shifting of 'a env * 'a env * bool
  3. | AboutToReduce of 'a env * production
  4. | HandlingError of 'a env
  5. | Accepted of 'a
  6. | Rejected
type strategy = [
  1. | `Legacy
  2. | `Simplified
]
val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
val lexer_lexbuf_to_supplier : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + supplier
val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
val loop_handle : + ('a -> 'answer) -> + ('a checkpoint -> 'answer) -> + supplier -> + 'a checkpoint -> + 'answer
val loop_handle_undo : + ('a -> 'answer) -> + ('a checkpoint -> 'a checkpoint -> 'answer) -> + supplier -> + 'a checkpoint -> + 'answer
val shifts : 'a checkpoint -> 'a env option
val acceptable : 'a checkpoint -> token -> IncrementalEngine.position -> bool
type 'a lr1state = state
val number : _ lr1state -> int
val production_index : production -> int
val find_production : int -> production
type element =
  1. | Element : 'a lr1state + * 'a + * IncrementalEngine.position + * IncrementalEngine.position -> element
type stack = element General.stream
val stack : 'a env -> stack
val top : 'a env -> element option
val pop_many : int -> 'a env -> 'a env option
val get : int -> 'a env -> element option
val current_state_number : 'a env -> int
val equal : 'a env -> 'a env -> bool
val env_has_default_reduction : 'a env -> bool
val state_has_default_reduction : _ lr1state -> bool
val pop : 'a env -> 'a env option
val force_reduction : production -> 'a env -> 'a env
val input_needed : 'a env -> 'a checkpoint
include INCREMENTAL_ENGINE_START + with type state := state + and type semantic_value := semantic_value + and type 'a checkpoint := 'a checkpoint
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/module-type-INCREMENTAL_ENGINE_START/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/module-type-INCREMENTAL_ENGINE_START/index.html new file mode 100644 index 000000000..221e27b1a --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/module-type-INCREMENTAL_ENGINE_START/index.html @@ -0,0 +1,2 @@ + +INCREMENTAL_ENGINE_START (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.EngineTypes.INCREMENTAL_ENGINE_START)

Module type EngineTypes.INCREMENTAL_ENGINE_START

type state
type semantic_value
type 'a checkpoint
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/module-type-MONOLITHIC_ENGINE/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/module-type-MONOLITHIC_ENGINE/index.html new file mode 100644 index 000000000..762aeeaa7 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/module-type-MONOLITHIC_ENGINE/index.html @@ -0,0 +1,7 @@ + +MONOLITHIC_ENGINE (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.EngineTypes.MONOLITHIC_ENGINE)

Module type EngineTypes.MONOLITHIC_ENGINE

type state
type token
type semantic_value
exception Error
val entry : + [ `Legacy | `Simplified ] -> + state -> + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + semantic_value
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/Log/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/Log/index.html new file mode 100644 index 000000000..d7e18c7ef --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/Log/index.html @@ -0,0 +1,2 @@ + +Log (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.EngineTypes.TABLE.Log)

Module TABLE.Log

val state : state -> unit
val shift : terminal -> state -> unit
val reduce_or_accept : production -> unit
val lookahead_token : terminal -> Lexing.position -> Lexing.position -> unit
val initiating_error_handling : unit -> unit
val resuming_error_handling : unit -> unit
val handling_error : state -> unit
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/index.html new file mode 100644 index 000000000..bb1058b8a --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/index.html @@ -0,0 +1,17 @@ + +TABLE (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.EngineTypes.TABLE)

Module type EngineTypes.TABLE

type state
val number : state -> int
type token
type terminal
type nonterminal
type semantic_value
val token2terminal : token -> terminal
val token2value : token -> semantic_value
val error_terminal : terminal
val error_value : semantic_value
val foreach_terminal : (terminal -> 'a -> 'a) -> 'a -> 'a
type production
val production_index : production -> int
val find_production : int -> production
val default_reduction : + state -> + ('env -> production -> 'answer) -> + ('env -> 'answer) -> + 'env -> + 'answer
val action : + state -> + terminal -> + semantic_value -> + ('env -> bool -> terminal -> semantic_value -> state -> 'answer) -> + ('env -> production -> 'answer) -> + ('env -> 'answer) -> + 'env -> + 'answer
val goto_nt : state -> nonterminal -> state
val goto_prod : state -> production -> state
val maybe_goto_nt : state -> nonterminal -> state option
val is_start : production -> bool
exception Error
type semantic_action = + (state, semantic_value, token) env -> + (state, semantic_value) stack
val semantic_action : production -> semantic_action
val may_reduce : state -> production -> bool
val log : bool
module Log : sig ... end
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/ErrorReports/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/ErrorReports/index.html new file mode 100644 index 000000000..810ce4d07 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/ErrorReports/index.html @@ -0,0 +1,8 @@ + +ErrorReports (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.ErrorReports)

Module CamlinternalMenhirLib.ErrorReports

type 'a buffer
val wrap : + (Lexing.lexbuf -> 'token) -> + (Lexing.position * Lexing.position) buffer * (Lexing.lexbuf -> 'token)
val wrap_supplier : + (unit -> 'token * Lexing.position * Lexing.position) -> + (Lexing.position * Lexing.position) buffer + * (unit -> + 'token * Lexing.position * Lexing.position)
val show : ('a -> string) -> 'a buffer -> string
val last : 'a buffer -> 'a
val extract : string -> (Lexing.position * Lexing.position) -> string
val sanitize : string -> string
val compress : string -> string
val shorten : int -> string -> string
val expand : (int -> string) -> string -> string
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/General/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/General/index.html new file mode 100644 index 000000000..72d893933 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/General/index.html @@ -0,0 +1,2 @@ + +General (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.General)

Module CamlinternalMenhirLib.General

val take : int -> 'a list -> 'a list
val drop : int -> 'a list -> 'a list
val uniq : ('a -> 'a -> int) -> 'a list -> 'a list
val weed : ('a -> 'a -> int) -> 'a list -> 'a list
type 'a stream = 'a head Lazy.t
and 'a head =
  1. | Nil
  2. | Cons of 'a * 'a stream
val length : 'a stream -> int
val foldr : ('a -> 'b -> 'b) -> 'a stream -> 'b -> 'b
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/IncrementalEngine/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/IncrementalEngine/index.html new file mode 100644 index 000000000..57661d06b --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/IncrementalEngine/index.html @@ -0,0 +1,2 @@ + +IncrementalEngine (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.IncrementalEngine)

Module CamlinternalMenhirLib.IncrementalEngine

type position = Lexing.position
module type INCREMENTAL_ENGINE = sig ... end
module type SYMBOLS = sig ... end
module type INSPECTION = sig ... end
module type EVERYTHING = sig ... end
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/IncrementalEngine/module-type-EVERYTHING/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/IncrementalEngine/module-type-EVERYTHING/index.html new file mode 100644 index 000000000..03f75f37f --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/IncrementalEngine/module-type-EVERYTHING/index.html @@ -0,0 +1,18 @@ + +EVERYTHING (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.IncrementalEngine.EVERYTHING)

Module type IncrementalEngine.EVERYTHING

include INCREMENTAL_ENGINE
type token
type production
type 'a env
type 'a checkpoint = private
  1. | InputNeeded of 'a env
  2. | Shifting of 'a env * 'a env * bool
  3. | AboutToReduce of 'a env * production
  4. | HandlingError of 'a env
  5. | Accepted of 'a
  6. | Rejected
val offer : 'a checkpoint -> (token * position * position) -> 'a checkpoint
type strategy = [
  1. | `Legacy
  2. | `Simplified
]
val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
type supplier = unit -> token * position * position
val lexer_lexbuf_to_supplier : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + supplier
val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
val loop_handle : + ('a -> 'answer) -> + ('a checkpoint -> 'answer) -> + supplier -> + 'a checkpoint -> + 'answer
val loop_handle_undo : + ('a -> 'answer) -> + ('a checkpoint -> 'a checkpoint -> 'answer) -> + supplier -> + 'a checkpoint -> + 'answer
val shifts : 'a checkpoint -> 'a env option
val acceptable : 'a checkpoint -> token -> position -> bool
type 'a lr1state
val number : _ lr1state -> int
val production_index : production -> int
val find_production : int -> production
type element =
  1. | Element : 'a lr1state * 'a * position * position -> element
type stack = element General.stream
val stack : 'a env -> stack
val top : 'a env -> element option
val pop_many : int -> 'a env -> 'a env option
val get : int -> 'a env -> element option
val current_state_number : 'a env -> int
val equal : 'a env -> 'a env -> bool
val positions : 'a env -> position * position
val env_has_default_reduction : 'a env -> bool
val state_has_default_reduction : _ lr1state -> bool
val pop : 'a env -> 'a env option
val force_reduction : production -> 'a env -> 'a env
val input_needed : 'a env -> 'a checkpoint
include INSPECTION + with type 'a lr1state := 'a lr1state + with type production := production + with type 'a env := 'a env
include SYMBOLS
type 'a terminal
type 'a nonterminal
type 'a symbol =
  1. | T : 'a terminal -> 'a symbol
  2. | N : 'a nonterminal -> 'a symbol
type xsymbol =
  1. | X : 'a symbol -> xsymbol
type item = production * int
val compare_terminals : _ terminal -> _ terminal -> int
val compare_nonterminals : _ nonterminal -> _ nonterminal -> int
val compare_symbols : xsymbol -> xsymbol -> int
val compare_productions : production -> production -> int
val compare_items : item -> item -> int
val incoming_symbol : 'a lr1state -> 'a symbol
val items : _ lr1state -> item list
val lhs : production -> xsymbol
val rhs : production -> xsymbol list
val nullable : _ nonterminal -> bool
val first : _ nonterminal -> _ terminal -> bool
val xfirst : xsymbol -> _ terminal -> bool
val foreach_terminal : (xsymbol -> 'a -> 'a) -> 'a -> 'a
val foreach_terminal_but_error : (xsymbol -> 'a -> 'a) -> 'a -> 'a
val feed : 'a symbol -> position -> 'a -> position -> 'b env -> 'b env
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/IncrementalEngine/module-type-INCREMENTAL_ENGINE/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/IncrementalEngine/module-type-INCREMENTAL_ENGINE/index.html new file mode 100644 index 000000000..24433f837 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/IncrementalEngine/module-type-INCREMENTAL_ENGINE/index.html @@ -0,0 +1,15 @@ + +INCREMENTAL_ENGINE (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE)

Module type IncrementalEngine.INCREMENTAL_ENGINE

type token
type production
type 'a env
type 'a checkpoint = private
  1. | InputNeeded of 'a env
  2. | Shifting of 'a env * 'a env * bool
  3. | AboutToReduce of 'a env * production
  4. | HandlingError of 'a env
  5. | Accepted of 'a
  6. | Rejected
val offer : 'a checkpoint -> (token * position * position) -> 'a checkpoint
type strategy = [
  1. | `Legacy
  2. | `Simplified
]
val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
type supplier = unit -> token * position * position
val lexer_lexbuf_to_supplier : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + supplier
val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
val loop_handle : + ('a -> 'answer) -> + ('a checkpoint -> 'answer) -> + supplier -> + 'a checkpoint -> + 'answer
val loop_handle_undo : + ('a -> 'answer) -> + ('a checkpoint -> 'a checkpoint -> 'answer) -> + supplier -> + 'a checkpoint -> + 'answer
val shifts : 'a checkpoint -> 'a env option
val acceptable : 'a checkpoint -> token -> position -> bool
type 'a lr1state
val number : _ lr1state -> int
val production_index : production -> int
val find_production : int -> production
type element =
  1. | Element : 'a lr1state * 'a * position * position -> element
type stack = element General.stream
val stack : 'a env -> stack
val top : 'a env -> element option
val pop_many : int -> 'a env -> 'a env option
val get : int -> 'a env -> element option
val current_state_number : 'a env -> int
val equal : 'a env -> 'a env -> bool
val positions : 'a env -> position * position
val env_has_default_reduction : 'a env -> bool
val state_has_default_reduction : _ lr1state -> bool
val pop : 'a env -> 'a env option
val force_reduction : production -> 'a env -> 'a env
val input_needed : 'a env -> 'a checkpoint
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/IncrementalEngine/module-type-INSPECTION/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/IncrementalEngine/module-type-INSPECTION/index.html new file mode 100644 index 000000000..485a684f3 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/IncrementalEngine/module-type-INSPECTION/index.html @@ -0,0 +1,2 @@ + +INSPECTION (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.IncrementalEngine.INSPECTION)

Module type IncrementalEngine.INSPECTION

include SYMBOLS
type 'a terminal
type 'a nonterminal
type 'a symbol =
  1. | T : 'a terminal -> 'a symbol
  2. | N : 'a nonterminal -> 'a symbol
type xsymbol =
  1. | X : 'a symbol -> xsymbol
type 'a lr1state
type production
type item = production * int
val compare_terminals : _ terminal -> _ terminal -> int
val compare_nonterminals : _ nonterminal -> _ nonterminal -> int
val compare_symbols : xsymbol -> xsymbol -> int
val compare_productions : production -> production -> int
val compare_items : item -> item -> int
val incoming_symbol : 'a lr1state -> 'a symbol
val items : _ lr1state -> item list
val lhs : production -> xsymbol
val rhs : production -> xsymbol list
val nullable : _ nonterminal -> bool
val first : _ nonterminal -> _ terminal -> bool
val xfirst : xsymbol -> _ terminal -> bool
val foreach_terminal : (xsymbol -> 'a -> 'a) -> 'a -> 'a
val foreach_terminal_but_error : (xsymbol -> 'a -> 'a) -> 'a -> 'a
type 'a env
val feed : 'a symbol -> position -> 'a -> position -> 'b env -> 'b env
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/IncrementalEngine/module-type-SYMBOLS/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/IncrementalEngine/module-type-SYMBOLS/index.html new file mode 100644 index 000000000..a343daa63 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/IncrementalEngine/module-type-SYMBOLS/index.html @@ -0,0 +1,2 @@ + +SYMBOLS (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.IncrementalEngine.SYMBOLS)

Module type IncrementalEngine.SYMBOLS

type 'a terminal
type 'a nonterminal
type 'a symbol =
  1. | T : 'a terminal -> 'a symbol
  2. | N : 'a nonterminal -> 'a symbol
type xsymbol =
  1. | X : 'a symbol -> xsymbol
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/InfiniteArray/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/InfiniteArray/index.html new file mode 100644 index 000000000..a68f0d82d --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/InfiniteArray/index.html @@ -0,0 +1,2 @@ + +InfiniteArray (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.InfiniteArray)

Module CamlinternalMenhirLib.InfiniteArray

type 'a t

This module implements infinite arrays. *

val make : 'a -> 'a t

make x creates an infinite array, where every slot contains x. *

val get : 'a t -> int -> 'a

get a i returns the element contained at offset i in the array a. Slots are numbered 0 and up. *

val set : 'a t -> int -> 'a -> unit

set a i x sets the element contained at offset i in the array a to x. Slots are numbered 0 and up. *

val extent : 'a t -> int

extent a is the length of an initial segment of the array a that is sufficiently large to contain all set operations ever performed. In other words, all elements beyond that segment have the default value.

val domain : 'a t -> 'a array

domain a is a fresh copy of an initial segment of the array a whose length is extent a.

diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableFormat/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableFormat/index.html new file mode 100644 index 000000000..80f8706b3 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableFormat/index.html @@ -0,0 +1,2 @@ + +InspectionTableFormat (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.InspectionTableFormat)

Module CamlinternalMenhirLib.InspectionTableFormat

module type TABLES = sig ... end
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableFormat/module-type-TABLES/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableFormat/module-type-TABLES/index.html new file mode 100644 index 000000000..5bffe6187 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableFormat/module-type-TABLES/index.html @@ -0,0 +1,2 @@ + +TABLES (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.InspectionTableFormat.TABLES)

Module type InspectionTableFormat.TABLES

include IncrementalEngine.SYMBOLS
type 'a terminal
type 'a nonterminal
type 'a symbol =
  1. | T : 'a terminal -> 'a symbol
  2. | N : 'a nonterminal -> 'a symbol
type xsymbol =
  1. | X : 'a symbol -> xsymbol
type 'a lr1state
val terminal : int -> xsymbol
val nonterminal : int -> xsymbol
val lr0_core : PackedIntArray.t
val lr0_incoming : PackedIntArray.t
val nullable : string
val first : int * string
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-1-TT/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-1-TT/index.html new file mode 100644 index 000000000..d5774ba3a --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-1-TT/index.html @@ -0,0 +1,3 @@ + +TT (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.InspectionTableInterpreter.Make.TT)

Parameter Make.TT

type token
val token2terminal : token -> int
val error_terminal : int
val token2value : token -> Obj.t
val default_reduction : PackedIntArray.t
val error : int * string
val start : int
val semantic_action : + ((int, Obj.t, token) EngineTypes.env -> (int, Obj.t) EngineTypes.stack) array
exception Error
val trace : (string array * string array) option
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-2-IT/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-2-IT/index.html new file mode 100644 index 000000000..81e561ac2 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-2-IT/index.html @@ -0,0 +1,2 @@ + +IT (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.InspectionTableInterpreter.Make.IT)

Parameter Make.IT

include IncrementalEngine.SYMBOLS
type 'a terminal
type 'a nonterminal
type 'a symbol =
  1. | T : 'a terminal -> 'a symbol
  2. | N : 'a nonterminal -> 'a symbol
type xsymbol =
  1. | X : 'a symbol -> xsymbol
type 'a lr1state = int
val terminal : int -> xsymbol
val nonterminal : int -> xsymbol
val lr0_core : PackedIntArray.t
val lr0_incoming : PackedIntArray.t
val nullable : string
val first : int * string
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/Log/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/Log/index.html new file mode 100644 index 000000000..bee6e80e9 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/Log/index.html @@ -0,0 +1,2 @@ + +Log (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.InspectionTableInterpreter.Make.ET.Log)

Module ET.Log

val state : state -> unit
val shift : terminal -> state -> unit
val reduce_or_accept : production -> unit
val lookahead_token : terminal -> Lexing.position -> Lexing.position -> unit
val initiating_error_handling : unit -> unit
val resuming_error_handling : unit -> unit
val handling_error : state -> unit
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/index.html new file mode 100644 index 000000000..5943e0d41 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/index.html @@ -0,0 +1,17 @@ + +ET (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.InspectionTableInterpreter.Make.ET)

Parameter Make.ET

type state
val number : state -> int
type token
type terminal = int
type nonterminal = int
type semantic_value = Obj.t
val token2terminal : token -> terminal
val token2value : token -> semantic_value
val error_terminal : terminal
val error_value : semantic_value
val foreach_terminal : (terminal -> 'a -> 'a) -> 'a -> 'a
type production
val production_index : production -> int
val find_production : int -> production
val default_reduction : + state -> + ('env -> production -> 'answer) -> + ('env -> 'answer) -> + 'env -> + 'answer
val action : + state -> + terminal -> + semantic_value -> + ('env -> bool -> terminal -> semantic_value -> state -> 'answer) -> + ('env -> production -> 'answer) -> + ('env -> 'answer) -> + 'env -> + 'answer
val goto_nt : state -> nonterminal -> state
val goto_prod : state -> production -> state
val maybe_goto_nt : state -> nonterminal -> state option
val is_start : production -> bool
exception Error
val semantic_action : production -> semantic_action
val may_reduce : state -> production -> bool
val log : bool
module Log : sig ... end
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-4-E/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-4-E/index.html new file mode 100644 index 000000000..59d941dfc --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-4-E/index.html @@ -0,0 +1,2 @@ + +E (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.InspectionTableInterpreter.Make.E)

Parameter Make.E

diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/index.html new file mode 100644 index 000000000..4daaa8a19 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Make/index.html @@ -0,0 +1,14 @@ + +Make (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.InspectionTableInterpreter.Make)

Module InspectionTableInterpreter.Make

Parameters

module IT : InspectionTableFormat.TABLES with type 'a lr1state = int
module ET : + EngineTypes.TABLE + with type terminal = int + and type nonterminal = int + and type semantic_value = Obj.t
module E : sig ... end

Signature

include IncrementalEngine.SYMBOLS + with type 'a terminal := 'a IT.terminal + with type 'a nonterminal := 'a IT.nonterminal
type 'a symbol =
  1. | T : 'a IT.terminal -> 'a symbol
  2. | N : 'a IT.nonterminal -> 'a symbol
type xsymbol =
  1. | X : 'a symbol -> xsymbol
type item = int * int
val compare_terminals : _ IT.terminal -> _ IT.terminal -> int
val compare_nonterminals : _ IT.nonterminal -> _ IT.nonterminal -> int
val compare_symbols : xsymbol -> xsymbol -> int
val compare_productions : int -> int -> int
val compare_items : item -> item -> int
val incoming_symbol : 'a IT.lr1state -> 'a symbol
val items : _ IT.lr1state -> item list
val lhs : int -> xsymbol
val rhs : int -> xsymbol list
val nullable : _ IT.nonterminal -> bool
val first : _ IT.nonterminal -> _ IT.terminal -> bool
val xfirst : xsymbol -> _ IT.terminal -> bool
val foreach_terminal : (xsymbol -> 'a -> 'a) -> 'a -> 'a
val foreach_terminal_but_error : (xsymbol -> 'a -> 'a) -> 'a -> 'a
val feed : + 'a symbol -> + IncrementalEngine.position -> + 'a -> + IncrementalEngine.position -> + 'b E.env -> + 'b E.env
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/argument-1-T/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/argument-1-T/index.html new file mode 100644 index 000000000..de33698ef --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.InspectionTableInterpreter.Symbols.T)

Parameter Symbols.T

type 'a terminal
type 'a nonterminal
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/index.html new file mode 100644 index 000000000..f0c7f9f74 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/index.html @@ -0,0 +1,2 @@ + +Symbols (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.InspectionTableInterpreter.Symbols)

Module InspectionTableInterpreter.Symbols

Parameters

module T : sig ... end

Signature

type 'a symbol =
  1. | T : 'a T.terminal -> 'a symbol
  2. | N : 'a T.nonterminal -> 'a symbol
type xsymbol =
  1. | X : 'a symbol -> xsymbol
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/index.html new file mode 100644 index 000000000..e9b7aab22 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/InspectionTableInterpreter/index.html @@ -0,0 +1,20 @@ + +InspectionTableInterpreter (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.InspectionTableInterpreter)

Module CamlinternalMenhirLib.InspectionTableInterpreter

module Symbols + (T : sig ... end) : + IncrementalEngine.SYMBOLS + with type 'a terminal := 'a T.terminal + and type 'a nonterminal := 'a T.nonterminal
module Make + (TT : TableFormat.TABLES) + (IT : InspectionTableFormat.TABLES with type 'a lr1state = int) + (ET : + EngineTypes.TABLE + with type terminal = int + and type nonterminal = int + and type semantic_value = Obj.t) + (E : sig ... end) : + IncrementalEngine.INSPECTION + with type 'a terminal := 'a IT.terminal + and type 'a nonterminal := 'a IT.nonterminal + and type 'a lr1state := 'a IT.lr1state + and type production := int + and type 'a env := 'a E.env
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/LexerUtil/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/LexerUtil/index.html new file mode 100644 index 000000000..3e14eb0fd --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/LexerUtil/index.html @@ -0,0 +1,2 @@ + +LexerUtil (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.LexerUtil)

Module CamlinternalMenhirLib.LexerUtil

val init : string -> Lexing.lexbuf -> Lexing.lexbuf
val read : string -> string * Lexing.lexbuf
val newline : Lexing.lexbuf -> unit
val range : (Lexing.position * Lexing.position) -> string
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/LinearizedArray/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/LinearizedArray/index.html new file mode 100644 index 000000000..3ac06c10e --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/LinearizedArray/index.html @@ -0,0 +1,2 @@ + +LinearizedArray (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.LinearizedArray)

Module CamlinternalMenhirLib.LinearizedArray

type 'a t = 'a array * int array
val make : 'a array array -> 'a t
val read : 'a t -> int -> int -> 'a
val write : 'a t -> int -> int -> 'a -> unit
val length : 'a t -> int
val row_length : 'a t -> int -> int
val read_row : 'a t -> int -> 'a list
val row_length_via : (int -> int) -> int -> int
val read_via : (int -> 'a) -> (int -> int) -> int -> int -> 'a
val read_row_via : (int -> 'a) -> (int -> int) -> int -> 'a list
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/PackedIntArray/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/PackedIntArray/index.html new file mode 100644 index 000000000..28f8a804e --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/PackedIntArray/index.html @@ -0,0 +1,2 @@ + +PackedIntArray (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.PackedIntArray)

Module CamlinternalMenhirLib.PackedIntArray

type t = int * string
val pack : int array -> t
val get : t -> int -> int
val get1 : string -> int -> int
val unflatten1 : (int * string) -> int -> int -> int
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/Printers/Make/argument-1-I/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/Printers/Make/argument-1-I/index.html new file mode 100644 index 000000000..4290808bc --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/Printers/Make/argument-1-I/index.html @@ -0,0 +1,34 @@ + +I (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.Printers.Make.I)

Parameter Make.I

include IncrementalEngine.INCREMENTAL_ENGINE
type token
type production
type 'a env
type 'a checkpoint = private
  1. | InputNeeded of 'a env
  2. | Shifting of 'a env * 'a env * bool
  3. | AboutToReduce of 'a env * production
  4. | HandlingError of 'a env
  5. | Accepted of 'a
  6. | Rejected
type strategy = [
  1. | `Legacy
  2. | `Simplified
]
val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
val lexer_lexbuf_to_supplier : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + supplier
val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
val loop_handle : + ('a -> 'answer) -> + ('a checkpoint -> 'answer) -> + supplier -> + 'a checkpoint -> + 'answer
val loop_handle_undo : + ('a -> 'answer) -> + ('a checkpoint -> 'a checkpoint -> 'answer) -> + supplier -> + 'a checkpoint -> + 'answer
val shifts : 'a checkpoint -> 'a env option
val acceptable : 'a checkpoint -> token -> IncrementalEngine.position -> bool
type 'a lr1state
val number : _ lr1state -> int
val production_index : production -> int
val find_production : int -> production
type element =
  1. | Element : 'a lr1state + * 'a + * IncrementalEngine.position + * IncrementalEngine.position -> element
type stack = element General.stream
val stack : 'a env -> stack
val top : 'a env -> element option
val pop_many : int -> 'a env -> 'a env option
val get : int -> 'a env -> element option
val current_state_number : 'a env -> int
val equal : 'a env -> 'a env -> bool
val env_has_default_reduction : 'a env -> bool
val state_has_default_reduction : _ lr1state -> bool
val pop : 'a env -> 'a env option
val force_reduction : production -> 'a env -> 'a env
val input_needed : 'a env -> 'a checkpoint
include IncrementalEngine.INSPECTION + with type 'a lr1state := 'a lr1state + with type production := production + with type 'a env := 'a env
include IncrementalEngine.SYMBOLS
type 'a terminal
type 'a nonterminal
type 'a symbol =
  1. | T : 'a terminal -> 'a symbol
  2. | N : 'a nonterminal -> 'a symbol
type xsymbol =
  1. | X : 'a symbol -> xsymbol
type item = production * int
val compare_terminals : _ terminal -> _ terminal -> int
val compare_nonterminals : _ nonterminal -> _ nonterminal -> int
val compare_symbols : xsymbol -> xsymbol -> int
val compare_productions : production -> production -> int
val compare_items : item -> item -> int
val incoming_symbol : 'a lr1state -> 'a symbol
val items : _ lr1state -> item list
val lhs : production -> xsymbol
val rhs : production -> xsymbol list
val nullable : _ nonterminal -> bool
val first : _ nonterminal -> _ terminal -> bool
val xfirst : xsymbol -> _ terminal -> bool
val foreach_terminal : (xsymbol -> 'a -> 'a) -> 'a -> 'a
val foreach_terminal_but_error : (xsymbol -> 'a -> 'a) -> 'a -> 'a
val feed : + 'a symbol -> + IncrementalEngine.position -> + 'a -> + IncrementalEngine.position -> + 'b env -> + 'b env
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/Printers/Make/argument-2-User/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/Printers/Make/argument-2-User/index.html new file mode 100644 index 000000000..eb50132cf --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/Printers/Make/argument-2-User/index.html @@ -0,0 +1,2 @@ + +User (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.Printers.Make.User)

Parameter Make.User

val print : string -> unit
val print_symbol : I.xsymbol -> unit
val print_element : (I.element -> unit) option
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/Printers/Make/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/Printers/Make/index.html new file mode 100644 index 000000000..2c071f09b --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/Printers/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.Printers.Make)

Module Printers.Make

Parameters

module User : sig ... end

Signature

val print_symbols : I.xsymbol list -> unit
val print_element_as_symbol : I.element -> unit
val print_stack : 'a I.env -> unit
val print_item : I.item -> unit
val print_production : I.production -> unit
val print_current_state : 'a I.env -> unit
val print_env : 'a I.env -> unit
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/Printers/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/Printers/index.html new file mode 100644 index 000000000..51b913032 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/Printers/index.html @@ -0,0 +1,5 @@ + +Printers (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.Printers)

Module CamlinternalMenhirLib.Printers

module Make + (I : IncrementalEngine.EVERYTHING) + (User : sig ... end) : + sig ... end
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/RowDisplacement/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/RowDisplacement/index.html new file mode 100644 index 000000000..277de0cf3 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/RowDisplacement/index.html @@ -0,0 +1,15 @@ + +RowDisplacement (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.RowDisplacement)

Module CamlinternalMenhirLib.RowDisplacement

type 'a table = int array * 'a array
val compress : + ('a -> 'a -> bool) -> + ('a -> bool) -> + 'a -> + int -> + int -> + 'a array array -> + 'a table
val get : 'a table -> int -> int -> 'a
val getget : + ('displacement -> int -> int) -> + ('data -> int -> 'a) -> + ('displacement * 'data) -> + int -> + int -> + 'a
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/StaticVersion/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/StaticVersion/index.html new file mode 100644 index 000000000..133345f32 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/StaticVersion/index.html @@ -0,0 +1,2 @@ + +StaticVersion (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.StaticVersion)

Module CamlinternalMenhirLib.StaticVersion

val require_20210419 : unit
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/TableFormat/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/TableFormat/index.html new file mode 100644 index 000000000..c88b1d748 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/TableFormat/index.html @@ -0,0 +1,2 @@ + +TableFormat (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.TableFormat)

Module CamlinternalMenhirLib.TableFormat

module type TABLES = sig ... end
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/TableFormat/module-type-TABLES/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/TableFormat/module-type-TABLES/index.html new file mode 100644 index 000000000..24c6171d7 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/TableFormat/module-type-TABLES/index.html @@ -0,0 +1,3 @@ + +TABLES (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.TableFormat.TABLES)

Module type TableFormat.TABLES

type token
val token2terminal : token -> int
val error_terminal : int
val token2value : token -> Obj.t
val default_reduction : PackedIntArray.t
val error : int * string
val start : int
val semantic_action : + ((int, Obj.t, token) EngineTypes.env -> (int, Obj.t) EngineTypes.stack) array
exception Error
val trace : (string array * string array) option
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/Log/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/Log/index.html new file mode 100644 index 000000000..8910bf49c --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/Log/index.html @@ -0,0 +1,2 @@ + +Log (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.TableInterpreter.MakeEngineTable.Log)

Module MakeEngineTable.Log

val state : state -> unit
val shift : terminal -> state -> unit
val reduce_or_accept : production -> unit
val lookahead_token : terminal -> Lexing.position -> Lexing.position -> unit
val initiating_error_handling : unit -> unit
val resuming_error_handling : unit -> unit
val handling_error : state -> unit
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/argument-1-T/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/argument-1-T/index.html new file mode 100644 index 000000000..57d7d5ca8 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/argument-1-T/index.html @@ -0,0 +1,3 @@ + +T (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.TableInterpreter.MakeEngineTable.T)

Parameter MakeEngineTable.T

type token
val token2terminal : token -> int
val error_terminal : int
val token2value : token -> Obj.t
val default_reduction : PackedIntArray.t
val error : int * string
val start : int
val semantic_action : + ((int, Obj.t, token) EngineTypes.env -> (int, Obj.t) EngineTypes.stack) array
exception Error
val trace : (string array * string array) option
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/index.html new file mode 100644 index 000000000..250e555ee --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/index.html @@ -0,0 +1,17 @@ + +MakeEngineTable (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.TableInterpreter.MakeEngineTable)

Module TableInterpreter.MakeEngineTable

Parameters

Signature

type state = int
val number : state -> int
type token = T.token
type terminal = int
type nonterminal = int
type semantic_value = Obj.t
val token2terminal : token -> terminal
val token2value : token -> semantic_value
val error_terminal : terminal
val error_value : semantic_value
val foreach_terminal : (terminal -> 'a -> 'a) -> 'a -> 'a
type production = int
val production_index : production -> int
val find_production : int -> production
val default_reduction : + state -> + ('env -> production -> 'answer) -> + ('env -> 'answer) -> + 'env -> + 'answer
val action : + state -> + terminal -> + semantic_value -> + ('env -> bool -> terminal -> semantic_value -> state -> 'answer) -> + ('env -> production -> 'answer) -> + ('env -> 'answer) -> + 'env -> + 'answer
val goto_nt : state -> nonterminal -> state
val goto_prod : state -> production -> state
val maybe_goto_nt : state -> nonterminal -> state option
val is_start : production -> bool
exception Error
val semantic_action : production -> semantic_action
val may_reduce : state -> production -> bool
val log : bool
module Log : sig ... end
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/TableInterpreter/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/TableInterpreter/index.html new file mode 100644 index 000000000..2844fc500 --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/TableInterpreter/index.html @@ -0,0 +1,10 @@ + +TableInterpreter (docs.findlib-0.compiler-libs.CamlinternalMenhirLib.TableInterpreter)

Module CamlinternalMenhirLib.TableInterpreter

module MakeEngineTable + (T : TableFormat.TABLES) : + EngineTypes.TABLE + with type state = int + and type token = T.token + and type semantic_value = Obj.t + and type production = int + and type terminal = int + and type nonterminal = int
diff --git a/findlib-0/compiler-libs/CamlinternalMenhirLib/index.html b/findlib-0/compiler-libs/CamlinternalMenhirLib/index.html new file mode 100644 index 000000000..0a3316f8d --- /dev/null +++ b/findlib-0/compiler-libs/CamlinternalMenhirLib/index.html @@ -0,0 +1,2 @@ + +CamlinternalMenhirLib (docs.findlib-0.compiler-libs.CamlinternalMenhirLib)

Module CamlinternalMenhirLib

module General : sig ... end
module Convert : sig ... end
module IncrementalEngine : sig ... end
module EngineTypes : sig ... end
module Engine : sig ... end
module ErrorReports : sig ... end
module LexerUtil : sig ... end
module Printers : sig ... end
module InfiniteArray : sig ... end
module PackedIntArray : sig ... end
module RowDisplacement : sig ... end
module LinearizedArray : sig ... end
module TableFormat : sig ... end
module InspectionTableFormat : sig ... end
module InspectionTableInterpreter : sig ... end
module TableInterpreter : sig ... end
module StaticVersion : sig ... end
diff --git a/findlib-0/compiler-libs/Ccomp/index.html b/findlib-0/compiler-libs/Ccomp/index.html new file mode 100644 index 000000000..831e457b7 --- /dev/null +++ b/findlib-0/compiler-libs/Ccomp/index.html @@ -0,0 +1,7 @@ + +Ccomp (docs.findlib-0.compiler-libs.Ccomp)

Module Ccomp

Compiling C files and building C libraries

Warning: this module is unstable and part of compiler-libs.

val command : string -> int
val run_command : string -> unit
val compile_file : + ?output:string -> + ?opt:string -> + ?stable_name:string -> + string -> + int
val create_archive : string -> string list -> int
val quote_files : response_files:bool -> string list -> string
val quote_optfile : string option -> string
val call_linker : link_mode -> string -> string list -> string -> int
diff --git a/findlib-0/compiler-libs/Clambda/index.html b/findlib-0/compiler-libs/Clambda/index.html new file mode 100644 index 000000000..bfe694492 --- /dev/null +++ b/findlib-0/compiler-libs/Clambda/index.html @@ -0,0 +1,19 @@ + +Clambda (docs.findlib-0.compiler-libs.Clambda)

Module Clambda

type function_label = string
type ustructured_constant =
  1. | Uconst_float of float
  2. | Uconst_int32 of int32
  3. | Uconst_int64 of int64
  4. | Uconst_nativeint of nativeint
  5. | Uconst_block of int * uconstant list
  6. | Uconst_float_array of float list
  7. | Uconst_string of string
  8. | Uconst_closure of ufunction list * string * uconstant list
and uconstant =
  1. | Uconst_ref of string * ustructured_constant option
  2. | Uconst_int of int
and uphantom_defining_expr =
  1. | Uphantom_const of uconstant
    (*

    The phantom-let-bound variable is a constant.

    *)
  2. | Uphantom_var of Backend_var.t
    (*

    The phantom-let-bound variable is an alias for another variable.

    *)
  3. | Uphantom_offset_var of {
    1. var : Backend_var.t;
    2. offset_in_words : int;
    }
    (*

    The phantom-let-bound-variable's value is defined by adding the given number of words to the pointer contained in the given identifier.

    *)
  4. | Uphantom_read_field of {
    1. var : Backend_var.t;
    2. field : int;
    }
    (*

    The phantom-let-bound-variable's value is found by adding the given number of words to the pointer contained in the given identifier, then dereferencing.

    *)
  5. | Uphantom_read_symbol_field of {
    1. sym : string;
    2. field : int;
    }
    (*

    As for Uphantom_read_var_field, but with the pointer specified by a symbol.

    *)
  6. | Uphantom_block of {
    1. tag : int;
    2. fields : Backend_var.t list;
    }
    (*

    The phantom-let-bound variable points at a block with the given structure.

    *)
and ulambda =
  1. | Uvar of Backend_var.t
  2. | Uconst of uconstant
  3. | Udirect_apply of function_label * ulambda list * Debuginfo.t
  4. | Ugeneric_apply of ulambda * ulambda list * Debuginfo.t
  5. | Uclosure of ufunction list * ulambda list
  6. | Uoffset of ulambda * int
  7. | Ulet of Asttypes.mutable_flag + * Lambda.value_kind + * Backend_var.With_provenance.t + * ulambda + * ulambda
  8. | Uphantom_let of Backend_var.With_provenance.t + * uphantom_defining_expr option + * ulambda
  9. | Uletrec of (Backend_var.With_provenance.t * ulambda) list * ulambda
  10. | Uprim of Clambda_primitives.primitive * ulambda list * Debuginfo.t
  11. | Uswitch of ulambda * ulambda_switch * Debuginfo.t
  12. | Ustringswitch of ulambda * (string * ulambda) list * ulambda option
  13. | Ustaticfail of int * ulambda list
  14. | Ucatch of int + * (Backend_var.With_provenance.t * Lambda.value_kind) list + * ulambda + * ulambda
  15. | Utrywith of ulambda * Backend_var.With_provenance.t * ulambda
  16. | Uifthenelse of ulambda * ulambda * ulambda
  17. | Usequence of ulambda * ulambda
  18. | Uwhile of ulambda * ulambda
  19. | Ufor of Backend_var.With_provenance.t + * ulambda + * ulambda + * Asttypes.direction_flag + * ulambda
  20. | Uassign of Backend_var.t * ulambda
  21. | Usend of Lambda.meth_kind * ulambda * ulambda * ulambda list * Debuginfo.t
  22. | Uunreachable
and ufunction = {
  1. label : function_label;
  2. arity : int;
  3. params : (Backend_var.With_provenance.t * Lambda.value_kind) list;
  4. return : Lambda.value_kind;
  5. body : ulambda;
  6. dbg : Debuginfo.t;
  7. env : Backend_var.t option;
  8. poll : Lambda.poll_attribute;
}
and ulambda_switch = {
  1. us_index_consts : int array;
  2. us_actions_consts : ulambda array;
  3. us_index_blocks : int array;
  4. us_actions_blocks : ulambda array;
}
type function_description = {
  1. fun_label : function_label;
  2. fun_arity : int;
  3. mutable fun_closed : bool;
  4. mutable fun_inline : (Backend_var.With_provenance.t list * ulambda) option;
  5. mutable fun_float_const_prop : bool;
  6. fun_poll : Lambda.poll_attribute;
}
type value_approximation =
  1. | Value_closure of function_description * value_approximation
  2. | Value_tuple of value_approximation array
  3. | Value_unknown
  4. | Value_const of uconstant
  5. | Value_global_field of string * int
val compare_structured_constants : + ustructured_constant -> + ustructured_constant -> + int
val compare_constants : uconstant -> uconstant -> int
type usymbol_provenance = {
  1. original_idents : Ident.t list;
  2. module_path : Path.t;
}
type uconstant_block_field =
  1. | Uconst_field_ref of string
  2. | Uconst_field_int of int
type preallocated_block = {
  1. symbol : string;
  2. exported : bool;
  3. tag : int;
  4. fields : uconstant_block_field option list;
  5. provenance : usymbol_provenance option;
}
type preallocated_constant = {
  1. symbol : string;
  2. exported : bool;
  3. definition : ustructured_constant;
  4. provenance : usymbol_provenance option;
}
type with_constants = + ulambda * preallocated_block list * preallocated_constant list
diff --git a/findlib-0/compiler-libs/Clambda_primitives/index.html b/findlib-0/compiler-libs/Clambda_primitives/index.html new file mode 100644 index 000000000..8281023ac --- /dev/null +++ b/findlib-0/compiler-libs/Clambda_primitives/index.html @@ -0,0 +1,2 @@ + +Clambda_primitives (docs.findlib-0.compiler-libs.Clambda_primitives)

Module Clambda_primitives

type mutable_flag = Asttypes.mutable_flag
type immediate_or_pointer = Lambda.immediate_or_pointer
type initialization_or_assignment = Lambda.initialization_or_assignment
type is_safe = Lambda.is_safe
type boxed =
  1. | Boxed
  2. | Unboxed
type memory_access_size =
  1. | Sixteen
  2. | Thirty_two
  3. | Sixty_four
type primitive =
  1. | Pread_symbol of string
  2. | Pmakeblock of int * mutable_flag * block_shape
  3. | Pfield of int * immediate_or_pointer * mutable_flag
  4. | Pfield_computed
  5. | Psetfield of int * immediate_or_pointer * initialization_or_assignment
  6. | Psetfield_computed of immediate_or_pointer * initialization_or_assignment
  7. | Pfloatfield of int
  8. | Psetfloatfield of int * initialization_or_assignment
  9. | Pduprecord of Types.record_representation * int
  10. | Prunstack
  11. | Pperform
  12. | Presume
  13. | Preperform
  14. | Pccall of Primitive.description
  15. | Praise of raise_kind
  16. | Psequand
  17. | Psequor
  18. | Pnot
  19. | Pnegint
  20. | Paddint
  21. | Psubint
  22. | Pmulint
  23. | Pdivint of is_safe
  24. | Pmodint of is_safe
  25. | Pandint
  26. | Porint
  27. | Pxorint
  28. | Plslint
  29. | Plsrint
  30. | Pasrint
  31. | Pintcomp of integer_comparison
  32. | Pcompare_ints
  33. | Pcompare_floats
  34. | Pcompare_bints of boxed_integer
  35. | Poffsetint of int
  36. | Poffsetref of int
  37. | Pintoffloat
  38. | Pfloatofint
  39. | Pnegfloat
  40. | Pabsfloat
  41. | Paddfloat
  42. | Psubfloat
  43. | Pmulfloat
  44. | Pdivfloat
  45. | Pfloatcomp of float_comparison
  46. | Pstringlength
  47. | Pstringrefu
  48. | Pstringrefs
  49. | Pbyteslength
  50. | Pbytesrefu
  51. | Pbytessetu
  52. | Pbytesrefs
  53. | Pbytessets
  54. | Pmakearray of array_kind * mutable_flag
    (*

    For Pmakearray, the list of arguments must not be empty. The empty array should be represented by a distinguished constant in the middle end.

    *)
  55. | Pduparray of array_kind * mutable_flag
    (*

    For Pduparray, the argument must be an immutable array. The arguments of Pduparray give the kind and mutability of the array being *produced* by the duplication.

    *)
  56. | Parraylength of array_kind
  57. | Parrayrefu of array_kind
  58. | Parraysetu of array_kind
  59. | Parrayrefs of array_kind
  60. | Parraysets of array_kind
  61. | Pisint
  62. | Pisout
  63. | Pbintofint of boxed_integer
  64. | Pintofbint of boxed_integer
  65. | Pcvtbint of boxed_integer * boxed_integer
  66. | Pnegbint of boxed_integer
  67. | Paddbint of boxed_integer
  68. | Psubbint of boxed_integer
  69. | Pmulbint of boxed_integer
  70. | Pdivbint of {
    1. size : boxed_integer;
    2. is_safe : is_safe;
    }
  71. | Pmodbint of {
    1. size : boxed_integer;
    2. is_safe : is_safe;
    }
  72. | Pandbint of boxed_integer
  73. | Porbint of boxed_integer
  74. | Pxorbint of boxed_integer
  75. | Plslbint of boxed_integer
  76. | Plsrbint of boxed_integer
  77. | Pasrbint of boxed_integer
  78. | Pbintcomp of boxed_integer * integer_comparison
  79. | Pbigarrayref of bool * int * bigarray_kind * bigarray_layout
  80. | Pbigarrayset of bool * int * bigarray_kind * bigarray_layout
  81. | Pbigarraydim of int
  82. | Pstring_load of memory_access_size * is_safe
  83. | Pbytes_load of memory_access_size * is_safe
  84. | Pbytes_set of memory_access_size * is_safe
  85. | Pbigstring_load of memory_access_size * is_safe
  86. | Pbigstring_set of memory_access_size * is_safe
  87. | Pbswap16
  88. | Pbbswap of boxed_integer
  89. | Pint_as_pointer
  90. | Patomic_load of {
    1. immediate_or_pointer : immediate_or_pointer;
    }
  91. | Patomic_exchange
  92. | Patomic_cas
  93. | Patomic_fetch_add
  94. | Popaque
  95. | Pdls_get
and integer_comparison = Lambda.integer_comparison =
  1. | Ceq
  2. | Cne
  3. | Clt
  4. | Cgt
  5. | Cle
  6. | Cge
and float_comparison = Lambda.float_comparison =
  1. | CFeq
  2. | CFneq
  3. | CFlt
  4. | CFnlt
  5. | CFgt
  6. | CFngt
  7. | CFle
  8. | CFnle
  9. | CFge
  10. | CFnge
and array_kind = Lambda.array_kind =
  1. | Pgenarray
  2. | Paddrarray
  3. | Pintarray
  4. | Pfloatarray
and value_kind = Lambda.value_kind =
  1. | Pgenval
  2. | Pfloatval
  3. | Pboxedintval of boxed_integer
  4. | Pintval
and block_shape = Lambda.block_shape
and boxed_integer = Primitive.boxed_integer =
  1. | Pnativeint
  2. | Pint32
  3. | Pint64
and bigarray_kind = Lambda.bigarray_kind =
  1. | Pbigarray_unknown
  2. | Pbigarray_float32
  3. | Pbigarray_float64
  4. | Pbigarray_sint8
  5. | Pbigarray_uint8
  6. | Pbigarray_sint16
  7. | Pbigarray_uint16
  8. | Pbigarray_int32
  9. | Pbigarray_int64
  10. | Pbigarray_caml_int
  11. | Pbigarray_native_int
  12. | Pbigarray_complex32
  13. | Pbigarray_complex64
and bigarray_layout = Lambda.bigarray_layout =
  1. | Pbigarray_unknown_layout
  2. | Pbigarray_c_layout
  3. | Pbigarray_fortran_layout
and raise_kind = Lambda.raise_kind =
  1. | Raise_regular
  2. | Raise_reraise
  3. | Raise_notrace
val equal : primitive -> primitive -> bool
diff --git a/findlib-0/compiler-libs/Clflags/Compiler_pass/index.html b/findlib-0/compiler-libs/Clflags/Compiler_pass/index.html new file mode 100644 index 000000000..ab200604f --- /dev/null +++ b/findlib-0/compiler-libs/Clflags/Compiler_pass/index.html @@ -0,0 +1,2 @@ + +Compiler_pass (docs.findlib-0.compiler-libs.Clflags.Compiler_pass)

Module Clflags.Compiler_pass

type t =
  1. | Parsing
  2. | Typing
  3. | Lambda
  4. | Scheduling
  5. | Emit
val of_string : string -> t option
val to_string : t -> string
val is_compilation_pass : t -> bool
val available_pass_names : filter:(t -> bool) -> native:bool -> string list
val can_save_ir_after : t -> bool
val compare : t -> t -> int
val to_output_filename : t -> prefix:string -> string
val of_input_filename : string -> t option
diff --git a/findlib-0/compiler-libs/Clflags/Float_arg_helper/index.html b/findlib-0/compiler-libs/Clflags/Float_arg_helper/index.html new file mode 100644 index 000000000..98f3f15d7 --- /dev/null +++ b/findlib-0/compiler-libs/Clflags/Float_arg_helper/index.html @@ -0,0 +1,2 @@ + +Float_arg_helper (docs.findlib-0.compiler-libs.Clflags.Float_arg_helper)

Module Clflags.Float_arg_helper

Optimization parameters represented as floats indexed by round number.

type parsed
val parse : string -> string -> parsed ref -> unit
type parse_result =
  1. | Ok
  2. | Parse_failed of exn
val parse_no_error : string -> parsed ref -> parse_result
val get : key:int -> parsed -> float
diff --git a/findlib-0/compiler-libs/Clflags/Int_arg_helper/index.html b/findlib-0/compiler-libs/Clflags/Int_arg_helper/index.html new file mode 100644 index 000000000..61fe64406 --- /dev/null +++ b/findlib-0/compiler-libs/Clflags/Int_arg_helper/index.html @@ -0,0 +1,2 @@ + +Int_arg_helper (docs.findlib-0.compiler-libs.Clflags.Int_arg_helper)

Module Clflags.Int_arg_helper

Optimization parameters represented as ints indexed by round number.

type parsed
val parse : string -> string -> parsed ref -> unit
type parse_result =
  1. | Ok
  2. | Parse_failed of exn
val parse_no_error : string -> parsed ref -> parse_result
val get : key:int -> parsed -> int
diff --git a/findlib-0/compiler-libs/Clflags/index.html b/findlib-0/compiler-libs/Clflags/index.html new file mode 100644 index 000000000..b88313d74 --- /dev/null +++ b/findlib-0/compiler-libs/Clflags/index.html @@ -0,0 +1,2 @@ + +Clflags (docs.findlib-0.compiler-libs.Clflags)

Module Clflags

Command line flags

module Int_arg_helper : sig ... end

Optimization parameters represented as ints indexed by round number.

module Float_arg_helper : sig ... end

Optimization parameters represented as floats indexed by round number.

type inlining_arguments = {
  1. inline_call_cost : int option;
  2. inline_alloc_cost : int option;
  3. inline_prim_cost : int option;
  4. inline_branch_cost : int option;
  5. inline_indirect_cost : int option;
  6. inline_lifting_benefit : int option;
  7. inline_branch_factor : float option;
  8. inline_max_depth : int option;
  9. inline_max_unroll : int option;
  10. inline_threshold : float option;
  11. inline_toplevel_threshold : int option;
}
val classic_arguments : inlining_arguments
val o1_arguments : inlining_arguments
val o2_arguments : inlining_arguments
val o3_arguments : inlining_arguments
val use_inlining_arguments_set : ?round:int -> inlining_arguments -> unit

Set all the inlining arguments for a round. The default is set if no round is provided.

val objfiles : string list ref
val ccobjs : string list ref
val dllibs : string list ref
val cmi_file : string option ref
val compile_only : bool ref
val output_name : string option ref
val include_dirs : string list ref
val no_std_include : bool ref
val no_cwd : bool ref
val print_types : bool ref
val make_archive : bool ref
val debug : bool ref
val debug_full : bool ref
val unsafe : bool ref
val use_linscan : bool ref
val custom_runtime : bool ref
val no_check_prims : bool ref
val bytecode_compatible_32 : bool ref
val output_c_object : bool ref
val output_complete_object : bool ref
val output_complete_executable : bool ref
val all_ccopts : string list ref
val classic : bool ref
val nopervasives : bool ref
val match_context_rows : int ref
val safer_matching : bool ref
val open_modules : string list ref
val preprocessor : string option ref
val all_ppx : string list ref
val absname : bool ref
val annotations : bool ref
val binary_annotations : bool ref
val use_threads : bool ref
val noassert : bool ref
val verbose : bool ref
val noprompt : bool ref
val nopromptcont : bool ref
val init_file : string option ref
val noinit : bool ref
val noversion : bool ref
val use_prims : string ref
val use_runtime : string ref
val plugin : bool ref
val principal : bool ref
val real_paths : bool ref
val recursive_types : bool ref
val strict_sequence : bool ref
val strict_formats : bool ref
val applicative_functors : bool ref
val make_runtime : bool ref
val c_compiler : string option ref
val dllpaths : string list ref
val make_package : bool ref
val for_package : string option ref
val error_size : int ref
val float_const_prop : bool ref
val transparent_modules : bool ref
val unique_ids : bool ref
val locations : bool ref
val dump_source : bool ref
val dump_parsetree : bool ref
val dump_typedtree : bool ref
val dump_shape : bool ref
val dump_rawlambda : bool ref
val dump_lambda : bool ref
val dump_rawclambda : bool ref
val dump_clambda : bool ref
val dump_rawflambda : bool ref
val dump_flambda : bool ref
val dump_flambda_let : int option ref
val dump_instr : bool ref
val keep_camlprimc_file : bool ref
val keep_asm_file : bool ref
val optimize_for_speed : bool ref
val dump_cmm : bool ref
val dump_selection : bool ref
val dump_cse : bool ref
val dump_live : bool ref
val dump_spill : bool ref
val dump_split : bool ref
val dump_interf : bool ref
val dump_prefer : bool ref
val dump_regalloc : bool ref
val dump_reload : bool ref
val dump_scheduling : bool ref
val dump_linear : bool ref
val dump_interval : bool ref
val keep_startup_file : bool ref
val dump_combine : bool ref
val native_code : bool ref
val default_inline_threshold : float
val inline_threshold : Float_arg_helper.parsed ref
val inlining_report : bool ref
val simplify_rounds : int option ref
val default_simplify_rounds : int ref
val rounds : unit -> int
val default_inline_max_unroll : int
val inline_max_unroll : Int_arg_helper.parsed ref
val default_inline_toplevel_threshold : int
val inline_toplevel_threshold : Int_arg_helper.parsed ref
val default_inline_call_cost : int
val default_inline_alloc_cost : int
val default_inline_prim_cost : int
val default_inline_branch_cost : int
val default_inline_indirect_cost : int
val default_inline_lifting_benefit : int
val inline_call_cost : Int_arg_helper.parsed ref
val inline_alloc_cost : Int_arg_helper.parsed ref
val inline_prim_cost : Int_arg_helper.parsed ref
val inline_branch_cost : Int_arg_helper.parsed ref
val inline_indirect_cost : Int_arg_helper.parsed ref
val inline_lifting_benefit : Int_arg_helper.parsed ref
val default_inline_branch_factor : float
val inline_branch_factor : Float_arg_helper.parsed ref
val dont_write_files : bool ref
val std_include_flag : string -> string
val std_include_dir : unit -> string list
val shared : bool ref
val dlcode : bool ref
val pic_code : bool ref
val runtime_variant : string ref
val with_runtime : bool ref
val force_slash : bool ref
val keep_docs : bool ref
val keep_locs : bool ref
val opaque : bool ref
val profile_columns : Profile.column list ref
val flambda_invariant_checks : bool ref
val unbox_closures : bool ref
val unbox_closures_factor : int ref
val default_unbox_closures_factor : int
val unbox_free_vars_of_closures : bool ref
val unbox_specialised_args : bool ref
val clambda_checks : bool ref
val cmm_invariants : bool ref
val default_inline_max_depth : int
val inline_max_depth : Int_arg_helper.parsed ref
val remove_unused_arguments : bool ref
val dump_flambda_verbose : bool ref
val classic_inlining : bool ref
val afl_instrument : bool ref
val afl_inst_ratio : int ref
val function_sections : bool ref
val all_passes : string list ref
val dumped_pass : string -> bool
val set_dumped_pass : string -> bool -> unit
val dump_into_file : bool ref
val dump_dir : string option ref
type 'a env_reader = {
  1. parse : string -> 'a option;
  2. print : 'a -> string;
  3. usage : string;
  4. env_var : string;
}
val color : Misc.Color.setting option ref
val color_reader : Misc.Color.setting env_reader
val error_style : Misc.Error_style.setting option ref
val error_style_reader : Misc.Error_style.setting env_reader
val unboxed_types : bool ref
val insn_sched : bool ref
val insn_sched_default : bool
module Compiler_pass : sig ... end
val stop_after : Compiler_pass.t option ref
val should_stop_after : Compiler_pass.t -> bool
val set_save_ir_after : Compiler_pass.t -> bool -> unit
val should_save_ir_after : Compiler_pass.t -> bool
val arg_spec : (string * Arg.spec * string) list ref
val add_arguments : string -> (string * Arg.spec * string) list -> unit
val create_usage_msg : string -> string
val print_arguments : string -> unit
val reset_arguments : unit -> unit
diff --git a/findlib-0/compiler-libs/Closure/index.html b/findlib-0/compiler-libs/Closure/index.html new file mode 100644 index 000000000..eeae59896 --- /dev/null +++ b/findlib-0/compiler-libs/Closure/index.html @@ -0,0 +1,6 @@ + +Closure (docs.findlib-0.compiler-libs.Closure)

Module Closure

val intro : + backend:(module Backend_intf.S) -> + size:int -> + Lambda.lambda -> + Clambda.ulambda
val reset : unit -> unit
diff --git a/findlib-0/compiler-libs/Closure_conversion/index.html b/findlib-0/compiler-libs/Closure_conversion/index.html new file mode 100644 index 000000000..6743f527b --- /dev/null +++ b/findlib-0/compiler-libs/Closure_conversion/index.html @@ -0,0 +1,7 @@ + +Closure_conversion (docs.findlib-0.compiler-libs.Closure_conversion)

Module Closure_conversion

val lambda_to_flambda : + backend:(module Backend_intf.S) -> + module_ident:Ident.t -> + size:int -> + Lambda.lambda -> + Flambda.program

Generation of Flambda intermediate language code from Lambda code by performing a form of closure conversion.

Function declarations (which may bind one or more variables identifying functions, possibly with mutual recursion) are transformed to Set_of_closures expressions. Project_closure expressions are then used to select a closure for a particular function from a Set_of_closures expression. The Set_of_closures expressions say nothing about the actual runtime layout of the closures; this is handled when Flambda code is translated to Clambda code.

The following transformations are also performed during closure conversion:

  • Constant blocks (by which is meant things wrapped in Lambda.Const_block) are converted to applications of the Pmakeblock primitive.
  • Levent debugging event nodes are removed and the information within them attached to function, method and raise calls.
  • Tuplified functions are converted to curried functions and a stub function emitted to call the curried version. For example: let rec f (x, y) = f (x + 1, y + 1) is transformed to: let rec internal_f x y = f (x + 1,y + 1) and f (x, y) = internal_f x y (* f is marked as a stub function *)
  • The Pdirapply and Prevapply application primitives are removed and converted to normal Flambda application nodes.

The lambda_to_flambda function is not re-entrant.

diff --git a/findlib-0/compiler-libs/Closure_conversion_aux/Env/index.html b/findlib-0/compiler-libs/Closure_conversion_aux/Env/index.html new file mode 100644 index 000000000..0bd67f14c --- /dev/null +++ b/findlib-0/compiler-libs/Closure_conversion_aux/Env/index.html @@ -0,0 +1,2 @@ + +Env (docs.findlib-0.compiler-libs.Closure_conversion_aux.Env)

Module Closure_conversion_aux.Env

Used to remember which Variable.t values correspond to which Ident.t values during closure conversion, and similarly for static exception identifiers.

type t
val empty : t
val add_var : t -> Ident.t -> Variable.t -> t
val add_vars : t -> Ident.t list -> Variable.t list -> t
val find_var : t -> Ident.t -> Variable.t
val find_var_exn : t -> Ident.t -> Variable.t
val add_mutable_var : t -> Ident.t -> Mutable_variable.t -> t
val find_mutable_var_exn : t -> Ident.t -> Mutable_variable.t
val add_static_exception : t -> int -> Static_exception.t -> t
val find_static_exception : t -> int -> Static_exception.t
val add_global : t -> int -> Symbol.t -> t
val find_global : t -> int -> Symbol.t
diff --git a/findlib-0/compiler-libs/Closure_conversion_aux/Function_decls/Function_decl/index.html b/findlib-0/compiler-libs/Closure_conversion_aux/Function_decls/Function_decl/index.html new file mode 100644 index 000000000..91b7855b4 --- /dev/null +++ b/findlib-0/compiler-libs/Closure_conversion_aux/Function_decls/Function_decl/index.html @@ -0,0 +1,10 @@ + +Function_decl (docs.findlib-0.compiler-libs.Closure_conversion_aux.Function_decls.Function_decl)

Module Function_decls.Function_decl

type t
val create : + let_rec_ident:Ident.t option -> + closure_bound_var:Variable.t -> + kind:Lambda.function_kind -> + params:Ident.t list -> + body:Lambda.lambda -> + attr:Lambda.function_attribute -> + loc:Lambda.scoped_location -> + t
val let_rec_ident : t -> Ident.t
val closure_bound_var : t -> Variable.t
val kind : t -> Lambda.function_kind
val params : t -> Ident.t list
val body : t -> Lambda.lambda
val inline : t -> Lambda.inline_attribute
val specialise : t -> Lambda.specialise_attribute
val is_a_functor : t -> bool
val stub : t -> bool
val poll_attribute : t -> Lambda.poll_attribute
val free_idents : t -> Ident.Set.t
diff --git a/findlib-0/compiler-libs/Closure_conversion_aux/Function_decls/index.html b/findlib-0/compiler-libs/Closure_conversion_aux/Function_decls/index.html new file mode 100644 index 000000000..977dc2202 --- /dev/null +++ b/findlib-0/compiler-libs/Closure_conversion_aux/Function_decls/index.html @@ -0,0 +1,2 @@ + +Function_decls (docs.findlib-0.compiler-libs.Closure_conversion_aux.Function_decls)

Module Closure_conversion_aux.Function_decls

Used to represent information about a set of function declarations during closure conversion. (The only case in which such a set may contain more than one declaration is when processing "let rec".)

module Function_decl : sig ... end
type t
val create : Function_decl.t list -> t
val to_list : t -> Function_decl.t list
val all_free_idents : t -> Ident.Set.t
val closure_env_without_parameters : Env.t -> t -> Env.t
diff --git a/findlib-0/compiler-libs/Closure_conversion_aux/index.html b/findlib-0/compiler-libs/Closure_conversion_aux/index.html new file mode 100644 index 000000000..a0de5271f --- /dev/null +++ b/findlib-0/compiler-libs/Closure_conversion_aux/index.html @@ -0,0 +1,2 @@ + +Closure_conversion_aux (docs.findlib-0.compiler-libs.Closure_conversion_aux)

Module Closure_conversion_aux

Environments and auxiliary structures used during closure conversion.

module Env : sig ... end

Used to remember which Variable.t values correspond to which Ident.t values during closure conversion, and similarly for static exception identifiers.

module Function_decls : sig ... end

Used to represent information about a set of function declarations during closure conversion. (The only case in which such a set may contain more than one declaration is when processing "let rec".)

diff --git a/findlib-0/compiler-libs/Closure_element/Map/index.html b/findlib-0/compiler-libs/Closure_element/Map/index.html new file mode 100644 index 000000000..de2a1b417 --- /dev/null +++ b/findlib-0/compiler-libs/Closure_element/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Closure_element.Map)

Module Closure_element.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Closure_element/Set/index.html b/findlib-0/compiler-libs/Closure_element/Set/index.html new file mode 100644 index 000000000..cfa4a1927 --- /dev/null +++ b/findlib-0/compiler-libs/Closure_element/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Closure_element.Set)

Module Closure_element.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Closure_element/T/index.html b/findlib-0/compiler-libs/Closure_element/T/index.html new file mode 100644 index 000000000..c0accc70d --- /dev/null +++ b/findlib-0/compiler-libs/Closure_element/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Closure_element.T)

Module Closure_element.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Closure_element/Tbl/index.html b/findlib-0/compiler-libs/Closure_element/Tbl/index.html new file mode 100644 index 000000000..85c7bfa63 --- /dev/null +++ b/findlib-0/compiler-libs/Closure_element/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Closure_element.Tbl)

Module Closure_element.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Closure_element/index.html b/findlib-0/compiler-libs/Closure_element/index.html new file mode 100644 index 000000000..5e57dfd91 --- /dev/null +++ b/findlib-0/compiler-libs/Closure_element/index.html @@ -0,0 +1,2 @@ + +Closure_element (docs.findlib-0.compiler-libs.Closure_element)

Module Closure_element

include Identifiable.S
type t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val wrap : Variable.t -> t
val unwrap : t -> Variable.t
val wrap_map : 'a Variable.Map.t -> 'a Map.t
val unwrap_set : Set.t -> Variable.Set.t
val in_compilation_unit : t -> Compilation_unit.t -> bool
val get_compilation_unit : t -> Compilation_unit.t
val unique_name : t -> string
val output_full : out_channel -> t -> unit
diff --git a/findlib-0/compiler-libs/Closure_id/Map/index.html b/findlib-0/compiler-libs/Closure_id/Map/index.html new file mode 100644 index 000000000..0909fac03 --- /dev/null +++ b/findlib-0/compiler-libs/Closure_id/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Closure_id.Map)

Module Closure_id.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Closure_id/Set/index.html b/findlib-0/compiler-libs/Closure_id/Set/index.html new file mode 100644 index 000000000..989b6a9f2 --- /dev/null +++ b/findlib-0/compiler-libs/Closure_id/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Closure_id.Set)

Module Closure_id.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Closure_id/T/index.html b/findlib-0/compiler-libs/Closure_id/T/index.html new file mode 100644 index 000000000..d58096bd3 --- /dev/null +++ b/findlib-0/compiler-libs/Closure_id/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Closure_id.T)

Module Closure_id.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Closure_id/Tbl/index.html b/findlib-0/compiler-libs/Closure_id/Tbl/index.html new file mode 100644 index 000000000..d08bdf66d --- /dev/null +++ b/findlib-0/compiler-libs/Closure_id/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Closure_id.Tbl)

Module Closure_id.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Closure_id/index.html b/findlib-0/compiler-libs/Closure_id/index.html new file mode 100644 index 000000000..452f5e442 --- /dev/null +++ b/findlib-0/compiler-libs/Closure_id/index.html @@ -0,0 +1,2 @@ + +Closure_id (docs.findlib-0.compiler-libs.Closure_id)

Module Closure_id

CR-someday lwhite: "Closure_id" is quite a generic name. I wonder whether something like "Closure_label" would better capture that it is the label of a projection.

An identifier, unique across the whole program (not just one compilation unit), that identifies a closure within a particular set of closures (viz. Project_closure).

include module type of Closure_element
include Identifiable.S
type t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val wrap : Variable.t -> t
val unwrap : t -> Variable.t
val wrap_map : 'a Variable.Map.t -> 'a Map.t
val unwrap_set : Set.t -> Variable.Set.t
val in_compilation_unit : t -> Compilation_unit.t -> bool
val get_compilation_unit : t -> Compilation_unit.t
val unique_name : t -> string
val output_full : out_channel -> t -> unit
diff --git a/findlib-0/compiler-libs/Closure_middle_end/index.html b/findlib-0/compiler-libs/Closure_middle_end/index.html new file mode 100644 index 000000000..6aa9da72e --- /dev/null +++ b/findlib-0/compiler-libs/Closure_middle_end/index.html @@ -0,0 +1,7 @@ + +Closure_middle_end (docs.findlib-0.compiler-libs.Closure_middle_end)

Module Closure_middle_end

val lambda_to_clambda : + backend:(module Backend_intf.S) -> + prefixname:string -> + ppf_dump:Format.formatter -> + Lambda.program -> + Clambda.with_constants
diff --git a/findlib-0/compiler-libs/Closure_offsets/index.html b/findlib-0/compiler-libs/Closure_offsets/index.html new file mode 100644 index 000000000..cec0cbe5f --- /dev/null +++ b/findlib-0/compiler-libs/Closure_offsets/index.html @@ -0,0 +1,2 @@ + +Closure_offsets (docs.findlib-0.compiler-libs.Closure_offsets)

Module Closure_offsets

Assign numerical offsets, within closure blocks, for code pointers and environment entries.

type result = private {
  1. function_offsets : int Closure_id.Map.t;
  2. free_variable_offsets : int Var_within_closure.Map.t;
}
val compute : Flambda.program -> result
diff --git a/findlib-0/compiler-libs/Closure_origin/Map/index.html b/findlib-0/compiler-libs/Closure_origin/Map/index.html new file mode 100644 index 000000000..7a2465e7d --- /dev/null +++ b/findlib-0/compiler-libs/Closure_origin/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Closure_origin.Map)

Module Closure_origin.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Closure_origin/Set/index.html b/findlib-0/compiler-libs/Closure_origin/Set/index.html new file mode 100644 index 000000000..20a691387 --- /dev/null +++ b/findlib-0/compiler-libs/Closure_origin/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Closure_origin.Set)

Module Closure_origin.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Closure_origin/T/index.html b/findlib-0/compiler-libs/Closure_origin/T/index.html new file mode 100644 index 000000000..2f9938e85 --- /dev/null +++ b/findlib-0/compiler-libs/Closure_origin/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Closure_origin.T)

Module Closure_origin.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Closure_origin/Tbl/index.html b/findlib-0/compiler-libs/Closure_origin/Tbl/index.html new file mode 100644 index 000000000..a2c031ff7 --- /dev/null +++ b/findlib-0/compiler-libs/Closure_origin/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Closure_origin.Tbl)

Module Closure_origin.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Closure_origin/index.html b/findlib-0/compiler-libs/Closure_origin/index.html new file mode 100644 index 000000000..bb8117c70 --- /dev/null +++ b/findlib-0/compiler-libs/Closure_origin/index.html @@ -0,0 +1,2 @@ + +Closure_origin (docs.findlib-0.compiler-libs.Closure_origin)

Module Closure_origin

include Identifiable.S
type t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val create : Closure_id.t -> t
val get_compilation_unit : t -> Compilation_unit.t
diff --git a/findlib-0/compiler-libs/Cmi_format/index.html b/findlib-0/compiler-libs/Cmi_format/index.html new file mode 100644 index 000000000..3d584bd40 --- /dev/null +++ b/findlib-0/compiler-libs/Cmi_format/index.html @@ -0,0 +1,2 @@ + +Cmi_format (docs.findlib-0.compiler-libs.Cmi_format)

Module Cmi_format

type pers_flags =
  1. | Rectypes
  2. | Alerts of Misc.alerts
  3. | Opaque
type cmi_infos = {
  1. cmi_name : Misc.modname;
  2. cmi_sign : Types.signature_item list;
  3. cmi_crcs : Misc.crcs;
  4. cmi_flags : pers_flags list;
}
val output_cmi : string -> out_channel -> cmi_infos -> Digest.t
val input_cmi : in_channel -> cmi_infos
val read_cmi : string -> cmi_infos
type error =
  1. | Not_an_interface of Misc.filepath
  2. | Wrong_version_interface of Misc.filepath * string
  3. | Corrupted_interface of Misc.filepath
exception Error of error
val report_error : Format.formatter -> error -> unit
diff --git a/findlib-0/compiler-libs/Cmm/index.html b/findlib-0/compiler-libs/Cmm/index.html new file mode 100644 index 000000000..e309335a4 --- /dev/null +++ b/findlib-0/compiler-libs/Cmm/index.html @@ -0,0 +1,30 @@ + +Cmm (docs.findlib-0.compiler-libs.Cmm)

Module Cmm

type machtype_component =
  1. | Val
  2. | Addr
  3. | Int
  4. | Float
type machtype = machtype_component array
val typ_void : machtype
val typ_val : machtype
val typ_addr : machtype
val typ_int : machtype
val typ_float : machtype

Least upper bound of two machtype_components.

val ge_component : machtype_component -> machtype_component -> bool

Returns true iff the first supplied machtype_component is greater than or equal to the second under the relation used by lub_component.

type exttype =
  1. | XInt
    (*

    r OCaml value, word-sized integer

    *)
  2. | XInt32
    (*

    r 32-bit integer

    *)
  3. | XInt64
    (*

    r 64-bit integer

    *)
  4. | XFloat
    (*

    r double-precision FP number

    *)

A variant of machtype used to describe arguments to external C functions

val machtype_of_exttype : exttype -> machtype
val machtype_of_exttype_list : exttype list -> machtype
type integer_comparison = Lambda.integer_comparison =
  1. | Ceq
  2. | Cne
  3. | Clt
  4. | Cgt
  5. | Cle
  6. | Cge
val negate_integer_comparison : integer_comparison -> integer_comparison
val swap_integer_comparison : integer_comparison -> integer_comparison
type float_comparison = Lambda.float_comparison =
  1. | CFeq
  2. | CFneq
  3. | CFlt
  4. | CFnlt
  5. | CFgt
  6. | CFngt
  7. | CFle
  8. | CFnle
  9. | CFge
  10. | CFnge
val negate_float_comparison : float_comparison -> float_comparison
val swap_float_comparison : float_comparison -> float_comparison
type label = int
val new_label : unit -> label
val set_label : label -> unit
val cur_label : unit -> label
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type phantom_defining_expr =
  1. | Cphantom_const_int of Targetint.t
    (*

    The phantom-let-bound variable is a constant integer. The argument must be the tagged representation of an integer within the range of type int on the target. (Analogously to Cconst_int.)

    *)
  2. | Cphantom_const_symbol of string
    (*

    The phantom-let-bound variable is an alias for a symbol.

    *)
  3. | Cphantom_var of Backend_var.t
    (*

    The phantom-let-bound variable is an alias for another variable. The aliased variable must not be a bound by a phantom let.

    *)
  4. | Cphantom_offset_var of {
    1. var : Backend_var.t;
    2. offset_in_words : int;
    }
    (*

    The phantom-let-bound-variable's value is defined by adding the given number of words to the pointer contained in the given identifier.

    *)
  5. | Cphantom_read_field of {
    1. var : Backend_var.t;
    2. field : int;
    }
    (*

    The phantom-let-bound-variable's value is found by adding the given number of words to the pointer contained in the given identifier, then dereferencing.

    *)
  6. | Cphantom_read_symbol_field of {
    1. sym : string;
    2. field : int;
    }
    (*

    As for Uphantom_read_var_field, but with the pointer specified by a symbol.

    *)
  7. | Cphantom_block of {
    1. tag : int;
    2. fields : Backend_var.t list;
    }
    (*

    The phantom-let-bound variable points at a block with the given structure.

    *)
type memory_chunk =
  1. | Byte_unsigned
  2. | Byte_signed
  3. | Sixteen_unsigned
  4. | Sixteen_signed
  5. | Thirtytwo_unsigned
  6. | Thirtytwo_signed
  7. | Word_int
  8. | Word_val
  9. | Single
  10. | Double
and operation =
  1. | Capply of machtype
  2. | Cextcall of string * machtype * exttype list * bool
    (*

    The machtype is the machine type of the result. The exttype list describes the unboxing types of the arguments. An empty list means "all arguments are machine words XInt". The boolean indicates whether the function may allocate.

    *)
  3. | Cload of {
    1. memory_chunk : memory_chunk;
    2. mutability : Asttypes.mutable_flag;
    3. is_atomic : bool;
    }
  4. | Calloc
  5. | Cstore of memory_chunk * Lambda.initialization_or_assignment
  6. | Caddi
  7. | Csubi
  8. | Cmuli
  9. | Cmulhi
  10. | Cdivi
  11. | Cmodi
  12. | Cand
  13. | Cor
  14. | Cxor
  15. | Clsl
  16. | Clsr
  17. | Casr
  18. | Ccmpi of integer_comparison
  19. | Caddv
  20. | Cadda
  21. | Ccmpa of integer_comparison
  22. | Cnegf
  23. | Cabsf
  24. | Caddf
  25. | Csubf
  26. | Cmulf
  27. | Cdivf
  28. | Cfloatofint
  29. | Cintoffloat
  30. | Ccmpf of float_comparison
  31. | Craise of Lambda.raise_kind
  32. | Ccheckbound
  33. | Copaque
  34. | Cdls_get
and expression =
  1. | Cconst_int of int * Debuginfo.t
  2. | Cconst_natint of nativeint * Debuginfo.t
  3. | Cconst_float of float * Debuginfo.t
  4. | Cconst_symbol of string * Debuginfo.t
  5. | Cvar of Backend_var.t
  6. | Clet of Backend_var.With_provenance.t * expression * expression
  7. | Clet_mut of Backend_var.With_provenance.t * machtype * expression * expression
  8. | Cphantom_let of Backend_var.With_provenance.t + * phantom_defining_expr option + * expression
  9. | Cassign of Backend_var.t * expression
  10. | Ctuple of expression list
  11. | Cop of operation * expression list * Debuginfo.t
  12. | Csequence of expression * expression
  13. | Cifthenelse of expression + * Debuginfo.t + * expression + * Debuginfo.t + * expression + * Debuginfo.t
  14. | Cswitch of expression + * int array + * (expression * Debuginfo.t) array + * Debuginfo.t
  15. | Ccatch of rec_flag + * (int + * (Backend_var.With_provenance.t * machtype) list + * expression + * Debuginfo.t) + list + * expression
  16. | Cexit of int * expression list
  17. | Ctrywith of expression + * Backend_var.With_provenance.t + * expression + * Debuginfo.t

Every basic block should have a corresponding Debuginfo.t for its beginning.

type codegen_option =
  1. | Reduce_code_size
  2. | No_CSE
type fundecl = {
  1. fun_name : string;
  2. fun_args : (Backend_var.With_provenance.t * machtype) list;
  3. fun_body : expression;
  4. fun_codegen_options : codegen_option list;
  5. fun_poll : Lambda.poll_attribute;
  6. fun_dbg : Debuginfo.t;
}
type data_item =
  1. | Cdefine_symbol of string
  2. | Cglobal_symbol of string
  3. | Cint8 of int
  4. | Cint16 of int
  5. | Cint32 of nativeint
  6. | Cint of nativeint
  7. | Csingle of float
  8. | Cdouble of float
  9. | Csymbol_address of string
  10. | Cstring of string
  11. | Cskip of int
  12. | Calign of int
type phrase =
  1. | Cfunction of fundecl
  2. | Cdata of data_item list
val ccatch : + (int + * (Backend_var.With_provenance.t * machtype) list + * expression + * expression + * Debuginfo.t) -> + expression
val reset : unit -> unit
val iter_shallow_tail : (expression -> unit) -> expression -> bool

Either apply the callback to all immediate sub-expressions that can produce the final result for the expression and return true, or do nothing and return false. Note that the notion of "tail" sub-expression used here does not match the one used to trigger tail calls; in particular, try...with handlers are considered to be in tail position (because their result become the final result for the expression).

val map_tail : (expression -> expression) -> expression -> expression

Apply the transformation to an expression, trying to push it to all inner sub-expressions that can produce the final result. Same disclaimer as for iter_shallow_tail about the notion of "tail" sub-expression.

val map_shallow : (expression -> expression) -> expression -> expression

Apply the transformation to each immediate sub-expression.

diff --git a/findlib-0/compiler-libs/Cmm_helpers/index.html b/findlib-0/compiler-libs/Cmm_helpers/index.html new file mode 100644 index 000000000..5d77709c0 --- /dev/null +++ b/findlib-0/compiler-libs/Cmm_helpers/index.html @@ -0,0 +1,322 @@ + +Cmm_helpers (docs.findlib-0.compiler-libs.Cmm_helpers)

Module Cmm_helpers

val bind : + string -> + Cmm.expression -> + (Cmm.expression -> Cmm.expression) -> + Cmm.expression

bind name arg fn is equivalent to let name = arg in fn name, or simply fn arg if arg is simple enough

val bind_load : + string -> + Cmm.expression -> + (Cmm.expression -> Cmm.expression) -> + Cmm.expression

Same as bind, but also treats loads from a variable as simple

val bind_nonvar : + string -> + Cmm.expression -> + (Cmm.expression -> Cmm.expression) -> + Cmm.expression

Same as bind, but does not treat variables as simple

Headers

val caml_black : nativeint

A null header with GC bits set to black

val floatarray_tag : Debuginfo.t -> Cmm.expression

A constant equal to the tag for float arrays

val block_header : int -> int -> nativeint

block_header tag size creates a header with tag tag for a block of size size

val black_block_header : int -> int -> nativeint

Same as block_header, but with GC bits set to black

val white_closure_header : int -> nativeint

Closure headers of the given size

val black_closure_header : int -> nativeint
val infix_header : int -> nativeint

Infix header at the given offset

val float_header : nativeint

Header for a boxed float value

val floatarray_header : int -> nativeint

Header for an unboxed float array of the given size

val string_header : int -> nativeint

Header for a string (or bytes) of the given length

val boxedint32_header : nativeint

Boxed integer headers

val boxedint64_header : nativeint
val boxedintnat_header : nativeint
val closure_info : arity:int -> startenv:int -> nativeint

Closure info for a closure of given arity and distance to environment

val alloc_float_header : Debuginfo.t -> Cmm.expression

Wrappers

val alloc_floatarray_header : int -> Debuginfo.t -> Cmm.expression
val alloc_closure_header : int -> Debuginfo.t -> Cmm.expression
val alloc_infix_header : int -> Debuginfo.t -> Cmm.expression
val alloc_closure_info : + arity:int -> + startenv:int -> + Debuginfo.t -> + Cmm.expression
val alloc_boxedint32_header : Debuginfo.t -> Cmm.expression
val alloc_boxedint64_header : Debuginfo.t -> Cmm.expression
val alloc_boxedintnat_header : Debuginfo.t -> Cmm.expression

Integers

val max_repr_int : int

Minimal/maximal OCaml integer values whose backend representation fits in a regular OCaml integer

val min_repr_int : int
val int_const : Debuginfo.t -> int -> Cmm.expression

Make an integer constant from the given integer (tags the integer)

val cint_const : int -> Cmm.data_item
val targetint_const : int -> Targetint.t
val natint_const_untagged : Debuginfo.t -> Nativeint.t -> Cmm.expression

Make a Cmm constant holding the given nativeint value. Uses Cconst_int instead of Cconst_nativeint when possible to preserve peephole optimisations.

val add_const : Cmm.expression -> int -> Debuginfo.t -> Cmm.expression

Add an integer to the given expression

Increment/decrement of integers

val ignore_low_bit_int : Cmm.expression -> Cmm.expression

Simplify the given expression knowing its last bit will be irrelevant

val ignore_high_bit_int : Cmm.expression -> Cmm.expression

Simplify the given expression knowing its first bit will be irrelevant

Arithmetical operations on integers

Integer tagging. tag_int x = (x lsl 1) + 1

Integer untagging. untag_int x = (x asr 1)

Specific division operations for boxed integers

val mk_if_then_else : + Debuginfo.t -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression -> + Cmm.expression

If-Then-Else expression mk_if_then_else dbg cond ifso_dbg ifso ifnot_dbg ifnot associates dbg to the global if-then-else expression, ifso_dbg to the then branch ifso, and ifnot_dbg to the else branch ifnot

Boolean negation

val mk_compare_ints : + Debuginfo.t -> + Cmm.expression -> + Cmm.expression -> + Cmm.expression

Integer and float comparison that returns int not bool

val mk_compare_floats : + Debuginfo.t -> + Cmm.expression -> + Cmm.expression -> + Cmm.expression
val create_loop : Cmm.expression -> Debuginfo.t -> Cmm.expression

Loop construction (while true do expr done). Used to be represented as Cloop.

val raise_symbol : Debuginfo.t -> string -> Cmm.expression

Exception raising

Convert a tagged integer into a raw integer with boolean meaning

Float boxing and unboxing

val unbox_float : Debuginfo.t -> Cmm.expression -> Cmm.expression
val box_complex : + Debuginfo.t -> + Cmm.expression -> + Cmm.expression -> + Cmm.expression

Complex number creation and access

val return_unit : Debuginfo.t -> Cmm.expression -> Cmm.expression

Make the given expression return a unit value

val remove_unit : Cmm.expression -> Cmm.expression

Remove a trailing unit return if any

Blocks

val mk_load_mut : Cmm.memory_chunk -> Cmm.operation

Non-atomic load of a mutable field

val mk_load_atomic : Cmm.memory_chunk -> Cmm.operation

Atomic load. All atomic fields are mutable.

val field_address : Cmm.expression -> int -> Debuginfo.t -> Cmm.expression

field_address ptr n dbg returns an expression for the address of the nth field of the block pointed to by ptr

val get_field_gen : + Asttypes.mutable_flag -> + Cmm.expression -> + int -> + Debuginfo.t -> + Cmm.expression

get_field_gen mut ptr n dbg returns an expression for the access to the nth field of the block pointed to by ptr

set_field ptr n newval init dbg returns an expression for setting the nth field of the block pointed to by ptr to newval

Load a block's header

val get_header_masked : Cmm.expression -> Debuginfo.t -> Cmm.expression

Same as get_header, but also clear all reserved bits of the result

Load a block's tag

Load a block's size

Arrays

val wordsize_shift : int
val numfloat_shift : int
val is_addr_array_hdr : Cmm.expression -> Debuginfo.t -> Cmm.expression

Check whether the given array is an array of regular OCaml values (as opposed to unboxed floats), from its header or pointer

val is_addr_array_ptr : Cmm.expression -> Debuginfo.t -> Cmm.expression
val addr_array_length_shifted : Cmm.expression -> Debuginfo.t -> Cmm.expression

Get the length of an array from its header Shifts by one bit less than necessary, keeping one of the GC colour bits, to save an operation when returning the length as a caml integer or when comparing it to a caml integer. Assumes that the reserved bits are clear (see get_header_masked)

val float_array_length_shifted : + Cmm.expression -> + Debuginfo.t -> + Cmm.expression
val array_indexing : + ?typ:Cmm.machtype_component -> + int -> + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression

For array_indexing ?typ log2size ptr ofs dbg : Produces a pointer to the element of the array ptr on the position ofs with the given element log2size log2 element size. ofs is given as a tagged int expression. The optional ?typ argument is the C-- type of the result. By default, it is Addr, meaning we are constructing a derived pointer into the heap. If we know the pointer is outside the heap (this is the case for bigarray indexing), we give type Int instead.

val addr_array_ref : + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression

Array loads and stores unboxed_float_array_ref and float_array_ref differ in the boxing of the result; float_array_set takes an unboxed float

val int_array_ref : + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression
val unboxed_float_array_ref : + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression
val float_array_ref : + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression
val addr_array_set : + Cmm.expression -> + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression
val addr_array_initialize : + Cmm.expression -> + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression
val int_array_set : + Cmm.expression -> + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression
val float_array_set : + Cmm.expression -> + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression

Strings

val string_length : Cmm.expression -> Debuginfo.t -> Cmm.expression
val bigstring_length : Cmm.expression -> Debuginfo.t -> Cmm.expression

Objects

val lookup_tag : + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression

Lookup a method by its hash, using caml_get_public_method Arguments :

  • obj : the object from which to lookup
  • tag : the hash of the method name, as a tagged integer
val lookup_label : + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression

Lookup a method by its offset in the method table Arguments :

  • obj : the object from which to lookup
  • lab : the position of the required method in the object's method array, as a tagged integer
val call_cached_method : + Cmm.expression -> + Cmm.expression -> + Cmm.expression -> + Cmm.expression -> + Cmm.expression list -> + Debuginfo.t -> + Cmm.expression

Lookup and call a method using the method cache Arguments :

  • obj : the object from which to lookup
  • tag : the hash of the method name, as a tagged integer
  • cache : the method cache array
  • pos : the position of the cache entry in the cache array
  • args : the additional arguments to the method call

Allocations

val make_alloc : Debuginfo.t -> int -> Cmm.expression list -> Cmm.expression

Allocate a block of regular values with the given tag

val make_float_alloc : + Debuginfo.t -> + int -> + Cmm.expression list -> + Cmm.expression

Allocate a block of unboxed floats with the given tag

Bounds checking

val make_checkbound : Debuginfo.t -> Cmm.expression list -> Cmm.expression

Generate a Ccheckbound term

check_bound safety access_size dbg length a2 k prefixes expression k with a check that reading access_size bits starting at position a2 in a string/bytes value of length length is within bounds, unless safety is Unsafe.

Sys.opaque_identity

Generic application functions

val apply_function_sym : int -> string

Get the symbol for the generic application with n arguments, and ensure its presence in the set of defined symbols

val curry_function_sym : int -> string

If n is positive, get the symbol for the generic currying wrapper with n arguments, and ensure its presence in the set of defined symbols. Otherwise, do the same for the generic tuple wrapper with -n arguments.

Bigarrays

val bigarray_get : + bool -> + Lambda.bigarray_kind -> + Lambda.bigarray_layout -> + Cmm.expression -> + Cmm.expression list -> + Debuginfo.t -> + Cmm.expression

bigarray_get unsafe kind layout b args dbg

  • unsafe : if true, do not insert bound checks
  • kind : see Lambda.bigarray_kind
  • layout : see Lambda.bigarray_layout
  • b : the bigarray to load from
  • args : a list of tagged integer expressions, corresponding to the indices in the respective dimensions
  • dbg : debugging information

bigarray_set unsafe kind layout b args newval dbg Same as bigarray_get, with newval the value being assigned

Operations on 32-bit integers

low_32 _ x is a value which agrees with x on at least the low 32 bits

val sign_extend_32 : Debuginfo.t -> Cmm.expression -> Cmm.expression

Sign extend from 32 bits to the word size

val zero_extend_32 : Debuginfo.t -> Cmm.expression -> Cmm.expression

Zero extend from 32 bits to the word size

Boxed numbers

val caml_nativeint_ops : string

Global symbols for the ops field of boxed integers

val caml_int32_ops : string
val caml_int64_ops : string

Box a given integer, without sharing of constants

Unbox a given boxed integer

val make_unsigned_int : + Primitive.boxed_integer -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression

Used to prepare 32-bit integers on 64-bit platforms for a lsr operation

val unaligned_load_16 : + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression
val unaligned_set_16 : + Cmm.expression -> + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression
val unaligned_load_32 : + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression
val unaligned_set_32 : + Cmm.expression -> + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression
val unaligned_load_64 : + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression
val unaligned_set_64 : + Cmm.expression -> + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression

Raw memory accesses

unaligned_set size ptr idx newval dbg

unaligned_load size ptr idx dbg

box_sized size dbg exp

Primitives

type unary_primitive = Cmm.expression -> Debuginfo.t -> Cmm.expression
val floatfield : int -> unary_primitive

Return the n-th field of a float array (or float-only record), as an unboxed float

val int_as_pointer : unary_primitive

Int_as_pointer primitive

Raise primitive

val negint : unary_primitive

Unary negation of an OCaml integer

val offsetint : int -> unary_primitive

Add a constant number to an OCaml integer

val offsetref : int -> unary_primitive

Add a constant number to an OCaml integer reference

val arraylength : Lambda.array_kind -> unary_primitive

Return the length of the array argument, as an OCaml integer

Byte swap primitive Operates on Cmm integers (unboxed values)

val bswap16 : unary_primitive

16-bit byte swap primitive Operates on Cmm integers (untagged integers)

type binary_primitive = + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression
type assignment_kind =
  1. | Caml_modify
  2. | Caml_initialize
  3. | Simple

setfield offset value_is_ptr init ptr value dbg

val setfloatfield : + int -> + Lambda.initialization_or_assignment -> + binary_primitive

setfloatfield offset init ptr value dbg value is expected to be an unboxed floating point number

val add_int_caml : binary_primitive

Operations on OCaml integers

val sub_int_caml : binary_primitive
val mul_int_caml : binary_primitive
val div_int_caml : Lambda.is_safe -> binary_primitive
val mod_int_caml : Lambda.is_safe -> binary_primitive
val and_int_caml : binary_primitive
val or_int_caml : binary_primitive
val xor_int_caml : binary_primitive
val lsl_int_caml : binary_primitive
val lsr_int_caml : binary_primitive
val asr_int_caml : binary_primitive

Strings, Bytes and Bigstrings

val stringref_unsafe : binary_primitive

Regular string/bytes access. Args: string/bytes, index

val stringref_safe : binary_primitive

Load by chunk from string/bytes, bigstring. Args: string, index

Arrays

val arrayref_unsafe : Lambda.array_kind -> binary_primitive

Array access. Args: array, index

val arrayref_safe : Lambda.array_kind -> binary_primitive
type ternary_primitive = + Cmm.expression -> + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression

Same as setfield, except the offset is one of the arguments. Args: pointer (structure/array/...), index, value

val bytesset_unsafe : ternary_primitive

Set the byte at the given offset to the given value. Args: bytes, index, value

val bytesset_safe : ternary_primitive
val arrayset_unsafe : Lambda.array_kind -> ternary_primitive

Set the element at the given index in the given array to the given value. WARNING: if kind is Pfloatarray, then value is expected to be an _unboxed_ float. Otherwise, it is expected to be a regular caml value, including in the case where the array contains floats. Args: array, index, value

val arrayset_safe : Lambda.array_kind -> ternary_primitive

Set a chunk of data in the given bytes or bigstring structure. See also string_load and bigstring_load. Note: value is expected to be an unboxed number of the given size. Args: pointer, index, value

Switch

val transl_isout : + Cmm.expression -> + Cmm.expression -> + Debuginfo.t -> + Cmm.expression

transl_isout h arg dbg

val make_switch : + Cmm.expression -> + int array -> + (Cmm.expression * Debuginfo.t) array -> + Debuginfo.t -> + Cmm.expression

make_switch arg cases actions dbg : Generate a Cswitch construct, or optimize as a static table lookup when possible.

val transl_int_switch : + Debuginfo.t -> + Cmm.expression -> + int -> + int -> + (int * Cmm.expression) list -> + Cmm.expression -> + Cmm.expression

transl_int_switch loc arg low high cases default

val transl_switch_clambda : + Debuginfo.t -> + Cmm.expression -> + int array -> + Cmm.expression array -> + Cmm.expression

transl_switch_clambda loc arg index cases

val strmatch_compile : + Debuginfo.t -> + Cmm.expression -> + Cmm.expression option -> + (string * Cmm.expression) list -> + Cmm.expression

strmatch_compile dbg arg default cases

Closures and function applications

val ptr_offset : Cmm.expression -> int -> Debuginfo.t -> Cmm.expression

Adds a constant offset to a pointer (for infix access)

val direct_apply : + string -> + Cmm.expression list -> + Debuginfo.t -> + Cmm.expression

Direct application of a function via a symbol

val generic_apply : + Asttypes.mutable_flag -> + Cmm.expression -> + Cmm.expression list -> + Debuginfo.t -> + Cmm.expression

Generic application of a function to one or several arguments. The mutable_flag argument annotates the loading of the code pointer from the closure. The Cmmgen code uses a mutable load by default, with a special case when the load is from (the first function of) the currently defined closure.

Method call : send kind met obj args dbg

  • met is a method identifier, which can be a hashed variant or an index in obj's method table, depending on kind
  • obj is the object whose method is being called
  • args is the extra arguments to the method call (Note: I'm not aware of any way for the frontend to generate any arguments other than the cache and cache position)

Generic Cmm fragments

val generic_functions : bool -> Cmx_format.unit_infos list -> Cmm.phrase list

Generate generic functions

val placeholder_dbg : unit -> Debuginfo.t
val placeholder_fun_dbg : human_name:string -> Debuginfo.t
val entry_point : string list -> Cmm.phrase

Entry point

val global_table : string list -> Cmm.phrase

Generate the caml_globals table

val reference_symbols : string list -> Cmm.phrase

Add references to the given symbols

val globals_map : + (string * Digest.t option * Digest.t option * string list) list -> + Cmm.phrase

Generate the caml_globals_map structure, as a marshalled string constant

val frame_table : string list -> Cmm.phrase

Generate the caml_frametable table, referencing the frametables from the given compilation units

val data_segment_table : string list -> Cmm.phrase

Generate the tables for data and code positions respectively of the given compilation units

val code_segment_table : string list -> Cmm.phrase
val predef_exception : int -> string -> Cmm.phrase

Generate data for a predefined exception

val plugin_header : (Cmx_format.unit_infos * Digest.t) list -> Cmm.phrase

Emit constant symbols

val cdefine_symbol : (string * Cmmgen_state.is_global) -> Cmm.data_item list

Produce the data_item list corresponding to a symbol definition

val emit_block : + (string * Cmmgen_state.is_global) -> + nativeint -> + Cmm.data_item list -> + Cmm.data_item list

emit_block symb white_header cont prepends to cont the header and symbol for the block. cont must already contain the fields of the block (and may contain additional data items afterwards).

val emit_float_constant : + (string * Cmmgen_state.is_global) -> + float -> + Cmm.data_item list -> + Cmm.data_item list

Emit specific kinds of constant blocks as data items

val emit_string_constant : + (string * Cmmgen_state.is_global) -> + string -> + Cmm.data_item list -> + Cmm.data_item list
val emit_int32_constant : + (string * Cmmgen_state.is_global) -> + int32 -> + Cmm.data_item list -> + Cmm.data_item list
val emit_int64_constant : + (string * Cmmgen_state.is_global) -> + int64 -> + Cmm.data_item list -> + Cmm.data_item list
val emit_nativeint_constant : + (string * Cmmgen_state.is_global) -> + nativeint -> + Cmm.data_item list -> + Cmm.data_item list
val emit_float_array_constant : + (string * Cmmgen_state.is_global) -> + float list -> + Cmm.data_item list -> + Cmm.data_item list
val fundecls_size : Clambda.ufunction list -> int
val emit_constant_closure : + (string * Cmmgen_state.is_global) -> + Clambda.ufunction list -> + Cmm.data_item list -> + Cmm.data_item list -> + Cmm.data_item list
val emit_preallocated_blocks : + Clambda.preallocated_block list -> + Cmm.phrase list -> + Cmm.phrase list
diff --git a/findlib-0/compiler-libs/Cmm_invariants/index.html b/findlib-0/compiler-libs/Cmm_invariants/index.html new file mode 100644 index 000000000..b1a0a48a3 --- /dev/null +++ b/findlib-0/compiler-libs/Cmm_invariants/index.html @@ -0,0 +1,2 @@ + +Cmm_invariants (docs.findlib-0.compiler-libs.Cmm_invariants)

Module Cmm_invariants

Check a number of continuation-related invariants

val run : Format.formatter -> Cmm.fundecl -> bool

run ppf fundecl analyses the given function, and returns whether any errors were encountered (with corresponding error messages printed on the given formatter).

diff --git a/findlib-0/compiler-libs/Cmmgen/index.html b/findlib-0/compiler-libs/Cmmgen/index.html new file mode 100644 index 000000000..6d09b2ee4 --- /dev/null +++ b/findlib-0/compiler-libs/Cmmgen/index.html @@ -0,0 +1,6 @@ + +Cmmgen (docs.findlib-0.compiler-libs.Cmmgen)

Module Cmmgen

diff --git a/findlib-0/compiler-libs/Cmmgen_state/index.html b/findlib-0/compiler-libs/Cmmgen_state/index.html new file mode 100644 index 000000000..f397970ab --- /dev/null +++ b/findlib-0/compiler-libs/Cmmgen_state/index.html @@ -0,0 +1,2 @@ + +Cmmgen_state (docs.findlib-0.compiler-libs.Cmmgen_state)

Module Cmmgen_state

Mutable state used by Cmmgen.

type is_global =
  1. | Global
  2. | Local
type constant =
  1. | Const_closure of is_global * Clambda.ufunction list * Clambda.uconstant list
  2. | Const_table of is_global * Cmm.data_item list
val add_constant : Misc.Stdlib.String.t -> constant -> unit
val add_data_items : Cmm.data_item list -> unit
val add_function : Clambda.ufunction -> unit
val get_and_clear_constants : unit -> constant Misc.Stdlib.String.Map.t
val get_and_clear_data_items : unit -> Cmm.data_item list
val next_function : unit -> Clambda.ufunction option
val no_more_functions : unit -> bool
val set_structured_constants : Clambda.preallocated_constant list -> unit
val add_structured_constant : string -> Clambda.ustructured_constant -> unit
val structured_constant_of_sym : string -> Clambda.ustructured_constant option
diff --git a/findlib-0/compiler-libs/Cmo_format/index.html b/findlib-0/compiler-libs/Cmo_format/index.html new file mode 100644 index 000000000..cf7394db9 --- /dev/null +++ b/findlib-0/compiler-libs/Cmo_format/index.html @@ -0,0 +1,2 @@ + +Cmo_format (docs.findlib-0.compiler-libs.Cmo_format)

Module Cmo_format

type reloc_info =
  1. | Reloc_literal of Obj.t
  2. | Reloc_getglobal of Ident.t
  3. | Reloc_setglobal of Ident.t
  4. | Reloc_primitive of string
type compilation_unit = {
  1. cu_name : Misc.modname;
  2. mutable cu_pos : int;
  3. cu_codesize : int;
  4. cu_reloc : (reloc_info * int) list;
  5. cu_imports : Misc.crcs;
  6. cu_required_globals : Ident.t list;
  7. cu_primitives : string list;
  8. mutable cu_debug : int;
  9. cu_debugsize : int;
}
type library = {
  1. lib_units : compilation_unit list;
  2. lib_custom : bool;
  3. lib_ccobjs : string list;
  4. lib_ccopts : string list;
  5. lib_dllibs : string list;
}
diff --git a/findlib-0/compiler-libs/Cmt2annot/index.html b/findlib-0/compiler-libs/Cmt2annot/index.html new file mode 100644 index 000000000..2f36721b6 --- /dev/null +++ b/findlib-0/compiler-libs/Cmt2annot/index.html @@ -0,0 +1,7 @@ + +Cmt2annot (docs.findlib-0.compiler-libs.Cmt2annot)

Module Cmt2annot

val gen_annot : + string option -> + sourcefile:string option -> + use_summaries:bool -> + Cmt_format.binary_annots -> + unit
diff --git a/findlib-0/compiler-libs/Cmt_format/index.html b/findlib-0/compiler-libs/Cmt_format/index.html new file mode 100644 index 000000000..df9c7e5a4 --- /dev/null +++ b/findlib-0/compiler-libs/Cmt_format/index.html @@ -0,0 +1,15 @@ + +Cmt_format (docs.findlib-0.compiler-libs.Cmt_format)

Module Cmt_format

cmt and cmti files format.

The layout of a cmt file is as follows: <cmt> := {<cmi>} <cmt magic> {cmt infos} {<source info>} where <cmi> is the cmi file format: <cmi> := <cmi magic> <cmi info>. More precisely, the optional <cmi> part must be present if and only if the file is:

Thus, we provide a common reading function for cmi and cmt(i) files which returns an option for each of the three parts: cmi info, cmt info, source info.

type binary_annots =
  1. | Packed of Types.signature * string list
  2. | Implementation of Typedtree.structure
  3. | Interface of Typedtree.signature
  4. | Partial_implementation of binary_part array
  5. | Partial_interface of binary_part array
and binary_part =
  1. | Partial_structure of Typedtree.structure
  2. | Partial_structure_item of Typedtree.structure_item
  3. | Partial_expression of Typedtree.expression
  4. | Partial_pattern : 'k Typedtree.pattern_category + * 'k Typedtree.general_pattern -> binary_part
  5. | Partial_class_expr of Typedtree.class_expr
  6. | Partial_signature of Typedtree.signature
  7. | Partial_signature_item of Typedtree.signature_item
  8. | Partial_module_type of Typedtree.module_type
type cmt_infos = {
  1. cmt_modname : Misc.modname;
  2. cmt_annots : binary_annots;
  3. cmt_value_dependencies : (Types.value_description * Types.value_description) + list;
  4. cmt_comments : (string * Location.t) list;
  5. cmt_args : string array;
  6. cmt_sourcefile : string option;
  7. cmt_builddir : string;
  8. cmt_loadpath : string list;
  9. cmt_source_digest : string option;
  10. cmt_initial_env : Env.t;
  11. cmt_imports : Misc.crcs;
  12. cmt_interface_digest : Digest.t option;
  13. cmt_use_summaries : bool;
  14. cmt_uid_to_loc : Location.t Shape.Uid.Tbl.t;
  15. cmt_impl_shape : Shape.t option;
}
type error =
  1. | Not_a_typedtree of string
exception Error of error
val read : string -> Cmi_format.cmi_infos option * cmt_infos option

read filename opens filename, and extract both the cmi_infos, if it exists, and the cmt_infos, if it exists. Thus, it can be used with .cmi, .cmt and .cmti files.

.cmti files always contain a cmi_infos at the beginning. .cmt files only contain a cmi_infos at the beginning if there is no associated .cmti file.

val read_cmt : string -> cmt_infos
val read_cmi : string -> Cmi_format.cmi_infos
val save_cmt : + string -> + string -> + binary_annots -> + string option -> + Env.t -> + Cmi_format.cmi_infos option -> + Shape.t option -> + unit

save_cmt filename modname binary_annots sourcefile initial_env cmi writes a cmt(i) file.

val read_magic_number : in_channel -> string
val clear : unit -> unit
val add_saved_type : binary_part -> unit
val get_saved_types : unit -> binary_part list
val set_saved_types : binary_part list -> unit
val record_value_dependency : + Types.value_description -> + Types.value_description -> + unit
diff --git a/findlib-0/compiler-libs/Cmx_format/index.html b/findlib-0/compiler-libs/Cmx_format/index.html new file mode 100644 index 000000000..ca5332b8d --- /dev/null +++ b/findlib-0/compiler-libs/Cmx_format/index.html @@ -0,0 +1,2 @@ + +Cmx_format (docs.findlib-0.compiler-libs.Cmx_format)

Module Cmx_format

type export_info =
  1. | Clambda of Clambda.value_approximation
  2. | Flambda of Export_info.t
type unit_infos = {
  1. mutable ui_name : Misc.modname;
  2. mutable ui_symbol : string;
  3. mutable ui_defines : string list;
  4. mutable ui_imports_cmi : Misc.crcs;
  5. mutable ui_imports_cmx : Misc.crcs;
  6. mutable ui_curry_fun : int list;
  7. mutable ui_apply_fun : int list;
  8. mutable ui_send_fun : int list;
  9. mutable ui_export_info : export_info;
  10. mutable ui_for_pack : string option;
}
type library_infos = {
  1. lib_units : (unit_infos * Digest.t) list;
  2. lib_ccobjs : string list;
  3. lib_ccopts : string list;
}
diff --git a/findlib-0/compiler-libs/Cmxs_format/index.html b/findlib-0/compiler-libs/Cmxs_format/index.html new file mode 100644 index 000000000..098d50c9c --- /dev/null +++ b/findlib-0/compiler-libs/Cmxs_format/index.html @@ -0,0 +1,2 @@ + +Cmxs_format (docs.findlib-0.compiler-libs.Cmxs_format)

Module Cmxs_format

type modname = string
type crcs = (modname * Digest.t option) list
type dynunit = {
  1. dynu_name : modname;
  2. dynu_crc : Digest.t;
  3. dynu_imports_cmi : crcs;
  4. dynu_imports_cmx : crcs;
  5. dynu_defines : string list;
}
type dynheader = {
  1. dynu_magic : string;
  2. dynu_units : dynunit list;
}
diff --git a/findlib-0/compiler-libs/Coloring/index.html b/findlib-0/compiler-libs/Coloring/index.html new file mode 100644 index 000000000..6a5cd22fe --- /dev/null +++ b/findlib-0/compiler-libs/Coloring/index.html @@ -0,0 +1,2 @@ + +Coloring (docs.findlib-0.compiler-libs.Coloring)

Module Coloring

val allocate_registers : unit -> int array
diff --git a/findlib-0/compiler-libs/Comballoc/index.html b/findlib-0/compiler-libs/Comballoc/index.html new file mode 100644 index 000000000..9787cccd0 --- /dev/null +++ b/findlib-0/compiler-libs/Comballoc/index.html @@ -0,0 +1,2 @@ + +Comballoc (docs.findlib-0.compiler-libs.Comballoc)

Module Comballoc

val fundecl : Mach.fundecl -> Mach.fundecl
diff --git a/findlib-0/compiler-libs/Compenv/index.html b/findlib-0/compiler-libs/Compenv/index.html new file mode 100644 index 000000000..bc061fc9b --- /dev/null +++ b/findlib-0/compiler-libs/Compenv/index.html @@ -0,0 +1,18 @@ + +Compenv (docs.findlib-0.compiler-libs.Compenv)

Module Compenv

exception Exit_with_status of int
val module_of_filename : string -> string -> string
val output_prefix : string -> string
val extract_output : string option -> string
val default_output : string option -> string
val print_version_and_library : string -> 'a
val print_version_string : unit -> 'a
val print_standard_library : unit -> 'a
val fatal : string -> 'a
val first_ccopts : string list ref
val first_ppx : string list ref
val first_include_dirs : string list ref
val last_include_dirs : string list ref
val get_objfiles : with_ocamlparam:bool -> string list
val last_objfiles : string list ref
val first_objfiles : string list ref
val stop_early : bool ref
val has_linker_inputs : bool ref
type filename = string
type readenv_position =
  1. | Before_args
  2. | Before_compile of filename
val readenv : Format.formatter -> readenv_position -> unit
val is_unit_name : string -> bool
val check_unit_name : string -> string -> unit
type deferred_action =
  1. | ProcessImplementation of string
  2. | ProcessInterface of string
  3. | ProcessCFile of string
  4. | ProcessOtherFile of string
  5. | ProcessObjects of string list
  6. | ProcessDLLs of string list
val c_object_of_filename : string -> string
val defer : deferred_action -> unit
val anonymous : string -> unit
val impl : string -> unit
val intf : string -> unit
val process_deferred_actions : + (Format.formatter + * (start_from:Clflags.Compiler_pass.t -> + source_file:string -> + output_prefix:string -> + unit) + * (source_file:string -> + output_prefix:string -> + unit) + * string + * string) -> + unit
val parse_arguments : + ?current:int ref -> + string array ref -> + Arg.anon_fun -> + string -> + unit
diff --git a/findlib-0/compiler-libs/Compilation_unit/Map/index.html b/findlib-0/compiler-libs/Compilation_unit/Map/index.html new file mode 100644 index 000000000..bc87d2345 --- /dev/null +++ b/findlib-0/compiler-libs/Compilation_unit/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Compilation_unit.Map)

Module Compilation_unit.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Compilation_unit/Set/index.html b/findlib-0/compiler-libs/Compilation_unit/Set/index.html new file mode 100644 index 000000000..6a34df5cb --- /dev/null +++ b/findlib-0/compiler-libs/Compilation_unit/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Compilation_unit.Set)

Module Compilation_unit.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Compilation_unit/T/index.html b/findlib-0/compiler-libs/Compilation_unit/T/index.html new file mode 100644 index 000000000..7189f5b4c --- /dev/null +++ b/findlib-0/compiler-libs/Compilation_unit/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Compilation_unit.T)

Module Compilation_unit.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Compilation_unit/Tbl/index.html b/findlib-0/compiler-libs/Compilation_unit/Tbl/index.html new file mode 100644 index 000000000..ed5bfa8c3 --- /dev/null +++ b/findlib-0/compiler-libs/Compilation_unit/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Compilation_unit.Tbl)

Module Compilation_unit.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Compilation_unit/index.html b/findlib-0/compiler-libs/Compilation_unit/index.html new file mode 100644 index 000000000..3b4faeef3 --- /dev/null +++ b/findlib-0/compiler-libs/Compilation_unit/index.html @@ -0,0 +1,2 @@ + +Compilation_unit (docs.findlib-0.compiler-libs.Compilation_unit)

Module Compilation_unit

include Identifiable.S
type t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val create : Ident.t -> Linkage_name.t -> t
val get_persistent_ident : t -> Ident.t
val get_linkage_name : t -> Linkage_name.t
val is_current : t -> bool
val set_current : t -> unit
val get_current : unit -> t option
val get_current_exn : unit -> t
val get_current_id_exn : unit -> Ident.t
val string_for_printing : t -> string
diff --git a/findlib-0/compiler-libs/Compile/index.html b/findlib-0/compiler-libs/Compile/index.html new file mode 100644 index 000000000..e5c023fef --- /dev/null +++ b/findlib-0/compiler-libs/Compile/index.html @@ -0,0 +1,12 @@ + +Compile (docs.findlib-0.compiler-libs.Compile)

Module Compile

Bytecode compilation for .ml and .mli files.

val interface : source_file:string -> output_prefix:string -> unit
val implementation : + start_from:Clflags.Compiler_pass.t -> + source_file:string -> + output_prefix:string -> + unit

Internal functions

*

to_bytecode info typed takes a typechecked implementation and returns its bytecode.

val emit_bytecode : + Compile_common.info -> + (Instruct.instruction list * Ident.Set.t) -> + unit

emit_bytecode bytecode output the bytecode executable.

diff --git a/findlib-0/compiler-libs/Compile_common/index.html b/findlib-0/compiler-libs/Compile_common/index.html new file mode 100644 index 000000000..1586633fa --- /dev/null +++ b/findlib-0/compiler-libs/Compile_common/index.html @@ -0,0 +1,12 @@ + +Compile_common (docs.findlib-0.compiler-libs.Compile_common)

Module Compile_common

Common compilation pipeline between bytecode and native.

Initialization

type info = {
  1. source_file : string;
  2. module_name : string;
  3. output_prefix : string;
  4. env : Env.t;
  5. ppf_dump : Format.formatter;
  6. tool_name : string;
  7. native : bool;
}

Information needed to compile a file.

val with_info : + native:bool -> + tool_name:string -> + source_file:string -> + output_prefix:string -> + dump_ext:string -> + (info -> 'a) -> + 'a

with_info ~native ~tool_name ~source_file ~output_prefix ~dump_ext k invokes its continuation k with an info structure built from its input, after initializing various global variables. This info structure and the initialized global state are not valid anymore after the continuation returns.

Due to current implementation limitations in the compiler, it is unsafe to try to compile several distinct compilation units by calling with_info several times.

Interfaces

val parse_intf : info -> Parsetree.signature

parse_intf info parses an interface (usually an .mli file).

val typecheck_intf : info -> Parsetree.signature -> Typedtree.signature

typecheck_intf info parsetree typechecks an interface and returns the typedtree of the associated signature.

val emit_signature : info -> Parsetree.signature -> Typedtree.signature -> unit

emit_signature info parsetree typedtree emits the .cmi file containing the given signature.

val interface : info -> unit

The complete compilation pipeline for interfaces.

Implementations

val parse_impl : info -> Parsetree.structure

parse_impl info parses an implementation (usually an .ml file).

typecheck_impl info parsetree typechecks an implementation and returns the typedtree of the associated module, its public interface, and a coercion against that public interface.

val implementation : + info -> + backend:(info -> Typedtree.implementation -> unit) -> + unit

The complete compilation pipeline for implementations.

Build artifacts

val cmo : info -> string
val cmx : info -> string
val obj : info -> string
val annot : info -> string

Return the filename of some compiler build artifacts associated with the file being compiled.

diff --git a/findlib-0/compiler-libs/Compilenv/index.html b/findlib-0/compiler-libs/Compilenv/index.html new file mode 100644 index 000000000..95f975bbc --- /dev/null +++ b/findlib-0/compiler-libs/Compilenv/index.html @@ -0,0 +1,8 @@ + +Compilenv (docs.findlib-0.compiler-libs.Compilenv)

Module Compilenv

val imported_sets_of_closures_table : + Simple_value_approx.function_declarations option Set_of_closures_id.Tbl.t
val reset : ?packname:string -> string -> unit
val unit_id_from_name : string -> Ident.t
val current_unit_infos : unit -> Cmx_format.unit_infos
val current_unit_name : unit -> string
val current_unit_linkage_name : unit -> Linkage_name.t
val current_unit : unit -> Compilation_unit.t
val current_unit_symbol : unit -> Symbol.t
val make_symbol : ?unitname:string -> string option -> string
val symbol_in_current_unit : string -> bool
val is_predefined_exception : Symbol.t -> bool
val unit_for_global : Ident.t -> Compilation_unit.t
val symbol_for_global : Ident.t -> string
val symbol_for_global' : Ident.t -> Symbol.t
val global_approx : Ident.t -> Clambda.value_approximation
val set_global_approx : Clambda.value_approximation -> unit
val record_global_approx_toplevel : unit -> unit
val set_export_info : Export_info.t -> unit
val approx_env : unit -> Export_info.t
val approx_for_global : Compilation_unit.t -> Export_info.t option
val need_curry_fun : int -> unit
val need_apply_fun : int -> unit
val need_send_fun : int -> unit
val new_const_symbol : unit -> string
val closure_symbol : Closure_id.t -> Symbol.t
val function_label : Closure_id.t -> string
val new_structured_constant : + Clambda.ustructured_constant -> + shared:bool -> + string
val structured_constants : unit -> Clambda.preallocated_constant list
val clear_structured_constants : unit -> unit
val structured_constant_of_symbol : + string -> + Clambda.ustructured_constant option
val add_exported_constant : string -> unit
type structured_constants
val snapshot : unit -> structured_constants
val backtrack : structured_constants -> unit
val read_unit_info : string -> Cmx_format.unit_infos * Digest.t
val write_unit_info : Cmx_format.unit_infos -> string -> unit
val save_unit_info : string -> unit
val cache_unit_info : Cmx_format.unit_infos -> unit
val require_global : Ident.t -> unit
val read_library_info : string -> Cmx_format.library_infos
type error =
  1. | Not_a_unit_info of string
  2. | Corrupted_unit_info of string
  3. | Illegal_renaming of string * string * string
  4. | Mismatching_for_pack of string * string * string * string option
exception Error of error
val report_error : Format.formatter -> error -> unit
diff --git a/findlib-0/compiler-libs/Compmisc/index.html b/findlib-0/compiler-libs/Compmisc/index.html new file mode 100644 index 000000000..f31376701 --- /dev/null +++ b/findlib-0/compiler-libs/Compmisc/index.html @@ -0,0 +1,6 @@ + +Compmisc (docs.findlib-0.compiler-libs.Compmisc)

Module Compmisc

val init_path : + ?auto_include:Load_path.auto_include_callback -> + ?dir:string -> + unit -> + unit
val initial_env : unit -> Env.t
val set_from_env : 'a option ref -> 'a Clflags.env_reader -> unit
val read_clflags_from_env : unit -> unit
val with_ppf_dump : file_prefix:string -> (Format.formatter -> 'a) -> 'a

auto_include find_in_dir fn is a callback function to be passed to Load_path.init and automatically adds -I +lib to the load path after displaying an alert.

diff --git a/findlib-0/compiler-libs/Compression/index.html b/findlib-0/compiler-libs/Compression/index.html new file mode 100644 index 000000000..0064f65e8 --- /dev/null +++ b/findlib-0/compiler-libs/Compression/index.html @@ -0,0 +1,2 @@ + +Compression (docs.findlib-0.compiler-libs.Compression)

Module Compression

val output_value : out_channel -> 'a -> unit

Compression.output_value chan v writes the representation of v on channel chan. If compression is supported, the marshaled data representing value v is compressed before being written to channel chan. If compression is not supported, this function behaves like Stdlib.output_value.

val input_value : in_channel -> 'a

Compression.input_value chan reads from channel chan the byte representation of a structured value, as produced by Compression.output_value, and reconstructs and returns the corresponding value. If compression is not supported, this function behaves like Stdlib.input_value.

val compression_supported : bool

Reports whether compression is supported.

diff --git a/findlib-0/compiler-libs/Config/index.html b/findlib-0/compiler-libs/Config/index.html new file mode 100644 index 000000000..6807bd23a --- /dev/null +++ b/findlib-0/compiler-libs/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-0.compiler-libs.Config)

Module Config

System configuration

Warning: this module is unstable and part of compiler-libs.

val version : string

The current version number of the system

val bindir : string

The directory containing the binary programs

val standard_library : string

The directory containing the standard libraries

val ccomp_type : string

The "kind" of the C compiler, assembler and linker used: one of "cc" (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)

val c_compiler : string

The compiler to use for compiling C files

val c_output_obj : string

Name of the option of the C compiler for specifying the output file

val c_has_debug_prefix_map : bool

Whether the C compiler supports -fdebug-prefix-map

val as_has_debug_prefix_map : bool

Whether the assembler supports --debug-prefix-map

val ocamlc_cflags : string

The flags ocamlc should pass to the C compiler

val ocamlc_cppflags : string

The flags ocamlc should pass to the C preprocessor

val ocamlopt_cflags : string
  • deprecated

    ocamlc_cflags should be used instead. The flags ocamlopt should pass to the C compiler

val ocamlopt_cppflags : string
  • deprecated

    ocamlc_cppflags should be used instead. The flags ocamlopt should pass to the C preprocessor

val bytecomp_c_libraries : string

The C libraries to link with custom runtimes

val native_c_libraries : string

The C libraries to link with native-code programs

val native_pack_linker : string

The linker to use for packaging (ocamlopt -pack) and for partial links (ocamlopt -output-obj).

val mkdll : string

The linker command line to build dynamic libraries.

val mkexe : string

The linker command line to build executables.

val mkmaindll : string

The linker command line to build main programs as dlls.

val default_rpath : string

Option to add a directory to be searched for libraries at runtime (used by ocamlmklib)

val mksharedlibrpath : string

Option to add a directory to be searched for shared libraries at runtime (used by ocamlmklib)

val ar : string

Name of the ar command, or "" if not needed (MSVC)

val interface_suffix : string ref

Suffix for interface file names

val exec_magic_number : string

Magic number for bytecode executable files

val cmi_magic_number : string

Magic number for compiled interface files

val cmo_magic_number : string

Magic number for object bytecode files

val cma_magic_number : string

Magic number for archive files

val cmx_magic_number : string

Magic number for compilation unit descriptions

val cmxa_magic_number : string

Magic number for libraries of compilation unit descriptions

val ast_intf_magic_number : string

Magic number for file holding an interface syntax tree

val ast_impl_magic_number : string

Magic number for file holding an implementation syntax tree

val cmxs_magic_number : string

Magic number for dynamically-loadable plugins

val cmt_magic_number : string

Magic number for compiled interface files

val linear_magic_number : string

Magic number for Linear internal representation files

val max_tag : int

Biggest tag that can be stored in the header of a regular block.

val lazy_tag : int

Normally the same as Obj.lazy_tag. Separate definition because of technical reasons for bootstrapping.

val max_young_wosize : int

Maximal size of arrays that are directly allocated in the minor heap

val stack_threshold : int

Size in words of safe area at bottom of VM stack, see runtime/caml/config.h

val stack_safety_margin : int

Size in words of the safety margin between the bottom of the stack and the stack pointer. This margin can be used by intermediate computations of some instructions, or the event handler.

val native_compiler : bool

Whether the native compiler is available or not

  • since 5.1
val architecture : string

Name of processor type for the native-code compiler

val model : string

Name of processor submodel for the native-code compiler

val system : string

Name of operating system for the native-code compiler

val asm : string

The assembler (and flags) to use for assembling ocamlopt-generated code.

val asm_cfi_supported : bool

Whether assembler understands CFI directives

val with_frame_pointers : bool

Whether assembler should maintain frame pointers

val ext_obj : string

Extension for object files, e.g. .o under Unix.

val ext_asm : string

Extension for assembler files, e.g. .s under Unix.

val ext_lib : string

Extension for library files, e.g. .a under Unix.

val ext_dll : string

Extension for dynamically-loaded libraries, e.g. .so under Unix.

val ext_exe : string

Extension for executable programs, e.g. .exe under Windows.

  • since 4.12
val default_executable_name : string

Name of executable produced by linking if none is given with -o, e.g. a.out under Unix.

val systhread_supported : bool

Whether the system thread library is implemented

val flexdll_dirs : string list

Directories needed for the FlexDLL objects

val host : string

Whether the compiler is a cross-compiler

val target : string

Whether the compiler is a cross-compiler

val flambda : bool

Whether the compiler was configured for flambda

val with_flambda_invariants : bool

Whether the invariants checks for flambda are enabled

val with_cmm_invariants : bool

Whether the invariants checks for Cmm are enabled

val reserved_header_bits : int

How many bits of a block's header are reserved

val flat_float_array : bool

Whether the compiler and runtime automagically flatten float arrays

val function_sections : bool

Whether the compiler was configured to generate each function in a separate section

val windows_unicode : bool

Whether Windows Unicode runtime is enabled

val naked_pointers : bool

Whether the runtime supports naked pointers

  • since 4.14
val supports_shared_libraries : bool

Whether shared libraries are supported

  • since 4.08

Whether native shared libraries are supported

  • since 5.1
val afl_instrument : bool

Whether afl-fuzz instrumentation is generated by default

val ar_supports_response_files : bool

Whether ar supports @FILE arguments.

val print_config : out_channel -> unit

Access to configuration values

val config_var : string -> string option

the configuration value of a variable, if it exists

diff --git a/findlib-0/compiler-libs/Config_boot/index.html b/findlib-0/compiler-libs/Config_boot/index.html new file mode 100644 index 000000000..63df9622b --- /dev/null +++ b/findlib-0/compiler-libs/Config_boot/index.html @@ -0,0 +1,2 @@ + +Config_boot (docs.findlib-0.compiler-libs.Config_boot)

Module Config_boot

System configuration

Warning: this module is unstable and part of compiler-libs.

val version : string

The current version number of the system

val bindir : string

The directory containing the binary programs

val standard_library : string

The directory containing the standard libraries

val ccomp_type : string

The "kind" of the C compiler, assembler and linker used: one of "cc" (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)

val c_compiler : string

The compiler to use for compiling C files

val c_output_obj : string

Name of the option of the C compiler for specifying the output file

val c_has_debug_prefix_map : bool

Whether the C compiler supports -fdebug-prefix-map

val as_has_debug_prefix_map : bool

Whether the assembler supports --debug-prefix-map

val ocamlc_cflags : string

The flags ocamlc should pass to the C compiler

val ocamlc_cppflags : string

The flags ocamlc should pass to the C preprocessor

val ocamlopt_cflags : string
  • deprecated

    ocamlc_cflags should be used instead. The flags ocamlopt should pass to the C compiler

val ocamlopt_cppflags : string
  • deprecated

    ocamlc_cppflags should be used instead. The flags ocamlopt should pass to the C preprocessor

val bytecomp_c_libraries : string

The C libraries to link with custom runtimes

val native_c_libraries : string

The C libraries to link with native-code programs

val native_pack_linker : string

The linker to use for packaging (ocamlopt -pack) and for partial links (ocamlopt -output-obj).

val mkdll : string

The linker command line to build dynamic libraries.

val mkexe : string

The linker command line to build executables.

val mkmaindll : string

The linker command line to build main programs as dlls.

val default_rpath : string

Option to add a directory to be searched for libraries at runtime (used by ocamlmklib)

val mksharedlibrpath : string

Option to add a directory to be searched for shared libraries at runtime (used by ocamlmklib)

val ar : string

Name of the ar command, or "" if not needed (MSVC)

val interface_suffix : string ref

Suffix for interface file names

val exec_magic_number : string

Magic number for bytecode executable files

val cmi_magic_number : string

Magic number for compiled interface files

val cmo_magic_number : string

Magic number for object bytecode files

val cma_magic_number : string

Magic number for archive files

val cmx_magic_number : string

Magic number for compilation unit descriptions

val cmxa_magic_number : string

Magic number for libraries of compilation unit descriptions

val ast_intf_magic_number : string

Magic number for file holding an interface syntax tree

val ast_impl_magic_number : string

Magic number for file holding an implementation syntax tree

val cmxs_magic_number : string

Magic number for dynamically-loadable plugins

val cmt_magic_number : string

Magic number for compiled interface files

val linear_magic_number : string

Magic number for Linear internal representation files

val max_tag : int

Biggest tag that can be stored in the header of a regular block.

val lazy_tag : int

Normally the same as Obj.lazy_tag. Separate definition because of technical reasons for bootstrapping.

val max_young_wosize : int

Maximal size of arrays that are directly allocated in the minor heap

val stack_threshold : int

Size in words of safe area at bottom of VM stack, see runtime/caml/config.h

val stack_safety_margin : int

Size in words of the safety margin between the bottom of the stack and the stack pointer. This margin can be used by intermediate computations of some instructions, or the event handler.

val native_compiler : bool

Whether the native compiler is available or not

  • since 5.1
val architecture : string

Name of processor type for the native-code compiler

val model : string

Name of processor submodel for the native-code compiler

val system : string

Name of operating system for the native-code compiler

val asm : string

The assembler (and flags) to use for assembling ocamlopt-generated code.

val asm_cfi_supported : bool

Whether assembler understands CFI directives

val with_frame_pointers : bool

Whether assembler should maintain frame pointers

val ext_obj : string

Extension for object files, e.g. .o under Unix.

val ext_asm : string

Extension for assembler files, e.g. .s under Unix.

val ext_lib : string

Extension for library files, e.g. .a under Unix.

val ext_dll : string

Extension for dynamically-loaded libraries, e.g. .so under Unix.

val ext_exe : string

Extension for executable programs, e.g. .exe under Windows.

  • since 4.12
val default_executable_name : string

Name of executable produced by linking if none is given with -o, e.g. a.out under Unix.

val systhread_supported : bool

Whether the system thread library is implemented

val flexdll_dirs : string list

Directories needed for the FlexDLL objects

val host : string

Whether the compiler is a cross-compiler

val target : string

Whether the compiler is a cross-compiler

val flambda : bool

Whether the compiler was configured for flambda

val with_flambda_invariants : bool

Whether the invariants checks for flambda are enabled

val with_cmm_invariants : bool

Whether the invariants checks for Cmm are enabled

val reserved_header_bits : int

How many bits of a block's header are reserved

val flat_float_array : bool

Whether the compiler and runtime automagically flatten float arrays

val function_sections : bool

Whether the compiler was configured to generate each function in a separate section

val windows_unicode : bool

Whether Windows Unicode runtime is enabled

val naked_pointers : bool

Whether the runtime supports naked pointers

  • since 4.14
val supports_shared_libraries : bool

Whether shared libraries are supported

  • since 4.08

Whether native shared libraries are supported

  • since 5.1
val afl_instrument : bool

Whether afl-fuzz instrumentation is generated by default

val ar_supports_response_files : bool

Whether ar supports @FILE arguments.

val print_config : out_channel -> unit

Access to configuration values

val config_var : string -> string option

the configuration value of a variable, if it exists

diff --git a/findlib-0/compiler-libs/Config_main/index.html b/findlib-0/compiler-libs/Config_main/index.html new file mode 100644 index 000000000..4a68f652a --- /dev/null +++ b/findlib-0/compiler-libs/Config_main/index.html @@ -0,0 +1,2 @@ + +Config_main (docs.findlib-0.compiler-libs.Config_main)

Module Config_main

System configuration

Warning: this module is unstable and part of compiler-libs.

val version : string

The current version number of the system

val bindir : string

The directory containing the binary programs

val standard_library : string

The directory containing the standard libraries

val ccomp_type : string

The "kind" of the C compiler, assembler and linker used: one of "cc" (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)

val c_compiler : string

The compiler to use for compiling C files

val c_output_obj : string

Name of the option of the C compiler for specifying the output file

val c_has_debug_prefix_map : bool

Whether the C compiler supports -fdebug-prefix-map

val as_has_debug_prefix_map : bool

Whether the assembler supports --debug-prefix-map

val ocamlc_cflags : string

The flags ocamlc should pass to the C compiler

val ocamlc_cppflags : string

The flags ocamlc should pass to the C preprocessor

val ocamlopt_cflags : string
  • deprecated

    ocamlc_cflags should be used instead. The flags ocamlopt should pass to the C compiler

val ocamlopt_cppflags : string
  • deprecated

    ocamlc_cppflags should be used instead. The flags ocamlopt should pass to the C preprocessor

val bytecomp_c_libraries : string

The C libraries to link with custom runtimes

val native_c_libraries : string

The C libraries to link with native-code programs

val native_pack_linker : string

The linker to use for packaging (ocamlopt -pack) and for partial links (ocamlopt -output-obj).

val mkdll : string

The linker command line to build dynamic libraries.

val mkexe : string

The linker command line to build executables.

val mkmaindll : string

The linker command line to build main programs as dlls.

val default_rpath : string

Option to add a directory to be searched for libraries at runtime (used by ocamlmklib)

val mksharedlibrpath : string

Option to add a directory to be searched for shared libraries at runtime (used by ocamlmklib)

val ar : string

Name of the ar command, or "" if not needed (MSVC)

val interface_suffix : string ref

Suffix for interface file names

val exec_magic_number : string

Magic number for bytecode executable files

val cmi_magic_number : string

Magic number for compiled interface files

val cmo_magic_number : string

Magic number for object bytecode files

val cma_magic_number : string

Magic number for archive files

val cmx_magic_number : string

Magic number for compilation unit descriptions

val cmxa_magic_number : string

Magic number for libraries of compilation unit descriptions

val ast_intf_magic_number : string

Magic number for file holding an interface syntax tree

val ast_impl_magic_number : string

Magic number for file holding an implementation syntax tree

val cmxs_magic_number : string

Magic number for dynamically-loadable plugins

val cmt_magic_number : string

Magic number for compiled interface files

val linear_magic_number : string

Magic number for Linear internal representation files

val max_tag : int

Biggest tag that can be stored in the header of a regular block.

val lazy_tag : int

Normally the same as Obj.lazy_tag. Separate definition because of technical reasons for bootstrapping.

val max_young_wosize : int

Maximal size of arrays that are directly allocated in the minor heap

val stack_threshold : int

Size in words of safe area at bottom of VM stack, see runtime/caml/config.h

val stack_safety_margin : int

Size in words of the safety margin between the bottom of the stack and the stack pointer. This margin can be used by intermediate computations of some instructions, or the event handler.

val native_compiler : bool

Whether the native compiler is available or not

  • since 5.1
val architecture : string

Name of processor type for the native-code compiler

val model : string

Name of processor submodel for the native-code compiler

val system : string

Name of operating system for the native-code compiler

val asm : string

The assembler (and flags) to use for assembling ocamlopt-generated code.

val asm_cfi_supported : bool

Whether assembler understands CFI directives

val with_frame_pointers : bool

Whether assembler should maintain frame pointers

val ext_obj : string

Extension for object files, e.g. .o under Unix.

val ext_asm : string

Extension for assembler files, e.g. .s under Unix.

val ext_lib : string

Extension for library files, e.g. .a under Unix.

val ext_dll : string

Extension for dynamically-loaded libraries, e.g. .so under Unix.

val ext_exe : string

Extension for executable programs, e.g. .exe under Windows.

  • since 4.12
val default_executable_name : string

Name of executable produced by linking if none is given with -o, e.g. a.out under Unix.

val systhread_supported : bool

Whether the system thread library is implemented

val flexdll_dirs : string list

Directories needed for the FlexDLL objects

val host : string

Whether the compiler is a cross-compiler

val target : string

Whether the compiler is a cross-compiler

val flambda : bool

Whether the compiler was configured for flambda

val with_flambda_invariants : bool

Whether the invariants checks for flambda are enabled

val with_cmm_invariants : bool

Whether the invariants checks for Cmm are enabled

val reserved_header_bits : int

How many bits of a block's header are reserved

val flat_float_array : bool

Whether the compiler and runtime automagically flatten float arrays

val function_sections : bool

Whether the compiler was configured to generate each function in a separate section

val windows_unicode : bool

Whether Windows Unicode runtime is enabled

val naked_pointers : bool

Whether the runtime supports naked pointers

  • since 4.14
val supports_shared_libraries : bool

Whether shared libraries are supported

  • since 4.08

Whether native shared libraries are supported

  • since 5.1
val afl_instrument : bool

Whether afl-fuzz instrumentation is generated by default

val ar_supports_response_files : bool

Whether ar supports @FILE arguments.

val print_config : out_channel -> unit

Access to configuration values

val config_var : string -> string option

the configuration value of a variable, if it exists

diff --git a/findlib-0/compiler-libs/Consistbl/Make/argument-1-Module_name/Map/index.html b/findlib-0/compiler-libs/Consistbl/Make/argument-1-Module_name/Map/index.html new file mode 100644 index 000000000..3bc7bde78 --- /dev/null +++ b/findlib-0/compiler-libs/Consistbl/Make/argument-1-Module_name/Map/index.html @@ -0,0 +1,8 @@ + +Map (docs.findlib-0.compiler-libs.Consistbl.Make.Module_name.Map)

Module Module_name.Map

Maps

type key = t

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Consistbl/Make/argument-1-Module_name/Set/index.html b/findlib-0/compiler-libs/Consistbl/Make/argument-1-Module_name/Set/index.html new file mode 100644 index 000000000..32ebb6bed --- /dev/null +++ b/findlib-0/compiler-libs/Consistbl/Make/argument-1-Module_name/Set/index.html @@ -0,0 +1,3 @@ + +Set (docs.findlib-0.compiler-libs.Consistbl.Make.Module_name.Set)

Module Module_name.Set

Sets

type elt = t

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Consistbl/Make/argument-1-Module_name/Tbl/index.html b/findlib-0/compiler-libs/Consistbl/Make/argument-1-Module_name/Tbl/index.html new file mode 100644 index 000000000..18468726c --- /dev/null +++ b/findlib-0/compiler-libs/Consistbl/Make/argument-1-Module_name/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Consistbl.Make.Module_name.Tbl)

Module Module_name.Tbl

type key = t
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/findlib-0/compiler-libs/Consistbl/Make/argument-1-Module_name/index.html b/findlib-0/compiler-libs/Consistbl/Make/argument-1-Module_name/index.html new file mode 100644 index 000000000..2b5a44a00 --- /dev/null +++ b/findlib-0/compiler-libs/Consistbl/Make/argument-1-Module_name/index.html @@ -0,0 +1,2 @@ + +Module_name (docs.findlib-0.compiler-libs.Consistbl.Make.Module_name)

Parameter Make.Module_name

type t
module Set : Set.S with type elt = t
module Map : Map.S with type key = t
module Tbl : Hashtbl.S with type key = t
val compare : t -> t -> int
diff --git a/findlib-0/compiler-libs/Consistbl/Make/index.html b/findlib-0/compiler-libs/Consistbl/Make/index.html new file mode 100644 index 000000000..9fede5fdf --- /dev/null +++ b/findlib-0/compiler-libs/Consistbl/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.findlib-0.compiler-libs.Consistbl.Make)

Module Consistbl.Make

Parameters

module Module_name : sig ... end

Signature

type t
val create : unit -> t
val clear : t -> unit
val check : t -> Module_name.t -> Digest.t -> Misc.filepath -> unit
val check_noadd : t -> Module_name.t -> Digest.t -> Misc.filepath -> unit
val source : t -> Module_name.t -> Misc.filepath
val extract : Module_name.t list -> t -> (Module_name.t * Digest.t option) list
val extract_map : Module_name.Set.t -> t -> Digest.t option Module_name.Map.t
val filter : (Module_name.t -> bool) -> t -> unit
exception Inconsistency of {
  1. unit_name : Module_name.t;
  2. inconsistent_source : string;
  3. original_source : string;
}
exception Not_available of Module_name.t
diff --git a/findlib-0/compiler-libs/Consistbl/index.html b/findlib-0/compiler-libs/Consistbl/index.html new file mode 100644 index 000000000..18a9f5e4f --- /dev/null +++ b/findlib-0/compiler-libs/Consistbl/index.html @@ -0,0 +1,2 @@ + +Consistbl (docs.findlib-0.compiler-libs.Consistbl)

Module Consistbl

Consistency tables: for checking consistency of module CRCs

Warning: this module is unstable and part of compiler-libs.

module Make (Module_name : sig ... end) : sig ... end
diff --git a/findlib-0/compiler-libs/Convert_primitives/index.html b/findlib-0/compiler-libs/Convert_primitives/index.html new file mode 100644 index 000000000..9a1b811a2 --- /dev/null +++ b/findlib-0/compiler-libs/Convert_primitives/index.html @@ -0,0 +1,2 @@ + +Convert_primitives (docs.findlib-0.compiler-libs.Convert_primitives)

Module Convert_primitives

diff --git a/findlib-0/compiler-libs/Ctype/index.html b/findlib-0/compiler-libs/Ctype/index.html new file mode 100644 index 000000000..00cab98d4 --- /dev/null +++ b/findlib-0/compiler-libs/Ctype/index.html @@ -0,0 +1,190 @@ + +Ctype (docs.findlib-0.compiler-libs.Ctype)

Module Ctype

exception Unify of Errortrace.unification_error
exception Equality of Errortrace.equality_error
exception Moregen of Errortrace.moregen_error
exception Subtype of Errortrace.Subtype.error
exception Tags of Asttypes.label * Asttypes.label
exception Cannot_expand
exception Cannot_apply
exception Matches_failure of Env.t * Errortrace.unification_error
exception Incompatible
val with_local_level : ?post:('a -> unit) -> (unit -> 'a) -> 'a
val with_local_level_if : bool -> (unit -> 'a) -> post:('a -> unit) -> 'a
val with_local_level_iter : (unit -> 'a * 'b list) -> post:('b -> unit) -> 'a
val with_local_level_iter_if : + bool -> + (unit -> 'a * 'b list) -> + post:('b -> unit) -> + 'a
val with_level : level:int -> (unit -> 'a) -> 'a
val with_level_if : bool -> level:int -> (unit -> 'a) -> 'a
val with_local_level_if_principal : (unit -> 'a) -> post:('a -> unit) -> 'a
val with_local_level_iter_if_principal : + (unit -> 'a * 'b list) -> + post:('b -> unit) -> + 'a
val with_local_level_for_class : ?post:('a -> unit) -> (unit -> 'a) -> 'a
val with_raised_nongen_level : (unit -> 'a) -> 'a
val reset_global_level : unit -> unit
val increase_global_level : unit -> int
val restore_global_level : int -> unit
val create_scope : unit -> int
val new_scoped_ty : int -> Types.type_desc -> Types.type_expr
val newvar : ?name:string -> unit -> Types.type_expr
val newvar2 : ?name:string -> int -> Types.type_expr
val new_global_var : ?name:string -> unit -> Types.type_expr
val newconstr : Path.t -> Types.type_expr list -> Types.type_expr
val none : Types.type_expr
val object_fields : Types.type_expr -> Types.type_expr
val flatten_fields : + Types.type_expr -> + (string * Types.field_kind * Types.type_expr) list * Types.type_expr

Transform a field type into a list of pairs label-type. The fields are sorted.

Beware of the interaction with GADTs:

Due to the introduction of object indexes for GADTs, the row variable of an object may now be an expansible type abbreviation. A first consequence is that flatten_fields will not completely flatten the object, since the type abbreviation will not be expanded (flatten_fields does not receive the current environment). Another consequence is that various functions may be called with the expansion of this type abbreviation, which is a Tfield, e.g. during printing.

Concrete problems have been fixed, but new bugs may appear in the future. (Test cases were added to typing-gadts/test.ml)

val associate_fields : + (string * Types.field_kind * Types.type_expr) list -> + (string * Types.field_kind * Types.type_expr) list -> + (string + * Types.field_kind + * Types.type_expr + * Types.field_kind + * Types.type_expr) + list + * (string * Types.field_kind * Types.type_expr) list + * (string * Types.field_kind * Types.type_expr) list
val opened_object : Types.type_expr -> bool
val set_object_name : + Ident.t -> + Types.type_expr list -> + Types.type_expr -> + unit
val remove_object_name : Types.type_expr -> unit
val find_cltype_for_path : + Env.t -> + Path.t -> + Types.type_declaration * Types.type_expr
val sort_row_fields : + (Asttypes.label * Types.row_field) list -> + (Asttypes.label * Types.row_field) list
val filter_row_fields : + bool -> + (Asttypes.label * Types.row_field) list -> + (Asttypes.label * Types.row_field) list
val generalize : Types.type_expr -> unit
val lower_contravariant : Env.t -> Types.type_expr -> unit
val lower_variables_only : Env.t -> int -> Types.type_expr -> unit
val enforce_current_level : Env.t -> Types.type_expr -> unit
val generalize_structure : Types.type_expr -> unit
val generalize_class_type : Types.class_type -> unit
val generalize_class_type_structure : Types.class_type -> unit
val generalize_class_signature_spine : Env.t -> Types.class_signature -> unit
val correct_levels : Types.type_expr -> Types.type_expr
val limited_generalize : Types.type_expr -> Types.type_expr -> unit
val limited_generalize_class_type : Types.type_expr -> Types.class_type -> unit
val fully_generic : Types.type_expr -> bool
val check_scope_escape : Env.t -> int -> Types.type_expr -> unit
val instance : ?partial:bool -> Types.type_expr -> Types.type_expr
val generic_instance : Types.type_expr -> Types.type_expr
val instance_list : Types.type_expr list -> Types.type_expr list
val new_local_type : + ?loc:Location.t -> + ?manifest_and_scope:(Types.type_expr * int) -> + unit -> + Types.type_declaration
val existential_name : + Types.constructor_description -> + Types.type_expr -> + string
type existential_treatment =
  1. | Keep_existentials_flexible
  2. | Make_existentials_abstract of {
    1. env : Env.t ref;
    2. scope : int;
    }
val instance_parameterized_type : + ?keep_names:bool -> + Types.type_expr list -> + Types.type_expr -> + Types.type_expr list * Types.type_expr
val instance_declaration : Types.type_declaration -> Types.type_declaration
val generic_instance_declaration : + Types.type_declaration -> + Types.type_declaration
val instance_class : + Types.type_expr list -> + Types.class_type -> + Types.type_expr list * Types.class_type
val instance_poly : + ?keep_names:bool -> + bool -> + Types.type_expr list -> + Types.type_expr -> + Types.type_expr list * Types.type_expr
val polyfy : + Env.t -> + Types.type_expr -> + Types.type_expr list -> + Types.type_expr * bool
val instance_label : + bool -> + Types.label_description -> + Types.type_expr list * Types.type_expr * Types.type_expr
val apply : + ?use_current_level:bool -> + Env.t -> + Types.type_expr list -> + Types.type_expr -> + Types.type_expr list -> + Types.type_expr
val try_expand_once_opt : Env.t -> Types.type_expr -> Types.type_expr
val try_expand_safe_opt : Env.t -> Types.type_expr -> Types.type_expr
val expand_head_once : Env.t -> Types.type_expr -> Types.type_expr
val expand_head : Env.t -> Types.type_expr -> Types.type_expr
val expand_head_opt : Env.t -> Types.type_expr -> Types.type_expr

The compiler's own version of expand_head necessary for type-based optimisations.

Expansion of types for error traces; lives here instead of in Errortrace because the expansion machinery lives here.

val expanded_diff : + Env.t -> + got:Types.type_expr -> + expected:Types.type_expr -> + (Errortrace.expanded_type, 'variant) Errortrace.elt

Create an Errortrace.Diff by expanding the two types

val unexpanded_diff : + got:Types.type_expr -> + expected:Types.type_expr -> + (Errortrace.expanded_type, 'variant) Errortrace.elt

Create an Errortrace.Diff by *duplicating* the two types, so that each one's expansion is identical to itself. Despite the name, does create Errortrace.expanded_types.

val full_expand : + may_forget_scope:bool -> + Env.t -> + Types.type_expr -> + Types.type_expr
type typedecl_extraction_result =
  1. | Typedecl of Path.t * Path.t * Types.type_declaration
  2. | Has_no_typedecl
  3. | May_have_typedecl
val extract_concrete_typedecl : + Env.t -> + Types.type_expr -> + typedecl_extraction_result
val unify : Env.t -> Types.type_expr -> Types.type_expr -> unit
val unify_gadt : + equations_level:int -> + allow_recursive_equations:bool -> + Env.t ref -> + Types.type_expr -> + Types.type_expr -> + Btype.TypePairs.t
val unify_var : Env.t -> Types.type_expr -> Types.type_expr -> unit
val filter_method : Env.t -> string -> Types.type_expr -> Types.type_expr
val occur_in : Env.t -> Types.type_expr -> Types.type_expr -> bool
val deep_occur : Types.type_expr -> Types.type_expr -> bool
val moregeneral : Env.t -> bool -> Types.type_expr -> Types.type_expr -> unit
val is_moregeneral : + Env.t -> + bool -> + Types.type_expr -> + Types.type_expr -> + bool
val rigidify : Types.type_expr -> Types.type_expr list
val all_distinct_vars : Env.t -> Types.type_expr list -> bool
val matches : + expand_error_trace:bool -> + Env.t -> + Types.type_expr -> + Types.type_expr -> + unit
val does_match : Env.t -> Types.type_expr -> Types.type_expr -> bool
val reify_univars : Env.t -> Types.type_expr -> Types.type_expr
type filter_arrow_failure =
  1. | Unification_error of Errortrace.unification_error
  2. | Label_mismatch of {
    1. got : Asttypes.arg_label;
    2. expected : Asttypes.arg_label;
    3. expected_type : Types.type_expr;
    }
  3. | Not_a_function
exception Filter_arrow_failed of filter_arrow_failure
type filter_method_failure =
  1. | Unification_error of Errortrace.unification_error
  2. | Not_a_method
  3. | Not_an_object of Types.type_expr
exception Filter_method_failed of filter_method_failure
type class_match_failure =
  1. | CM_Virtual_class
  2. | CM_Parameter_arity_mismatch of int * int
  3. | CM_Type_parameter_mismatch of Env.t * Errortrace.equality_error
  4. | CM_Class_type_mismatch of Env.t * Types.class_type * Types.class_type
  5. | CM_Parameter_mismatch of Env.t * Errortrace.moregen_error
  6. | CM_Val_type_mismatch of string * Env.t * Errortrace.comparison_error
  7. | CM_Meth_type_mismatch of string * Env.t * Errortrace.comparison_error
  8. | CM_Non_mutable_value of string
  9. | CM_Non_concrete_value of string
  10. | CM_Missing_value of string
  11. | CM_Missing_method of string
  12. | CM_Hide_public of string
  13. | CM_Hide_virtual of string * string
  14. | CM_Public_method of string
  15. | CM_Private_method of string
  16. | CM_Virtual_method of string
val match_class_types : + ?trace:bool -> + Env.t -> + Types.class_type -> + Types.class_type -> + class_match_failure list
val equal : + Env.t -> + bool -> + Types.type_expr list -> + Types.type_expr list -> + unit
val is_equal : + Env.t -> + bool -> + Types.type_expr list -> + Types.type_expr list -> + bool
val equal_private : + Env.t -> + Types.type_expr list -> + Types.type_expr -> + Types.type_expr list -> + Types.type_expr -> + unit
val match_class_declarations : + Env.t -> + Types.type_expr list -> + Types.class_type -> + Types.type_expr list -> + Types.class_type -> + class_match_failure list
val enlarge_type : Env.t -> Types.type_expr -> Types.type_expr * bool
val subtype : Env.t -> Types.type_expr -> Types.type_expr -> unit -> unit
val new_class_signature : unit -> Types.class_signature
val add_dummy_method : Env.t -> scope:int -> Types.class_signature -> unit
type add_method_failure =
  1. | Unexpected_method
  2. | Type_mismatch of Errortrace.unification_error
exception Add_method_failed of add_method_failure
type add_instance_variable_failure =
  1. | Mutability_mismatch of Asttypes.mutable_flag
  2. | Type_mismatch of Errortrace.unification_error
exception Add_instance_variable_failed of add_instance_variable_failure
val add_instance_variable : + strict:bool -> + Env.t -> + Asttypes.label -> + Asttypes.mutable_flag -> + Asttypes.virtual_flag -> + Types.type_expr -> + Types.class_signature -> + unit
type inherit_class_signature_failure =
  1. | Self_type_mismatch of Errortrace.unification_error
  2. | Method of Asttypes.label * add_method_failure
  3. | Instance_variable of Asttypes.label * add_instance_variable_failure
exception Inherit_class_signature_failed of inherit_class_signature_failure
val inherit_class_signature : + strict:bool -> + Env.t -> + Types.class_signature -> + Types.class_signature -> + unit
val update_class_signature : + Env.t -> + Types.class_signature -> + Asttypes.label list * Asttypes.label list
val hide_private_methods : Env.t -> Types.class_signature -> unit
val close_class_signature : Env.t -> Types.class_signature -> bool
exception Nondep_cannot_erase of Ident.t
val nondep_type : Env.t -> Ident.t list -> Types.type_expr -> Types.type_expr
val nondep_type_decl : + Env.t -> + Ident.t list -> + bool -> + Types.type_declaration -> + Types.type_declaration
val nondep_extension_constructor : + Env.t -> + Ident.t list -> + Types.extension_constructor -> + Types.extension_constructor
val nondep_class_declaration : + Env.t -> + Ident.t list -> + Types.class_declaration -> + Types.class_declaration
val nondep_cltype_declaration : + Env.t -> + Ident.t list -> + Types.class_type_declaration -> + Types.class_type_declaration
val is_contractive : Env.t -> Path.t -> bool
val normalize_type : Types.type_expr -> unit
val nongen_vars_in_schema : Env.t -> Types.type_expr -> Btype.TypeSet.t option
val nongen_vars_in_class_declaration : + Types.class_declaration -> + Btype.TypeSet.t option
type variable_kind =
  1. | Row_variable
  2. | Type_variable
type closed_class_failure = {
  1. free_variable : Types.type_expr * variable_kind;
  2. meth : string;
  3. meth_ty : Types.type_expr;
}
val free_variables : ?env:Env.t -> Types.type_expr -> Types.type_expr list
val closed_type_decl : Types.type_declaration -> Types.type_expr option
val closed_extension_constructor : + Types.extension_constructor -> + Types.type_expr option
val closed_class : + Types.type_expr list -> + Types.class_signature -> + closed_class_failure option
val arity : Types.type_expr -> int
val collapse_conj_params : Env.t -> Types.type_expr list -> unit
val get_current_level : unit -> int
val wrap_trace_gadt_instances : Env.t -> ('a -> 'b) -> 'a -> 'b
val immediacy : Env.t -> Types.type_expr -> Type_immediacy.t
val package_subtype : + (Env.t -> + Path.t -> + (Longident.t * Types.type_expr) list -> + Path.t -> + (Longident.t * Types.type_expr) list -> + bool) + ref
val mcomp : Env.t -> Types.type_expr -> Types.type_expr -> unit
diff --git a/findlib-0/compiler-libs/Dataflow/Backward/argument-1-D/index.html b/findlib-0/compiler-libs/Dataflow/Backward/argument-1-D/index.html new file mode 100644 index 000000000..6debc154c --- /dev/null +++ b/findlib-0/compiler-libs/Dataflow/Backward/argument-1-D/index.html @@ -0,0 +1,2 @@ + +D (docs.findlib-0.compiler-libs.Dataflow.Backward.D)

Parameter Backward.D

type t
val bot : t
val join : t -> t -> t
val lessequal : t -> t -> bool
diff --git a/findlib-0/compiler-libs/Dataflow/Backward/index.html b/findlib-0/compiler-libs/Dataflow/Backward/index.html new file mode 100644 index 000000000..cb2a2de2d --- /dev/null +++ b/findlib-0/compiler-libs/Dataflow/Backward/index.html @@ -0,0 +1,7 @@ + +Backward (docs.findlib-0.compiler-libs.Dataflow.Backward)

Module Dataflow.Backward

Parameters

module D : DOMAIN

Signature

val analyze : + ?exnhandler:(D.t -> D.t) -> + ?exnescape:D.t -> + transfer:(Mach.instruction -> next:D.t -> exn:D.t -> D.t) -> + Mach.instruction -> + D.t * (int -> D.t)
diff --git a/findlib-0/compiler-libs/Dataflow/index.html b/findlib-0/compiler-libs/Dataflow/index.html new file mode 100644 index 000000000..bcca93a0d --- /dev/null +++ b/findlib-0/compiler-libs/Dataflow/index.html @@ -0,0 +1,2 @@ + +Dataflow (docs.findlib-0.compiler-libs.Dataflow)

Module Dataflow

module type DOMAIN = sig ... end
module Backward (D : DOMAIN) : sig ... end
diff --git a/findlib-0/compiler-libs/Dataflow/module-type-DOMAIN/index.html b/findlib-0/compiler-libs/Dataflow/module-type-DOMAIN/index.html new file mode 100644 index 000000000..b3d789afa --- /dev/null +++ b/findlib-0/compiler-libs/Dataflow/module-type-DOMAIN/index.html @@ -0,0 +1,2 @@ + +DOMAIN (docs.findlib-0.compiler-libs.Dataflow.DOMAIN)

Module type Dataflow.DOMAIN

type t
val bot : t
val join : t -> t -> t
val lessequal : t -> t -> bool
diff --git a/findlib-0/compiler-libs/Datarepr/index.html b/findlib-0/compiler-libs/Datarepr/index.html new file mode 100644 index 000000000..eb67deed6 --- /dev/null +++ b/findlib-0/compiler-libs/Datarepr/index.html @@ -0,0 +1,19 @@ + +Datarepr (docs.findlib-0.compiler-libs.Datarepr)

Module Datarepr

val extension_descr : + current_unit:string -> + Path.t -> + Types.extension_constructor -> + Types.constructor_description
val labels_of_type : + Path.t -> + Types.type_declaration -> + (Ident.t * Types.label_description) list
val constructors_of_type : + current_unit:string -> + Path.t -> + Types.type_declaration -> + (Ident.t * Types.constructor_description) list
exception Constr_not_found
val constructor_existentials : + Types.constructor_arguments -> + Types.type_expr option -> + Types.type_expr list * Types.type_expr list

Takes cd_args and cd_res from a constructor_declaration and returns:

  • the types of the constructor's arguments
  • the existential variables introduced by the constructor
diff --git a/findlib-0/compiler-libs/Deadcode/index.html b/findlib-0/compiler-libs/Deadcode/index.html new file mode 100644 index 000000000..5a49a0cef --- /dev/null +++ b/findlib-0/compiler-libs/Deadcode/index.html @@ -0,0 +1,2 @@ + +Deadcode (docs.findlib-0.compiler-libs.Deadcode)

Module Deadcode

val fundecl : Mach.fundecl -> Mach.fundecl
diff --git a/findlib-0/compiler-libs/Debuginfo/Scoped_location/index.html b/findlib-0/compiler-libs/Debuginfo/Scoped_location/index.html new file mode 100644 index 000000000..46837d77e --- /dev/null +++ b/findlib-0/compiler-libs/Debuginfo/Scoped_location/index.html @@ -0,0 +1,2 @@ + +Scoped_location (docs.findlib-0.compiler-libs.Debuginfo.Scoped_location)

Module Debuginfo.Scoped_location

type scopes
val string_of_scopes : scopes -> string
val empty_scopes : scopes
val enter_anonymous_function : scopes:scopes -> scopes
val enter_value_definition : scopes:scopes -> Ident.t -> scopes
val enter_module_definition : scopes:scopes -> Ident.t -> scopes
val enter_class_definition : scopes:scopes -> Ident.t -> scopes
val enter_method_definition : scopes:scopes -> Asttypes.label -> scopes
type t =
  1. | Loc_unknown
  2. | Loc_known of {
    1. loc : Location.t;
    2. scopes : scopes;
    }
val of_location : scopes:scopes -> Location.t -> t
val to_location : t -> Location.t
val string_of_scoped_location : t -> string
diff --git a/findlib-0/compiler-libs/Debuginfo/index.html b/findlib-0/compiler-libs/Debuginfo/index.html new file mode 100644 index 000000000..67d589f08 --- /dev/null +++ b/findlib-0/compiler-libs/Debuginfo/index.html @@ -0,0 +1,2 @@ + +Debuginfo (docs.findlib-0.compiler-libs.Debuginfo)

Module Debuginfo

module Scoped_location : sig ... end
type item = private {
  1. dinfo_file : string;
  2. dinfo_line : int;
  3. dinfo_char_start : int;
  4. dinfo_char_end : int;
  5. dinfo_start_bol : int;
  6. dinfo_end_bol : int;
  7. dinfo_end_line : int;
  8. dinfo_scopes : Scoped_location.scopes;
}
type t = item list
type alloc_dbginfo_item = {
  1. alloc_words : int;
  2. alloc_dbg : t;
}

Due to Comballoc, a single Ialloc instruction may combine several unrelated allocations. Their Debuginfo.t (which may differ) are stored as a list of alloc_dbginfo. This list is in order of increasing memory address, which is the reverse of the original allocation order. Later allocations are consed to the front of this list by Comballoc.

type alloc_dbginfo = alloc_dbginfo_item list
val none : t
val is_none : t -> bool
val to_string : t -> string
val from_location : Scoped_location.t -> t
val to_location : t -> Location.t
val inline : t -> t -> t
val compare : t -> t -> int
val hash : t -> int
val print_compact : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Depend/index.html b/findlib-0/compiler-libs/Depend/index.html new file mode 100644 index 000000000..5cb3d1540 --- /dev/null +++ b/findlib-0/compiler-libs/Depend/index.html @@ -0,0 +1,2 @@ + +Depend (docs.findlib-0.compiler-libs.Depend)

Module Depend

Module dependencies.

Warning: this module is unstable and part of compiler-libs.

module String = Misc.Stdlib.String
type map_tree =
  1. | Node of String.Set.t * bound_map
and bound_map = map_tree String.Map.t
val make_leaf : string -> map_tree
val make_node : bound_map -> map_tree
val weaken_map : String.Set.t -> map_tree -> map_tree
val free_structure_names : String.Set.t ref
val pp_deps : string list ref

dependencies found by preprocessing tools

val open_module : bound_map -> Longident.t -> bound_map
val add_use_file : bound_map -> Parsetree.toplevel_phrase list -> unit
val add_signature : bound_map -> Parsetree.signature -> unit
val add_implementation : bound_map -> Parsetree.structure -> unit
val add_implementation_binding : bound_map -> Parsetree.structure -> bound_map
val add_signature_binding : bound_map -> Parsetree.signature -> bound_map
diff --git a/findlib-0/compiler-libs/Diffing/Define/Left_variadic/argument-1-_/index.html b/findlib-0/compiler-libs/Diffing/Define/Left_variadic/argument-1-_/index.html new file mode 100644 index 000000000..aa770ee3d --- /dev/null +++ b/findlib-0/compiler-libs/Diffing/Define/Left_variadic/argument-1-_/index.html @@ -0,0 +1,2 @@ + +_ (docs.findlib-0.compiler-libs.Diffing.Define.Left_variadic._)

Parameter Left_variadic._

val weight : change -> int

weight ch returns the weight of the change ch. Used to find the smallest patch.

val test : D.state -> D.left -> D.right -> (D.eq, D.diff) result

test st xl xr tests if the elements xl and xr are co mpatible (Ok) or not (Error).

val update : change -> D.state -> D.state * D.left array

update ch st returns the new state after applying a change. The update_result type also contains expansions in the variadic case.

diff --git a/findlib-0/compiler-libs/Diffing/Define/Left_variadic/index.html b/findlib-0/compiler-libs/Diffing/Define/Left_variadic/index.html new file mode 100644 index 000000000..268172fe1 --- /dev/null +++ b/findlib-0/compiler-libs/Diffing/Define/Left_variadic/index.html @@ -0,0 +1,2 @@ + +Left_variadic (docs.findlib-0.compiler-libs.Diffing.Define.Left_variadic)

Module Define.Left_variadic

Variadic diffing

Variadic diffing allows to expand the lists being diffed during diffing. in one specific direction.

Parameters

module _ : Parameters with type update_result := D.state * D.left array

Signature

val diff : D.state -> D.left array -> D.right array -> patch

diff state l r computes the optimal patch between l and r, using the initial state state.

diff --git a/findlib-0/compiler-libs/Diffing/Define/Right_variadic/argument-1-_/index.html b/findlib-0/compiler-libs/Diffing/Define/Right_variadic/argument-1-_/index.html new file mode 100644 index 000000000..5b7c7f564 --- /dev/null +++ b/findlib-0/compiler-libs/Diffing/Define/Right_variadic/argument-1-_/index.html @@ -0,0 +1,2 @@ + +_ (docs.findlib-0.compiler-libs.Diffing.Define.Right_variadic._)

Parameter Right_variadic._

val weight : change -> int

weight ch returns the weight of the change ch. Used to find the smallest patch.

val test : D.state -> D.left -> D.right -> (D.eq, D.diff) result

test st xl xr tests if the elements xl and xr are co mpatible (Ok) or not (Error).

val update : change -> D.state -> D.state * D.right array

update ch st returns the new state after applying a change. The update_result type also contains expansions in the variadic case.

diff --git a/findlib-0/compiler-libs/Diffing/Define/Right_variadic/index.html b/findlib-0/compiler-libs/Diffing/Define/Right_variadic/index.html new file mode 100644 index 000000000..8ccd05075 --- /dev/null +++ b/findlib-0/compiler-libs/Diffing/Define/Right_variadic/index.html @@ -0,0 +1,2 @@ + +Right_variadic (docs.findlib-0.compiler-libs.Diffing.Define.Right_variadic)

Module Define.Right_variadic

Parameters

module _ : Parameters with type update_result := D.state * D.right array

Signature

val diff : D.state -> D.left array -> D.right array -> patch

diff state l r computes the optimal patch between l and r, using the initial state state.

diff --git a/findlib-0/compiler-libs/Diffing/Define/Simple/argument-1-_/index.html b/findlib-0/compiler-libs/Diffing/Define/Simple/argument-1-_/index.html new file mode 100644 index 000000000..c462b7a10 --- /dev/null +++ b/findlib-0/compiler-libs/Diffing/Define/Simple/argument-1-_/index.html @@ -0,0 +1,2 @@ + +_ (docs.findlib-0.compiler-libs.Diffing.Define.Simple._)

Parameter Simple._

val weight : change -> int

weight ch returns the weight of the change ch. Used to find the smallest patch.

val test : D.state -> D.left -> D.right -> (D.eq, D.diff) result

test st xl xr tests if the elements xl and xr are co mpatible (Ok) or not (Error).

val update : change -> D.state -> D.state

update ch st returns the new state after applying a change. The update_result type also contains expansions in the variadic case.

diff --git a/findlib-0/compiler-libs/Diffing/Define/Simple/index.html b/findlib-0/compiler-libs/Diffing/Define/Simple/index.html new file mode 100644 index 000000000..adf69eaa7 --- /dev/null +++ b/findlib-0/compiler-libs/Diffing/Define/Simple/index.html @@ -0,0 +1,2 @@ + +Simple (docs.findlib-0.compiler-libs.Diffing.Define.Simple)

Module Define.Simple

Parameters

module _ : Parameters with type update_result := D.state

Signature

val diff : D.state -> D.left array -> D.right array -> patch

diff state l r computes the optimal patch between l and r, using the initial state state.

diff --git a/findlib-0/compiler-libs/Diffing/Define/argument-1-D/index.html b/findlib-0/compiler-libs/Diffing/Define/argument-1-D/index.html new file mode 100644 index 000000000..d157b3de5 --- /dev/null +++ b/findlib-0/compiler-libs/Diffing/Define/argument-1-D/index.html @@ -0,0 +1,2 @@ + +D (docs.findlib-0.compiler-libs.Diffing.Define.D)

Parameter Define.D

type left
type right
type eq

Detailed equality trace

type diff

Detailed difference trace

type state

environment of a partial patch

diff --git a/findlib-0/compiler-libs/Diffing/Define/index.html b/findlib-0/compiler-libs/Diffing/Define/index.html new file mode 100644 index 000000000..ccfe63f5f --- /dev/null +++ b/findlib-0/compiler-libs/Diffing/Define/index.html @@ -0,0 +1,6 @@ + +Define (docs.findlib-0.compiler-libs.Diffing.Define)

Module Diffing.Define

Define(Defs) creates the diffing types from the types defined in Defs and the functors that need to be instantatied with the diffing algorithm parameters

Parameters

module D : Defs

Signature

type nonrec change = (D.left, D.right, D.eq, D.diff) change

The type of potential changes on a list.

type patch = change list

A patch is an ordered list of changes.

module type Parameters = sig ... end
module type S = sig ... end
module Simple (_ : Parameters with type update_result := D.state) : S
module Left_variadic + (_ : Parameters with type update_result := D.state * D.left array) : + S
module Right_variadic + (_ : Parameters with type update_result := D.state * D.right array) : + S
diff --git a/findlib-0/compiler-libs/Diffing/Define/module-type-Parameters/index.html b/findlib-0/compiler-libs/Diffing/Define/module-type-Parameters/index.html new file mode 100644 index 000000000..a8df66a5f --- /dev/null +++ b/findlib-0/compiler-libs/Diffing/Define/module-type-Parameters/index.html @@ -0,0 +1,2 @@ + +Parameters (docs.findlib-0.compiler-libs.Diffing.Define.Parameters)

Module type Define.Parameters

type update_result
val weight : change -> int

weight ch returns the weight of the change ch. Used to find the smallest patch.

val test : D.state -> D.left -> D.right -> (D.eq, D.diff) result

test st xl xr tests if the elements xl and xr are co mpatible (Ok) or not (Error).

val update : change -> D.state -> update_result

update ch st returns the new state after applying a change. The update_result type also contains expansions in the variadic case.

diff --git a/findlib-0/compiler-libs/Diffing/Define/module-type-S/index.html b/findlib-0/compiler-libs/Diffing/Define/module-type-S/index.html new file mode 100644 index 000000000..9a5d77f24 --- /dev/null +++ b/findlib-0/compiler-libs/Diffing/Define/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (docs.findlib-0.compiler-libs.Diffing.Define.S)

Module type Define.S

val diff : D.state -> D.left array -> D.right array -> patch

diff state l r computes the optimal patch between l and r, using the initial state state.

diff --git a/findlib-0/compiler-libs/Diffing/index.html b/findlib-0/compiler-libs/Diffing/index.html new file mode 100644 index 000000000..999bafe71 --- /dev/null +++ b/findlib-0/compiler-libs/Diffing/index.html @@ -0,0 +1,2 @@ + +Diffing (docs.findlib-0.compiler-libs.Diffing)

Module Diffing

Parametric diffing

This module implements diffing over lists of arbitrary content. It is parameterized by

Diffing is extended to maintain state depending on the computed changes while walking through the two lists.

The underlying algorithm is a modified Wagner-Fischer algorithm (see <https://en.wikipedia.org/wiki/Wagner%E2%80%93Fischer_algorithm>).

We provide the following guarantee: Given two lists l and r, if different patches result in different states, we say that the state diverges.

More precisely, the optimality of Wagner-Fischer depends on the property that the edit-distance between a k-prefix of the left input and a l-prefix of the right input d(k,l) satisfies

d(k,l) = min ( del_cost + d(k-1,l), insert_cost + d(k,l-1), change_cost + d(k-1,l-1) )

Under this hypothesis, it is optimal to choose greedily the state of the minimal patch transforming the left k-prefix into the right l-prefix as a representative of the states of all possible patches transforming the left k-prefix into the right l-prefix.

If this property is not satisfied, we can still choose greedily a representative state. However, the computed patch is no more guaranteed to be globally optimal. Nevertheless, it is still a correct patch, which is even optimal among all explored patches.

module type Defs = sig ... end

The core types of a diffing implementation

type change_kind =
  1. | Deletion
  2. | Insertion
  3. | Modification
  4. | Preservation

The kind of changes which is used to share printing and styling across implementation

val prefix : Format.formatter -> (int * change_kind) -> unit
val style : change_kind -> Misc.Color.style list
type ('left, 'right, 'eq, 'diff) change =
  1. | Delete of 'left
  2. | Insert of 'right
  3. | Keep of 'left * 'right * 'eq
  4. | Change of 'left * 'right * 'diff
val classify : (_, _, _, _) change -> change_kind
module Define (D : Defs) : sig ... end

Define(Defs) creates the diffing types from the types defined in Defs and the functors that need to be instantatied with the diffing algorithm parameters

diff --git a/findlib-0/compiler-libs/Diffing/module-type-Defs/index.html b/findlib-0/compiler-libs/Diffing/module-type-Defs/index.html new file mode 100644 index 000000000..1bc360104 --- /dev/null +++ b/findlib-0/compiler-libs/Diffing/module-type-Defs/index.html @@ -0,0 +1,2 @@ + +Defs (docs.findlib-0.compiler-libs.Diffing.Defs)

Module type Diffing.Defs

The core types of a diffing implementation

type left
type right
type eq

Detailed equality trace

type diff

Detailed difference trace

type state

environment of a partial patch

diff --git a/findlib-0/compiler-libs/Diffing_with_keys/Define/Simple/argument-1-_/index.html b/findlib-0/compiler-libs/Diffing_with_keys/Define/Simple/argument-1-_/index.html new file mode 100644 index 000000000..d8dfffda1 --- /dev/null +++ b/findlib-0/compiler-libs/Diffing_with_keys/Define/Simple/argument-1-_/index.html @@ -0,0 +1,2 @@ + +_ (docs.findlib-0.compiler-libs.Diffing_with_keys.Define.Simple._)

Parameter Simple._

val weight : change -> int
val test : D.state -> left -> right -> (unit, diff) result
val update : change -> D.state -> D.state
val key_left : D.left -> string
val key_right : D.right -> string
diff --git a/findlib-0/compiler-libs/Diffing_with_keys/Define/Simple/index.html b/findlib-0/compiler-libs/Diffing_with_keys/Define/Simple/index.html new file mode 100644 index 000000000..8d8f3256b --- /dev/null +++ b/findlib-0/compiler-libs/Diffing_with_keys/Define/Simple/index.html @@ -0,0 +1,2 @@ + +Simple (docs.findlib-0.compiler-libs.Diffing_with_keys.Define.Simple)

Module Define.Simple

Parameters

module _ : Parameters

Signature

val diff : D.state -> D.left list -> D.right list -> patch
diff --git a/findlib-0/compiler-libs/Diffing_with_keys/Define/argument-1-D/index.html b/findlib-0/compiler-libs/Diffing_with_keys/Define/argument-1-D/index.html new file mode 100644 index 000000000..e3ed2d64a --- /dev/null +++ b/findlib-0/compiler-libs/Diffing_with_keys/Define/argument-1-D/index.html @@ -0,0 +1,2 @@ + +D (docs.findlib-0.compiler-libs.Diffing_with_keys.Define.D)

Parameter Define.D

type left
type right
type diff

Detailed difference trace

type state

environment of a partial patch

diff --git a/findlib-0/compiler-libs/Diffing_with_keys/Define/index.html b/findlib-0/compiler-libs/Diffing_with_keys/Define/index.html new file mode 100644 index 000000000..e7b8dd17d --- /dev/null +++ b/findlib-0/compiler-libs/Diffing_with_keys/Define/index.html @@ -0,0 +1,2 @@ + +Define (docs.findlib-0.compiler-libs.Diffing_with_keys.Define)

Module Diffing_with_keys.Define

Parameters

module D : Diffing.Defs with type eq := unit

Signature

type diff = (D.left, D.right, D.diff) mismatch
type left = D.left with_pos
type right = D.right with_pos
type composite_change = (D.left, D.right, D.diff) change

Composite changes and patches

type patch = composite_change list
type change = (left, right, unit, diff) Diffing.change

Atomic changes

module type Parameters = sig ... end
module Simple (_ : Parameters) : sig ... end
diff --git a/findlib-0/compiler-libs/Diffing_with_keys/Define/module-type-Parameters/index.html b/findlib-0/compiler-libs/Diffing_with_keys/Define/module-type-Parameters/index.html new file mode 100644 index 000000000..5ed8989f9 --- /dev/null +++ b/findlib-0/compiler-libs/Diffing_with_keys/Define/module-type-Parameters/index.html @@ -0,0 +1,2 @@ + +Parameters (docs.findlib-0.compiler-libs.Diffing_with_keys.Define.Parameters)

Module type Define.Parameters

val weight : change -> int
val test : D.state -> left -> right -> (unit, diff) result
val update : change -> D.state -> D.state
val key_left : D.left -> string
val key_right : D.right -> string
diff --git a/findlib-0/compiler-libs/Diffing_with_keys/index.html b/findlib-0/compiler-libs/Diffing_with_keys/index.html new file mode 100644 index 000000000..efe572f1a --- /dev/null +++ b/findlib-0/compiler-libs/Diffing_with_keys/index.html @@ -0,0 +1,2 @@ + +Diffing_with_keys (docs.findlib-0.compiler-libs.Diffing_with_keys)

Module Diffing_with_keys

When diffing lists where each element has a distinct key, we can refine the diffing patch by introducing two composite edit moves: swaps and moves.

Swaps exchange the position of two elements. Swap cost is set to 2 * change - epsilon. Moves change the position of one element. Move cost is set to delete + addition - epsilon.

When the cost delete + addition is greater than change and with those specific weights, the optimal patch with Swaps and Moves can be computed directly and cheaply from the original optimal patch.

type 'a with_pos = {
  1. pos : int;
  2. data : 'a;
}
val with_pos : 'a list -> 'a with_pos list
type ('l, 'r, 'diff) mismatch =
  1. | Name of {
    1. pos : int;
    2. got : string;
    3. expected : string;
    4. types_match : bool;
    }
  2. | Type of {
    1. pos : int;
    2. got : 'l;
    3. expected : 'r;
    4. reason : 'diff;
    }
type ('l, 'r, 'diff) change =
  1. | Change of ('l, 'r, 'diff) mismatch
  2. | Swap of {
    1. pos : int * int;
    2. first : string;
    3. last : string;
    }
  3. | Move of {
    1. name : string;
    2. got : int;
    3. expected : int;
    }
  4. | Insert of {
    1. pos : int;
    2. insert : 'r;
    }
  5. | Delete of {
    1. pos : int;
    2. delete : 'l;
    }

This specialized version of changes introduces two composite changes: Move and Swap

val prefix : Format.formatter -> ('l, 'r, 'diff) change -> unit
module Define (D : Diffing.Defs with type eq := unit) : sig ... end
diff --git a/findlib-0/compiler-libs/Dll/index.html b/findlib-0/compiler-libs/Dll/index.html new file mode 100644 index 000000000..931329412 --- /dev/null +++ b/findlib-0/compiler-libs/Dll/index.html @@ -0,0 +1,2 @@ + +Dll (docs.findlib-0.compiler-libs.Dll)

Module Dll

val extract_dll_name : string -> string
type dll_mode =
  1. | For_checking
  2. | For_execution
val open_dlls : dll_mode -> string list -> unit
val close_all_dlls : unit -> unit
type dll_address
type primitive_address =
  1. | Prim_loaded of dll_address
  2. | Prim_exists
val find_primitive : string -> primitive_address option
val synchronize_primitive : int -> dll_address -> unit
val add_path : string list -> unit
val remove_path : string list -> unit
val init_compile : bool -> unit
val init_toplevel : string list -> unit
val reset : unit -> unit
diff --git a/findlib-0/compiler-libs/Docstrings/WithMenhir/index.html b/findlib-0/compiler-libs/Docstrings/WithMenhir/index.html new file mode 100644 index 000000000..aa7840e35 --- /dev/null +++ b/findlib-0/compiler-libs/Docstrings/WithMenhir/index.html @@ -0,0 +1,2 @@ + +WithMenhir (docs.findlib-0.compiler-libs.Docstrings.WithMenhir)

Module Docstrings.WithMenhir

val symbol_docs : (Lexing.position * Lexing.position) -> docs

Fetch the item documentation for the current symbol. This also marks this documentation (for ambiguity warnings).

val symbol_docs_lazy : (Lexing.position * Lexing.position) -> docs Lazy.t
val rhs_docs : Lexing.position -> Lexing.position -> docs

Fetch the item documentation for the symbols between two positions. This also marks this documentation (for ambiguity warnings).

val rhs_docs_lazy : Lexing.position -> Lexing.position -> docs Lazy.t
val mark_symbol_docs : (Lexing.position * Lexing.position) -> unit

Mark the item documentation for the current symbol (for ambiguity warnings).

val mark_rhs_docs : Lexing.position -> Lexing.position -> unit

Mark as associated the item documentation for the symbols between two positions (for ambiguity warnings)

val symbol_info : Lexing.position -> info

Fetch the field info for the current symbol.

val rhs_info : Lexing.position -> info

Fetch the field info following the symbol at a given position.

val symbol_text : Lexing.position -> text

Fetch the text preceding the current symbol.

val symbol_text_lazy : Lexing.position -> text Lazy.t
val rhs_text : Lexing.position -> text

Fetch the text preceding the symbol at the given position.

val rhs_text_lazy : Lexing.position -> text Lazy.t

Extra text

There may be additional text attached to the delimiters of a block (e.g. struct and end). This is fetched by the following functions, which are applied to the contents of the block rather than the delimiters.

val symbol_pre_extra_text : Lexing.position -> text

Fetch additional text preceding the current symbol

val symbol_post_extra_text : Lexing.position -> text

Fetch additional text following the current symbol

val rhs_pre_extra_text : Lexing.position -> text

Fetch additional text preceding the symbol at the given position

val rhs_post_extra_text : Lexing.position -> text

Fetch additional text following the symbol at the given position

val rhs_post_text : Lexing.position -> text

Fetch text following the symbol at the given position

diff --git a/findlib-0/compiler-libs/Docstrings/index.html b/findlib-0/compiler-libs/Docstrings/index.html new file mode 100644 index 000000000..3916775ba --- /dev/null +++ b/findlib-0/compiler-libs/Docstrings/index.html @@ -0,0 +1,2 @@ + +Docstrings (docs.findlib-0.compiler-libs.Docstrings)

Module Docstrings

Documentation comments

Warning: this module is unstable and part of compiler-libs.

val init : unit -> unit

(Re)Initialise all docstring state

val warn_bad_docstrings : unit -> unit

Emit warnings for unattached and ambiguous docstrings

Docstrings

type docstring

Documentation comments

val docstring : string -> Location.t -> docstring

Create a docstring

val register : docstring -> unit

Register a docstring

val docstring_body : docstring -> string

Get the text of a docstring

val docstring_loc : docstring -> Location.t

Get the location of a docstring

Set functions

These functions are used by the lexer to associate docstrings to the locations of tokens.

val set_pre_docstrings : Lexing.position -> docstring list -> unit

Docstrings immediately preceding a token

val set_post_docstrings : Lexing.position -> docstring list -> unit

Docstrings immediately following a token

val set_floating_docstrings : Lexing.position -> docstring list -> unit

Docstrings not immediately adjacent to a token

val set_pre_extra_docstrings : Lexing.position -> docstring list -> unit

Docstrings immediately following the token which precedes this one

val set_post_extra_docstrings : Lexing.position -> docstring list -> unit

Docstrings immediately preceding the token which follows this one

Items

The docs type represents documentation attached to an item.

type docs = {
  1. docs_pre : docstring option;
  2. docs_post : docstring option;
}
val empty_docs : docs
val docs_attr : docstring -> Parsetree.attribute

Convert item documentation to attributes and add them to an attribute list

val symbol_docs : unit -> docs

Fetch the item documentation for the current symbol. This also marks this documentation (for ambiguity warnings).

val symbol_docs_lazy : unit -> docs Lazy.t
val rhs_docs : int -> int -> docs

Fetch the item documentation for the symbols between two positions. This also marks this documentation (for ambiguity warnings).

val rhs_docs_lazy : int -> int -> docs Lazy.t
val mark_symbol_docs : unit -> unit

Mark the item documentation for the current symbol (for ambiguity warnings).

val mark_rhs_docs : int -> int -> unit

Mark as associated the item documentation for the symbols between two positions (for ambiguity warnings)

Fields and constructors

The info type represents documentation attached to a field or constructor.

type info = docstring option
val empty_info : info
val info_attr : docstring -> Parsetree.attribute

Convert field info to attributes and add them to an attribute list

val symbol_info : unit -> info

Fetch the field info for the current symbol.

val rhs_info : int -> info

Fetch the field info following the symbol at a given position.

Unattached comments

The text type represents documentation which is not attached to anything.

type text = docstring list
val empty_text : text
val empty_text_lazy : text Lazy.t
val text_attr : docstring -> Parsetree.attribute

Convert text to attributes and add them to an attribute list

val symbol_text : unit -> text

Fetch the text preceding the current symbol.

val symbol_text_lazy : unit -> text Lazy.t
val rhs_text : int -> text

Fetch the text preceding the symbol at the given position.

val rhs_text_lazy : int -> text Lazy.t

Extra text

There may be additional text attached to the delimiters of a block (e.g. struct and end). This is fetched by the following functions, which are applied to the contents of the block rather than the delimiters.

val symbol_pre_extra_text : unit -> text

Fetch additional text preceding the current symbol

val symbol_post_extra_text : unit -> text

Fetch additional text following the current symbol

val rhs_pre_extra_text : int -> text

Fetch additional text preceding the symbol at the given position

val rhs_post_extra_text : int -> text

Fetch additional text following the symbol at the given position

val rhs_post_text : int -> text

Fetch text following the symbol at the given position

module WithMenhir : sig ... end
diff --git a/findlib-0/compiler-libs/Domainstate/index.html b/findlib-0/compiler-libs/Domainstate/index.html new file mode 100644 index 000000000..7b07806ff --- /dev/null +++ b/findlib-0/compiler-libs/Domainstate/index.html @@ -0,0 +1,2 @@ + +Domainstate (docs.findlib-0.compiler-libs.Domainstate)

Module Domainstate

val stack_ctx_words : int
type t =
  1. | Domain_young_limit
  2. | Domain_young_ptr
  3. | Domain_young_start
  4. | Domain_young_end
  5. | Domain_young_trigger
  6. | Domain_current_stack
  7. | Domain_exn_handler
  8. | Domain_action_pending
  9. | Domain_c_stack
  10. | Domain_stack_cache
  11. | Domain_gc_regs_buckets
  12. | Domain_gc_regs
  13. | Domain_minor_tables
  14. | Domain_mark_stack
  15. | Domain_marking_done
  16. | Domain_sweeping_done
  17. | Domain_allocated_words
  18. | Domain_swept_words
  19. | Domain_major_slice_epoch
  20. | Domain_local_roots
  21. | Domain_ephe_info
  22. | Domain_final_info
  23. | Domain_backtrace_pos
  24. | Domain_backtrace_active
  25. | Domain_backtrace_buffer
  26. | Domain_backtrace_last_exn
  27. | Domain_compare_unordered
  28. | Domain_oo_next_id_local
  29. | Domain_requested_major_slice
  30. | Domain_requested_global_major_slice
  31. | Domain_requested_minor_gc
  32. | Domain_requested_external_interrupt
  33. | Domain_parser_trace
  34. | Domain_minor_heap_wsz
  35. | Domain_shared_heap
  36. | Domain_id
  37. | Domain_unique_id
  38. | Domain_dls_root
  39. | Domain_extra_heap_resources
  40. | Domain_extra_heap_resources_minor
  41. | Domain_dependent_size
  42. | Domain_dependent_allocated
  43. | Domain_slice_target
  44. | Domain_slice_budget
  45. | Domain_major_work_done_between_slices
  46. | Domain_extern_state
  47. | Domain_intern_state
  48. | Domain_stat_minor_words
  49. | Domain_stat_promoted_words
  50. | Domain_stat_major_words
  51. | Domain_stat_forced_major_collections
  52. | Domain_stat_blocks_marked
  53. | Domain_inside_stw_handler
  54. | Domain_trap_sp_off
  55. | Domain_trap_barrier_off
  56. | Domain_trap_barrier_block
  57. | Domain_external_raise
  58. | Domain_extra_params
val idx_of_field : t -> int
diff --git a/findlib-0/compiler-libs/Effect_analysis/index.html b/findlib-0/compiler-libs/Effect_analysis/index.html new file mode 100644 index 000000000..b28876716 --- /dev/null +++ b/findlib-0/compiler-libs/Effect_analysis/index.html @@ -0,0 +1,2 @@ + +Effect_analysis (docs.findlib-0.compiler-libs.Effect_analysis)

Module Effect_analysis

Simple side effect analysis.

val no_effects : Flambda.t -> bool

Conservative approximation as to whether a given Flambda expression may have any side effects.

val no_effects_named : Flambda.named -> bool
diff --git a/findlib-0/compiler-libs/Emit/index.html b/findlib-0/compiler-libs/Emit/index.html new file mode 100644 index 000000000..cf1a1a89c --- /dev/null +++ b/findlib-0/compiler-libs/Emit/index.html @@ -0,0 +1,2 @@ + +Emit (docs.findlib-0.compiler-libs.Emit)

Module Emit

val fundecl : Linear.fundecl -> unit
val data : Cmm.data_item list -> unit
val begin_assembly : unit -> unit
val end_assembly : unit -> unit
diff --git a/findlib-0/compiler-libs/Emitaux/index.html b/findlib-0/compiler-libs/Emitaux/index.html new file mode 100644 index 000000000..8d7d8a3de --- /dev/null +++ b/findlib-0/compiler-libs/Emitaux/index.html @@ -0,0 +1,15 @@ + +Emitaux (docs.findlib-0.compiler-libs.Emitaux)

Module Emitaux

val output_channel : out_channel ref
val emit_string : string -> unit
val emit_int : int -> unit
val emit_nativeint : nativeint -> unit
val emit_int32 : int32 -> unit
val emit_symbol : string -> unit
val emit_printf : ('a, out_channel, unit) format -> 'a
val emit_char : char -> unit
val emit_string_literal : string -> unit
val emit_string_directive : string -> string -> unit
val emit_bytes_directive : string -> string -> unit
val emit_float64_directive : string -> int64 -> unit
val emit_float64_split_directive : string -> int64 -> unit
val emit_float32_directive : string -> int32 -> unit
val reset : unit -> unit
val reset_debug_info : unit -> unit
val emit_debug_info : Debuginfo.t -> unit
val emit_debug_info_gen : + Debuginfo.t -> + (file_num:int -> file_name:string -> unit) -> + (file_num:int -> line:int -> col:int -> unit) -> + unit
type frame_debuginfo =
  1. | Dbg_alloc of Debuginfo.alloc_dbginfo
  2. | Dbg_raise of Debuginfo.t
  3. | Dbg_other of Debuginfo.t
val record_frame_descr : + label:int -> + frame_size:int -> + live_offset:int list -> + frame_debuginfo -> + unit
type emit_frame_actions = {
  1. efa_code_label : int -> unit;
  2. efa_data_label : int -> unit;
  3. efa_8 : int -> unit;
  4. efa_16 : int -> unit;
  5. efa_32 : int32 -> unit;
  6. efa_word : int -> unit;
  7. efa_align : int -> unit;
  8. efa_label_rel : int -> int32 -> unit;
  9. efa_def_label : int -> unit;
  10. efa_string : string -> unit;
}
val emit_frames : emit_frame_actions -> unit
val is_generic_function : string -> bool
val cfi_startproc : unit -> unit
val cfi_endproc : unit -> unit
val cfi_adjust_cfa_offset : int -> unit
val cfi_offset : reg:int -> offset:int -> unit
val cfi_def_cfa_offset : int -> unit
val cfi_remember_state : unit -> unit
val cfi_restore_state : unit -> unit
val cfi_def_cfa_register : reg:int -> unit
val binary_backend_available : bool ref

Is a binary backend available. If yes, we don't need to generate the textual assembly file (unless the user request it with -S).

val create_asm_file : bool ref

Are we actually generating the textual assembly file?

type error =
  1. | Stack_frame_too_large of int
exception Error of error
val report_error : Format.formatter -> error -> unit
type preproc_stack_check_result = {
  1. max_frame_size : int;
  2. contains_nontail_calls : bool;
}
val preproc_stack_check : + fun_body:Linear.instruction -> + frame_size:int -> + trap_size:int -> + preproc_stack_check_result
diff --git a/findlib-0/compiler-libs/Emitcode/index.html b/findlib-0/compiler-libs/Emitcode/index.html new file mode 100644 index 000000000..ac5cbab31 --- /dev/null +++ b/findlib-0/compiler-libs/Emitcode/index.html @@ -0,0 +1,24 @@ + +Emitcode (docs.findlib-0.compiler-libs.Emitcode)

Module Emitcode

val to_file : + out_channel -> + string -> + string -> + required_globals:Ident.Set.t -> + Instruct.instruction list -> + unit
val to_memory : + Instruct.instruction list -> + Instruct.instruction list -> + Misc.LongString.t + * (Cmo_format.reloc_info * int) list + * Instruct.debug_event list
val to_packed_file : + out_channel -> + Instruct.instruction list -> + int + * (Cmo_format.reloc_info * int) list + * Instruct.debug_event list + * Misc.Stdlib.String.Set.t
val marshal_to_channel_with_possibly_32bit_compat : + filename:string -> + kind:string -> + out_channel -> + 'a -> + unit
diff --git a/findlib-0/compiler-libs/Emitenv/index.html b/findlib-0/compiler-libs/Emitenv/index.html new file mode 100644 index 000000000..75ebce519 --- /dev/null +++ b/findlib-0/compiler-libs/Emitenv/index.html @@ -0,0 +1,2 @@ + +Emitenv (docs.findlib-0.compiler-libs.Emitenv)

Module Emitenv

type label = Linear.label
type gc_call = {
  1. gc_lbl : label;
  2. gc_return_lbl : label;
  3. gc_frame_lbl : label;
}
type bound_error_call = {
  1. bd_lbl : label;
  2. bd_frame : label;
}
type float_literal = {
  1. fl : int64;
  2. lbl : label;
}
type int_literal = {
  1. n : nativeint;
  2. n_lbl : label;
}
type offset_computation = {
  1. lbl : label;
  2. dst : label;
  3. src : label;
}
type gotrel_literal = {
  1. lbl_got : label;
  2. lbl_pic : label;
}
type symbol_literal = {
  1. sym : string;
  2. lbl : label;
}
type per_function_env = {
  1. f : Linear.fundecl;
  2. mutable stack_offset : int;
  3. mutable call_gc_sites : gc_call list;
  4. mutable call_gc_label : label;
  5. mutable bound_error_sites : bound_error_call list;
  6. mutable bound_error_call : label option;
  7. mutable jumptables_lbl : label option;
  8. mutable jumptables : label list;
  9. mutable float_literals : float_literal list;
  10. mutable int_literals : int_literal list;
}
diff --git a/findlib-0/compiler-libs/Env/index.html b/findlib-0/compiler-libs/Env/index.html new file mode 100644 index 000000000..c63b4c3ee --- /dev/null +++ b/findlib-0/compiler-libs/Env/index.html @@ -0,0 +1,308 @@ + +Env (docs.findlib-0.compiler-libs.Env)

Module Env

val register_uid : Types.Uid.t -> Location.t -> unit
val get_uid_to_loc_tbl : unit -> Location.t Types.Uid.Tbl.t
type value_unbound_reason =
  1. | Val_unbound_instance_variable
  2. | Val_unbound_self
  3. | Val_unbound_ancestor
  4. | Val_unbound_ghost_recursive of Location.t
type module_unbound_reason =
  1. | Mod_unbound_illegal_recursion
type summary =
  1. | Env_empty
  2. | Env_value of summary * Ident.t * Types.value_description
  3. | Env_type of summary * Ident.t * Types.type_declaration
  4. | Env_extension of summary * Ident.t * Types.extension_constructor
  5. | Env_module of summary + * Ident.t + * Types.module_presence + * Types.module_declaration
  6. | Env_modtype of summary * Ident.t * Types.modtype_declaration
  7. | Env_class of summary * Ident.t * Types.class_declaration
  8. | Env_cltype of summary * Ident.t * Types.class_type_declaration
  9. | Env_open of summary * Path.t
    (*

    The string set argument of Env_open represents a list of module names to skip, i.e. that won't be imported in the toplevel namespace.

    *)
  10. | Env_functor_arg of summary * Ident.t
  11. | Env_constraints of summary * Types.type_declaration Path.Map.t
  12. | Env_copy_types of summary
  13. | Env_persistent of summary * Ident.t
  14. | Env_value_unbound of summary * string * value_unbound_reason
  15. | Env_module_unbound of summary * string * module_unbound_reason
type address =
  1. | Aident of Ident.t
  2. | Adot of address * int
type t
val empty : t
val initial : t
val diff : t -> t -> Ident.t list
type type_descriptions = type_descr_kind
type iter_cont
val iter_types : + (Path.t -> (Path.t * Types.type_declaration) -> unit) -> + t -> + iter_cont
val run_iter_cont : iter_cont list -> (Path.t * iter_cont) list
val same_types : t -> t -> bool
val used_persistent : unit -> Misc.Stdlib.String.Set.t
val find_shadowed_types : Path.t -> t -> Path.t list
val without_cmis : ('a -> 'b) -> 'a -> 'b
val find_value : Path.t -> t -> Types.value_description
val find_type : Path.t -> t -> Types.type_declaration
val find_type_descrs : Path.t -> t -> type_descriptions
val find_module : Path.t -> t -> Types.module_declaration
val find_modtype : Path.t -> t -> Types.modtype_declaration
val find_class : Path.t -> t -> Types.class_declaration
val find_cltype : Path.t -> t -> Types.class_type_declaration
val find_strengthened_module : + aliasable:bool -> + Path.t -> + t -> + Types.module_type
val find_ident_constructor : Ident.t -> t -> Types.constructor_description
val find_ident_label : Ident.t -> t -> Types.label_description
val find_type_expansion : + Path.t -> + t -> + Types.type_expr list * Types.type_expr * int
val find_type_expansion_opt : + Path.t -> + t -> + Types.type_expr list * Types.type_expr * int
val find_modtype_expansion : Path.t -> t -> Types.module_type
val find_modtype_expansion_lazy : Path.t -> t -> Subst.Lazy.modtype
val find_hash_type : Path.t -> t -> Types.type_declaration
val find_value_address : Path.t -> t -> address
val find_module_address : Path.t -> t -> address
val find_class_address : Path.t -> t -> address
val find_constructor_address : Path.t -> t -> address
val shape_of_path : + namespace:Shape.Sig_component_kind.t -> + t -> + Path.t -> + Shape.t
val add_functor_arg : Ident.t -> t -> t
val is_functor_arg : Path.t -> t -> bool
val normalize_module_path : Location.t option -> t -> Path.t -> Path.t
val normalize_type_path : Location.t option -> t -> Path.t -> Path.t
val normalize_value_path : Location.t option -> t -> Path.t -> Path.t
val normalize_modtype_path : t -> Path.t -> Path.t
val reset_required_globals : unit -> unit
val get_required_globals : unit -> Ident.t list
val add_required_global : Ident.t -> unit
val has_local_constraints : t -> bool
val mark_value_used : Types.Uid.t -> unit
val mark_module_used : Types.Uid.t -> unit
val mark_type_used : Types.Uid.t -> unit
type constructor_usage =
  1. | Positive
  2. | Pattern
  3. | Exported_private
  4. | Exported
val mark_constructor_used : + constructor_usage -> + Types.constructor_declaration -> + unit
val mark_extension_used : + constructor_usage -> + Types.extension_constructor -> + unit
type label_usage =
  1. | Projection
  2. | Mutation
  3. | Construct
  4. | Exported_private
  5. | Exported
val mark_label_used : label_usage -> Types.label_declaration -> unit
type unbound_value_hint =
  1. | No_hint
  2. | Missing_rec of Location.t
type lookup_error =
  1. | Unbound_value of Longident.t * unbound_value_hint
  2. | Unbound_type of Longident.t
  3. | Unbound_constructor of Longident.t
  4. | Unbound_label of Longident.t
  5. | Unbound_module of Longident.t
  6. | Unbound_class of Longident.t
  7. | Unbound_modtype of Longident.t
  8. | Unbound_cltype of Longident.t
  9. | Unbound_instance_variable of string
  10. | Not_an_instance_variable of string
  11. | Masked_instance_variable of Longident.t
  12. | Masked_self_variable of Longident.t
  13. | Masked_ancestor_variable of Longident.t
  14. | Structure_used_as_functor of Longident.t
  15. | Abstract_used_as_functor of Longident.t
  16. | Functor_used_as_structure of Longident.t
  17. | Abstract_used_as_structure of Longident.t
  18. | Generative_used_as_applicative of Longident.t
  19. | Illegal_reference_to_recursive_module
  20. | Cannot_scrape_alias of Longident.t * Path.t
val lookup_error : Location.t -> t -> lookup_error -> 'a
val lookup_value : + ?use:bool -> + loc:Location.t -> + Longident.t -> + t -> + Path.t * Types.value_description
val lookup_type : + ?use:bool -> + loc:Location.t -> + Longident.t -> + t -> + Path.t * Types.type_declaration
val lookup_module : + ?use:bool -> + loc:Location.t -> + Longident.t -> + t -> + Path.t * Types.module_declaration
val lookup_modtype : + ?use:bool -> + loc:Location.t -> + Longident.t -> + t -> + Path.t * Types.modtype_declaration
val lookup_class : + ?use:bool -> + loc:Location.t -> + Longident.t -> + t -> + Path.t * Types.class_declaration
val lookup_cltype : + ?use:bool -> + loc:Location.t -> + Longident.t -> + t -> + Path.t * Types.class_type_declaration
val lookup_module_path : + ?use:bool -> + loc:Location.t -> + load:bool -> + Longident.t -> + t -> + Path.t
val lookup_modtype_path : + ?use:bool -> + loc:Location.t -> + Longident.t -> + t -> + Path.t
val lookup_constructor : + ?use:bool -> + loc:Location.t -> + constructor_usage -> + Longident.t -> + t -> + Types.constructor_description
val lookup_all_constructors : + ?use:bool -> + loc:Location.t -> + constructor_usage -> + Longident.t -> + t -> + ((Types.constructor_description * (unit -> unit)) list, + Location.t * t * lookup_error) + result
val lookup_all_constructors_from_type : + ?use:bool -> + loc:Location.t -> + constructor_usage -> + Path.t -> + t -> + (Types.constructor_description * (unit -> unit)) list
val lookup_label : + ?use:bool -> + loc:Location.t -> + label_usage -> + Longident.t -> + t -> + Types.label_description
val lookup_all_labels : + ?use:bool -> + loc:Location.t -> + label_usage -> + Longident.t -> + t -> + ((Types.label_description * (unit -> unit)) list, + Location.t * t * lookup_error) + result
val lookup_all_labels_from_type : + ?use:bool -> + loc:Location.t -> + label_usage -> + Path.t -> + t -> + (Types.label_description * (unit -> unit)) list
val lookup_instance_variable : + ?use:bool -> + loc:Location.t -> + string -> + t -> + Path.t * Asttypes.mutable_flag * string * Types.type_expr
val find_value_by_name : Longident.t -> t -> Path.t * Types.value_description
val find_type_by_name : Longident.t -> t -> Path.t * Types.type_declaration
val find_module_by_name : Longident.t -> t -> Path.t * Types.module_declaration
val find_modtype_by_name : + Longident.t -> + t -> + Path.t * Types.modtype_declaration
val find_class_by_name : Longident.t -> t -> Path.t * Types.class_declaration
val find_cltype_by_name : + Longident.t -> + t -> + Path.t * Types.class_type_declaration
val find_constructor_by_name : + Longident.t -> + t -> + Types.constructor_description
val find_label_by_name : Longident.t -> t -> Types.label_description
val find_value_index : Ident.t -> t -> int option

The find_*_index functions computes a "namespaced" De Bruijn index of an identifier in a given environment. In other words, it returns how many times an identifier has been shadowed by a more recent identifiers with the same name in a given environment. Those functions return None when the identifier is not bound in the environment. This behavior is there to facilitate the detection of inconsistent printing environment, but should disappear in the long term.

val find_type_index : Ident.t -> t -> int option
val find_module_index : Ident.t -> t -> int option
val find_modtype_index : Ident.t -> t -> int option
val find_class_index : Ident.t -> t -> int option
val find_cltype_index : Ident.t -> t -> int option
val bound_value : string -> t -> bool
val bound_module : string -> t -> bool
val bound_type : string -> t -> bool
val bound_modtype : string -> t -> bool
val bound_class : string -> t -> bool
val bound_cltype : string -> t -> bool
val make_copy_of_types : t -> t -> t
val add_value : + ?check:(string -> Warnings.t) -> + Ident.t -> + Types.value_description -> + t -> + t
val add_type : check:bool -> Ident.t -> Types.type_declaration -> t -> t
val add_extension : + check:bool -> + rebind:bool -> + Ident.t -> + Types.extension_constructor -> + t -> + t
val add_module : + ?arg:bool -> + ?shape:Shape.t -> + Ident.t -> + Types.module_presence -> + Types.module_type -> + t -> + t
val add_module_lazy : + update_summary:bool -> + Ident.t -> + Types.module_presence -> + Subst.Lazy.modtype -> + t -> + t
val add_module_declaration : + ?arg:bool -> + ?shape:Shape.t -> + check:bool -> + Ident.t -> + Types.module_presence -> + Types.module_declaration -> + t -> + t
val add_module_declaration_lazy : + update_summary:bool -> + Ident.t -> + Types.module_presence -> + Subst.Lazy.module_decl -> + t -> + t
val add_modtype : Ident.t -> Types.modtype_declaration -> t -> t
val add_modtype_lazy : + update_summary:bool -> + Ident.t -> + Subst.Lazy.modtype_declaration -> + t -> + t
val add_class : Ident.t -> Types.class_declaration -> t -> t
val add_cltype : Ident.t -> Types.class_type_declaration -> t -> t
val add_local_type : Path.t -> Types.type_declaration -> t -> t
val add_persistent_structure : Ident.t -> t -> t
val persistent_structures_of_dir : Load_path.Dir.t -> Misc.Stdlib.String.Set.t
val filter_non_loaded_persistent : (Ident.t -> bool) -> t -> t
val add_signature : Types.signature -> t -> t
val open_signature : + ?used_slot:bool ref -> + ?loc:Location.t -> + ?toplevel:bool -> + Asttypes.override_flag -> + Path.t -> + t -> + (t, [ `Not_found | `Functor ]) result
val open_pers_signature : string -> t -> (t, [ `Not_found ]) result
val remove_last_open : Path.t -> t -> t option
val enter_value : + ?check:(string -> Warnings.t) -> + string -> + Types.value_description -> + t -> + Ident.t * t
val enter_type : + scope:int -> + string -> + Types.type_declaration -> + t -> + Ident.t * t
val enter_extension : + scope:int -> + rebind:bool -> + string -> + Types.extension_constructor -> + t -> + Ident.t * t
val enter_module : + scope:int -> + ?arg:bool -> + string -> + Types.module_presence -> + Types.module_type -> + t -> + Ident.t * t
val enter_module_declaration : + scope:int -> + ?arg:bool -> + ?shape:Shape.t -> + string -> + Types.module_presence -> + Types.module_declaration -> + t -> + Ident.t * t
val enter_modtype : + scope:int -> + string -> + Types.modtype_declaration -> + t -> + Ident.t * t
val enter_class : + scope:int -> + string -> + Types.class_declaration -> + t -> + Ident.t * t
val enter_cltype : + scope:int -> + string -> + Types.class_type_declaration -> + t -> + Ident.t * t
val enter_signature : + ?mod_shape:Shape.t -> + scope:int -> + Types.signature -> + t -> + Types.signature * t
val enter_signature_and_shape : + scope:int -> + parent_shape:Shape.Map.t -> + Shape.t -> + Types.signature -> + t -> + Types.signature * Shape.Map.t * t
val enter_unbound_value : string -> value_unbound_reason -> t -> t
val enter_unbound_module : string -> module_unbound_reason -> t -> t
val reset_cache : unit -> unit
val reset_cache_toplevel : unit -> unit
val set_unit_name : string -> unit
val get_unit_name : unit -> string
val read_signature : Misc.modname -> Misc.filepath -> Types.signature
val save_signature : + alerts:Misc.alerts -> + Types.signature -> + Misc.modname -> + Misc.filepath -> + Cmi_format.cmi_infos
val save_signature_with_imports : + alerts:Misc.alerts -> + Types.signature -> + Misc.modname -> + Misc.filepath -> + Misc.crcs -> + Cmi_format.cmi_infos
val crc_of_unit : Misc.modname -> Digest.t
val imports : unit -> Misc.crcs
val import_crcs : source:string -> Misc.crcs -> unit
val is_imported_opaque : Misc.modname -> bool
val register_import_as_opaque : Misc.modname -> unit
val summary : t -> summary
val keep_only_summary : t -> t
val env_of_only_summary : (summary -> Subst.t -> t) -> t -> t
type error =
  1. | Missing_module of Location.t * Path.t * Path.t
  2. | Illegal_value_name of Location.t * string
  3. | Lookup_error of Location.t * t * lookup_error
exception Error of error
val report_error : Format.formatter -> error -> unit
val report_lookup_error : + Location.t -> + t -> + Format.formatter -> + lookup_error -> + unit
val in_signature : bool -> t -> t
val is_in_signature : t -> bool
val set_value_used_callback : Types.value_description -> (unit -> unit) -> unit
val set_type_used_callback : + Types.type_declaration -> + ((unit -> unit) -> unit) -> + unit
val check_functor_application : + (errors:bool -> + loc:Location.t -> + lid_whole_app:Longident.t -> + f0_path:Path.t -> + args:(Path.t * Types.module_type) list -> + arg_path:Path.t -> + arg_mty:Types.module_type -> + param_mty:Types.module_type -> + t -> + unit) + ref
val check_well_formed_module : + (t -> Location.t -> string -> Types.module_type -> unit) ref
val add_delayed_check_forward : ((unit -> unit) -> unit) ref
val strengthen : + (aliasable:bool -> + t -> + Subst.Lazy.modtype -> + Path.t -> + Subst.Lazy.modtype) + ref
val same_constr : (t -> Types.type_expr -> Types.type_expr -> bool) ref
val print_longident : (Format.formatter -> Longident.t -> unit) ref
val print_path : (Format.formatter -> Path.t -> unit) ref

Folds

val fold_values : + (string -> Path.t -> Types.value_description -> 'a -> 'a) -> + Longident.t option -> + t -> + 'a -> + 'a
val fold_types : + (string -> Path.t -> Types.type_declaration -> 'a -> 'a) -> + Longident.t option -> + t -> + 'a -> + 'a
val fold_constructors : + (Types.constructor_description -> 'a -> 'a) -> + Longident.t option -> + t -> + 'a -> + 'a
val fold_labels : + (Types.label_description -> 'a -> 'a) -> + Longident.t option -> + t -> + 'a -> + 'a
val fold_modules : + (string -> Path.t -> Types.module_declaration -> 'a -> 'a) -> + Longident.t option -> + t -> + 'a -> + 'a

Persistent structures are only traversed if they are already loaded.

val fold_modtypes : + (string -> Path.t -> Types.modtype_declaration -> 'a -> 'a) -> + Longident.t option -> + t -> + 'a -> + 'a
val fold_classes : + (string -> Path.t -> Types.class_declaration -> 'a -> 'a) -> + Longident.t option -> + t -> + 'a -> + 'a
val fold_cltypes : + (string -> Path.t -> Types.class_type_declaration -> 'a -> 'a) -> + Longident.t option -> + t -> + 'a -> + 'a
val scrape_alias : t -> Types.module_type -> Types.module_type

Utilities

val check_value_name : string -> Location.t -> unit
val print_address : Format.formatter -> address -> unit
diff --git a/findlib-0/compiler-libs/Envaux/index.html b/findlib-0/compiler-libs/Envaux/index.html new file mode 100644 index 000000000..8e1b6f655 --- /dev/null +++ b/findlib-0/compiler-libs/Envaux/index.html @@ -0,0 +1,2 @@ + +Envaux (docs.findlib-0.compiler-libs.Envaux)

Module Envaux

val env_from_summary : Env.summary -> Subst.t -> Env.t
val reset_cache : unit -> unit
val env_of_only_summary : Env.t -> Env.t
type error =
  1. | Module_not_found of Path.t
exception Error of error
val report_error : Format.formatter -> error -> unit
diff --git a/findlib-0/compiler-libs/Errors/index.html b/findlib-0/compiler-libs/Errors/index.html new file mode 100644 index 000000000..5135a4215 --- /dev/null +++ b/findlib-0/compiler-libs/Errors/index.html @@ -0,0 +1,2 @@ + +Errors (docs.findlib-0.compiler-libs.Errors)

Module Errors

val report_error : Format.formatter -> exn -> unit
diff --git a/findlib-0/compiler-libs/Errortrace/Subtype/index.html b/findlib-0/compiler-libs/Errortrace/Subtype/index.html new file mode 100644 index 000000000..5066741fe --- /dev/null +++ b/findlib-0/compiler-libs/Errortrace/Subtype/index.html @@ -0,0 +1,5 @@ + +Subtype (docs.findlib-0.compiler-libs.Errortrace.Subtype)

Module Errortrace.Subtype

type 'a elt =
  1. | Diff of 'a diff
type 'a t = 'a elt list

Just as outside Subtype, we split traces, completed traces, and complete errors. However, in a minor asymmetry, the name Subtype.error_trace corresponds to the outside error type, and Subtype.error corresponds to the outside *_error types (e.g., unification_error). This error type has the invariant that the subtype trace is nonempty; note that no such invariant is imposed on the unification trace.

type trace = Types.type_expr t
type error_trace = expanded_type t
type unification_error_trace = unification error

To avoid shadowing

type nonrec error = private {
  1. trace : error_trace;
  2. unification_trace : unification error;
}
val error : + trace:error_trace -> + unification_trace:unification_error_trace -> + error
val map : ('a -> 'b) -> 'a t -> 'b t
diff --git a/findlib-0/compiler-libs/Errortrace/index.html b/findlib-0/compiler-libs/Errortrace/index.html new file mode 100644 index 000000000..3120f9349 --- /dev/null +++ b/findlib-0/compiler-libs/Errortrace/index.html @@ -0,0 +1,11 @@ + +Errortrace (docs.findlib-0.compiler-libs.Errortrace)

Module Errortrace

type position =
  1. | First
  2. | Second
val swap_position : position -> position
val print_pos : Format.formatter -> position -> unit
type expanded_type = {
  1. ty : Types.type_expr;
  2. expanded : Types.type_expr;
}
val trivial_expansion : Types.type_expr -> expanded_type

trivial_expansion ty creates an expanded_type whose expansion is also ty. Usually, you want Ctype.expand_type instead, since the expansion carries useful information; however, in certain circumstances, the error is about the expansion of the type, meaning that actually performing the expansion produces more confusing or inaccurate output.

type 'a diff = {
  1. got : 'a;
  2. expected : 'a;
}
val map_diff : ('a -> 'b) -> 'a diff -> 'b diff

map_diff f {expected;got} is {expected=f expected; got=f got}

type 'a escape_kind =
  1. | Constructor of Path.t
  2. | Univ of Types.type_expr
  3. | Self
  4. | Module_type of Path.t
  5. | Equation of 'a
  6. | Constraint

Scope escape related errors

type 'a escape = {
  1. kind : 'a escape_kind;
  2. context : Types.type_expr option;
}
val map_escape : ('a -> 'b) -> 'a escape -> 'b escape
val explain : 'a list -> (prev:'a option -> 'a -> 'b option) -> 'b option
type unification = private
  1. | Unification

Type indices

type comparison = private
  1. | Comparison
type fixed_row_case =
  1. | Cannot_be_closed
  2. | Cannot_add_tags of string list
type 'variety variant =
  1. | Incompatible_types_for : string -> _ variant
  2. | No_tags : position * (Asttypes.label * Types.row_field) list -> _ variant
  3. | No_intersection : unification variant
  4. | Fixed_row : position + * fixed_row_case + * Types.fixed_explanation -> unification variant
  5. | Presence_not_guaranteed_for : position * string -> comparison variant
  6. | Openness : position -> comparison variant
type 'variety obj =
  1. | Missing_field : position * string -> _ obj
  2. | Abstract_row : position -> _ obj
  3. | Self_cannot_be_closed : unification obj
type ('a, 'variety) elt =
  1. | Diff : 'a diff -> ('a, _) elt
  2. | Variant : 'variety variant -> ('a, 'variety) elt
  3. | Obj : 'variety obj -> ('a, 'variety) elt
  4. | Escape : 'a escape -> ('a, _) elt
  5. | Incompatible_fields : {
    1. name : string;
    2. diff : Types.type_expr diff;
    } -> ('a, _) elt
  6. | Rec_occur : Types.type_expr * Types.type_expr -> ('a, _) elt
type ('a, 'variety) t = ('a, 'variety) elt list
type 'variety trace = (Types.type_expr, 'variety) t
type 'variety error = (expanded_type, 'variety) t
val map : ('a -> 'b) -> ('a, 'variety) t -> ('b, 'variety) t
val incompatible_fields : + name:string -> + got:Types.type_expr -> + expected:Types.type_expr -> + (Types.type_expr, _) elt
val swap_trace : ('a, 'variety) t -> ('a, 'variety) t

The traces ('variety t) are the core error types. However, we bundle them up into three "top-level" error types, which are used elsewhere: unification_error, equality_error, and moregen_error. In the case of equality_error, this has to bundle in extra information; in general, it distinguishes the three types of errors and allows us to distinguish traces that are being built (or processed) from those that are complete and have become the final error. These error types have the invariants that their traces are nonempty; we ensure that through three smart constructors with matching names.

type unification_error = private {
  1. trace : unification error;
}
type equality_error = private {
  1. trace : comparison error;
  2. subst : (Types.type_expr * Types.type_expr) list;
}
type moregen_error = private {
  1. trace : comparison error;
}
val unification_error : trace:unification error -> unification_error
val equality_error : + trace:comparison error -> + subst:(Types.type_expr * Types.type_expr) list -> + equality_error
val moregen_error : trace:comparison error -> moregen_error
type comparison_error =
  1. | Equality_error of equality_error
  2. | Moregen_error of moregen_error

Wraps up the two different kinds of comparison errors in one type

val swap_unification_error : unification_error -> unification_error

Lift swap_trace to unification_error

module Subtype : sig ... end
diff --git a/findlib-0/compiler-libs/Export_id/Map/index.html b/findlib-0/compiler-libs/Export_id/Map/index.html new file mode 100644 index 000000000..6c0fe53d4 --- /dev/null +++ b/findlib-0/compiler-libs/Export_id/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Export_id.Map)

Module Export_id.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Export_id/Set/index.html b/findlib-0/compiler-libs/Export_id/Set/index.html new file mode 100644 index 000000000..ee4c790d3 --- /dev/null +++ b/findlib-0/compiler-libs/Export_id/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Export_id.Set)

Module Export_id.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Export_id/T/index.html b/findlib-0/compiler-libs/Export_id/T/index.html new file mode 100644 index 000000000..c950e4253 --- /dev/null +++ b/findlib-0/compiler-libs/Export_id/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Export_id.T)

Module Export_id.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Export_id/Tbl/index.html b/findlib-0/compiler-libs/Export_id/Tbl/index.html new file mode 100644 index 000000000..c3b5f7731 --- /dev/null +++ b/findlib-0/compiler-libs/Export_id/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Export_id.Tbl)

Module Export_id.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Export_id/index.html b/findlib-0/compiler-libs/Export_id/index.html new file mode 100644 index 000000000..fa1048130 --- /dev/null +++ b/findlib-0/compiler-libs/Export_id/index.html @@ -0,0 +1,2 @@ + +Export_id (docs.findlib-0.compiler-libs.Export_id)

Module Export_id

include Identifiable.S
type t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val create : ?name:string -> Compilation_unit.t -> t
val name : t -> string option
val get_compilation_unit : t -> Compilation_unit.t
diff --git a/findlib-0/compiler-libs/Export_info/index.html b/findlib-0/compiler-libs/Export_info/index.html new file mode 100644 index 000000000..47834a7ce --- /dev/null +++ b/findlib-0/compiler-libs/Export_info/index.html @@ -0,0 +1,34 @@ + +Export_info (docs.findlib-0.compiler-libs.Export_info)

Module Export_info

Exported information (that is to say, information written into a .cmx file) about a compilation unit.

type value_string_contents =
  1. | Contents of string
  2. | Unknown_or_mutable
type value_string = {
  1. contents : value_string_contents;
  2. size : int;
}
type value_float_array_contents =
  1. | Contents of float option array
  2. | Unknown_or_mutable
type value_float_array = {
  1. contents : value_float_array_contents;
  2. size : int;
}
type descr =
  1. | Value_block of Tag.t * approx array
  2. | Value_mutable_block of Tag.t * int
  3. | Value_int of int
  4. | Value_char of char
  5. | Value_float of float
  6. | Value_float_array of value_float_array
  7. | Value_boxed_int : 'a A.boxed_int * 'a -> descr
  8. | Value_string of value_string
  9. | Value_closure of value_closure
  10. | Value_set_of_closures of value_set_of_closures
  11. | Value_unknown_descr
and value_closure = {
  1. closure_id : Closure_id.t;
  2. set_of_closures : value_set_of_closures;
}
and value_set_of_closures = {
  1. set_of_closures_id : Set_of_closures_id.t;
  2. bound_vars : approx Var_within_closure.Map.t;
  3. free_vars : Flambda.specialised_to Variable.Map.t;
  4. results : approx Closure_id.Map.t;
  5. aliased_symbol : Symbol.t option;
}
and approx =
  1. | Value_unknown
  2. | Value_id of Export_id.t
  3. | Value_symbol of Symbol.t
type t = private {
  1. sets_of_closures : A.function_declarations Set_of_closures_id.Map.t;
    (*

    Code of exported functions indexed by set of closures IDs.

    *)
  2. values : descr Export_id.Map.t Compilation_unit.Map.t;
    (*

    Structure of exported values.

    *)
  3. symbol_id : Export_id.t Symbol.Map.t;
    (*

    Associates symbols and values.

    *)
  4. offset_fun : int Closure_id.Map.t;
    (*

    Positions of function pointers in their closures.

    *)
  5. offset_fv : int Var_within_closure.Map.t;
    (*

    Positions of value pointers in their closures.

    *)
  6. constant_closures : Closure_id.Set.t;
  7. invariant_params : Variable.Set.t Variable.Map.t Set_of_closures_id.Map.t;
  8. recursive : Variable.Set.t Set_of_closures_id.Map.t;
}

A structure that describes what a single compilation unit exports.

type transient = private {
  1. sets_of_closures : A.function_declarations Set_of_closures_id.Map.t;
  2. values : descr Export_id.Map.t Compilation_unit.Map.t;
  3. symbol_id : Export_id.t Symbol.Map.t;
  4. invariant_params : Variable.Set.t Variable.Map.t Set_of_closures_id.Map.t;
  5. recursive : Variable.Set.t Set_of_closures_id.Map.t;
  6. relevant_local_closure_ids : Closure_id.Set.t;
  7. relevant_imported_closure_ids : Closure_id.Set.t;
  8. relevant_local_vars_within_closure : Var_within_closure.Set.t;
  9. relevant_imported_vars_within_closure : Var_within_closure.Set.t;
}
val empty : t

Export information for a compilation unit that exports nothing.

val opaque_transient : + compilation_unit:Compilation_unit.t -> + root_symbol:Symbol.t -> + transient
val create : + sets_of_closures:A.function_declarations Set_of_closures_id.Map.t -> + values:descr Export_id.Map.t Compilation_unit.Map.t -> + symbol_id:Export_id.t Symbol.Map.t -> + offset_fun:int Closure_id.Map.t -> + offset_fv:int Var_within_closure.Map.t -> + constant_closures:Closure_id.Set.t -> + invariant_params:Variable.Set.t Variable.Map.t Set_of_closures_id.Map.t -> + recursive:Variable.Set.t Set_of_closures_id.Map.t -> + t

Create a new export information structure.

val create_transient : + sets_of_closures:A.function_declarations Set_of_closures_id.Map.t -> + values:descr Export_id.Map.t Compilation_unit.Map.t -> + symbol_id:Export_id.t Symbol.Map.t -> + invariant_params:Variable.Set.t Variable.Map.t Set_of_closures_id.Map.t -> + recursive:Variable.Set.t Set_of_closures_id.Map.t -> + relevant_local_closure_ids:Closure_id.Set.t -> + relevant_imported_closure_ids:Closure_id.Set.t -> + relevant_local_vars_within_closure:Var_within_closure.Set.t -> + relevant_imported_vars_within_closure:Var_within_closure.Set.t -> + transient
val t_of_transient : + transient -> + program:Flambda.program -> + local_offset_fun:int Closure_id.Map.t -> + local_offset_fv:int Var_within_closure.Map.t -> + imported_offset_fun:int Closure_id.Map.t -> + imported_offset_fv:int Var_within_closure.Map.t -> + constant_closures:Closure_id.Set.t -> + t

Record information about the layout of closures and which sets of closures are constant. These are all worked out during the Flambda_to_clambda pass.

val merge : t -> t -> t

Union of export information. Verifies that there are no identifier clashes.

val find_description : t -> Export_id.t -> descr

Look up the description of an exported value given its export ID.

Partition a mapping from export IDs by compilation unit.

diff --git a/findlib-0/compiler-libs/Export_info_for_pack/index.html b/findlib-0/compiler-libs/Export_info_for_pack/index.html new file mode 100644 index 000000000..1e34d4473 --- /dev/null +++ b/findlib-0/compiler-libs/Export_info_for_pack/index.html @@ -0,0 +1,6 @@ + +Export_info_for_pack (docs.findlib-0.compiler-libs.Export_info_for_pack)

Module Export_info_for_pack

Transformations on export information that are only used for the building of packs.

val import_for_pack : + pack_units:Compilation_unit.Set.t -> + pack:Compilation_unit.t -> + Export_info.t -> + Export_info.t

Transform the information from exported to be suitable to be reexported as the information for a pack named pack containing units pack_units. It mainly changes symbols of units pack_units to refer to pack instead.

val clear_import_state : unit -> unit

Drops the state after importing several units in the same pack.

diff --git a/findlib-0/compiler-libs/Expunge/index.html b/findlib-0/compiler-libs/Expunge/index.html new file mode 100644 index 000000000..0a17a6a3e --- /dev/null +++ b/findlib-0/compiler-libs/Expunge/index.html @@ -0,0 +1,2 @@ + +Expunge (docs.findlib-0.compiler-libs.Expunge)

Module Expunge

val main : unit -> unit

The entry point for expunge

diff --git a/findlib-0/compiler-libs/Extract_projections/index.html b/findlib-0/compiler-libs/Extract_projections/index.html new file mode 100644 index 000000000..355ce6b93 --- /dev/null +++ b/findlib-0/compiler-libs/Extract_projections/index.html @@ -0,0 +1,6 @@ + +Extract_projections (docs.findlib-0.compiler-libs.Extract_projections)

Module Extract_projections

Identify projections from variables used in function bodies (free variables or specialised args, for example, according to which_variables below). Projections from variables that are also used boxed are not returned.

val from_function_decl : + env:Inline_and_simplify_aux.Env.t -> + which_variables:Flambda.specialised_to Variable.Map.t -> + function_decl:Flambda.function_declaration -> + Projection.Set.t

which_variables maps (existing) inner variables to (existing) outer variables in the manner of free_vars and specialised_args in Flambda.set_of_closures.

The returned projections are projecting_from (cf. projection.mli) the "existing inner vars".

diff --git a/findlib-0/compiler-libs/Find_recursive_functions/index.html b/findlib-0/compiler-libs/Find_recursive_functions/index.html new file mode 100644 index 000000000..6842cb7e5 --- /dev/null +++ b/findlib-0/compiler-libs/Find_recursive_functions/index.html @@ -0,0 +1,7 @@ + +Find_recursive_functions (docs.findlib-0.compiler-libs.Find_recursive_functions)

Module Find_recursive_functions

"Recursive functions" are those functions f that might call either:

For example in the following simultaneous definition of f g and h, f and g are recursive functions, but not h: let rec f x = g x + and g x = f x + and h x = g x

val in_function_declarations : + Flambda.function_declarations -> + backend:(module Backend_intf.S) -> + Variable.Set.t

Determine the recursive functions, if any, bound by the given set of function declarations. This is only intended to be used by Flambda.create_function_declarations.

diff --git a/findlib-0/compiler-libs/Flambda/Constant_defining_value/Map/index.html b/findlib-0/compiler-libs/Flambda/Constant_defining_value/Map/index.html new file mode 100644 index 000000000..799572c24 --- /dev/null +++ b/findlib-0/compiler-libs/Flambda/Constant_defining_value/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Flambda.Constant_defining_value.Map)

Module Constant_defining_value.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Flambda/Constant_defining_value/Set/index.html b/findlib-0/compiler-libs/Flambda/Constant_defining_value/Set/index.html new file mode 100644 index 000000000..b875d6ba0 --- /dev/null +++ b/findlib-0/compiler-libs/Flambda/Constant_defining_value/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Flambda.Constant_defining_value.Set)

Module Constant_defining_value.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Flambda/Constant_defining_value/T/index.html b/findlib-0/compiler-libs/Flambda/Constant_defining_value/T/index.html new file mode 100644 index 000000000..fe6fe6b31 --- /dev/null +++ b/findlib-0/compiler-libs/Flambda/Constant_defining_value/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Flambda.Constant_defining_value.T)

Module Constant_defining_value.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Flambda/Constant_defining_value/Tbl/index.html b/findlib-0/compiler-libs/Flambda/Constant_defining_value/Tbl/index.html new file mode 100644 index 000000000..e0e2751f5 --- /dev/null +++ b/findlib-0/compiler-libs/Flambda/Constant_defining_value/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Flambda.Constant_defining_value.Tbl)

Module Constant_defining_value.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Flambda/Constant_defining_value/index.html b/findlib-0/compiler-libs/Flambda/Constant_defining_value/index.html new file mode 100644 index 000000000..3d9383ec0 --- /dev/null +++ b/findlib-0/compiler-libs/Flambda/Constant_defining_value/index.html @@ -0,0 +1,2 @@ + +Constant_defining_value (docs.findlib-0.compiler-libs.Flambda.Constant_defining_value)

Module Flambda.Constant_defining_value

module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
diff --git a/findlib-0/compiler-libs/Flambda/With_free_variables/index.html b/findlib-0/compiler-libs/Flambda/With_free_variables/index.html new file mode 100644 index 000000000..caaae7e4e --- /dev/null +++ b/findlib-0/compiler-libs/Flambda/With_free_variables/index.html @@ -0,0 +1,2 @@ + +With_free_variables (docs.findlib-0.compiler-libs.Flambda.With_free_variables)

Module Flambda.With_free_variables

A module for the manipulation of terms where the recomputation of free variable sets is to be kept to a minimum.

type 'a t
val of_defining_expr_of_let : let_expr -> named t

O(1) time.

val of_body_of_let : let_expr -> expr t

O(1) time.

val of_expr : expr -> expr t

Takes the time required to calculate the free variables of the given term (proportional to the size of the term, except that the calculation for Let is O(1)).

val of_named : named -> named t
val create_let_reusing_defining_expr : Variable.t -> named t -> expr -> expr

Takes the time required to calculate the free variables of the given expr.

val create_let_reusing_body : Variable.t -> named -> expr t -> expr

Takes the time required to calculate the free variables of the given named.

val create_let_reusing_both : Variable.t -> named t -> expr t -> expr

O(1) time.

val expr : expr t -> named t

The equivalent of the Expr constructor.

val contents : 'a t -> 'a
val free_variables : _ t -> Variable.Set.t

O(1) time.

diff --git a/findlib-0/compiler-libs/Flambda/index.html b/findlib-0/compiler-libs/Flambda/index.html new file mode 100644 index 000000000..6e3c9de53 --- /dev/null +++ b/findlib-0/compiler-libs/Flambda/index.html @@ -0,0 +1,120 @@ + +Flambda (docs.findlib-0.compiler-libs.Flambda)

Module Flambda

Intermediate language used for tree-based analysis and optimization.

type call_kind =
  1. | Indirect
  2. | Direct of Closure_id.t

Whether the callee in a function application is known at compile time.

type const =
  1. | Int of int
  2. | Char of char
    (*

    Char is kept separate from Int to improve printing

    *)

Simple constants. ("Structured constants" are rewritten to invocations of Pmakeblock so that they easily take part in optimizations.)

type apply = {
  1. func : Variable.t;
  2. args : Variable.t list;
  3. kind : call_kind;
  4. dbg : Debuginfo.t;
  5. inline : Lambda.inline_attribute;
    (*

    Instructions from the source code as to whether the callee should be inlined.

    *)
  6. specialise : Lambda.specialise_attribute;
    (*

    Instructions from the source code as to whether the callee should be specialised.

    *)
}

The application of a function to a list of arguments.

type assign = {
  1. being_assigned : Mutable_variable.t;
  2. new_value : Variable.t;
}

The update of a mutable variable. Mutable variables are distinct from immutable variables in Flambda.

type send = {
  1. kind : Lambda.meth_kind;
  2. meth : Variable.t;
  3. obj : Variable.t;
  4. args : Variable.t list;
  5. dbg : Debuginfo.t;
}

The invocation of a method.

type project_closure = Projection.project_closure

For details on these types, see projection.mli.

type move_within_set_of_closures = Projection.move_within_set_of_closures
type project_var = Projection.project_var
type specialised_to = {
  1. var : Variable.t;
    (*

    The "outer variable".

    *)
  2. projection : Projection.t option;
    (*

    The projecting_from value (see projection.mli) of any projection must be another free variable or specialised argument (depending on whether this record type is involved in free_vars or specialised_args respectively) in the same set of closures. As such, this field describes a relation of projections between either the free_vars or the specialised_args.

    *)
}

See free_vars and specialised_args, below.

type t =
  1. | Var of Variable.t
  2. | Let of let_expr
  3. | Let_mutable of let_mutable
  4. | Let_rec of (Variable.t * named) list * t
    (*

    CR-someday lwhite: give Let_rec the same fields as Let.

    *)
  5. | Apply of apply
  6. | Send of send
  7. | Assign of assign
  8. | If_then_else of Variable.t * t * t
  9. | Switch of Variable.t * switch
  10. | String_switch of Variable.t * (string * t) list * t option
    (*

    Restrictions on Lambda.Lstringswitch also apply to String_switch.

    *)
  11. | Static_raise of Static_exception.t * Variable.t list
  12. | Static_catch of Static_exception.t * Variable.t list * t * t
  13. | Try_with of t * Variable.t * t
  14. | While of t * t
  15. | For of for_loop
  16. | Proved_unreachable

Flambda terms are partitioned in a pseudo-ANF manner; many terms are required to be let-bound. This in particular ensures there is always a variable name for an expression that may be lifted out (for example if it is found to be constant). Note: All bound variables in Flambda terms must be distinct. Flambda_invariants verifies this.

and named =
  1. | Symbol of Symbol.t
  2. | Const of const
  3. | Allocated_const of Allocated_const.t
  4. | Read_mutable of Mutable_variable.t
  5. | Read_symbol_field of Symbol.t * int
    (*

    During the lifting of let bindings to program constructions after closure conversion, we generate symbols and their corresponding definitions (which may or may not be constant), together with field accesses to such symbols. We would like it to be the case that such field accesses are simplified to the relevant component of the symbol concerned. (The rationale is to generate efficient code and share constants as expected: see e.g. tests/asmcomp/staticalloc.ml.) The components of the symbol would be identified by other symbols. This sort of access pattern is feasible because the top-level structure of symbols is statically allocated and fixed at compile time. It may seem that Prim (Pfield, ...) expressions could be used to perform the field accesses. However for simplicity, to avoid having to keep track of properties of individual fields of blocks, Inconstant_idents never deems a Prim (Pfield, ...) expression to be constant. This would in general prevent field accesses to symbols from being simplified in the way we would like, since Lift_constants would not assign new symbols (i.e. the things we would like to simplify to) to the various projections from the symbols in question. To circumvent this problem we use Read_symbol_field when generating projections from the top level of symbols. Owing to the properties of symbols described above, such expressions may be eligible for declaration as constant by Inconstant_idents (and thus themselves lifted to another symbol), without any further complication. Read_symbol_field may only be used when the definition of the symbol is in scope in the program. For external unresolved symbols, Pfield may still be used; it will be changed to Read_symbol_field by Inline_and_simplify when (and if) the symbol is imported.

    *)
  6. | Set_of_closures of set_of_closures
  7. | Project_closure of project_closure
  8. | Move_within_set_of_closures of move_within_set_of_closures
  9. | Project_var of project_var
  10. | Prim of Clambda_primitives.primitive * Variable.t list * Debuginfo.t
  11. | Expr of t
    (*

    ANF escape hatch.

    *)

Values of type named will always be let-bound to a Variable.t.

and let_expr = private {
  1. var : Variable.t;
  2. defining_expr : named;
  3. body : t;
  4. free_vars_of_defining_expr : Variable.Set.t;
    (*

    A cache of the free variables in the defining expression of the let.

    *)
  5. free_vars_of_body : Variable.Set.t;
    (*

    A cache of the free variables of the body of the let. This is an important optimization.

    *)
}
and let_mutable = {
  1. var : Mutable_variable.t;
  2. initial_value : Variable.t;
  3. contents_kind : Lambda.value_kind;
  4. body : t;
}
and set_of_closures = private {
  1. function_decls : function_declarations;
  2. free_vars : specialised_to Variable.Map.t;
    (*

    Mapping from all variables free in the body of the function_decls to variables in scope at the definition point of the set_of_closures. The domain of this map is sometimes known as the "variables bound by the closure".

    *)
  3. specialised_args : specialised_to Variable.Map.t;
    (*

    Parameters whose corresponding arguments are known to always alias a particular value. These are the only parameters that may, during Inline_and_simplify, have non-unknown approximations.

    An argument may only be specialised to a variable in the scope of the corresponding set of closures declaration. Usually, that variable itself also appears in the position of the specialised argument at all call sites of the function. However it may also be the case (for example in code generated as a result of Augment_specialised_args) that the various call sites of such a function have differing variables in the position of the specialised argument. This is permissible *so long as it is certain they all alias the same value*. Great care must be taken in transformations that result in this situation since there are no invariant checks for correctness.

    As an example, supposing all call sites of f are represented here: let x = ... in + let f a b c = ... in + let y = ... in + f x y 1; + f x y 1 the specialised arguments of f can (but does not necessarily) contain the association a -> x, but cannot contain b -> y because f is not in the scope of y. If f were the recursive function let rec f a b c = f a 1 2 in, a -> x would still be a valid specialised argument because all recursive calls maintain the invariant.

    This information is used for optimization purposes, if such a binding is known, it is possible to specialise the body of the function according to its parameter. This is usually introduced when specialising a recursive function, for instance. let rec map f = function + | [] -> [] + | h :: t -> f h :: map f t + let map_succ l = + let succ x = x + 1 in + map succ l map can be duplicated in map_succ to be specialised for the argument f. This will result in let map_succ l = + let succ x = x + 1 in + let rec map f = function + | [] -> [] + | h :: t -> f h :: map f t in + map succ l with map having f -> succ in its specialised_args field.

    Specialised argument information for arguments that are used must never be erased. This ensures that specialised arguments whose approximations describe closures maintain those approximations, which is essential to transport the closure freshening information to the point of use (e.g. a Project_var from such an argument).

    *)
  4. direct_call_surrogates : Variable.t Variable.Map.t;
    (*

    If direct_call_surrogates maps fun_var1 to fun_var2 then direct calls to fun_var1 should be redirected to fun_var2. This is used to reduce the overhead of transformations that introduce wrapper functions (which will be inlined at direct call sites, but will penalise indirect call sites). direct_call_surrogates may not be transitively closed.

    *)
}

The representation of a set of function declarations (possibly mutually recursive). Such a set encapsulates the declarations themselves, information about their defining environment, and information used specifically for optimization. Before a function can be applied it must be "projected" from a set of closures to yield a "closure". This is done using Project_closure (see above). Given a closure, not only can it be applied, but information about its defining environment can be retrieved (using Project_var, see above). At runtime, a set_of_closures corresponds to an OCaml value with tag Closure_tag (possibly with inline Infix_tag(s)). As an optimization, an operation (Move_within_set_of_closures) is provided (see above) which enables one closure within a set to be located given another closure in the same set. This avoids keeping a pointer to the whole set of closures alive when compiling, for example, mutually-recursive functions.

and function_declarations = private {
  1. is_classic_mode : bool;
    (*

    Indicates whether this function_declarations was compiled with -Oclassic.

    *)
  2. set_of_closures_id : Set_of_closures_id.t;
    (*

    An identifier (unique across all Flambda trees currently in memory) of the set of closures associated with this set of function declarations.

    *)
  3. set_of_closures_origin : Set_of_closures_origin.t;
    (*

    An identifier of the original set of closures on which this set of function declarations is based. Used to prevent different specialisations of the same functions from being inlined/specialised within each other.

    *)
  4. funs : function_declaration Variable.Map.t;
    (*

    The function(s) defined by the set of function declarations. The keys of this map are often referred to in the code as "fun_var"s.

    *)
}
and function_declaration = private {
  1. closure_origin : Closure_origin.t;
  2. params : Parameter.t list;
  3. body : t;
  4. free_variables : Variable.Set.t;
    (*

    All variables free in the *body* of the function. For example, a variable that is bound as one of the function's parameters will still be included in this set. This field is present as an optimization.

    *)
  5. free_symbols : Symbol.Set.t;
    (*

    All symbols that occur in the function's body. (Symbols can never be bound in a function's body; the only thing that binds symbols is the program constructions below.)

    *)
  6. stub : bool;
    (*

    A stub function is a generated function used to prepare arguments or return values to allow indirect calls to functions with a special calling convention. For instance indirect calls to tuplified functions must go through a stub. Stubs will be unconditionally inlined.

    *)
  7. dbg : Debuginfo.t;
    (*

    Debug info for the function declaration.

    *)
  8. inline : Lambda.inline_attribute;
    (*

    Inlining requirements from the source code.

    *)
  9. specialise : Lambda.specialise_attribute;
    (*

    Specialising requirements from the source code.

    *)
  10. is_a_functor : bool;
    (*

    Whether the function is known definitively to be a functor.

    *)
  11. poll : Lambda.poll_attribute;
    (*

    Behaviour for polls

    *)
}
and switch = {
  1. numconsts : Numbers.Int.Set.t;
    (*

    Integer cases

    *)
  2. consts : (int * t) list;
    (*

    Integer cases

    *)
  3. numblocks : Numbers.Int.Set.t;
    (*

    Number of tag block cases

    *)
  4. blocks : (int * t) list;
    (*

    Tag block cases

    *)
  5. failaction : t option;
    (*

    Action to take if none matched

    *)
}

Equivalent to the similar type in Lambda.

and for_loop = {
  1. bound_var : Variable.t;
  2. from_value : Variable.t;
  3. to_value : Variable.t;
  4. direction : Asttypes.direction_flag;
  5. body : t;
}

Equivalent to the similar type in Lambda.

and constant_defining_value =
  1. | Allocated_const of Allocated_const.t
    (*

    A single constant. These are never "simple constants" (type const) but instead more complicated constructions.

    *)
  2. | Block of Tag.t * constant_defining_value_block_field list
    (*

    A pre-allocated block full of constants (either simple constants or references to other constants, see below).

    *)
  3. | Set_of_closures of set_of_closures
    (*

    A closed (and thus constant) set of closures. (That is to say, free_vars must be empty.)

    *)
  4. | Project_closure of Symbol.t * Closure_id.t
    (*

    Selection of one closure from a constant set of closures. Analogous to the equivalent operation on expressions.

    *)

Like a subset of Flambda.named, except that instead of Variable.ts we have Symbol.ts, and everything is a constant (i.e. with a fixed value known at compile time). Values of this type describe constants that will be directly assigned to symbols in the object file (see below).

and constant_defining_value_block_field =
  1. | Symbol of Symbol.t
  2. | Const of const
type expr = t
type program_body =
  1. | Let_symbol of Symbol.t * constant_defining_value * program_body
    (*

    Define the given symbol to have the given constant value.

    *)
  2. | Let_rec_symbol of (Symbol.t * constant_defining_value) list * program_body
    (*

    As for Let_symbol, but recursive. This is needed to treat examples like this, where a constant set of closures is lifted to toplevel:

    let rec f x = f x

    After lifting this produces (in pseudo-Flambda):

    Let_rec_symbol set_of_closures_symbol = (Set_of_closures f x -> + let applied_function = Symbol f_closure in + Apply (applied_function, x) ) and f_closure = Project_closure (set_of_closures_symbol, f)

    Use of Let_rec_symbol, by virtue of the special handling in Inline_and_simplify.define_let_rec_symbol_approx, enables the approximation of the set of closures to be present in order to correctly simplify the Project_closure construction. (See Inline_and_simplify.simplify_project_closure for that part.)

    *)
  3. | Initialize_symbol of Symbol.t * Tag.t * t list * program_body
    (*

    Define the given symbol as a constant block of the given size and tag; but with a possibly non-constant initializer. The initializer will be executed at most once (from the entry point of the compilation unit).

    *)
  4. | Effect of t * program_body
    (*

    Cause the given expression, which may have a side effect, to be executed. The resulting value is discarded. Effect constructions are never re-ordered.

    *)
  5. | End of Symbol.t
    (*

    End accepts the root symbol: the only symbol that can never be eliminated.

    *)

A "program" is the contents of one compilation unit. It describes the various values that are assigned to symbols (and in some cases fields of such symbols) in the object file. As such, it is closely related to the compilation of toplevel modules.

type program = {
  1. imported_symbols : Symbol.Set.t;
  2. program_body : program_body;
}
val free_variables : + ?ignore_uses_as_callee:unit -> + ?ignore_uses_as_argument:unit -> + ?ignore_uses_in_project_var:unit -> + t -> + Variable.Set.t

Compute the free variables of a term. (This is O(1) for Lets). If ignore_uses_as_callee, all free variables inside Apply expressions are ignored. Likewise ignore_uses_in_project_var for Project_var expressions.

val free_variables_named : + ?ignore_uses_in_project_var:unit -> + named -> + Variable.Set.t

Compute the free variables of a named expression.

val used_variables : + ?ignore_uses_as_callee:unit -> + ?ignore_uses_as_argument:unit -> + ?ignore_uses_in_project_var:unit -> + t -> + Variable.Set.t

Compute _all_ variables occurring inside an expression.

val used_variables_named : + ?ignore_uses_in_project_var:unit -> + named -> + Variable.Set.t

Compute _all_ variables occurring inside a named expression.

val free_symbols : expr -> Symbol.Set.t
val free_symbols_named : named -> Symbol.Set.t
val free_symbols_program : program -> Symbol.Set.t
val fold_lets_option : + t -> + init:'a -> + for_defining_expr:('a -> Variable.t -> named -> 'a * Variable.t * named) -> + for_last_body:('a -> t -> t * 'b) -> + filter_defining_expr: + ('b -> + Variable.t -> + named -> + Variable.Set.t -> + 'b * Variable.t * named option) -> + t * 'b

Used to avoid exceeding the stack limit when handling expressions with multiple consecutive nested Let-expressions. This saves rewriting large simplification functions in CPS. This function provides for the rewriting or elimination of expressions during the fold.

val map_lets : + t -> + for_defining_expr:(Variable.t -> named -> named) -> + for_last_body:(t -> t) -> + after_rebuild:(t -> t) -> + t

Like fold_lets_option, but just a map.

val iter_lets : + t -> + for_defining_expr:(Variable.t -> named -> unit) -> + for_last_body:(t -> unit) -> + for_each_let:(t -> unit) -> + unit

Like map_lets, but just an iterator.

val create_let : Variable.t -> named -> t -> t

Creates a Let expression. (This computes the free variables of the defining expression and the body.)

val map_defining_expr_of_let : let_expr -> f:(named -> named) -> t

Apply the specified function f to the defining expression of the given Let-expression, returning a new Let.

module With_free_variables : sig ... end

A module for the manipulation of terms where the recomputation of free variable sets is to be kept to a minimum.

val create_function_declaration : + params:Parameter.t list -> + body:t -> + stub:bool -> + dbg:Debuginfo.t -> + inline:Lambda.inline_attribute -> + specialise:Lambda.specialise_attribute -> + is_a_functor:bool -> + closure_origin:Closure_origin.t -> + poll:Lambda.poll_attribute -> + function_declaration

Create a function declaration. This calculates the free variables and symbols occurring in the specified body.

val update_function_declaration : + function_declaration -> + params:Parameter.t list -> + body:t -> + function_declaration

Create a function declaration based on another function declaration

val create_function_declarations : + is_classic_mode:bool -> + funs:function_declaration Variable.Map.t -> + function_declarations

Create a set of function declarations given the individual declarations.

val create_function_declarations_with_origin : + is_classic_mode:bool -> + funs:function_declaration Variable.Map.t -> + set_of_closures_origin:Set_of_closures_origin.t -> + function_declarations

Create a set of function declarations with a given set of closures origin.

val update_body_of_function_declaration : + function_declaration -> + body:expr -> + function_declaration

Change only the code of a function declaration.

val update_function_decl's_params_and_body : + function_declaration -> + params:Parameter.t list -> + body:expr -> + function_declaration

Change only the code and parameters of a function declaration.

val update_function_declarations : + function_declarations -> + funs:function_declaration Variable.Map.t -> + function_declarations

Create a set of function declarations based on another set of function declarations.

val create_function_declarations_with_closures_origin : + is_classic_mode:bool -> + funs:function_declaration Variable.Map.t -> + set_of_closures_origin:Set_of_closures_origin.t -> + function_declarations
val create_set_of_closures : + function_decls:function_declarations -> + free_vars:specialised_to Variable.Map.t -> + specialised_args:specialised_to Variable.Map.t -> + direct_call_surrogates:Variable.t Variable.Map.t -> + set_of_closures

Create a set of closures. Checks are made to ensure that free_vars and specialised_args are reasonable.

Given a function declaration, find which of its parameters (if any) are used in the body.

type maybe_named =
  1. | Is_expr of t
  2. | Is_named of named
val iter_general : + toplevel:bool -> + (t -> unit) -> + (named -> unit) -> + maybe_named -> + unit

This function is designed for the internal use of Flambda_iterators. See that module for iterators to be used over Flambda terms.

val print : Format.formatter -> t -> unit
val print_named : Format.formatter -> named -> unit
val print_program : Format.formatter -> program -> unit
val print_const : Format.formatter -> const -> unit
val print_constant_defining_value : + Format.formatter -> + constant_defining_value -> + unit
val print_function_declaration : + Format.formatter -> + (Variable.t * function_declaration) -> + unit
val print_function_declarations : + Format.formatter -> + function_declarations -> + unit
val print_project_closure : Format.formatter -> project_closure -> unit
val print_move_within_set_of_closures : + Format.formatter -> + move_within_set_of_closures -> + unit
val print_project_var : Format.formatter -> project_var -> unit
val print_set_of_closures : Format.formatter -> set_of_closures -> unit
val print_specialised_to : Format.formatter -> specialised_to -> unit
val equal_call_kind : call_kind -> call_kind -> bool
val equal_specialised_to : specialised_to -> specialised_to -> bool
val compare_const : const -> const -> int
val compare_project_var : project_var -> project_var -> int
val compare_move_within_set_of_closures : + move_within_set_of_closures -> + move_within_set_of_closures -> + int
val compare_project_closure : project_closure -> project_closure -> int
diff --git a/findlib-0/compiler-libs/Flambda_invariants/index.html b/findlib-0/compiler-libs/Flambda_invariants/index.html new file mode 100644 index 000000000..7bc802a76 --- /dev/null +++ b/findlib-0/compiler-libs/Flambda_invariants/index.html @@ -0,0 +1,2 @@ + +Flambda_invariants (docs.findlib-0.compiler-libs.Flambda_invariants)

Module Flambda_invariants

type flambda_kind =
  1. | Normal
  2. | Lifted
val check_exn : ?kind:flambda_kind -> Flambda.program -> unit

Checking of invariants on Flambda expressions. Raises an exception if a check fails.

diff --git a/findlib-0/compiler-libs/Flambda_iterators/index.html b/findlib-0/compiler-libs/Flambda_iterators/index.html new file mode 100644 index 000000000..b76ca7de5 --- /dev/null +++ b/findlib-0/compiler-libs/Flambda_iterators/index.html @@ -0,0 +1,95 @@ + +Flambda_iterators (docs.findlib-0.compiler-libs.Flambda_iterators)

Module Flambda_iterators

val apply_on_subexpressions : + (Flambda.t -> unit) -> + (Flambda.named -> unit) -> + Flambda.t -> + unit

Apply the given functions to the immediate subexpressions of the given Flambda expression. For avoidance of doubt, if a subexpression is Expr, it is passed to the function taking Flambda.named, rather than being followed and passed to the function taking Flambda.t.

val map_subexpressions : + (Flambda.t -> Flambda.t) -> + (Variable.t -> Flambda.named -> Flambda.named) -> + Flambda.t -> + Flambda.t
val iter : (Flambda.t -> unit) -> (Flambda.named -> unit) -> Flambda.t -> unit
val iter_expr : (Flambda.t -> unit) -> Flambda.t -> unit
val iter_on_named : + (Flambda.t -> unit) -> + (Flambda.named -> unit) -> + Flambda.named -> + unit
val iter_named : (Flambda.named -> unit) -> Flambda.t -> unit
val iter_named_on_named : (Flambda.named -> unit) -> Flambda.named -> unit
val iter_toplevel : + (Flambda.t -> unit) -> + (Flambda.named -> unit) -> + Flambda.t -> + unit

iter_toplevel f t applies f on every toplevel subexpression of t. In particular, it never applies f to the body of a function (which will always be contained within an Set_of_closures expression).

val iter_named_toplevel : + (Flambda.t -> unit) -> + (Flambda.named -> unit) -> + Flambda.named -> + unit
val iter_on_sets_of_closures : + (Flambda.set_of_closures -> unit) -> + Flambda.t -> + unit
val iter_on_set_of_closures_of_program : + Flambda.program -> + f:(constant:bool -> Flambda.set_of_closures -> unit) -> + unit
val iter_all_immutable_let_and_let_rec_bindings : + Flambda.t -> + f:(Variable.t -> Flambda.named -> unit) -> + unit
val iter_all_toplevel_immutable_let_and_let_rec_bindings : + Flambda.t -> + f:(Variable.t -> Flambda.named -> unit) -> + unit
val iter_exprs_at_toplevel_of_program : + Flambda.program -> + f:(Flambda.t -> unit) -> + unit
val iter_named_of_program : + Flambda.program -> + f:(Flambda.named -> unit) -> + unit
val iter_constant_defining_values_on_program : + Flambda.program -> + f:(Flambda.constant_defining_value -> unit) -> + unit
val iter_apply_on_program : + Flambda.program -> + f:(Flambda.apply -> unit) -> + unit
val map : + (Flambda.t -> Flambda.t) -> + (Flambda.named -> Flambda.named) -> + Flambda.t -> + Flambda.t
val map_expr : (Flambda.t -> Flambda.t) -> Flambda.t -> Flambda.t
val map_named : (Flambda.named -> Flambda.named) -> Flambda.t -> Flambda.t
val map_toplevel : + (Flambda.t -> Flambda.t) -> + (Flambda.named -> Flambda.named) -> + Flambda.t -> + Flambda.t
val map_toplevel_expr : (Flambda.t -> Flambda.t) -> Flambda.t -> Flambda.t
val map_toplevel_named : + (Flambda.named -> Flambda.named) -> + Flambda.t -> + Flambda.t
val map_symbols : Flambda.t -> f:(Symbol.t -> Symbol.t) -> Flambda.t
val map_symbols_on_set_of_closures : + Flambda.set_of_closures -> + f:(Symbol.t -> Symbol.t) -> + Flambda.set_of_closures
val map_toplevel_sets_of_closures : + Flambda.t -> + f:(Flambda.set_of_closures -> Flambda.set_of_closures) -> + Flambda.t
val map_apply : Flambda.t -> f:(Flambda.apply -> Flambda.apply) -> Flambda.t
val map_function_bodies : + Flambda.set_of_closures -> + f:(Flambda.t -> Flambda.t) -> + Flambda.set_of_closures
val map_sets_of_closures : + Flambda.t -> + f:(Flambda.set_of_closures -> Flambda.set_of_closures) -> + Flambda.t
val map_sets_of_closures_of_program : + Flambda.program -> + f:(Flambda.set_of_closures -> Flambda.set_of_closures) -> + Flambda.program
val map_project_var_to_expr_opt : + Flambda.t -> + f:(Flambda.project_var -> Flambda.t option) -> + Flambda.t
val map_project_var_to_named_opt : + Flambda.t -> + f:(Flambda.project_var -> Flambda.named option) -> + Flambda.t
val map_exprs_at_toplevel_of_program : + Flambda.program -> + f:(Flambda.t -> Flambda.t) -> + Flambda.program
val map_named_of_program : + Flambda.program -> + f:(Variable.t -> Flambda.named -> Flambda.named) -> + Flambda.program
val map_all_immutable_let_and_let_rec_bindings : + Flambda.t -> + f:(Variable.t -> Flambda.named -> Flambda.named) -> + Flambda.t
val fold_function_decls_ignoring_stubs : + Flambda.set_of_closures -> + init:'a -> + f: + (fun_var:Variable.t -> + function_decl:Flambda.function_declaration -> + 'a -> + 'a) -> + 'a
diff --git a/findlib-0/compiler-libs/Flambda_middle_end/index.html b/findlib-0/compiler-libs/Flambda_middle_end/index.html new file mode 100644 index 000000000..e71d75b05 --- /dev/null +++ b/findlib-0/compiler-libs/Flambda_middle_end/index.html @@ -0,0 +1,7 @@ + +Flambda_middle_end (docs.findlib-0.compiler-libs.Flambda_middle_end)

Module Flambda_middle_end

Translate Lambda code to Flambda code, optimize it, and produce Clambda.

val lambda_to_clambda : + backend:(module Backend_intf.S) -> + prefixname:string -> + ppf_dump:Format.formatter -> + Lambda.program -> + Clambda.with_constants
diff --git a/findlib-0/compiler-libs/Flambda_to_clambda/index.html b/findlib-0/compiler-libs/Flambda_to_clambda/index.html new file mode 100644 index 000000000..9f7a75a63 --- /dev/null +++ b/findlib-0/compiler-libs/Flambda_to_clambda/index.html @@ -0,0 +1,5 @@ + +Flambda_to_clambda (docs.findlib-0.compiler-libs.Flambda_to_clambda)

Module Flambda_to_clambda

type result = {
  1. expr : Clambda.ulambda;
  2. preallocated_blocks : Clambda.preallocated_block list;
  3. structured_constants : Clambda.ustructured_constant Symbol.Map.t;
  4. exported : Export_info.t;
}
val convert : + ppf_dump:Format.formatter -> + (Flambda.program * Export_info.transient) -> + result

Convert an Flambda program, with associated proto-export information, to Clambda. This yields a Clambda expression together with augmented export information and details about required statically-allocated values (preallocated blocks, for Initialize_symbol, and structured constants).

It is during this process that accesses to variables within closures are transformed to field accesses within closure values. For direct calls, the hidden closure parameter is added. Switch tables are also built.

diff --git a/findlib-0/compiler-libs/Flambda_utils/Switch_storer/index.html b/findlib-0/compiler-libs/Flambda_utils/Switch_storer/index.html new file mode 100644 index 000000000..6317a9b53 --- /dev/null +++ b/findlib-0/compiler-libs/Flambda_utils/Switch_storer/index.html @@ -0,0 +1,2 @@ + +Switch_storer (docs.findlib-0.compiler-libs.Flambda_utils.Switch_storer)

Module Flambda_utils.Switch_storer

For the compilation of switch statements.

val mk_store : unit -> (Flambda.t, unit) Switch.t_store
diff --git a/findlib-0/compiler-libs/Flambda_utils/index.html b/findlib-0/compiler-libs/Flambda_utils/index.html new file mode 100644 index 000000000..dc0ea0cf1 --- /dev/null +++ b/findlib-0/compiler-libs/Flambda_utils/index.html @@ -0,0 +1,53 @@ + +Flambda_utils (docs.findlib-0.compiler-libs.Flambda_utils)

Module Flambda_utils

Utility functions for the Flambda intermediate language.

Access functions

find_declaration f decl raises Not_found if f is not in decl.

val find_declaration_variable : + Closure_id.t -> + Flambda.function_declarations -> + Variable.t

find_declaration_variable f decl raises Not_found if f is not in decl.

val find_free_variable : + Var_within_closure.t -> + Flambda.set_of_closures -> + Variable.t

find_free_variable v clos raises Not_found if c is not in clos.

Utility functions

val function_arity : Flambda.function_declaration -> int
val variables_bound_by_the_closure : + Closure_id.t -> + Flambda.function_declarations -> + Variable.Set.t

Variables "bound by a closure" are those variables free in the corresponding function's body that are neither:

  • bound as parameters of that function; nor
  • bound by the let binding that introduces the function declaration(s). In particular, if f, g and h are being introduced by a simultaneous, possibly mutually-recursive let binding then none of f, g or h are bound in any of the closures for f, g and h.
val can_be_merged : Flambda.t -> Flambda.t -> bool

If can_be_merged f1 f2 is true, it is safe to merge switch branches containing f1 and f2.

val description_of_toplevel_node : Flambda.t -> string
val make_closure_declaration : + is_classic_mode:bool -> + id:Variable.t -> + body:Flambda.t -> + params:Parameter.t list -> + Flambda.t
val toplevel_substitution : + Variable.t Variable.Map.t -> + Flambda.expr -> + Flambda.expr
val toplevel_substitution_named : + Variable.t Variable.Map.t -> + Flambda.named -> + Flambda.named
val bind : + bindings:(Variable.t * Flambda.named) list -> + body:Flambda.t -> + Flambda.t

bind [var1, expr1; ...; varN, exprN] body binds using Immutable Let expressions the given (var, expr) pairs around the body.

val name_expr_from_var : var:Variable.t -> Flambda.named -> Flambda.t
val initialize_symbols : + Flambda.program -> + (Symbol.t * Tag.t * Flambda.t list) list
val imported_symbols : Flambda.program -> Symbol.Set.t
val needed_import_symbols : Flambda.program -> Symbol.Set.t
val introduce_needed_import_symbols : Flambda.program -> Flambda.program
val root_symbol : Flambda.program -> Symbol.t
val might_raise_static_exn : Flambda.named -> Static_exception.t -> bool

Returns true iff the given term might raise the given static exception.

Creates a map from closure IDs to set_of_closure IDs by iterating over all sets of closures in the given program.

val all_lifted_constants : + Flambda.program -> + (Symbol.t * Flambda.constant_defining_value) list

The definitions of all constants that have been lifted out to Let_symbol or Let_rec_symbol constructions.

val all_lifted_constants_as_map : + Flambda.program -> + Flambda.constant_defining_value Symbol.Map.t

Like all_lifted_constant_symbols, but returns a map instead of a list.

val all_lifted_constant_sets_of_closures : + Flambda.program -> + Set_of_closures_id.Set.t

The identifiers of all constant sets of closures that have been lifted out to Let_symbol or Let_rec_symbol constructions.

val all_lifted_constant_closures : Flambda.program -> Closure_id.Set.t
val all_sets_of_closures : Flambda.program -> Flambda.set_of_closures list

All sets of closures in the given program (whether or not bound to a symbol.)

val substitute_read_symbol_field_for_variables : + (Symbol.t * int list) Variable.Map.t -> + Flambda.t -> + Flambda.t
module Switch_storer : sig ... end

For the compilation of switch statements.

val fun_vars_referenced_in_decls : + Flambda.function_declarations -> + closure_symbol:(Closure_id.t -> Symbol.t) -> + Variable.Set.t Variable.Map.t

Within a set of function declarations there is a set of function bodies, each of which may (or may not) reference one of the other functions in the same set. Initially such intra-set references are by Vars (known as "fun_var"s) but if the function is lifted by Lift_constants then the references will be translated to Symbols. This means that optimization passes that need to identify whether a given "fun_var" (i.e. a key in the funs map in a value of type function_declarations) is used in one of the function bodies need to examine the free_symbols as well as the free_variables members of function_declarations. This function makes that process easier by computing all used "fun_var"s in the bodies of the given set of function declarations, including the cases where the references are Symbols. The returned value is a map from "fun_var"s to the "fun_var"s (if any) used in the body of the function associated with that "fun_var".

val closures_required_by_entry_point : + entry_point:Closure_id.t -> + closure_symbol:(Closure_id.t -> Symbol.t) -> + Flambda.function_declarations -> + Variable.Set.t

Computes the set of closure_id in the set of closures that are required used (transitively) the entry_point

val all_functions_parameters : Flambda.function_declarations -> Variable.Set.t
val contains_stub : Flambda.function_declarations -> bool
val clean_projections : + which_variables:Flambda.specialised_to Variable.Map.t -> + Flambda.specialised_to Variable.Map.t
val projection_to_named : Projection.t -> Flambda.named
type specialised_to_same_as =
  1. | Not_specialised
  2. | Specialised_and_aliased_to of Variable.Set.t
val parameters_specialised_to_the_same_variable : + function_decls:Flambda.function_declarations -> + specialised_args:Flambda.specialised_to Variable.Map.t -> + specialised_to_same_as list Variable.Map.t

For each parameter in a given set of function declarations and the usual specialised-args mapping, determine which other parameters are specialised to the same variable as that parameter. The result is presented as a map from fun_vars to lists, corresponding componentwise to the usual params list in the corresponding function declaration.

diff --git a/findlib-0/compiler-libs/Freshening/Project_var/index.html b/findlib-0/compiler-libs/Freshening/Project_var/index.html new file mode 100644 index 000000000..31a675a72 --- /dev/null +++ b/findlib-0/compiler-libs/Freshening/Project_var/index.html @@ -0,0 +1,9 @@ + +Project_var (docs.findlib-0.compiler-libs.Freshening.Project_var)

Module Freshening.Project_var

type t

A table used for freshening of identifiers in Project_closure and Move_within_set_of_closures ("ids of closures"); and Project_var ("bound vars of closures") expressions.

This information is propagated bottom up and populated when inlining a function containing a closure declaration.

For instance, let f x = + let g y = ... x ... in + ... g.x ... (Project_var x) + ... g 1 ... (Apply (Project_closure g ...)) +

If f is inlined, g is renamed. The approximation of g will carry this table such that later the access to the field x of g and selection of g in the closure can be substituted.

val empty : t
val compose : earlier:t -> later:t -> t

Composition of two freshenings.

val apply_closure_id : t -> Closure_id.t -> Closure_id.t

Freshen a closure ID based on the given renaming. The same ID is returned if the renaming does not affect it. If dealing with approximations, you probably want to use Simple_value_approx.freshen_and_check_closure_id instead of this function.

val apply_var_within_closure : + t -> + Var_within_closure.t -> + Var_within_closure.t

Like apply_closure_id, but for variables within closures.

val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Freshening/index.html b/findlib-0/compiler-libs/Freshening/index.html new file mode 100644 index 000000000..4c1270e19 --- /dev/null +++ b/findlib-0/compiler-libs/Freshening/index.html @@ -0,0 +1,22 @@ + +Freshening (docs.findlib-0.compiler-libs.Freshening)

Module Freshening

Freshening of various identifiers.

type t

A table used for freshening variables and static exception identifiers.

type subst = t
val empty : t

The freshening that does nothing. This is the unique inactive freshening.

val is_empty : t -> bool
val activate : t -> t

Activate the freshening. Without activation, operations to request freshenings have no effect (cf. the documentation below for add_variable). As such, the inactive renaming is unique.

val empty_preserving_activation_state : t -> t

Given the inactive freshening, return the same; otherwise, return an empty active freshening.

val add_variable : t -> Variable.t -> Variable.t * t

add_variable t var If t is active: It returns a fresh variable new_var and adds var -> new_var to the freshening. If a renaming other_var -> var or symbol -> var was already present in t, it will also add other_var -> new_var and symbol -> new_var. If t is inactive, this is the identity.

val add_variables' : t -> Variable.t list -> Variable.t list * t

Like add_variable, but for multiple variables, each freshened separately.

val add_variables : t -> (Variable.t * 'a) list -> (Variable.t * 'a) list * t

Like add_variables', but passes through the second component of the input list unchanged.

val add_mutable_variable : t -> Mutable_variable.t -> Mutable_variable.t * t

Like add_variable, but for mutable variables.

val add_static_exception : t -> Static_exception.t -> Static_exception.t * t

As for add_variable, but for static exception identifiers.

val apply_variable : t -> Variable.t -> Variable.t

apply_variable t var applies the freshening t to var. If no renaming is specified in t for var it is returned unchanged.

val apply_mutable_variable : t -> Mutable_variable.t -> Mutable_variable.t

As for apply_variable, but for mutable variables.

val apply_static_exception : t -> Static_exception.t -> Static_exception.t

As for apply_variable, but for static exception identifiers.

val rewrite_recursive_calls_with_symbols : + t -> + Flambda.function_declarations -> + make_closure_symbol:(Closure_id.t -> Symbol.t) -> + Flambda.function_declarations

Replace recursive accesses to the closures in the set through Symbol by the corresponding Var. This is used to recover the recursive call when importing code from another compilation unit.

If the renaming is inactive, this is the identity.

module Project_var : sig ... end
val apply_function_decls_and_free_vars : + t -> + (Flambda.specialised_to * 'a) Variable.Map.t -> + Flambda.function_declarations -> + only_freshen_parameters:bool -> + (Flambda.specialised_to * 'a) Variable.Map.t + * Flambda.function_declarations + * t + * Project_var.t
val does_not_freshen : t -> Variable.t list -> bool
val print : Format.formatter -> t -> unit
val freshen_projection_relation : + Flambda.specialised_to Variable.Map.t -> + freshening:t -> + closure_freshening:Project_var.t -> + Flambda.specialised_to Variable.Map.t

N.B. This does not freshen the domain of the supplied map, only the range.

val freshen_projection_relation' : + (Flambda.specialised_to * 'a) Variable.Map.t -> + freshening:t -> + closure_freshening:Project_var.t -> + (Flambda.specialised_to * 'a) Variable.Map.t
diff --git a/findlib-0/compiler-libs/Genprintval/Make/argument-1-O/index.html b/findlib-0/compiler-libs/Genprintval/Make/argument-1-O/index.html new file mode 100644 index 000000000..234d64ee7 --- /dev/null +++ b/findlib-0/compiler-libs/Genprintval/Make/argument-1-O/index.html @@ -0,0 +1,2 @@ + +O (docs.findlib-0.compiler-libs.Genprintval.Make.O)

Parameter Make.O

type t
val repr : 'a -> t
val obj : t -> 'a
val is_block : t -> bool
val tag : t -> int
val size : t -> int
val field : t -> int -> t
val double_array_tag : int
val double_field : t -> int -> float
diff --git a/findlib-0/compiler-libs/Genprintval/Make/argument-2-_/index.html b/findlib-0/compiler-libs/Genprintval/Make/argument-2-_/index.html new file mode 100644 index 000000000..d6c7d573e --- /dev/null +++ b/findlib-0/compiler-libs/Genprintval/Make/argument-2-_/index.html @@ -0,0 +1,2 @@ + +_ (docs.findlib-0.compiler-libs.Genprintval.Make._)

Parameter Make._

type valu = O.t
val eval_address : Env.address -> valu
exception Error
val same_value : valu -> valu -> bool
diff --git a/findlib-0/compiler-libs/Genprintval/Make/index.html b/findlib-0/compiler-libs/Genprintval/Make/index.html new file mode 100644 index 000000000..8f772351e --- /dev/null +++ b/findlib-0/compiler-libs/Genprintval/Make/index.html @@ -0,0 +1,22 @@ + +Make (docs.findlib-0.compiler-libs.Genprintval.Make)

Module Genprintval.Make

Parameters

module O : OBJ
module _ : EVALPATH with type valu = O.t

Signature

type t = O.t
val install_printer : + Path.t -> + Types.type_expr -> + (Format.formatter -> t -> unit) -> + unit
val install_generic_printer : + Path.t -> + Path.t -> + (int -> + (int -> t -> Outcometree.out_value, t -> Outcometree.out_value) gen_printer) -> + unit
val install_generic_printer' : + Path.t -> + Path.t -> + (Format.formatter -> t -> unit, Format.formatter -> t -> unit) gen_printer -> + unit

install_generic_printer' function_path constructor_path printer function_path is used to remove the printer.

val remove_printer : Path.t -> unit
val outval_of_untyped_exception : t -> Outcometree.out_value
val outval_of_value : + int -> + int -> + (int -> t -> Types.type_expr -> Outcometree.out_value option) -> + Env.t -> + t -> + Types.type_expr -> + Outcometree.out_value
diff --git a/findlib-0/compiler-libs/Genprintval/index.html b/findlib-0/compiler-libs/Genprintval/index.html new file mode 100644 index 000000000..244ce7fd4 --- /dev/null +++ b/findlib-0/compiler-libs/Genprintval/index.html @@ -0,0 +1,2 @@ + +Genprintval (docs.findlib-0.compiler-libs.Genprintval)

Module Genprintval

module type OBJ = sig ... end
module type EVALPATH = sig ... end
type ('a, 'b) gen_printer =
  1. | Zero of 'b
  2. | Succ of 'a -> ('a, 'b) gen_printer
module type S = sig ... end
module Make (O : OBJ) (_ : EVALPATH with type valu = O.t) : S with type t = O.t
diff --git a/findlib-0/compiler-libs/Genprintval/module-type-EVALPATH/index.html b/findlib-0/compiler-libs/Genprintval/module-type-EVALPATH/index.html new file mode 100644 index 000000000..bfe8777e6 --- /dev/null +++ b/findlib-0/compiler-libs/Genprintval/module-type-EVALPATH/index.html @@ -0,0 +1,2 @@ + +EVALPATH (docs.findlib-0.compiler-libs.Genprintval.EVALPATH)

Module type Genprintval.EVALPATH

type valu
val eval_address : Env.address -> valu
exception Error
val same_value : valu -> valu -> bool
diff --git a/findlib-0/compiler-libs/Genprintval/module-type-OBJ/index.html b/findlib-0/compiler-libs/Genprintval/module-type-OBJ/index.html new file mode 100644 index 000000000..8a4b094b1 --- /dev/null +++ b/findlib-0/compiler-libs/Genprintval/module-type-OBJ/index.html @@ -0,0 +1,2 @@ + +OBJ (docs.findlib-0.compiler-libs.Genprintval.OBJ)

Module type Genprintval.OBJ

type t
val repr : 'a -> t
val obj : t -> 'a
val is_block : t -> bool
val tag : t -> int
val size : t -> int
val field : t -> int -> t
val double_array_tag : int
val double_field : t -> int -> float
diff --git a/findlib-0/compiler-libs/Genprintval/module-type-S/index.html b/findlib-0/compiler-libs/Genprintval/module-type-S/index.html new file mode 100644 index 000000000..f1a541470 --- /dev/null +++ b/findlib-0/compiler-libs/Genprintval/module-type-S/index.html @@ -0,0 +1,22 @@ + +S (docs.findlib-0.compiler-libs.Genprintval.S)

Module type Genprintval.S

type t
val install_printer : + Path.t -> + Types.type_expr -> + (Format.formatter -> t -> unit) -> + unit
val install_generic_printer : + Path.t -> + Path.t -> + (int -> + (int -> t -> Outcometree.out_value, t -> Outcometree.out_value) gen_printer) -> + unit
val install_generic_printer' : + Path.t -> + Path.t -> + (Format.formatter -> t -> unit, Format.formatter -> t -> unit) gen_printer -> + unit

install_generic_printer' function_path constructor_path printer function_path is used to remove the printer.

val remove_printer : Path.t -> unit
val outval_of_untyped_exception : t -> Outcometree.out_value
val outval_of_value : + int -> + int -> + (int -> t -> Types.type_expr -> Outcometree.out_value option) -> + Env.t -> + t -> + Types.type_expr -> + Outcometree.out_value
diff --git a/findlib-0/compiler-libs/Id_types/Id/index.html b/findlib-0/compiler-libs/Id_types/Id/index.html new file mode 100644 index 000000000..4be477f36 --- /dev/null +++ b/findlib-0/compiler-libs/Id_types/Id/index.html @@ -0,0 +1,2 @@ + +Id (docs.findlib-0.compiler-libs.Id_types.Id)

Module Id_types.Id

Parameters

Signature

include BaseId
type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val name : t -> string option
val to_string : t -> string
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val create : ?name:string -> unit -> t
diff --git a/findlib-0/compiler-libs/Id_types/UnitId/argument-1-_/index.html b/findlib-0/compiler-libs/Id_types/UnitId/argument-1-_/index.html new file mode 100644 index 000000000..feb9b0b1e --- /dev/null +++ b/findlib-0/compiler-libs/Id_types/UnitId/argument-1-_/index.html @@ -0,0 +1,2 @@ + +_ (docs.findlib-0.compiler-libs.Id_types.UnitId._)

Parameter UnitId._

include BaseId
type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val name : t -> string option
val to_string : t -> string
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val create : ?name:string -> unit -> t
diff --git a/findlib-0/compiler-libs/Id_types/UnitId/argument-2-Compilation_unit/index.html b/findlib-0/compiler-libs/Id_types/UnitId/argument-2-Compilation_unit/index.html new file mode 100644 index 000000000..c973dee44 --- /dev/null +++ b/findlib-0/compiler-libs/Id_types/UnitId/argument-2-Compilation_unit/index.html @@ -0,0 +1,2 @@ + +Compilation_unit (docs.findlib-0.compiler-libs.Id_types.UnitId.Compilation_unit)

Parameter UnitId.Compilation_unit

type t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Id_types/UnitId/index.html b/findlib-0/compiler-libs/Id_types/UnitId/index.html new file mode 100644 index 000000000..396b07d77 --- /dev/null +++ b/findlib-0/compiler-libs/Id_types/UnitId/index.html @@ -0,0 +1,2 @@ + +UnitId (docs.findlib-0.compiler-libs.Id_types.UnitId)

Module Id_types.UnitId

Parameters

module _ : Id

Signature

include BaseId
type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val name : t -> string option
val to_string : t -> string
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val create : ?name:string -> Compilation_unit.t -> t
val unit : t -> Compilation_unit.t
diff --git a/findlib-0/compiler-libs/Id_types/index.html b/findlib-0/compiler-libs/Id_types/index.html new file mode 100644 index 000000000..2be7190a9 --- /dev/null +++ b/findlib-0/compiler-libs/Id_types/index.html @@ -0,0 +1,5 @@ + +Id_types (docs.findlib-0.compiler-libs.Id_types)

Module Id_types

module type BaseId = sig ... end

Generic identifier type

module type Id = sig ... end
module type UnitId = sig ... end

Fully qualified identifiers

module Id () : Id
diff --git a/findlib-0/compiler-libs/Id_types/module-type-BaseId/index.html b/findlib-0/compiler-libs/Id_types/module-type-BaseId/index.html new file mode 100644 index 000000000..7b0d2d019 --- /dev/null +++ b/findlib-0/compiler-libs/Id_types/module-type-BaseId/index.html @@ -0,0 +1,2 @@ + +BaseId (docs.findlib-0.compiler-libs.Id_types.BaseId)

Module type Id_types.BaseId

Generic identifier type

type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val name : t -> string option
val to_string : t -> string
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Id_types/module-type-Id/index.html b/findlib-0/compiler-libs/Id_types/module-type-Id/index.html new file mode 100644 index 000000000..d4e487ba3 --- /dev/null +++ b/findlib-0/compiler-libs/Id_types/module-type-Id/index.html @@ -0,0 +1,2 @@ + +Id (docs.findlib-0.compiler-libs.Id_types.Id)

Module type Id_types.Id

include BaseId
type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val name : t -> string option
val to_string : t -> string
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val create : ?name:string -> unit -> t
diff --git a/findlib-0/compiler-libs/Id_types/module-type-UnitId/Compilation_unit/index.html b/findlib-0/compiler-libs/Id_types/module-type-UnitId/Compilation_unit/index.html new file mode 100644 index 000000000..5b1ec2686 --- /dev/null +++ b/findlib-0/compiler-libs/Id_types/module-type-UnitId/Compilation_unit/index.html @@ -0,0 +1,2 @@ + +Compilation_unit (docs.findlib-0.compiler-libs.Id_types.UnitId.Compilation_unit)

Module UnitId.Compilation_unit

type t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Id_types/module-type-UnitId/index.html b/findlib-0/compiler-libs/Id_types/module-type-UnitId/index.html new file mode 100644 index 000000000..77e0549db --- /dev/null +++ b/findlib-0/compiler-libs/Id_types/module-type-UnitId/index.html @@ -0,0 +1,2 @@ + +UnitId (docs.findlib-0.compiler-libs.Id_types.UnitId)

Module type Id_types.UnitId

Fully qualified identifiers

include BaseId
type t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val name : t -> string option
val to_string : t -> string
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val create : ?name:string -> Compilation_unit.t -> t
val unit : t -> Compilation_unit.t
diff --git a/findlib-0/compiler-libs/Ident/Map/index.html b/findlib-0/compiler-libs/Ident/Map/index.html new file mode 100644 index 000000000..c7b8dbe4a --- /dev/null +++ b/findlib-0/compiler-libs/Ident/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Ident.Map)

Module Ident.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Ident/Set/index.html b/findlib-0/compiler-libs/Ident/Set/index.html new file mode 100644 index 000000000..f2cd95868 --- /dev/null +++ b/findlib-0/compiler-libs/Ident/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Ident.Set)

Module Ident.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Ident/T/index.html b/findlib-0/compiler-libs/Ident/T/index.html new file mode 100644 index 000000000..4f508d3f9 --- /dev/null +++ b/findlib-0/compiler-libs/Ident/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Ident.T)

Module Ident.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Ident/Tbl/index.html b/findlib-0/compiler-libs/Ident/Tbl/index.html new file mode 100644 index 000000000..4aefcc3d2 --- /dev/null +++ b/findlib-0/compiler-libs/Ident/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Ident.Tbl)

Module Ident.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Ident/index.html b/findlib-0/compiler-libs/Ident/index.html new file mode 100644 index 000000000..5818c2a2e --- /dev/null +++ b/findlib-0/compiler-libs/Ident/index.html @@ -0,0 +1,2 @@ + +Ident (docs.findlib-0.compiler-libs.Ident)

Module Ident

type t
include Identifiable.S with type t := t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val print_with_scope : Format.formatter -> t -> unit

Same as print except that it will also add a "n" suffix if the scope of the argument is n.

val create_scoped : scope:int -> string -> t
val create_local : string -> t
val create_persistent : string -> t
val create_predef : string -> t
val rename : t -> t

Creates an identifier with the same name as the input, a fresh stamp, and no scope.

  • raises [Fatal_error]

    if called on a persistent / predef ident.

val name : t -> string
val unique_name : t -> string
val unique_toplevel_name : t -> string
val persistent : t -> bool
val same : t -> t -> bool

Compare identifiers by binding location. Two identifiers are the same either if they are both non-persistent and have been created by the same call to create_*, or if they are both persistent and have the same name.

val compare : t -> t -> int
val global : t -> bool
val is_predef : t -> bool
val scope : t -> int
val lowest_scope : int
val highest_scope : int
val reinit : unit -> unit
type 'a tbl

'a tbl represents association tables from identifiers to values of type 'a.

'a tbl plays the role of map, but bindings can be looked up from either the full Ident using find_same, or just its user-visible name using find_name. In general the two lookups may not return the same result, as an identifier may have been shadowed in the environment by a distinct identifier with the same name.

find_all returns the bindings for all idents of a given name, most recently introduced first.

In other words, 'a tbl corresponds to (Ident.t * 'a) list Map.Make(String) and the implementation is very close to that representation.

Note in particular that searching among idents of the same name takes linear time, and that add simply extends the list without checking for duplicates. So it is not a good idea to implement union by repeated add calls, which may result in many duplicated identifiers and poor find_same performance. It is even possible to build overly large same-name lists such that non-recursive functions like find_all or fold_all blow the stack.

You should probably use Map.Make(Ident) instead, unless you really need to query bindings by user-visible name, not just by unique identifiers.

val empty : 'a tbl
val add : t -> 'a -> 'a tbl -> 'a tbl
val find_same : t -> 'a tbl -> 'a
val find_name : string -> 'a tbl -> t * 'a
val find_all : string -> 'a tbl -> (t * 'a) list
val find_all_seq : string -> 'a tbl -> (t * 'a) Seq.t
val fold_name : (t -> 'a -> 'b -> 'b) -> 'a tbl -> 'b -> 'b
val fold_all : (t -> 'a -> 'b -> 'b) -> 'a tbl -> 'b -> 'b
val iter : (t -> 'a -> unit) -> 'a tbl -> unit
val remove : t -> 'a tbl -> 'a tbl
val make_key_generator : unit -> t -> t
diff --git a/findlib-0/compiler-libs/Identifiable/Make/Map/index.html b/findlib-0/compiler-libs/Identifiable/Make/Map/index.html new file mode 100644 index 000000000..613a6fcfa --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/Make/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Identifiable.Make.Map)

Module Make.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Identifiable/Make/Set/index.html b/findlib-0/compiler-libs/Identifiable/Make/Set/index.html new file mode 100644 index 000000000..8e2655876 --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/Make/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Identifiable.Make.Set)

Module Make.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Identifiable/Make/T/index.html b/findlib-0/compiler-libs/Identifiable/Make/T/index.html new file mode 100644 index 000000000..d8cd7392e --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/Make/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Identifiable.Make.T)

Module Make.T

type t = T.t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Identifiable/Make/Tbl/index.html b/findlib-0/compiler-libs/Identifiable/Make/Tbl/index.html new file mode 100644 index 000000000..4c32f756b --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/Make/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Identifiable.Make.Tbl)

Module Make.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Identifiable/Make/argument-1-T/index.html b/findlib-0/compiler-libs/Identifiable/Make/argument-1-T/index.html new file mode 100644 index 000000000..3bff78adc --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/Make/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Identifiable.Make.T)

Parameter Make.T

type t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Identifiable/Make/index.html b/findlib-0/compiler-libs/Identifiable/Make/index.html new file mode 100644 index 000000000..7948a8464 --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.findlib-0.compiler-libs.Identifiable.Make)

Module Identifiable.Make

Parameters

module T : Thing

Signature

module T : Thing with type t = T.t
include Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Set with module T := T
module Map : Map with module T := T
module Tbl : Tbl with module T := T
diff --git a/findlib-0/compiler-libs/Identifiable/Pair/argument-1-A/index.html b/findlib-0/compiler-libs/Identifiable/Pair/argument-1-A/index.html new file mode 100644 index 000000000..80d09ce20 --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/Pair/argument-1-A/index.html @@ -0,0 +1,2 @@ + +A (docs.findlib-0.compiler-libs.Identifiable.Pair.A)

Parameter Pair.A

type t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Identifiable/Pair/argument-2-B/index.html b/findlib-0/compiler-libs/Identifiable/Pair/argument-2-B/index.html new file mode 100644 index 000000000..34ff18182 --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/Pair/argument-2-B/index.html @@ -0,0 +1,2 @@ + +B (docs.findlib-0.compiler-libs.Identifiable.Pair.B)

Parameter Pair.B

type t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Identifiable/Pair/index.html b/findlib-0/compiler-libs/Identifiable/Pair/index.html new file mode 100644 index 000000000..926d064f8 --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/Pair/index.html @@ -0,0 +1,2 @@ + +Pair (docs.findlib-0.compiler-libs.Identifiable.Pair)

Module Identifiable.Pair

Parameters

module A : Thing
module B : Thing

Signature

type t = A.t * B.t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Identifiable/index.html b/findlib-0/compiler-libs/Identifiable/index.html new file mode 100644 index 000000000..1d7ff6a1c --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/index.html @@ -0,0 +1,2 @@ + +Identifiable (docs.findlib-0.compiler-libs.Identifiable)

Module Identifiable

Uniform interface for common data structures over various things.

Warning: this module is unstable and part of compiler-libs.

module type Thing = sig ... end
module Pair (A : Thing) (B : Thing) : Thing with type t = A.t * B.t
module type Set = sig ... end
module type Map = sig ... end
module type Tbl = sig ... end
module type S = sig ... end
module Make (T : Thing) : S with type t := T.t
diff --git a/findlib-0/compiler-libs/Identifiable/module-type-Map/T/index.html b/findlib-0/compiler-libs/Identifiable/module-type-Map/T/index.html new file mode 100644 index 000000000..c68f55be0 --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/module-type-Map/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Identifiable.Map.T)

Module Map.T

type t

The type of the map keys.

val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/findlib-0/compiler-libs/Identifiable/module-type-Map/index.html b/findlib-0/compiler-libs/Identifiable/module-type-Map/index.html new file mode 100644 index 000000000..d9bb43da4 --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/module-type-Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Identifiable.Map)

Module type Identifiable.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Identifiable/module-type-S/Map/index.html b/findlib-0/compiler-libs/Identifiable/module-type-S/Map/index.html new file mode 100644 index 000000000..b3a88080a --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/module-type-S/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Identifiable.S.Map)

Module S.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Identifiable/module-type-S/Set/index.html b/findlib-0/compiler-libs/Identifiable/module-type-S/Set/index.html new file mode 100644 index 000000000..bd6bce6e0 --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/module-type-S/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Identifiable.S.Set)

Module S.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Identifiable/module-type-S/T/index.html b/findlib-0/compiler-libs/Identifiable/module-type-S/T/index.html new file mode 100644 index 000000000..88e6dd77f --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/module-type-S/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Identifiable.S.T)

Module S.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Identifiable/module-type-S/Tbl/index.html b/findlib-0/compiler-libs/Identifiable/module-type-S/Tbl/index.html new file mode 100644 index 000000000..00e46a79f --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/module-type-S/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Identifiable.S.Tbl)

Module S.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Identifiable/module-type-S/index.html b/findlib-0/compiler-libs/Identifiable/module-type-S/index.html new file mode 100644 index 000000000..7931e2d0f --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (docs.findlib-0.compiler-libs.Identifiable.S)

Module type Identifiable.S

type t
module T : Thing with type t = t
include Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Set with module T := T
module Map : Map with module T := T
module Tbl : Tbl with module T := T
diff --git a/findlib-0/compiler-libs/Identifiable/module-type-Set/T/index.html b/findlib-0/compiler-libs/Identifiable/module-type-Set/T/index.html new file mode 100644 index 000000000..ae85db21e --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/module-type-Set/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Identifiable.Set.T)

Module Set.T

type t

The type of the set elements.

val compare : t -> t -> int

A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/findlib-0/compiler-libs/Identifiable/module-type-Set/index.html b/findlib-0/compiler-libs/Identifiable/module-type-Set/index.html new file mode 100644 index 000000000..ddf9e0522 --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/module-type-Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Identifiable.Set)

Module type Identifiable.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Identifiable/module-type-Tbl/T/index.html b/findlib-0/compiler-libs/Identifiable/module-type-Tbl/T/index.html new file mode 100644 index 000000000..2ff4fd61f --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/module-type-Tbl/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Identifiable.Tbl.T)

Module Tbl.T

type t
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/findlib-0/compiler-libs/Identifiable/module-type-Tbl/index.html b/findlib-0/compiler-libs/Identifiable/module-type-Tbl/index.html new file mode 100644 index 000000000..e6e0f073e --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/module-type-Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Identifiable.Tbl)

Module type Identifiable.Tbl

module T : sig ... end
include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Identifiable/module-type-Thing/index.html b/findlib-0/compiler-libs/Identifiable/module-type-Thing/index.html new file mode 100644 index 000000000..c9f8de42e --- /dev/null +++ b/findlib-0/compiler-libs/Identifiable/module-type-Thing/index.html @@ -0,0 +1,2 @@ + +Thing (docs.findlib-0.compiler-libs.Identifiable.Thing)

Module type Identifiable.Thing

type t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Import_approx/index.html b/findlib-0/compiler-libs/Import_approx/index.html new file mode 100644 index 000000000..bd58e8958 --- /dev/null +++ b/findlib-0/compiler-libs/Import_approx/index.html @@ -0,0 +1,2 @@ + +Import_approx (docs.findlib-0.compiler-libs.Import_approx)

Module Import_approx

Create simple value approximations from the export information in .cmx files.

Given an approximation description, load .cmx files (possibly more than one) until the description is fully resolved. If a necessary .cmx file cannot be found, "unresolved" will be returned.

val really_import_approx : Simple_value_approx.t -> Simple_value_approx.t

Maps the description of the given approximation through really_import.

val import_symbol : Symbol.t -> Simple_value_approx.t

Read and convert the approximation of a given symbol from the relevant .cmx file. Unlike the "really_" functions, this does not continue to load .cmx files until the approximation is fully resolved.

diff --git a/findlib-0/compiler-libs/Includeclass/index.html b/findlib-0/compiler-libs/Includeclass/index.html new file mode 100644 index 000000000..bb5e9ca83 --- /dev/null +++ b/findlib-0/compiler-libs/Includeclass/index.html @@ -0,0 +1,19 @@ + +Includeclass (docs.findlib-0.compiler-libs.Includeclass)

Module Includeclass

val class_types : + Env.t -> + Types.class_type -> + Types.class_type -> + Ctype.class_match_failure list
val class_type_declarations : + loc:Location.t -> + Env.t -> + Types.class_type_declaration -> + Types.class_type_declaration -> + Ctype.class_match_failure list
val report_error : + Printtyp.type_or_scheme -> + Format.formatter -> + Ctype.class_match_failure list -> + unit
diff --git a/findlib-0/compiler-libs/Includecore/index.html b/findlib-0/compiler-libs/Includecore/index.html new file mode 100644 index 000000000..f650b5796 --- /dev/null +++ b/findlib-0/compiler-libs/Includecore/index.html @@ -0,0 +1,51 @@ + +Includecore (docs.findlib-0.compiler-libs.Includecore)

Module Includecore

type position = Errortrace.position =
  1. | First
  2. | Second
type primitive_mismatch =
  1. | Name
  2. | Arity
  3. | No_alloc of position
  4. | Native_name
  5. | Result_repr
  6. | Argument_repr of int
type value_mismatch =
  1. | Primitive_mismatch of primitive_mismatch
  2. | Not_a_primitive
  3. | Type of Errortrace.moregen_error
exception Dont_match of value_mismatch
type privacy_mismatch =
  1. | Private_type_abbreviation
  2. | Private_variant_type
  3. | Private_record_type
  4. | Private_extensible_variant
  5. | Private_row_type
type type_kind =
  1. | Kind_abstract
  2. | Kind_record
  3. | Kind_variant
  4. | Kind_open
type kind_mismatch = type_kind * type_kind
type label_mismatch =
  1. | Type of Errortrace.equality_error
  2. | Mutability of position
type record_change = + (Types.label_declaration as 'ld, 'ld, label_mismatch) + Diffing_with_keys.change
type record_mismatch =
  1. | Label_mismatch of record_change list
  2. | Unboxed_float_representation of position
type constructor_mismatch =
  1. | Type of Errortrace.equality_error
  2. | Arity
  3. | Inline_record of record_change list
  4. | Kind of position
  5. | Explicit_return_type of position
type extension_constructor_mismatch =
  1. | Constructor_privacy
  2. | Constructor_mismatch of Ident.t + * Types.extension_constructor + * Types.extension_constructor + * constructor_mismatch
type private_variant_mismatch =
  1. | Only_outer_closed
  2. | Missing of position * string
  3. | Presence of string
  4. | Incompatible_types_for of string
  5. | Types of Errortrace.equality_error
type private_object_mismatch =
  1. | Missing of string
  2. | Types of Errortrace.equality_error
type type_mismatch =
  1. | Arity
  2. | Privacy of privacy_mismatch
  3. | Kind of kind_mismatch
  4. | Constraint of Errortrace.equality_error
  5. | Manifest of Errortrace.equality_error
  6. | Private_variant of Types.type_expr * Types.type_expr * private_variant_mismatch
  7. | Private_object of Types.type_expr * Types.type_expr * private_object_mismatch
  8. | Variance
  9. | Record_mismatch of record_mismatch
  10. | Variant_mismatch of variant_change list
  11. | Unboxed_representation of position
  12. | Immediate of Type_immediacy.Violation.t
val value_descriptions : + loc:Location.t -> + Env.t -> + string -> + Types.value_description -> + Types.value_description -> + Typedtree.module_coercion
val type_declarations : + ?equality:bool -> + loc:Location.t -> + Env.t -> + mark:bool -> + string -> + Types.type_declaration -> + Path.t -> + Types.type_declaration -> + type_mismatch option
val extension_constructors : + loc:Location.t -> + Env.t -> + mark:bool -> + Ident.t -> + Types.extension_constructor -> + Types.extension_constructor -> + extension_constructor_mismatch option
val report_value_mismatch : + string -> + string -> + Env.t -> + Format.formatter -> + value_mismatch -> + unit
val report_type_mismatch : + string -> + string -> + string -> + Env.t -> + Format.formatter -> + type_mismatch -> + unit
val report_extension_constructor_mismatch : + string -> + string -> + string -> + Env.t -> + Format.formatter -> + extension_constructor_mismatch -> + unit
diff --git a/findlib-0/compiler-libs/Includemod/Error/index.html b/findlib-0/compiler-libs/Includemod/Error/index.html new file mode 100644 index 000000000..35c44bf3b --- /dev/null +++ b/findlib-0/compiler-libs/Includemod/Error/index.html @@ -0,0 +1,13 @@ + +Error (docs.findlib-0.compiler-libs.Includemod.Error)

Module Includemod.Error

type ('elt, 'explanation) diff = {
  1. got : 'elt;
  2. expected : 'elt;
  3. symptom : 'explanation;
}
type 'elt core_diff = ('elt, unit) diff
type functor_arg_descr =
  1. | Anonymous
  2. | Named of Path.t
  3. | Unit
  4. | Empty_struct
    (*

    For backward compatibility's sake, an empty struct can be implicitly converted to an unit module.

    *)
type core_sigitem_symptom =
  1. | Value_descriptions of (Types.value_description, Includecore.value_mismatch) + diff
  2. | Type_declarations of (Types.type_declaration, Includecore.type_mismatch) diff
  3. | Extension_constructors of (Types.extension_constructor, + Includecore.extension_constructor_mismatch) + diff
  4. | Class_type_declarations of (Types.class_type_declaration, + Ctype.class_match_failure list) + diff
  5. | Class_declarations of (Types.class_declaration, Ctype.class_match_failure list) + diff
type core_module_type_symptom =
  1. | Not_an_alias
  2. | Not_an_identifier
  3. | Incompatible_aliases
  4. | Abstract_module_type
  5. | Unbound_module_path of Path.t
type module_type_symptom =
  1. | Mt_core of core_module_type_symptom
  2. | Signature of signature_symptom
  3. | Functor of functor_symptom
  4. | Invalid_module_alias of Path.t
  5. | After_alias_expansion of module_type_diff
and module_type_diff = (Types.module_type, module_type_symptom) diff
and functor_symptom =
  1. | Params of functor_params_diff
  2. | Result of module_type_diff
and ('arg, 'path) functor_param_symptom =
  1. | Incompatible_params of 'arg * Types.functor_parameter
  2. | Mismatch of module_type_diff
and arg_functor_param_symptom = + (Types.functor_parameter, Ident.t) functor_param_symptom
and functor_params_diff = + (Types.functor_parameter list * Types.module_type) core_diff
and signature_symptom = {
  1. env : Env.t;
  2. missings : Types.signature_item list;
  3. incompatibles : (Ident.t * sigitem_symptom) list;
  4. oks : (int * Typedtree.module_coercion) list;
  5. leftovers : (Types.signature_item as 'it * 'it * int) list;
    (*

    signature items that could not be compared due to type divergence

    *)
}
and sigitem_symptom =
  1. | Core of core_sigitem_symptom
  2. | Module_type_declaration of (Types.modtype_declaration, + module_type_declaration_symptom) + diff
  3. | Module_type of module_type_diff
and module_type_declaration_symptom =
  1. | Illegal_permutation of Typedtree.module_coercion
  2. | Not_greater_than of module_type_diff
  3. | Not_less_than of module_type_diff
  4. | Incomparable of {
    1. less_than : module_type_diff;
    2. greater_than : module_type_diff;
    }
type all =
  1. | In_Compilation_unit of (string, signature_symptom) diff
  2. | In_Signature of signature_symptom
  3. | In_Module_type of module_type_diff
  4. | In_Module_type_substitution of Ident.t + * (Types.module_type, module_type_declaration_symptom) diff
  5. | In_Type_declaration of Ident.t * core_sigitem_symptom
  6. | In_Expansion of core_module_type_symptom
diff --git a/findlib-0/compiler-libs/Includemod/FieldMap/index.html b/findlib-0/compiler-libs/Includemod/FieldMap/index.html new file mode 100644 index 000000000..c7200520e --- /dev/null +++ b/findlib-0/compiler-libs/Includemod/FieldMap/index.html @@ -0,0 +1,8 @@ + +FieldMap (docs.findlib-0.compiler-libs.Includemod.FieldMap)

Module Includemod.FieldMap

Map indexed by both field types and names. This avoids name clashes between different sorts of fields such as values and types.

Maps

type key = field_desc

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Includemod/Functor_app_diff/Defs/index.html b/findlib-0/compiler-libs/Includemod/Functor_app_diff/Defs/index.html new file mode 100644 index 000000000..caf4f280a --- /dev/null +++ b/findlib-0/compiler-libs/Includemod/Functor_app_diff/Defs/index.html @@ -0,0 +1,2 @@ + +Defs (docs.findlib-0.compiler-libs.Includemod.Functor_app_diff.Defs)

Module Functor_app_diff.Defs

type state
diff --git a/findlib-0/compiler-libs/Includemod/Functor_app_diff/index.html b/findlib-0/compiler-libs/Includemod/Functor_app_diff/index.html new file mode 100644 index 000000000..6072f2c7f --- /dev/null +++ b/findlib-0/compiler-libs/Includemod/Functor_app_diff/index.html @@ -0,0 +1,6 @@ + +Functor_app_diff (docs.findlib-0.compiler-libs.Includemod.Functor_app_diff)

Module Includemod.Functor_app_diff

module Defs : sig ... end
diff --git a/findlib-0/compiler-libs/Includemod/Functor_inclusion_diff/Defs/index.html b/findlib-0/compiler-libs/Includemod/Functor_inclusion_diff/Defs/index.html new file mode 100644 index 000000000..93076a7bf --- /dev/null +++ b/findlib-0/compiler-libs/Includemod/Functor_inclusion_diff/Defs/index.html @@ -0,0 +1,2 @@ + +Defs (docs.findlib-0.compiler-libs.Includemod.Functor_inclusion_diff.Defs)

Module Functor_inclusion_diff.Defs

type right = left
type state
diff --git a/findlib-0/compiler-libs/Includemod/Functor_inclusion_diff/index.html b/findlib-0/compiler-libs/Includemod/Functor_inclusion_diff/index.html new file mode 100644 index 000000000..37bf5aa60 --- /dev/null +++ b/findlib-0/compiler-libs/Includemod/Functor_inclusion_diff/index.html @@ -0,0 +1,6 @@ + +Functor_inclusion_diff (docs.findlib-0.compiler-libs.Includemod.Functor_inclusion_diff)

Module Includemod.Functor_inclusion_diff

module Defs : sig ... end
diff --git a/findlib-0/compiler-libs/Includemod/index.html b/findlib-0/compiler-libs/Includemod/index.html new file mode 100644 index 000000000..b0975d64c --- /dev/null +++ b/findlib-0/compiler-libs/Includemod/index.html @@ -0,0 +1,76 @@ + +Includemod (docs.findlib-0.compiler-libs.Includemod)

Module Includemod

type mark =
  1. | Mark_both
    (*

    Mark definitions used from both arguments

    *)
  2. | Mark_positive
    (*

    Mark definitions used from the positive (first) argument

    *)
  3. | Mark_negative
    (*

    Mark definitions used from the negative (second) argument

    *)
  4. | Mark_neither
    (*

    Do not mark definitions used from either argument

    *)

Type describing which arguments of an inclusion to consider as used for the usage warnings. Mark_both is the default.

module Error : sig ... end
type explanation = Env.t * Error.all
type field_kind =
  1. | Field_value
  2. | Field_type
  3. | Field_exception
  4. | Field_typext
  5. | Field_module
  6. | Field_modtype
  7. | Field_class
  8. | Field_classtype
type field_desc = {
  1. name : string;
  2. kind : field_kind;
}
val kind_of_field_desc : field_desc -> string
val field_desc : field_kind -> Ident.t -> field_desc
module FieldMap : Map.S with type key = field_desc

Map indexed by both field types and names. This avoids name clashes between different sorts of fields such as values and types.

val item_ident_name : Types.signature_item -> Ident.t * Location.t * field_desc
val is_runtime_component : Types.signature_item -> bool
val modtypes : + loc:Location.t -> + Env.t -> + mark:mark -> + Types.module_type -> + Types.module_type -> + Typedtree.module_coercion
val modtypes_with_shape : + shape:Shape.t -> + loc:Location.t -> + Env.t -> + mark:mark -> + Types.module_type -> + Types.module_type -> + Typedtree.module_coercion * Shape.t
val strengthened_module_decl : + loc:Location.t -> + aliasable:bool -> + Env.t -> + mark:mark -> + Types.module_declaration -> + Path.t -> + Types.module_declaration -> + Typedtree.module_coercion
val check_modtype_inclusion : + loc:Location.t -> + Env.t -> + Types.module_type -> + Path.t -> + Types.module_type -> + explanation option

check_modtype_inclusion ~loc env mty1 path1 mty2 checks that the functor application F(M) is well typed, where mty2 is the type of the argument of F and path1/mty1 is the path/unstrenghened type of M.

val check_modtype_equiv : + loc:Location.t -> + Env.t -> + Ident.t -> + Types.module_type -> + Types.module_type -> + unit
val signatures : + Env.t -> + mark:mark -> + Types.signature -> + Types.signature -> + Typedtree.module_coercion
val compunit : + Env.t -> + mark:mark -> + string -> + Types.signature -> + string -> + Types.signature -> + Shape.t -> + Typedtree.module_coercion * Shape.t
val type_declarations : + loc:Location.t -> + Env.t -> + mark:mark -> + Ident.t -> + Types.type_declaration -> + Types.type_declaration -> + unit
val print_coercion : Format.formatter -> Typedtree.module_coercion -> unit
type symptom =
  1. | Missing_field of Ident.t * Location.t * string
  2. | Value_descriptions of Ident.t + * Types.value_description + * Types.value_description + * Includecore.value_mismatch
  3. | Type_declarations of Ident.t + * Types.type_declaration + * Types.type_declaration + * Includecore.type_mismatch
  4. | Extension_constructors of Ident.t + * Types.extension_constructor + * Types.extension_constructor + * Includecore.extension_constructor_mismatch
  5. | Module_types of Types.module_type * Types.module_type
  6. | Modtype_infos of Ident.t + * Types.modtype_declaration + * Types.modtype_declaration
  7. | Modtype_permutation of Types.module_type * Typedtree.module_coercion
  8. | Interface_mismatch of string * string
  9. | Class_type_declarations of Ident.t + * Types.class_type_declaration + * Types.class_type_declaration + * Ctype.class_match_failure list
  10. | Class_declarations of Ident.t + * Types.class_declaration + * Types.class_declaration + * Ctype.class_match_failure list
  11. | Unbound_module_path of Path.t
  12. | Invalid_module_alias of Path.t
type pos =
  1. | Module of Ident.t
  2. | Modtype of Ident.t
  3. | Arg of Types.functor_parameter
  4. | Body of Types.functor_parameter
exception Error of explanation
exception Apply_error of {
  1. loc : Location.t;
  2. env : Env.t;
  3. lid_app : Longident.t option;
  4. mty_f : Types.module_type;
  5. args : (Error.functor_arg_descr * Types.module_type) list;
}
val expand_module_alias : + strengthen:bool -> + Env.t -> + Path.t -> + Types.module_type
module Functor_inclusion_diff : sig ... end
module Functor_app_diff : sig ... end
diff --git a/findlib-0/compiler-libs/Includemod_errorprinter/index.html b/findlib-0/compiler-libs/Includemod_errorprinter/index.html new file mode 100644 index 000000000..2c87a0812 --- /dev/null +++ b/findlib-0/compiler-libs/Includemod_errorprinter/index.html @@ -0,0 +1,2 @@ + +Includemod_errorprinter (docs.findlib-0.compiler-libs.Includemod_errorprinter)

Module Includemod_errorprinter

val err_msgs : Includemod.explanation -> Format.formatter -> unit
val register : unit -> unit
diff --git a/findlib-0/compiler-libs/Inconstant_idents/index.html b/findlib-0/compiler-libs/Inconstant_idents/index.html new file mode 100644 index 000000000..0a3f7e7b7 --- /dev/null +++ b/findlib-0/compiler-libs/Inconstant_idents/index.html @@ -0,0 +1,6 @@ + +Inconstant_idents (docs.findlib-0.compiler-libs.Inconstant_idents)

Module Inconstant_idents

type result
val inconstants_on_program : + compilation_unit:Compilation_unit.t -> + backend:(module Backend_intf.S) -> + Flambda.program -> + result

inconstants_on_program finds those variables and set-of-closures identifiers that cannot be compiled to constants by Flambda_to_clambda.

val variable : Variable.t -> result -> bool

variable var res returns true if var is marked as inconstant in res.

val closure : Set_of_closures_id.t -> result -> bool

closure cl res returns true if cl is marked as inconstant in res.

diff --git a/findlib-0/compiler-libs/Initialize_symbol_to_let_symbol/index.html b/findlib-0/compiler-libs/Initialize_symbol_to_let_symbol/index.html new file mode 100644 index 000000000..bd96fd9d8 --- /dev/null +++ b/findlib-0/compiler-libs/Initialize_symbol_to_let_symbol/index.html @@ -0,0 +1,4 @@ + +Initialize_symbol_to_let_symbol (docs.findlib-0.compiler-libs.Initialize_symbol_to_let_symbol)

Module Initialize_symbol_to_let_symbol

val constant_field : + Flambda.t -> + Flambda.constant_defining_value_block_field option

Transform Initialize_symbol with only constant fields to let_symbol construction.

diff --git a/findlib-0/compiler-libs/Inline_and_simplify/index.html b/findlib-0/compiler-libs/Inline_and_simplify/index.html new file mode 100644 index 000000000..12e1dd308 --- /dev/null +++ b/findlib-0/compiler-libs/Inline_and_simplify/index.html @@ -0,0 +1,14 @@ + +Inline_and_simplify (docs.findlib-0.compiler-libs.Inline_and_simplify)

Module Inline_and_simplify

val run : + never_inline:bool -> + backend:(module Backend_intf.S) -> + prefixname:string -> + round:int -> + ppf_dump:Format.formatter -> + Flambda.program -> + Flambda.program

Simplification of Flambda programs combined with function inlining: for the most part a beta-reduction pass.

Readers interested in the inlining strategy should read the Inlining_decision module first.

val duplicate_function : + env:Inline_and_simplify_aux.Env.t -> + set_of_closures:Flambda.set_of_closures -> + fun_var:Variable.t -> + new_fun_var:Variable.t -> + Flambda.function_declaration * Flambda.specialised_to Variable.Map.t
diff --git a/findlib-0/compiler-libs/Inline_and_simplify_aux/Env/index.html b/findlib-0/compiler-libs/Inline_and_simplify_aux/Env/index.html new file mode 100644 index 000000000..7bb0c250e --- /dev/null +++ b/findlib-0/compiler-libs/Inline_and_simplify_aux/Env/index.html @@ -0,0 +1,17 @@ + +Env (docs.findlib-0.compiler-libs.Inline_and_simplify_aux.Env)

Module Inline_and_simplify_aux.Env

type t

Environments follow the lexical scopes of the program.

val create : + never_inline:bool -> + backend:(module Backend_intf.S) -> + round:int -> + ppf_dump:Format.formatter -> + t

Create a new environment. If never_inline is true then the returned environment will prevent Inline_and_simplify from inlining. The backend parameter is used for passing information about the compiler backend being used. Newly-created environments have inactive Freshenings (see below) and do not initially hold any approximation information.

val backend : t -> (module Backend_intf.S)

Obtain the first-class module that gives information about the compiler backend being used for compilation.

val really_import_approx : t -> Simple_value_approx.t -> Simple_value_approx.t

Obtain the really_import_approx function from the backend module.

val round : t -> int

Which simplification round we are currently in.

val ppf_dump : t -> Format.formatter

Where to print intermediate asts and similar debug information

val add : t -> Variable.t -> Simple_value_approx.t -> t

Add the approximation of a variable---that is to say, some knowledge about the value(s) the variable may take on at runtime---to the environment.

val add_outer_scope : t -> Variable.t -> Simple_value_approx.t -> t
val add_mutable : t -> Mutable_variable.t -> Simple_value_approx.t -> t

Like add, but for mutable variables.

val find_exn : t -> Variable.t -> Simple_value_approx.t

Find the approximation of a given variable, raising a fatal error if the environment does not know about the variable. Use find_opt instead if you need to catch the failure case.

val find_mutable_exn : t -> Mutable_variable.t -> Simple_value_approx.t

Like find_exn, but for mutable variables.

type scope =
  1. | Current
  2. | Outer
val find_with_scope_exn : t -> Variable.t -> scope * Simple_value_approx.t
val find_opt : t -> Variable.t -> Simple_value_approx.t option

Like find_exn, but intended for use where the "not present in environment" case is to be handled by the caller.

val find_list_exn : t -> Variable.t list -> Simple_value_approx.t list

Like find_exn, but for a list of variables.

val does_not_bind : t -> Variable.t list -> bool
val does_not_freshen : t -> Variable.t list -> bool
val add_symbol : t -> Symbol.t -> Simple_value_approx.t -> t
val redefine_symbol : t -> Symbol.t -> Simple_value_approx.t -> t
val find_symbol_exn : t -> Symbol.t -> Simple_value_approx.t
val find_symbol_opt : t -> Symbol.t -> Simple_value_approx.t option
val find_symbol_fatal : t -> Symbol.t -> Simple_value_approx.t
val find_or_load_symbol : t -> Symbol.t -> Simple_value_approx.t
val add_projection : t -> projection:Projection.t -> bound_to:Variable.t -> t

Note that the given bound_to holds the given projection.

val find_projection : t -> projection:Projection.t -> Variable.t option

Determine if the environment knows about a variable that is bound to the given projection.

val mem : t -> Variable.t -> bool

Whether the environment has an approximation for the given variable.

val freshening : t -> Freshening.t

Return the freshening that should be applied to variables when rewriting code (in Inline_and_simplify, etc.) using the given environment.

val set_freshening : t -> Freshening.t -> t

Set the freshening that should be used as per freshening, above.

val activate_freshening : t -> t

Causes every bound variable in code rewritten during inlining and simplification, using the given environment, to be freshened. This is used when descending into subexpressions substituted into existing expressions.

val local : t -> t

Erase all variable approximation information and freshening information from the given environment. However, the freshening activation state is preserved. This function is used when rewriting inside a function declaration, to avoid (due to a compiler bug) accidental use of variables from outer scopes that are not accessible.

val inside_set_of_closures_declaration : Set_of_closures_origin.t -> t -> bool

Determine whether the inliner is currently inside a function body from the given set of closures. This is used to detect whether a given function call refers to a function which exists somewhere on the current inlining stack.

val at_toplevel : t -> bool

Not inside a closure declaration. Toplevel code is the one evaluated when the compilation unit is loaded

val is_inside_branch : t -> bool
val branch_depth : t -> int
val inside_branch : t -> t
val increase_closure_depth : t -> t
val set_never_inline : t -> t

Mark that call sites contained within code rewritten using the given environment should never be replaced by inlined (or unrolled) versions of the callee(s).

val set_never_inline_inside_closures : t -> t

Equivalent to set_never_inline but only applies to code inside a set of closures.

val unset_never_inline_inside_closures : t -> t

Unset the restriction from set_never_inline_inside_closures

val set_never_inline_outside_closures : t -> t

Equivalent to set_never_inline but does not apply to code inside a set of closures.

val unset_never_inline_outside_closures : t -> t

Unset the restriction from set_never_inline_outside_closures

val never_inline : t -> bool

Return whether set_never_inline is currently in effect on the given environment.

val inlining_level : t -> int
val inlining_level_up : t -> t

Mark that this environment is used to rewrite code for inlining. This is used by the inlining heuristics to decide whether to continue. Unconditionally inlined does not take this into account.

val actively_unrolling : t -> Set_of_closures_origin.t -> int option

Whether we are actively unrolling a given function.

val start_actively_unrolling : t -> Set_of_closures_origin.t -> int -> t

Start actively unrolling a given function n times.

val continue_actively_unrolling : t -> Set_of_closures_origin.t -> t

Unroll a function currently actively being unrolled.

val unrolling_allowed : t -> Set_of_closures_origin.t -> bool

Whether it is permissible to unroll a call to a recursive function in the given environment.

val inside_unrolled_function : t -> Set_of_closures_origin.t -> t

Whether the given environment is currently being used to rewrite the body of an unrolled recursive function.

val inlining_allowed : t -> Closure_origin.t -> bool

Whether it is permissible to inline a call to a function in the given environment.

val inside_inlined_function : t -> Closure_origin.t -> t

Whether the given environment is currently being used to rewrite the body of an inlined function.

val note_entering_closure : + t -> + closure_id:Closure_id.t -> + dbg:Debuginfo.t -> + t

If collecting inlining statistics, record that the inliner is about to descend into closure_id. This information enables us to produce a stack of closures that form a kind of context around an inlining decision point.

val note_entering_call : t -> closure_id:Closure_id.t -> dbg:Debuginfo.t -> t

If collecting inlining statistics, record that the inliner is about to descend into a call to closure_id. This information enables us to produce a stack of closures that form a kind of context around an inlining decision point.

val note_entering_inlined : t -> t

If collecting inlining statistics, record that the inliner is about to descend into an inlined function call. This requires that the inliner has already entered the call with note_entering_call.

val note_entering_specialised : t -> closure_ids:Closure_id.Set.t -> t

If collecting inlining statistics, record that the inliner is about to descend into a specialised function definition. This requires that the inliner has already entered the call with note_entering_call.

val enter_closure : + t -> + closure_id:Closure_id.t -> + inline_inside:bool -> + dbg:Debuginfo.t -> + f:(t -> 'a) -> + 'a

Update a given environment to record that the inliner is about to descend into closure_id and pass the resulting environment to f. If inline_inside is false then the environment passed to f will be marked as never_inline (see above).

val record_decision : t -> Inlining_stats_types.Decision.t -> unit

If collecting inlining statistics, record an inlining decision for the call at the top of the closure stack stored inside the given environment.

val print : Format.formatter -> t -> unit

Print a human-readable version of the given environment.

val set_inline_debuginfo : t -> dbg:Debuginfo.t -> t

The environment stores the call-site being inlined to produce precise location information. This function sets the current call-site being inlined.

val add_inlined_debuginfo : t -> dbg:Debuginfo.t -> Debuginfo.t

Appends the locations of inlined call-sites to the ~dbg argument

diff --git a/findlib-0/compiler-libs/Inline_and_simplify_aux/Result/index.html b/findlib-0/compiler-libs/Inline_and_simplify_aux/Result/index.html new file mode 100644 index 000000000..2e0045746 --- /dev/null +++ b/findlib-0/compiler-libs/Inline_and_simplify_aux/Result/index.html @@ -0,0 +1,5 @@ + +Result (docs.findlib-0.compiler-libs.Inline_and_simplify_aux.Result)

Module Inline_and_simplify_aux.Result

type t

Result structures approximately follow the evaluation order of the program. They are returned by the simplification algorithm acting on an Flambda subexpression.

val create : unit -> t
val approx : t -> Simple_value_approx.t

The approximation of the subexpression that has just been simplified.

val set_approx : t -> Simple_value_approx.t -> t

Set the approximation of the subexpression that has just been simplified. Typically used just before returning from a case of the simplification algorithm.

val meet_approx : t -> Env.t -> Simple_value_approx.t -> t

Set the approximation of the subexpression to the meet of the current return approximation and the provided one. Typically used just before returning from a branch case of the simplification algorithm.

val used_static_exceptions : t -> Static_exception.Set.t

All static exceptions for which use_staticfail has been called on the given result structure.

val use_static_exception : t -> Static_exception.t -> t

Mark that the given static exception has been used.

val exit_scope_catch : t -> Static_exception.t -> t

Mark that we are moving up out of the scope of a static-catch block that catches the given static exception identifier. This has the effect of removing the identifier from the used_staticfail set.

val benefit : t -> Inlining_cost.Benefit.t

The benefit to be gained by inlining the subexpression whose simplification yielded the given result structure.

val map_benefit : + t -> + (Inlining_cost.Benefit.t -> Inlining_cost.Benefit.t) -> + t

Apply a transformation to the inlining benefit stored within the given result structure.

val add_benefit : t -> Inlining_cost.Benefit.t -> t

Add some benefit to the inlining benefit stored within the given result structure.

val reset_benefit : t -> t

Set the benefit of inlining the subexpression corresponding to the given result structure to zero.

val set_inlining_threshold : t -> Inlining_cost.Threshold.t option -> t
val add_inlining_threshold : t -> Inlining_cost.Threshold.t -> t
val sub_inlining_threshold : t -> Inlining_cost.Threshold.t -> t
val inlining_threshold : t -> Inlining_cost.Threshold.t option
val seen_direct_application : t -> t
val num_direct_applications : t -> int
diff --git a/findlib-0/compiler-libs/Inline_and_simplify_aux/index.html b/findlib-0/compiler-libs/Inline_and_simplify_aux/index.html new file mode 100644 index 000000000..e18eb7b89 --- /dev/null +++ b/findlib-0/compiler-libs/Inline_and_simplify_aux/index.html @@ -0,0 +1,26 @@ + +Inline_and_simplify_aux (docs.findlib-0.compiler-libs.Inline_and_simplify_aux)

Module Inline_and_simplify_aux

Environments and result structures used during inlining and simplification. (See inline_and_simplify.ml.)

module Env : sig ... end
module Result : sig ... end
val initial_inlining_threshold : round:int -> Inlining_cost.Threshold.t

Command line argument -inline

val initial_inlining_toplevel_threshold : + round:int -> + Inlining_cost.Threshold.t

Command line argument -inline-toplevel

val prepare_to_simplify_closure : + function_decl:Flambda.function_declaration -> + free_vars:(Flambda.specialised_to * Simple_value_approx.t) Variable.Map.t -> + specialised_args:Flambda.specialised_to Variable.Map.t -> + parameter_approximations:Simple_value_approx.t Variable.Map.t -> + set_of_closures_env:Env.t -> + Env.t
val keep_body_check : + is_classic_mode:bool -> + recursive:Variable.Set.t Lazy.t -> + Variable.t -> + Flambda.function_declaration -> + bool
diff --git a/findlib-0/compiler-libs/Inlining_cost/Benefit/index.html b/findlib-0/compiler-libs/Inlining_cost/Benefit/index.html new file mode 100644 index 000000000..3d6ff1449 --- /dev/null +++ b/findlib-0/compiler-libs/Inlining_cost/Benefit/index.html @@ -0,0 +1,2 @@ + +Benefit (docs.findlib-0.compiler-libs.Inlining_cost.Benefit)

Module Inlining_cost.Benefit

type t
val zero : t
val (+) : t -> t -> t
val max : round:int -> t -> t -> t
val remove_call : t -> t
val remove_alloc : t -> t
val remove_prim : t -> t
val remove_prims : t -> int -> t
val remove_branch : t -> t
val direct_call_of_indirect : t -> t
val requested_inline : t -> size_of:Flambda.t -> t
val remove_code : Flambda.t -> t -> t
val remove_code_named : Flambda.named -> t -> t
val remove_projection : Projection.t -> t -> t
val add_code : Flambda.t -> t -> t
val add_code_named : Flambda.named -> t -> t
val add_projection : Projection.t -> t -> t
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Inlining_cost/Threshold/index.html b/findlib-0/compiler-libs/Inlining_cost/Threshold/index.html new file mode 100644 index 000000000..6cadcf630 --- /dev/null +++ b/findlib-0/compiler-libs/Inlining_cost/Threshold/index.html @@ -0,0 +1,2 @@ + +Threshold (docs.findlib-0.compiler-libs.Inlining_cost.Threshold)

Module Inlining_cost.Threshold

type t =
  1. | Never_inline
  2. | Can_inline_if_no_larger_than of int

The maximum size, in some abstract measure of space cost, that an Flambda expression may be in order to be inlined.

val add : t -> t -> t
val sub : t -> t -> t
val min : t -> t -> t
val equal : t -> t -> bool
diff --git a/findlib-0/compiler-libs/Inlining_cost/Whether_sufficient_benefit/index.html b/findlib-0/compiler-libs/Inlining_cost/Whether_sufficient_benefit/index.html new file mode 100644 index 000000000..e6eb5291f --- /dev/null +++ b/findlib-0/compiler-libs/Inlining_cost/Whether_sufficient_benefit/index.html @@ -0,0 +1,18 @@ + +Whether_sufficient_benefit (docs.findlib-0.compiler-libs.Inlining_cost.Whether_sufficient_benefit)

Module Inlining_cost.Whether_sufficient_benefit

type t
val create : + original:Flambda.t -> + toplevel:bool -> + branch_depth:int -> + Flambda.t -> + benefit:Benefit.t -> + lifting:bool -> + round:int -> + t
val create_estimate : + original_size:int -> + toplevel:bool -> + branch_depth:int -> + new_size:int -> + benefit:Benefit.t -> + lifting:bool -> + round:int -> + t
val evaluate : t -> bool
val to_string : t -> string
val print_description : subfunctions:bool -> Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Inlining_cost/index.html b/findlib-0/compiler-libs/Inlining_cost/index.html new file mode 100644 index 000000000..126954d9a --- /dev/null +++ b/findlib-0/compiler-libs/Inlining_cost/index.html @@ -0,0 +1,7 @@ + +Inlining_cost (docs.findlib-0.compiler-libs.Inlining_cost)

Module Inlining_cost

Measurement of the cost (including cost in space) of Flambda terms in the context of inlining.

module Threshold : sig ... end
val can_inline : Flambda.t -> Threshold.t -> bonus:int -> bool
val can_try_inlining : + Flambda.t -> + Threshold.t -> + number_of_arguments:int -> + size_from_approximation:int option -> + Threshold.t
module Benefit : sig ... end
module Whether_sufficient_benefit : sig ... end
val scale_inline_threshold_by : int
val default_toplevel_multiplier : int
val direct_call_size : int
val maximum_interesting_size_of_function_body : int -> int

If a function body exceeds this size, we can make a fast decision not to inline it (see Inlining_decision).

val lambda_smaller' : Flambda.expr -> than:int -> int option

Measure the given expression to determine whether its size is at or below the given threshold. None is returned if it is too big; otherwise Some is returned with the measured size.

val lambda_size : Flambda.expr -> int
diff --git a/findlib-0/compiler-libs/Inlining_decision/index.html b/findlib-0/compiler-libs/Inlining_decision/index.html new file mode 100644 index 000000000..e411cb448 --- /dev/null +++ b/findlib-0/compiler-libs/Inlining_decision/index.html @@ -0,0 +1,16 @@ + +Inlining_decision (docs.findlib-0.compiler-libs.Inlining_decision)

Module Inlining_decision

See the Flambda manual chapter for an explanation in prose of the inlining decision procedure.

val for_call_site : + env:Inline_and_simplify_aux.Env.t -> + r:Inline_and_simplify_aux.Result.t -> + function_decls:Simple_value_approx.function_declarations -> + lhs_of_application:Variable.t -> + closure_id_being_applied:Closure_id.t -> + function_decl:Simple_value_approx.function_declaration -> + value_set_of_closures:Simple_value_approx.value_set_of_closures -> + args:Variable.t list -> + args_approxs:Simple_value_approx.t list -> + dbg:Debuginfo.t -> + simplify:Inlining_decision_intf.simplify -> + inline_requested:Lambda.inline_attribute -> + specialise_requested:Lambda.specialise_attribute -> + Flambda.t * Inline_and_simplify_aux.Result.t

Try to inline a full application of a known function, guided by various heuristics.

val should_inline_inside_declaration : Flambda.function_declaration -> bool

When a function declaration is encountered by for_call_site, the body may be subject to inlining immediately, thus changing the declaration. This function must return true for that to be able to happen.

diff --git a/findlib-0/compiler-libs/Inlining_decision_intf/index.html b/findlib-0/compiler-libs/Inlining_decision_intf/index.html new file mode 100644 index 000000000..bc3009afa --- /dev/null +++ b/findlib-0/compiler-libs/Inlining_decision_intf/index.html @@ -0,0 +1,25 @@ + +Inlining_decision_intf (docs.findlib-0.compiler-libs.Inlining_decision_intf)

Module Inlining_decision_intf

type 'a by_copying_function_declaration = + env:Inline_and_simplify_aux.Env.t -> + r:Inline_and_simplify_aux.Result.t -> + funct:Flambda.t -> + clos:Flambda.function_declarations -> + fun_id:Closure_id.t -> + func:Flambda.function_declaration -> + args_with_approxs:(Flambda.t list * Simple_value_approx.t list) -> + invariant_params:Variable.Set.t -> + specialised_args:Variable.Set.t -> + dbg:Debuginfo.t -> + (Flambda.t * Inline_and_simplify_aux.Result.t) option
diff --git a/findlib-0/compiler-libs/Inlining_stats/Closure_stack/index.html b/findlib-0/compiler-libs/Inlining_stats/Closure_stack/index.html new file mode 100644 index 000000000..0a9930ed4 --- /dev/null +++ b/findlib-0/compiler-libs/Inlining_stats/Closure_stack/index.html @@ -0,0 +1,6 @@ + +Closure_stack (docs.findlib-0.compiler-libs.Inlining_stats.Closure_stack)

Module Inlining_stats.Closure_stack

type t
val create : unit -> t
val note_entering_closure : + t -> + closure_id:Closure_id.t -> + dbg:Debuginfo.t -> + t
val note_entering_call : t -> closure_id:Closure_id.t -> dbg:Debuginfo.t -> t
val note_entering_inlined : t -> t
val note_entering_specialised : t -> closure_ids:Closure_id.Set.t -> t
diff --git a/findlib-0/compiler-libs/Inlining_stats/index.html b/findlib-0/compiler-libs/Inlining_stats/index.html new file mode 100644 index 000000000..ef60f9260 --- /dev/null +++ b/findlib-0/compiler-libs/Inlining_stats/index.html @@ -0,0 +1,5 @@ + +Inlining_stats (docs.findlib-0.compiler-libs.Inlining_stats)

Module Inlining_stats

module Closure_stack : sig ... end
val record_decision : + Inlining_stats_types.Decision.t -> + closure_stack:Closure_stack.t -> + unit
val save_then_forget_decisions : output_prefix:string -> unit
diff --git a/findlib-0/compiler-libs/Inlining_stats_types/Decision/index.html b/findlib-0/compiler-libs/Inlining_stats_types/Decision/index.html new file mode 100644 index 000000000..e178702a3 --- /dev/null +++ b/findlib-0/compiler-libs/Inlining_stats_types/Decision/index.html @@ -0,0 +1,2 @@ + +Decision (docs.findlib-0.compiler-libs.Inlining_stats_types.Decision)

Module Inlining_stats_types.Decision

type t =
  1. | Prevented of Prevented.t
  2. | Specialised of Specialised.t
  3. | Inlined of Not_specialised.t * Inlined.t
  4. | Unchanged of Not_specialised.t * Not_inlined.t
val summary : Format.formatter -> t -> unit
val calculation : depth:int -> Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Inlining_stats_types/Inlined/index.html b/findlib-0/compiler-libs/Inlining_stats_types/Inlined/index.html new file mode 100644 index 000000000..6aae5c5a2 --- /dev/null +++ b/findlib-0/compiler-libs/Inlining_stats_types/Inlined/index.html @@ -0,0 +1,3 @@ + +Inlined (docs.findlib-0.compiler-libs.Inlining_stats_types.Inlined)

Module Inlining_stats_types.Inlined

type t =
  1. | Classic_mode
  2. | Annotation
  3. | Decl_local_to_application
  4. | Without_subfunctions of Inlining_cost.Whether_sufficient_benefit.t
  5. | With_subfunctions of Inlining_cost.Whether_sufficient_benefit.t + * Inlining_cost.Whether_sufficient_benefit.t
diff --git a/findlib-0/compiler-libs/Inlining_stats_types/Not_inlined/index.html b/findlib-0/compiler-libs/Inlining_stats_types/Not_inlined/index.html new file mode 100644 index 000000000..2efca5d0b --- /dev/null +++ b/findlib-0/compiler-libs/Inlining_stats_types/Not_inlined/index.html @@ -0,0 +1,3 @@ + +Not_inlined (docs.findlib-0.compiler-libs.Inlining_stats_types.Not_inlined)

Module Inlining_stats_types.Not_inlined

type t =
  1. | Classic_mode
  2. | Above_threshold of int
  3. | Annotation
  4. | No_useful_approximations
  5. | Unrolling_depth_exceeded
  6. | Self_call
  7. | Without_subfunctions of Inlining_cost.Whether_sufficient_benefit.t
  8. | With_subfunctions of Inlining_cost.Whether_sufficient_benefit.t + * Inlining_cost.Whether_sufficient_benefit.t
diff --git a/findlib-0/compiler-libs/Inlining_stats_types/Not_specialised/index.html b/findlib-0/compiler-libs/Inlining_stats_types/Not_specialised/index.html new file mode 100644 index 000000000..5fc7d243e --- /dev/null +++ b/findlib-0/compiler-libs/Inlining_stats_types/Not_specialised/index.html @@ -0,0 +1,3 @@ + +Not_specialised (docs.findlib-0.compiler-libs.Inlining_stats_types.Not_specialised)

Module Inlining_stats_types.Not_specialised

type t =
  1. | Classic_mode
  2. | Above_threshold of int
  3. | Annotation
  4. | Not_recursive
  5. | Not_closed
  6. | No_invariant_parameters
  7. | No_useful_approximations
  8. | Self_call
  9. | Not_beneficial of Inlining_cost.Whether_sufficient_benefit.t + * Inlining_cost.Whether_sufficient_benefit.t
diff --git a/findlib-0/compiler-libs/Inlining_stats_types/Prevented/index.html b/findlib-0/compiler-libs/Inlining_stats_types/Prevented/index.html new file mode 100644 index 000000000..13ec6d7d7 --- /dev/null +++ b/findlib-0/compiler-libs/Inlining_stats_types/Prevented/index.html @@ -0,0 +1,2 @@ + +Prevented (docs.findlib-0.compiler-libs.Inlining_stats_types.Prevented)

Module Inlining_stats_types.Prevented

type t =
  1. | Function_prevented_from_inlining
  2. | Level_exceeded
diff --git a/findlib-0/compiler-libs/Inlining_stats_types/Specialised/index.html b/findlib-0/compiler-libs/Inlining_stats_types/Specialised/index.html new file mode 100644 index 000000000..ff0af9237 --- /dev/null +++ b/findlib-0/compiler-libs/Inlining_stats_types/Specialised/index.html @@ -0,0 +1,3 @@ + +Specialised (docs.findlib-0.compiler-libs.Inlining_stats_types.Specialised)

Module Inlining_stats_types.Specialised

diff --git a/findlib-0/compiler-libs/Inlining_stats_types/index.html b/findlib-0/compiler-libs/Inlining_stats_types/index.html new file mode 100644 index 000000000..602b7d5ec --- /dev/null +++ b/findlib-0/compiler-libs/Inlining_stats_types/index.html @@ -0,0 +1,2 @@ + +Inlining_stats_types (docs.findlib-0.compiler-libs.Inlining_stats_types)

Module Inlining_stats_types

module Inlined : sig ... end
module Not_inlined : sig ... end
module Specialised : sig ... end
module Not_specialised : sig ... end
module Prevented : sig ... end
module Decision : sig ... end
diff --git a/findlib-0/compiler-libs/Inlining_transforms/index.html b/findlib-0/compiler-libs/Inlining_transforms/index.html new file mode 100644 index 000000000..4e024fb3c --- /dev/null +++ b/findlib-0/compiler-libs/Inlining_transforms/index.html @@ -0,0 +1,32 @@ + +Inlining_transforms (docs.findlib-0.compiler-libs.Inlining_transforms)

Module Inlining_transforms

Source code transformations used during inlining.

val inline_by_copying_function_body : + env:Inline_and_simplify_aux.Env.t -> + r:Inline_and_simplify_aux.Result.t -> + lhs_of_application:Variable.t -> + inline_requested:Lambda.inline_attribute -> + specialise_requested:Lambda.specialise_attribute -> + closure_id_being_applied:Closure_id.t -> + function_decl:Simple_value_approx.function_declaration -> + function_body:Simple_value_approx.function_body -> + fun_vars:Variable.Set.t -> + args:Variable.t list -> + dbg:Debuginfo.t -> + simplify:Inlining_decision_intf.simplify -> + Flambda.t * Inline_and_simplify_aux.Result.t

Inline a function by substituting its body (which may be subject to further transformation) at a call site. The function's declaration is not copied.

This transformation is used when:

  • inlining a call to a non-recursive function;
  • inlining a call, within a recursive or mutually-recursive function, to the same or another function being defined simultaneously ("unrolling"). The maximum depth of unrolling is bounded (see E.unrolling_allowed).

In both cases, the body of the function is copied, within a sequence of lets that bind the function parameters, the variables "bound by the closure" (see flambda.mli), and any function identifiers introduced by the set of closures. These stages are delimited below by comments.

As an example, suppose we are inlining the following function:

let f x = x + y ... let p = f, f in (fst p) 42

The call site (fst p) 42 will be transformed to:

let clos_id = fst p in (* must eventually yield a closure *) let y = <access to y in clos_id> in let x' = 42 in let x = x' in x + y

When unrolling a recursive function we rename the arguments to the recursive call in order to avoid clashes with existing bindings. For example, suppose we are inlining the following call to f, which lies within its own declaration:

let rec f x y = f (fst x) (y + snd x)

This will be transformed to:

let rec f x y = let clos_id = f in (* not used this time, since f has no free vars *) let x' = fst x in let y' = y + snd x in f (fst x') (y' + snd x') (* body of f with parameters freshened *)

val inline_by_copying_function_declaration : + env:Inline_and_simplify_aux.Env.t -> + r:Inline_and_simplify_aux.Result.t -> + function_decls:Simple_value_approx.function_declarations -> + lhs_of_application:Variable.t -> + inline_requested:Lambda.inline_attribute -> + closure_id_being_applied:Closure_id.t -> + function_decl:Simple_value_approx.function_declaration -> + args:Variable.t list -> + args_approxs:Simple_value_approx.t list -> + invariant_params:Variable.Set.t Variable.Map.t lazy_t -> + specialised_args:Flambda.specialised_to Variable.Map.t -> + free_vars:Flambda.specialised_to Variable.Map.t -> + direct_call_surrogates:Closure_id.t Closure_id.Map.t -> + dbg:Debuginfo.t -> + simplify:Inlining_decision_intf.simplify -> + (Flambda.t * Inline_and_simplify_aux.Result.t) option

Inlining of recursive function(s) yields a copy of the functions' definitions (not just their bodies, unlike the non-recursive case) and a direct application of the new body. Note: the function really does need to be recursive (but possibly only via some mutual recursion) to end up in here; a simultaneous binding that is + non-recursive is not sufficient.

diff --git a/findlib-0/compiler-libs/Instruct/index.html b/findlib-0/compiler-libs/Instruct/index.html new file mode 100644 index 000000000..96930e2e8 --- /dev/null +++ b/findlib-0/compiler-libs/Instruct/index.html @@ -0,0 +1,2 @@ + +Instruct (docs.findlib-0.compiler-libs.Instruct)

Module Instruct

type compilation_env = {
  1. ce_stack : int Ident.tbl;
  2. ce_heap : int Ident.tbl;
  3. ce_rec : int Ident.tbl;
}
type debug_event = {
  1. mutable ev_pos : int;
  2. ev_module : string;
  3. ev_loc : Location.t;
  4. ev_kind : debug_event_kind;
  5. ev_defname : string;
  6. ev_info : debug_event_info;
  7. ev_typenv : Env.summary;
  8. ev_typsubst : Subst.t;
  9. ev_compenv : compilation_env;
  10. ev_stacksize : int;
  11. ev_repr : debug_event_repr;
}
and debug_event_kind =
  1. | Event_before
  2. | Event_after of Types.type_expr
  3. | Event_pseudo
and debug_event_info =
  1. | Event_function
  2. | Event_return of int
  3. | Event_other
and debug_event_repr =
  1. | Event_none
  2. | Event_parent of int ref
  3. | Event_child of int ref
type label = int
type instruction =
  1. | Klabel of label
  2. | Kacc of int
  3. | Kenvacc of int
  4. | Kpush
  5. | Kpop of int
  6. | Kassign of int
  7. | Kpush_retaddr of label
  8. | Kapply of int
  9. | Kappterm of int * int
  10. | Kreturn of int
  11. | Krestart
  12. | Kgrab of int
  13. | Kclosure of label * int
  14. | Kclosurerec of label list * int
  15. | Koffsetclosure of int
  16. | Kgetglobal of Ident.t
  17. | Ksetglobal of Ident.t
  18. | Kconst of Lambda.structured_constant
  19. | Kmakeblock of int * int
  20. | Kmakefloatblock of int
  21. | Kgetfield of int
  22. | Ksetfield of int
  23. | Kgetfloatfield of int
  24. | Ksetfloatfield of int
  25. | Kvectlength
  26. | Kgetvectitem
  27. | Ksetvectitem
  28. | Kgetstringchar
  29. | Kgetbyteschar
  30. | Ksetbyteschar
  31. | Kbranch of label
  32. | Kbranchif of label
  33. | Kbranchifnot of label
  34. | Kstrictbranchif of label
  35. | Kstrictbranchifnot of label
  36. | Kswitch of label array * label array
  37. | Kboolnot
  38. | Kpushtrap of label
  39. | Kpoptrap
  40. | Kraise of Lambda.raise_kind
  41. | Kcheck_signals
  42. | Kccall of string * int
  43. | Knegint
  44. | Kaddint
  45. | Ksubint
  46. | Kmulint
  47. | Kdivint
  48. | Kmodint
  49. | Kandint
  50. | Korint
  51. | Kxorint
  52. | Klslint
  53. | Klsrint
  54. | Kasrint
  55. | Kintcomp of Lambda.integer_comparison
  56. | Koffsetint of int
  57. | Koffsetref of int
  58. | Kisint
  59. | Kisout
  60. | Kgetmethod
  61. | Kgetpubmet of int
  62. | Kgetdynmet
  63. | Kevent of debug_event
  64. | Kperform
  65. | Kresume
  66. | Kresumeterm of int
  67. | Kreperformterm of int
  68. | Kstop
val immed_min : int
val immed_max : int
diff --git a/findlib-0/compiler-libs/Int_replace_polymorphic_compare/index.html b/findlib-0/compiler-libs/Int_replace_polymorphic_compare/index.html new file mode 100644 index 000000000..fbe578337 --- /dev/null +++ b/findlib-0/compiler-libs/Int_replace_polymorphic_compare/index.html @@ -0,0 +1,2 @@ + +Int_replace_polymorphic_compare (docs.findlib-0.compiler-libs.Int_replace_polymorphic_compare)

Module Int_replace_polymorphic_compare

val (=) : int -> int -> bool
val (<>) : int -> int -> bool
val (<) : int -> int -> bool
val (>) : int -> int -> bool
val (<=) : int -> int -> bool
val (>=) : int -> int -> bool
val compare : int -> int -> int
diff --git a/findlib-0/compiler-libs/Interf/index.html b/findlib-0/compiler-libs/Interf/index.html new file mode 100644 index 000000000..76fe68ff7 --- /dev/null +++ b/findlib-0/compiler-libs/Interf/index.html @@ -0,0 +1,2 @@ + +Interf (docs.findlib-0.compiler-libs.Interf)

Module Interf

val build_graph : Mach.fundecl -> unit
diff --git a/findlib-0/compiler-libs/Internal_variable_names/index.html b/findlib-0/compiler-libs/Internal_variable_names/index.html new file mode 100644 index 000000000..6ea006eed --- /dev/null +++ b/findlib-0/compiler-libs/Internal_variable_names/index.html @@ -0,0 +1,2 @@ + +Internal_variable_names (docs.findlib-0.compiler-libs.Internal_variable_names)

Module Internal_variable_names

type t = private string
val apply_arg : t
val apply_funct : t
val block_symbol : t
val block_symbol_get : t
val block_symbol_get_field : t
val closure : t
val cond : t
val cond_sequor : t
val const_block : t
val const_bool : t
val const_boxed_int : t
val const_char : t
val const_false : t
val const_float : t
val const_int : t
val const_one : t
val const_ptr : t
val const_ptr_one : t
val const_ptr_zero : t
val const_sequand : t
val const_string : t
val const_true : t
val const_zero : t
val denominator : t
val division_by_zero : t
val dummy : t
val dup_func : t
val dup_set_of_closures : t
val const_float_array : t
val fake_effect_symbol : t
val for_from : t
val for_to : t
val from_closure : t
val full_apply : t
val get_symbol_field : t
val const_immstring : t
val const_int32 : t
val const_int64 : t
val ignore : t
val is_zero : t
val lifted_let_rec_block : t
val meth : t
val module_as_block : t
val const_nativeint : t
val new_value : t
val numerator : t
val obj : t
val offsetted : t
val partial_fun : t
val pgetglobal : t
val pointer : t
val predef_exn : t
val project_closure : t
val raise : t
val raise_arg : t
val read_mutable : t
val remove_unused_arguments : t
val result : t
val send_arg : t
val sequence : t
val set_of_closures : t
val staticraise_arg : t
val simplify_fv : t
val string_switch : t
val switch : t
val symbol : t
val symbol_field : t
val symbol_field_block : t
val the_dead_constant : t
val toplevel_substitution_named : t
val unbox_free_vars_of_closures : t
val unit : t
val zero : t
val of_primitive : Lambda.primitive -> t
val of_primitive_arg : Lambda.primitive -> t
val anon_fn_with_loc : Lambda.scoped_location -> t
diff --git a/findlib-0/compiler-libs/Interval/index.html b/findlib-0/compiler-libs/Interval/index.html new file mode 100644 index 000000000..bfe3e6fda --- /dev/null +++ b/findlib-0/compiler-libs/Interval/index.html @@ -0,0 +1,2 @@ + +Interval (docs.findlib-0.compiler-libs.Interval)

Module Interval

type range = {
  1. mutable rbegin : int;
  2. mutable rend : int;
}
type t = {
  1. mutable reg : Reg.t;
  2. mutable ibegin : int;
  3. mutable iend : int;
  4. mutable ranges : range list;
}
type result = {
  1. intervals : t list;
  2. fixed_intervals : t list;
}
val overlap : t -> t -> bool
val is_live : t -> int -> bool
val remove_expired_ranges : t -> int -> unit
val build_intervals : Mach.fundecl -> result
diff --git a/findlib-0/compiler-libs/Invariant_params/index.html b/findlib-0/compiler-libs/Invariant_params/index.html new file mode 100644 index 000000000..e360ac2a4 --- /dev/null +++ b/findlib-0/compiler-libs/Invariant_params/index.html @@ -0,0 +1,11 @@ + +Invariant_params (docs.findlib-0.compiler-libs.Invariant_params)

Module Invariant_params

val invariant_params_in_recursion : + Flambda.function_declarations -> + backend:(module Backend_intf.S) -> + Variable.Set.t Variable.Map.t
val invariant_param_sources : + Flambda.function_declarations -> + backend:(module Backend_intf.S) -> + Variable.Pair.Set.t Variable.Map.t
val unused_arguments : + Flambda.function_declarations -> + backend:(module Backend_intf.S) -> + Variable.Set.t
diff --git a/findlib-0/compiler-libs/Lambda/index.html b/findlib-0/compiler-libs/Lambda/index.html new file mode 100644 index 000000000..00f533668 --- /dev/null +++ b/findlib-0/compiler-libs/Lambda/index.html @@ -0,0 +1,36 @@ + +Lambda (docs.findlib-0.compiler-libs.Lambda)

Module Lambda

type compile_time_constant =
  1. | Big_endian
  2. | Word_size
  3. | Int_size
  4. | Max_wosize
  5. | Ostype_unix
  6. | Ostype_win32
  7. | Ostype_cygwin
  8. | Backend_type
type immediate_or_pointer =
  1. | Immediate
  2. | Pointer
type initialization_or_assignment =
  1. | Assignment
  2. | Heap_initialization
  3. | Root_initialization
type is_safe =
  1. | Safe
  2. | Unsafe
type primitive =
  1. | Pbytes_to_string
  2. | Pbytes_of_string
  3. | Pignore
  4. | Pgetglobal of Ident.t
  5. | Psetglobal of Ident.t
  6. | Pmakeblock of int * Asttypes.mutable_flag * block_shape
  7. | Pfield of int * immediate_or_pointer * Asttypes.mutable_flag
  8. | Pfield_computed
  9. | Psetfield of int * immediate_or_pointer * initialization_or_assignment
  10. | Psetfield_computed of immediate_or_pointer * initialization_or_assignment
  11. | Pfloatfield of int
  12. | Psetfloatfield of int * initialization_or_assignment
  13. | Pduprecord of Types.record_representation * int
  14. | Prunstack
  15. | Pperform
  16. | Presume
  17. | Preperform
  18. | Pccall of Primitive.description
  19. | Praise of raise_kind
  20. | Psequand
  21. | Psequor
  22. | Pnot
  23. | Pnegint
  24. | Paddint
  25. | Psubint
  26. | Pmulint
  27. | Pdivint of is_safe
  28. | Pmodint of is_safe
  29. | Pandint
  30. | Porint
  31. | Pxorint
  32. | Plslint
  33. | Plsrint
  34. | Pasrint
  35. | Pintcomp of integer_comparison
  36. | Pcompare_ints
  37. | Pcompare_floats
  38. | Pcompare_bints of boxed_integer
  39. | Poffsetint of int
  40. | Poffsetref of int
  41. | Pintoffloat
  42. | Pfloatofint
  43. | Pnegfloat
  44. | Pabsfloat
  45. | Paddfloat
  46. | Psubfloat
  47. | Pmulfloat
  48. | Pdivfloat
  49. | Pfloatcomp of float_comparison
  50. | Pstringlength
  51. | Pstringrefu
  52. | Pstringrefs
  53. | Pbyteslength
  54. | Pbytesrefu
  55. | Pbytessetu
  56. | Pbytesrefs
  57. | Pbytessets
  58. | Pmakearray of array_kind * Asttypes.mutable_flag
  59. | Pduparray of array_kind * Asttypes.mutable_flag
    (*

    For Pduparray, the argument must be an immutable array. The arguments of Pduparray give the kind and mutability of the array being *produced* by the duplication.

    *)
  60. | Parraylength of array_kind
  61. | Parrayrefu of array_kind
  62. | Parraysetu of array_kind
  63. | Parrayrefs of array_kind
  64. | Parraysets of array_kind
  65. | Pisint
  66. | Pisout
  67. | Pbintofint of boxed_integer
  68. | Pintofbint of boxed_integer
  69. | Pcvtbint of boxed_integer * boxed_integer
  70. | Pnegbint of boxed_integer
  71. | Paddbint of boxed_integer
  72. | Psubbint of boxed_integer
  73. | Pmulbint of boxed_integer
  74. | Pdivbint of {
    1. size : boxed_integer;
    2. is_safe : is_safe;
    }
  75. | Pmodbint of {
    1. size : boxed_integer;
    2. is_safe : is_safe;
    }
  76. | Pandbint of boxed_integer
  77. | Porbint of boxed_integer
  78. | Pxorbint of boxed_integer
  79. | Plslbint of boxed_integer
  80. | Plsrbint of boxed_integer
  81. | Pasrbint of boxed_integer
  82. | Pbintcomp of boxed_integer * integer_comparison
  83. | Pbigarrayref of bool * int * bigarray_kind * bigarray_layout
  84. | Pbigarrayset of bool * int * bigarray_kind * bigarray_layout
  85. | Pbigarraydim of int
  86. | Pstring_load_16 of bool
  87. | Pstring_load_32 of bool
  88. | Pstring_load_64 of bool
  89. | Pbytes_load_16 of bool
  90. | Pbytes_load_32 of bool
  91. | Pbytes_load_64 of bool
  92. | Pbytes_set_16 of bool
  93. | Pbytes_set_32 of bool
  94. | Pbytes_set_64 of bool
  95. | Pbigstring_load_16 of bool
  96. | Pbigstring_load_32 of bool
  97. | Pbigstring_load_64 of bool
  98. | Pbigstring_set_16 of bool
  99. | Pbigstring_set_32 of bool
  100. | Pbigstring_set_64 of bool
  101. | Pctconst of compile_time_constant
  102. | Pbswap16
  103. | Pbbswap of boxed_integer
  104. | Pint_as_pointer
  105. | Patomic_load of {
    1. immediate_or_pointer : immediate_or_pointer;
    }
  106. | Patomic_exchange
  107. | Patomic_cas
  108. | Patomic_fetch_add
  109. | Popaque
  110. | Pdls_get
and integer_comparison =
  1. | Ceq
  2. | Cne
  3. | Clt
  4. | Cgt
  5. | Cle
  6. | Cge
and float_comparison =
  1. | CFeq
  2. | CFneq
  3. | CFlt
  4. | CFnlt
  5. | CFgt
  6. | CFngt
  7. | CFle
  8. | CFnle
  9. | CFge
  10. | CFnge
and array_kind =
  1. | Pgenarray
  2. | Paddrarray
  3. | Pintarray
  4. | Pfloatarray
and value_kind =
  1. | Pgenval
  2. | Pfloatval
  3. | Pboxedintval of boxed_integer
  4. | Pintval
and block_shape = value_kind list option
and boxed_integer = Primitive.boxed_integer =
  1. | Pnativeint
  2. | Pint32
  3. | Pint64
and bigarray_kind =
  1. | Pbigarray_unknown
  2. | Pbigarray_float32
  3. | Pbigarray_float64
  4. | Pbigarray_sint8
  5. | Pbigarray_uint8
  6. | Pbigarray_sint16
  7. | Pbigarray_uint16
  8. | Pbigarray_int32
  9. | Pbigarray_int64
  10. | Pbigarray_caml_int
  11. | Pbigarray_native_int
  12. | Pbigarray_complex32
  13. | Pbigarray_complex64
and bigarray_layout =
  1. | Pbigarray_unknown_layout
  2. | Pbigarray_c_layout
  3. | Pbigarray_fortran_layout
and raise_kind =
  1. | Raise_regular
  2. | Raise_reraise
  3. | Raise_notrace
val equal_primitive : primitive -> primitive -> bool
val equal_value_kind : value_kind -> value_kind -> bool
val equal_boxed_integer : boxed_integer -> boxed_integer -> bool
type structured_constant =
  1. | Const_base of Asttypes.constant
  2. | Const_block of int * structured_constant list
  3. | Const_float_array of string list
  4. | Const_immstring of string
type tailcall_attribute =
  1. | Tailcall_expectation of bool
  2. | Default_tailcall
type inline_attribute =
  1. | Always_inline
  2. | Never_inline
  3. | Hint_inline
  4. | Unroll of int
  5. | Default_inline
val equal_inline_attribute : inline_attribute -> inline_attribute -> bool
type specialise_attribute =
  1. | Always_specialise
  2. | Never_specialise
  3. | Default_specialise
val equal_specialise_attribute : + specialise_attribute -> + specialise_attribute -> + bool
type local_attribute =
  1. | Always_local
  2. | Never_local
  3. | Default_local
type poll_attribute =
  1. | Error_poll
  2. | Default_poll
type function_kind =
  1. | Curried
  2. | Tupled
type let_kind =
  1. | Strict
  2. | Alias
  3. | StrictOpt
type meth_kind =
  1. | Self
  2. | Public
  3. | Cached
val equal_meth_kind : meth_kind -> meth_kind -> bool
type shared_code = (int * int) list
type function_attribute = {
  1. inline : inline_attribute;
  2. specialise : specialise_attribute;
  3. local : local_attribute;
  4. poll : poll_attribute;
  5. is_a_functor : bool;
  6. stub : bool;
  7. tmc_candidate : bool;
}
type scoped_location = Debuginfo.Scoped_location.t
type lambda =
  1. | Lvar of Ident.t
  2. | Lmutvar of Ident.t
  3. | Lconst of structured_constant
  4. | Lapply of lambda_apply
  5. | Lfunction of lfunction
  6. | Llet of let_kind * value_kind * Ident.t * lambda * lambda
  7. | Lmutlet of value_kind * Ident.t * lambda * lambda
  8. | Lletrec of (Ident.t * lambda) list * lambda
  9. | Lprim of primitive * lambda list * scoped_location
  10. | Lswitch of lambda * lambda_switch * scoped_location
  11. | Lstringswitch of lambda + * (string * lambda) list + * lambda option + * scoped_location
  12. | Lstaticraise of int * lambda list
  13. | Lstaticcatch of lambda * int * (Ident.t * value_kind) list * lambda
  14. | Ltrywith of lambda * Ident.t * lambda
  15. | Lifthenelse of lambda * lambda * lambda
  16. | Lsequence of lambda * lambda
  17. | Lwhile of lambda * lambda
  18. | Lfor of Ident.t * lambda * lambda * Asttypes.direction_flag * lambda
  19. | Lassign of Ident.t * lambda
  20. | Lsend of meth_kind * lambda * lambda * lambda list * scoped_location
  21. | Levent of lambda * lambda_event
  22. | Lifused of Ident.t * lambda
and lfunction = private {
  1. kind : function_kind;
  2. params : (Ident.t * value_kind) list;
  3. return : value_kind;
  4. body : lambda;
  5. attr : function_attribute;
  6. loc : scoped_location;
}
and lambda_apply = {
  1. ap_func : lambda;
  2. ap_args : lambda list;
  3. ap_loc : scoped_location;
  4. ap_tailcall : tailcall_attribute;
  5. ap_inlined : inline_attribute;
  6. ap_specialised : specialise_attribute;
}
and lambda_switch = {
  1. sw_numconsts : int;
  2. sw_consts : (int * lambda) list;
  3. sw_numblocks : int;
  4. sw_blocks : (int * lambda) list;
  5. sw_failaction : lambda option;
}
and lambda_event = {
  1. lev_loc : scoped_location;
  2. lev_kind : lambda_event_kind;
  3. lev_repr : int ref option;
  4. lev_env : Env.t;
}
and lambda_event_kind =
  1. | Lev_before
  2. | Lev_after of Types.type_expr
  3. | Lev_function
  4. | Lev_pseudo
type program = {
  1. module_ident : Ident.t;
  2. main_module_block_size : int;
  3. required_globals : Ident.Set.t;
  4. code : lambda;
}
val make_key : lambda -> lambda option
val const_unit : structured_constant
val const_int : int -> structured_constant
val lambda_unit : lambda
val name_lambda : let_kind -> lambda -> (Ident.t -> lambda) -> lambda
val name_lambda_list : lambda list -> (lambda list -> lambda) -> lambda
val lfunction : + kind:function_kind -> + params:(Ident.t * value_kind) list -> + return:value_kind -> + body:lambda -> + attr:function_attribute -> + loc:scoped_location -> + lambda
val iter_head_constructor : (lambda -> unit) -> lambda -> unit

iter_head_constructor f lam apply f to only the first level of sub expressions of lam. It does not recursively traverse the expression.

val shallow_iter : + tail:(lambda -> unit) -> + non_tail:(lambda -> unit) -> + lambda -> + unit

Same as iter_head_constructor, but use a different callback for sub-terms which are in tail position or not.

val transl_prim : string -> string -> lambda

Translate a value from a persistent module. For instance:

transl_internal_value "CamlinternalLazy" "force"
val free_variables : lambda -> Ident.Set.t
val transl_module_path : scoped_location -> Env.t -> Path.t -> lambda
val transl_value_path : scoped_location -> Env.t -> Path.t -> lambda
val transl_extension_path : scoped_location -> Env.t -> Path.t -> lambda
val transl_class_path : scoped_location -> Env.t -> Path.t -> lambda
val make_sequence : ('a -> lambda) -> 'a list -> lambda
val subst : + (Ident.t -> Types.value_description -> Env.t -> Env.t) -> + ?freshen_bound_variables:bool -> + lambda Ident.Map.t -> + lambda -> + lambda

subst update_env ?freshen_bound_variables s lt applies a substitution s to the lambda-term lt.

Assumes that the image of the substitution is out of reach of the bound variables of the lambda-term (no capture).

update_env is used to refresh the environment contained in debug events.

freshen_bound_variables, which defaults to false, freshens the bound variables within lt.

val rename : Ident.t Ident.Map.t -> lambda -> lambda

A version of subst specialized for the case where we're just renaming idents.

val duplicate : lambda -> lambda

Duplicate a term, freshening all locally-bound identifiers.

val map : (lambda -> lambda) -> lambda -> lambda

Bottom-up rewriting, applying the function on each node from the leaves to the root.

val shallow_map : (lambda -> lambda) -> lambda -> lambda

Rewrite each immediate sub-term with the function.

val bind : let_kind -> Ident.t -> lambda -> lambda -> lambda
val bind_with_value_kind : + let_kind -> + (Ident.t * value_kind) -> + lambda -> + lambda -> + lambda
val negate_integer_comparison : integer_comparison -> integer_comparison
val swap_integer_comparison : integer_comparison -> integer_comparison
val negate_float_comparison : float_comparison -> float_comparison
val swap_float_comparison : float_comparison -> float_comparison
val default_function_attribute : function_attribute
val default_stub_attribute : function_attribute
val function_is_curried : lfunction -> bool
val find_exact_application : + function_kind -> + arity:int -> + lambda list -> + lambda list option
val max_arity : unit -> int

Maximal number of parameters for a function, or in other words, maximal length of the params list of a lfunction record. This is unlimited (max_int) for bytecode, but limited (currently to 126) for native code.

val next_raise_count : unit -> int
val staticfail : lambda
val is_guarded : lambda -> bool
val patch_guarded : lambda -> lambda -> lambda
val raise_kind : raise_kind -> string
val merge_inline_attributes : + inline_attribute -> + inline_attribute -> + inline_attribute option
val reset : unit -> unit
diff --git a/findlib-0/compiler-libs/Lazy_backtrack/index.html b/findlib-0/compiler-libs/Lazy_backtrack/index.html new file mode 100644 index 000000000..d80a4fc25 --- /dev/null +++ b/findlib-0/compiler-libs/Lazy_backtrack/index.html @@ -0,0 +1,6 @@ + +Lazy_backtrack (docs.findlib-0.compiler-libs.Lazy_backtrack)

Module Lazy_backtrack

type ('a, 'b) t
type log
val force : ('a -> 'b) -> ('a, 'b) t -> 'b
val create : 'a -> ('a, 'b) t
val get_arg : ('a, 'b) t -> 'a option
val get_contents : ('a, 'b) t -> ('a, 'b) Either.t
val create_forced : 'b -> ('a, 'b) t
val create_failed : exn -> ('a, 'b) t
val log : unit -> log
val force_logged : + log -> + ('a -> ('b, 'c) result) -> + ('a, ('b, 'c) result) t -> + ('b, 'c) result
val backtrack : log -> unit
diff --git a/findlib-0/compiler-libs/Lexer/index.html b/findlib-0/compiler-libs/Lexer/index.html new file mode 100644 index 000000000..54a8c90e2 --- /dev/null +++ b/findlib-0/compiler-libs/Lexer/index.html @@ -0,0 +1,5 @@ + +Lexer (docs.findlib-0.compiler-libs.Lexer)

Module Lexer

The lexical analyzer

Warning: this module is unstable and part of compiler-libs.

val init : unit -> unit
val skip_hash_bang : Lexing.lexbuf -> unit
type error =
  1. | Illegal_character of char
  2. | Illegal_escape of string * string option
  3. | Reserved_sequence of string * string option
  4. | Unterminated_comment of Location.t
  5. | Unterminated_string
  6. | Unterminated_string_in_comment of Location.t * Location.t
  7. | Empty_character_literal
  8. | Keyword_as_label of string
  9. | Invalid_literal of string
  10. | Invalid_directive of string * string option
exception Error of error * Location.t
val in_comment : unit -> bool
val in_string : unit -> bool
val print_warnings : bool ref
val handle_docstrings : bool ref
val comments : unit -> (string * Location.t) list
val token_with_comments : Lexing.lexbuf -> Parser.token
val set_preprocessor : + (unit -> unit) -> + ((Lexing.lexbuf -> Parser.token) -> Lexing.lexbuf -> Parser.token) -> + unit
diff --git a/findlib-0/compiler-libs/Lift_code/index.html b/findlib-0/compiler-libs/Lift_code/index.html new file mode 100644 index 000000000..7b42fa5e5 --- /dev/null +++ b/findlib-0/compiler-libs/Lift_code/index.html @@ -0,0 +1,7 @@ + +Lift_code (docs.findlib-0.compiler-libs.Lift_code)

Module Lift_code

val lift_lets : lifter

Lift let bindings to attempt to increase the length of scopes, as an aid to further optimizations. For example: let c = let b = <expr> in b, b in fst c would be transformed to: let b = <expr> in let c = b, b in fst c which is then clearly just: <expr>

val lift_lets_expr : Flambda.t -> toplevel:bool -> Flambda.t
val lifting_helper : + Flambda.t list -> + evaluation_order:[ `Left_to_right | `Right_to_left ] -> + create_body:(Variable.t list -> Flambda.t) -> + name:Internal_variable_names.t -> + Flambda.t
diff --git a/findlib-0/compiler-libs/Lift_constants/index.html b/findlib-0/compiler-libs/Lift_constants/index.html new file mode 100644 index 000000000..68e3f9049 --- /dev/null +++ b/findlib-0/compiler-libs/Lift_constants/index.html @@ -0,0 +1,5 @@ + +Lift_constants (docs.findlib-0.compiler-libs.Lift_constants)

Module Lift_constants

The aim of this pass is to assign symbols to values known to be constant (in other words, whose values we know at compile time), with appropriate sharing of constants, and replace the occurrences of the constants with their corresponding symbols.

This pass uses the results of two other passes, Inconstant_idents and Alias_analysis. The relationship between these two deserves some attention.

Inconstant_idents is a "backwards" analysis that propagates implications about inconstantness of variables and set of closures IDs.

Alias_analysis is a "forwards" analysis that is analogous to the propagation of Simple_value_approx.t values during Inline_and_simplify. It gives us information about relationships between values but not actually about their constantness.

Combining these two into a single pass has been attempted previously, but was not thought to be successful; this experiment could be repeated in the future. (If "constant" is considered as "top" and "inconstant" is considered as "bottom", then Alias_analysis corresponds to a least fixed point and Inconstant_idents corresponds to a greatest fixed point.)

At a high level, this pass operates as follows. Symbols are assigned to variables known to be constant and their defining expressions examined. Based on the results of Alias_analysis, we simplify the destructive elements within the defining expressions (specifically, projection of fields from blocks), to eventually yield Flambda.constant_defining_values that are entirely constructive. These will be bound to symbols in the resulting program.

Another approach to this pass could be to only use the results of Inconstant_idents and then repeatedly lift constants and run Inline_and_simplify until a fixpoint. It was thought more robust to instead use Alias_analysis, where the fixpointing involves a less complicated function.

We still run Inline_and_simplify once after this pass since the lifting of constants may enable more functions to become closed; the simplification pass provides an easy way of cleaning up (e.g. making sure free_vars maps in sets of closures are correct).

val lift_constants : + Flambda.program -> + backend:(module Backend_intf.S) -> + Flambda.program
diff --git a/findlib-0/compiler-libs/Lift_let_to_initialize_symbol/index.html b/findlib-0/compiler-libs/Lift_let_to_initialize_symbol/index.html new file mode 100644 index 000000000..bf4478a13 --- /dev/null +++ b/findlib-0/compiler-libs/Lift_let_to_initialize_symbol/index.html @@ -0,0 +1,5 @@ + +Lift_let_to_initialize_symbol (docs.findlib-0.compiler-libs.Lift_let_to_initialize_symbol)

Module Lift_let_to_initialize_symbol

val lift : + backend:(module Backend_intf.S) -> + Flambda.program -> + Flambda.program

Lift toplevel Let-expressions to Flambda program constructions such that the results of evaluation of such expressions may be accessed directly, through symbols, rather than through closures. The Let-expressions typically come from the compilation of modules (using the bytecode strategy) in Translmod.

This means of compilation supersedes the old "transl_store_" methodology for native code.

An Initialize_symbol construction generated by this pass may be subsequently rewritten to Let_symbol if it is discovered that the initializer is in fact constant. (See Initialize_symbol_to_let_symbol.)

The program constructions generated by this pass will be joined by others that arise from the lifting of constants (see Lift_constants).

diff --git a/findlib-0/compiler-libs/Linear/index.html b/findlib-0/compiler-libs/Linear/index.html new file mode 100644 index 000000000..80b69cb07 --- /dev/null +++ b/findlib-0/compiler-libs/Linear/index.html @@ -0,0 +1,7 @@ + +Linear (docs.findlib-0.compiler-libs.Linear)

Module Linear

type label = Cmm.label
type instruction = {
  1. mutable desc : instruction_desc;
  2. mutable next : instruction;
  3. arg : Reg.t array;
  4. res : Reg.t array;
  5. dbg : Debuginfo.t;
  6. live : Reg.Set.t;
}
and instruction_desc =
  1. | Lprologue
  2. | Lend
  3. | Lop of Mach.operation
  4. | Lreloadretaddr
  5. | Lreturn
  6. | Llabel of label
  7. | Lbranch of label
  8. | Lcondbranch of Mach.test * label
  9. | Lcondbranch3 of label option * label option * label option
  10. | Lswitch of label array
  11. | Lentertrap
  12. | Ladjust_trap_depth of {
    1. delta_traps : int;
    }
  13. | Lpushtrap of {
    1. lbl_handler : label;
    }
  14. | Lpoptrap
  15. | Lraise of Lambda.raise_kind
val has_fallthrough : instruction_desc -> bool
val end_instr : instruction
val instr_cons : + instruction_desc -> + Reg.t array -> + Reg.t array -> + instruction -> + instruction
val invert_test : Mach.test -> Mach.test
type fundecl = {
  1. fun_name : string;
  2. fun_args : Reg.Set.t;
  3. fun_body : instruction;
  4. fun_fast : bool;
  5. fun_dbg : Debuginfo.t;
  6. fun_tailrec_entry_point_label : label;
  7. fun_contains_calls : bool;
  8. fun_num_stack_slots : int array;
  9. fun_frame_required : bool;
  10. fun_prologue_required : bool;
}
diff --git a/findlib-0/compiler-libs/Linear_format/index.html b/findlib-0/compiler-libs/Linear_format/index.html new file mode 100644 index 000000000..008375e84 --- /dev/null +++ b/findlib-0/compiler-libs/Linear_format/index.html @@ -0,0 +1,2 @@ + +Linear_format (docs.findlib-0.compiler-libs.Linear_format)

Module Linear_format

type linear_item_info =
  1. | Func of Linear.fundecl
  2. | Data of Cmm.data_item list
type linear_unit_info = {
  1. mutable unit_name : string;
  2. mutable items : linear_item_info list;
  3. mutable for_pack : string option;
}
val save : string -> linear_unit_info -> unit
val restore : string -> linear_unit_info * Digest.t
diff --git a/findlib-0/compiler-libs/Linearize/index.html b/findlib-0/compiler-libs/Linearize/index.html new file mode 100644 index 000000000..ced114bbe --- /dev/null +++ b/findlib-0/compiler-libs/Linearize/index.html @@ -0,0 +1,2 @@ + +Linearize (docs.findlib-0.compiler-libs.Linearize)

Module Linearize

val fundecl : Mach.fundecl -> Linear.fundecl
diff --git a/findlib-0/compiler-libs/Linkage_name/Map/index.html b/findlib-0/compiler-libs/Linkage_name/Map/index.html new file mode 100644 index 000000000..ce1fdf49c --- /dev/null +++ b/findlib-0/compiler-libs/Linkage_name/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Linkage_name.Map)

Module Linkage_name.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Linkage_name/Set/index.html b/findlib-0/compiler-libs/Linkage_name/Set/index.html new file mode 100644 index 000000000..2fc1bc420 --- /dev/null +++ b/findlib-0/compiler-libs/Linkage_name/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Linkage_name.Set)

Module Linkage_name.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Linkage_name/T/index.html b/findlib-0/compiler-libs/Linkage_name/T/index.html new file mode 100644 index 000000000..c40800e73 --- /dev/null +++ b/findlib-0/compiler-libs/Linkage_name/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Linkage_name.T)

Module Linkage_name.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Linkage_name/Tbl/index.html b/findlib-0/compiler-libs/Linkage_name/Tbl/index.html new file mode 100644 index 000000000..fe21f6436 --- /dev/null +++ b/findlib-0/compiler-libs/Linkage_name/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Linkage_name.Tbl)

Module Linkage_name.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Linkage_name/index.html b/findlib-0/compiler-libs/Linkage_name/index.html new file mode 100644 index 000000000..5d7ceec14 --- /dev/null +++ b/findlib-0/compiler-libs/Linkage_name/index.html @@ -0,0 +1,2 @@ + +Linkage_name (docs.findlib-0.compiler-libs.Linkage_name)

Module Linkage_name

include Identifiable.S
type t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val create : string -> t
val to_string : t -> string
diff --git a/findlib-0/compiler-libs/Linscan/index.html b/findlib-0/compiler-libs/Linscan/index.html new file mode 100644 index 000000000..a7bc25ca8 --- /dev/null +++ b/findlib-0/compiler-libs/Linscan/index.html @@ -0,0 +1,2 @@ + +Linscan (docs.findlib-0.compiler-libs.Linscan)

Module Linscan

val allocate_registers : Interval.result -> int array
diff --git a/findlib-0/compiler-libs/Liveness/index.html b/findlib-0/compiler-libs/Liveness/index.html new file mode 100644 index 000000000..2b04eec25 --- /dev/null +++ b/findlib-0/compiler-libs/Liveness/index.html @@ -0,0 +1,2 @@ + +Liveness (docs.findlib-0.compiler-libs.Liveness)

Module Liveness

val fundecl : Mach.fundecl -> unit
diff --git a/findlib-0/compiler-libs/Load_path/Dir/index.html b/findlib-0/compiler-libs/Load_path/Dir/index.html new file mode 100644 index 000000000..3f5c7dcfc --- /dev/null +++ b/findlib-0/compiler-libs/Load_path/Dir/index.html @@ -0,0 +1,2 @@ + +Dir (docs.findlib-0.compiler-libs.Load_path.Dir)

Module Load_path.Dir

type t

Represent one directory in the load path.

val create : string -> t
val path : t -> string
val files : t -> string list

All the files in that directory. This doesn't include files in sub-directories of this directory.

val find : t -> string -> string option

find dir fn returns the full path to fn in dir.

val find_uncap : t -> string -> string option

As find, but search also for uncapitalized name, i.e. if name is Foo.ml, either /path/Foo.ml or /path/foo.ml may be returned.

diff --git a/findlib-0/compiler-libs/Load_path/index.html b/findlib-0/compiler-libs/Load_path/index.html new file mode 100644 index 000000000..6867737ad --- /dev/null +++ b/findlib-0/compiler-libs/Load_path/index.html @@ -0,0 +1,5 @@ + +Load_path (docs.findlib-0.compiler-libs.Load_path)

Module Load_path

Management of include directories.

This module offers a high level interface to locating files in the load path, which is constructed from -I command line flags and a few other parameters.

It makes the assumption that the contents of include directories doesn't change during the execution of the compiler.

val add_dir : string -> unit

Add a directory to the end of the load path (i.e. at lowest priority.)

val remove_dir : string -> unit

Remove a directory from the load path

val reset : unit -> unit

Remove all directories

module Dir : sig ... end
type auto_include_callback = + (Dir.t -> string -> string option) -> + string -> + string

The type of callback functions on for init ~auto_include

val no_auto_include : auto_include_callback

No automatic directory inclusion: misses in the load path raise Not_found as normal.

val init : auto_include:auto_include_callback -> string list -> unit

init l is the same as reset (); List.iter add_dir (List.rev l)

val auto_include_otherlibs : (string -> unit) -> auto_include_callback

auto_include_otherlibs alert is a callback function to be passed to Load_path.init and automatically adds -I +lib to the load path after calling alert lib.

val get_paths : unit -> string list

Return the list of directories passed to add_dir so far.

val find : string -> string

Locate a file in the load path. Raise Not_found if the file cannot be found. This function is optimized for the case where the filename is a basename, i.e. doesn't contain a directory separator.

val find_uncap : string -> string

Same as find, but search also for uncapitalized name, i.e. if name is Foo.ml, allow /path/Foo.ml and /path/foo.ml to match.

val add : Dir.t -> unit

Old name for append_dir

  • deprecated
val append_dir : Dir.t -> unit

append_dir d adds d to the end of the load path (i.e. at lowest priority.

val prepend_dir : Dir.t -> unit

prepend_dir d adds d to the start of the load path (i.e. at highest priority.

val get : unit -> Dir.t list

Same as get_paths (), except that it returns a Dir.t list.

diff --git a/findlib-0/compiler-libs/Local_store/index.html b/findlib-0/compiler-libs/Local_store/index.html new file mode 100644 index 000000000..311a87b41 --- /dev/null +++ b/findlib-0/compiler-libs/Local_store/index.html @@ -0,0 +1,2 @@ + +Local_store (docs.findlib-0.compiler-libs.Local_store)

Module Local_store

This module provides some facilities for creating references (and hash tables) which can easily be snapshoted and restored to an arbitrary version.

It is used throughout the frontend (read: typechecker), to register all (well, hopefully) the global state. Thus making it easy for tools like Merlin to go back and forth typechecking different files.

Creators

val s_ref : 'a -> 'a ref

Similar to Stdlib.ref, except the allocated reference is registered into the store.

val s_table : ('a -> 'b) -> 'a -> 'b ref

Used to register hash tables. Those also need to be placed into refs to be easily swapped out, but one can't just "snapshot" the initial value to create fresh instances, so instead an initializer is required.

Use it like this:

let my_table = s_table Hashtbl.create 42

State management

Note: all the following functions are currently unused inside the compiler codebase. Merlin is their only user at the moment.

type store
val fresh : unit -> store

Returns a fresh instance of the store.

The first time this function is called, it snapshots the value of all the registered references, later calls to fresh will return instances initialized to those values.

val with_store : store -> (unit -> 'a) -> 'a

with_store s f resets all the registered references to the value they have in s for the run of f. If f updates any of the registered refs, s is updated to remember those changes.

val reset : unit -> unit

Resets all the references to the initial snapshot (i.e. to the same values that new instances start with).

val is_bound : unit -> bool

Returns true when a store is active (i.e. when called from the callback passed to with_store), false otherwise.

diff --git a/findlib-0/compiler-libs/Location/index.html b/findlib-0/compiler-libs/Location/index.html new file mode 100644 index 000000000..aed095139 --- /dev/null +++ b/findlib-0/compiler-libs/Location/index.html @@ -0,0 +1,27 @@ + +Location (docs.findlib-0.compiler-libs.Location)

Module Location

Source code locations (ranges of positions), used in parsetree.

Warning: this module is unstable and part of compiler-libs.

type t = Warnings.loc = {
  1. loc_start : Lexing.position;
  2. loc_end : Lexing.position;
  3. loc_ghost : bool;
}

Note on the use of Lexing.position in this module. If pos_fname = "", then use !input_name instead. If pos_lnum = -1, then pos_bol = 0. Use pos_cnum and re-parse the file to get the line and character numbers. Else all fields are correct.

val none : t

An arbitrary value of type t; describes an empty ghost range.

val is_none : t -> bool

True for Location.none, false any other location

val in_file : string -> t

Return an empty ghost range located in a given file.

val init : Lexing.lexbuf -> string -> unit

Set the file name and line number of the lexbuf to be the start of the named file.

val curr : Lexing.lexbuf -> t

Get the location of the current token from the lexbuf.

val symbol_rloc : unit -> t
val symbol_gloc : unit -> t
val rhs_loc : int -> t

rhs_loc n returns the location of the symbol at position n, starting at 1, in the current parser rule.

val rhs_interval : int -> int -> t
val get_pos_info : Lexing.position -> string * int * int

file, line, char

type 'a loc = {
  1. txt : 'a;
  2. loc : t;
}
val mknoloc : 'a -> 'a loc
val mkloc : 'a -> t -> 'a loc

Input info

val input_name : string ref
val input_lexbuf : Lexing.lexbuf option ref
val input_phrase_buffer : Buffer.t option ref

Toplevel-specific functions

val echo_eof : unit -> unit
val separate_new_message : Format.formatter -> unit
val reset : unit -> unit

Rewriting path

val rewrite_absolute_path : string -> string

rewrite_absolute_path path rewrites path to honor the BUILD_PATH_PREFIX_MAP variable if it is set. It does not check whether path is absolute or not. The result is as follows:

  • If BUILD_PATH_PREFIX_MAP is not set, just return path.
  • otherwise, rewrite using the mapping (and if there are no matching prefixes that will just return path).

See the BUILD_PATH_PREFIX_MAP spec

val rewrite_find_first_existing : string -> string option

rewrite_find_first_existing path uses a BUILD_PATH_PREFIX_MAP mapping and tries to find a source in mapping that maps to a result that exists in the file system. There are the following return values:

  • None, means either

    • BUILD_PATH_PREFIX_MAP is not set and path does not exists, or
    • no source prefixes of path in the mapping were found,
  • Some target, means target exists and either

    • BUILD_PATH_PREFIX_MAP is not set and target = path, or
    • target is the first file (in priority order) that path mapped to that exists in the file system.
  • Not_found raised, means some source prefixes in the map were found that matched path, but none of them existed in the file system. The caller should catch this and issue an appropriate error message.

See the BUILD_PATH_PREFIX_MAP spec

val rewrite_find_all_existing_dirs : string -> string list

rewrite_find_all_existing_dirs dir accumulates a list of existing directories, dirs, that are the result of mapping a potentially abstract directory, dir, over all the mapping pairs in the BUILD_PATH_PREFIX_MAP environment variable, if any. The list dirs will be in priority order (head as highest priority).

The possible results are:

  • [], means either

    • BUILD_PATH_PREFIX_MAP is not set and dir is not an existing directory, or
    • if set, then there were no matching prefixes of dir.
  • Some dirs, means dirs are the directories found. Either

    • BUILD_PATH_PREFIX_MAP is not set and dirs = [dir], or
    • it was set and dirs are the mapped existing directories.
  • Not_found raised, means some source prefixes in the map were found that matched dir, but none of mapping results were existing directories (possibly due to misconfiguration). The caller should catch this and issue an appropriate error message.

See the BUILD_PATH_PREFIX_MAP spec

val absolute_path : string -> string

absolute_path path first makes an absolute path, s from path, prepending the current working directory if path was relative. Then s is rewritten using rewrite_absolute_path. Finally the result is normalized by eliminating instances of '.' or '..'.

Printing locations

val show_filename : string -> string

In -absname mode, return the absolute path for this filename. Otherwise, returns the filename unchanged.

val print_filename : Format.formatter -> string -> unit
val print_loc : Format.formatter -> t -> unit
val print_locs : Format.formatter -> t list -> unit

Toplevel-specific location highlighting

val highlight_terminfo : Lexing.lexbuf -> Format.formatter -> t list -> unit

Reporting errors and warnings

The type of reports and report printers

type msg = (Format.formatter -> unit) loc
val msg : ?loc:t -> ('a, Format.formatter, unit, msg) format4 -> 'a
type report_kind =
  1. | Report_error
  2. | Report_warning of string
  3. | Report_warning_as_error of string
  4. | Report_alert of string
  5. | Report_alert_as_error of string
type report = {
  1. kind : report_kind;
  2. main : msg;
  3. sub : msg list;
}
type report_printer = {
  1. pp : report_printer -> Format.formatter -> report -> unit;
  2. pp_report_kind : report_printer -> + report -> + Format.formatter -> + report_kind -> + unit;
  3. pp_main_loc : report_printer -> report -> Format.formatter -> t -> unit;
  4. pp_main_txt : report_printer -> + report -> + Format.formatter -> + (Format.formatter -> unit) -> + unit;
  5. pp_submsgs : report_printer -> report -> Format.formatter -> msg list -> unit;
  6. pp_submsg : report_printer -> report -> Format.formatter -> msg -> unit;
  7. pp_submsg_loc : report_printer -> report -> Format.formatter -> t -> unit;
  8. pp_submsg_txt : report_printer -> + report -> + Format.formatter -> + (Format.formatter -> unit) -> + unit;
}

A printer for reports, defined using open-recursion. The goal is to make it easy to define new printers by re-using code from existing ones.

Report printers used in the compiler

val batch_mode_printer : report_printer
val terminfo_toplevel_printer : Lexing.lexbuf -> report_printer
val best_toplevel_printer : unit -> report_printer

Detects the terminal capabilities and selects an adequate printer

Printing a report

val print_report : Format.formatter -> report -> unit

Display an error or warning report.

val report_printer : (unit -> report_printer) ref

Hook for redefining the printer of reports.

The hook is a unit -> report_printer and not simply a report_printer: this is useful so that it can detect the type of the output (a file, a terminal, ...) and select a printer accordingly.

val default_report_printer : unit -> report_printer

Original report printer for use in hooks.

Reporting warnings

Converting a Warnings.t into a report

val report_warning : t -> Warnings.t -> report option

report_warning loc w produces a report for the given warning w, or None if the warning is not to be printed.

val warning_reporter : (t -> Warnings.t -> report option) ref

Hook for intercepting warnings.

val default_warning_reporter : t -> Warnings.t -> report option

Original warning reporter for use in hooks.

Printing warnings

val formatter_for_warnings : Format.formatter ref
val print_warning : t -> Format.formatter -> Warnings.t -> unit

Prints a warning. This is simply the composition of report_warning and print_report.

val prerr_warning : t -> Warnings.t -> unit

Same as print_warning, but uses !formatter_for_warnings as output formatter.

Reporting alerts

Converting an Alert.t into a report

val report_alert : t -> Warnings.alert -> report option

report_alert loc w produces a report for the given alert w, or None if the alert is not to be printed.

val alert_reporter : (t -> Warnings.alert -> report option) ref

Hook for intercepting alerts.

val default_alert_reporter : t -> Warnings.alert -> report option

Original alert reporter for use in hooks.

Printing alerts

val print_alert : t -> Format.formatter -> Warnings.alert -> unit

Prints an alert. This is simply the composition of report_alert and print_report.

val prerr_alert : t -> Warnings.alert -> unit

Same as print_alert, but uses !formatter_for_warnings as output formatter.

val deprecated : ?def:t -> ?use:t -> t -> string -> unit

Prints a deprecation alert.

val alert : ?def:t -> ?use:t -> kind:string -> t -> string -> unit

Prints an arbitrary alert.

val auto_include_alert : string -> unit

Prints an alert that -I +lib has been automatically added to the load path

val deprecated_script_alert : string -> unit

deprecated_script_alert command prints an alert that command foo has been deprecated in favour of command ./foo

Reporting errors

type error = report

An error is a report which report_kind must be Report_error.

val error : ?loc:t -> ?sub:msg list -> string -> error
val errorf : + ?loc:t -> + ?sub:msg list -> + ('a, Format.formatter, unit, error) format4 -> + 'a
val error_of_printer : + ?loc:t -> + ?sub:msg list -> + (Format.formatter -> 'a -> unit) -> + 'a -> + error
val error_of_printer_file : (Format.formatter -> 'a -> unit) -> 'a -> error

Automatically reporting errors for raised exceptions

val register_error_of_exn : (exn -> error option) -> unit

Each compiler module which defines a custom type of exception which can surface as a user-visible error should register a "printer" for this exception using register_error_of_exn. The result of the printer is an error value containing a location, a message, and optionally sub-messages (each of them being located as well).

val error_of_exn : exn -> [ `Ok of error | `Already_displayed ] option
exception Error of error

Raising Error e signals an error e; the exception will be caught and the error will be printed.

exception Already_displayed_error

Raising Already_displayed_error signals an error which has already been printed. The exception will be caught, but nothing will be printed

val raise_errorf : + ?loc:t -> + ?sub:msg list -> + ('a, Format.formatter, unit, 'b) format4 -> + 'a
val report_exception : Format.formatter -> exn -> unit

Reraise the exception if it is unknown.

diff --git a/findlib-0/compiler-libs/Longident/index.html b/findlib-0/compiler-libs/Longident/index.html new file mode 100644 index 000000000..59b598745 --- /dev/null +++ b/findlib-0/compiler-libs/Longident/index.html @@ -0,0 +1,3 @@ + +Longident (docs.findlib-0.compiler-libs.Longident)

Module Longident

Long identifiers, used in parsetree.

Warning: this module is unstable and part of compiler-libs.

To print a longident, see Pprintast.longident, using Format.asprintf to convert to a string.

type t =
  1. | Lident of string
  2. | Ldot of t * string
  3. | Lapply of t * t
val flatten : t -> string list
val unflatten : string list -> t option

For a non-empty list l, unflatten l is Some lid where lid is the long identifier created by concatenating the elements of l with Ldot. unflatten [] is None.

val last : t -> string
val parse : string -> t

This function is broken on identifiers that are not just "Word.Word.word"; for example, it returns incorrect results on infix operators and extended module paths.

If you want to generate long identifiers that are a list of dot-separated identifiers, the function unflatten is safer and faster. unflatten is available since OCaml 4.06.0.

If you want to parse any identifier correctly, use the long-identifiers functions from the Parse module, in particular Parse.longident. They are available since OCaml 4.11, and also provide proper input-location support.

  • deprecated this function may misparse its input, +use "Parse.longident" or "Longident.unflatten"
diff --git a/findlib-0/compiler-libs/Mach/index.html b/findlib-0/compiler-libs/Mach/index.html new file mode 100644 index 000000000..336c50454 --- /dev/null +++ b/findlib-0/compiler-libs/Mach/index.html @@ -0,0 +1,13 @@ + +Mach (docs.findlib-0.compiler-libs.Mach)

Module Mach

type integer_comparison =
  1. | Isigned of Cmm.integer_comparison
  2. | Iunsigned of Cmm.integer_comparison
type integer_operation =
  1. | Iadd
  2. | Isub
  3. | Imul
  4. | Imulh
  5. | Idiv
  6. | Imod
  7. | Iand
  8. | Ior
  9. | Ixor
  10. | Ilsl
  11. | Ilsr
  12. | Iasr
  13. | Icomp of integer_comparison
  14. | Icheckbound
type float_comparison = Cmm.float_comparison
type test =
  1. | Itruetest
  2. | Ifalsetest
  3. | Iinttest of integer_comparison
  4. | Iinttest_imm of integer_comparison * int
  5. | Ifloattest of float_comparison
  6. | Ioddtest
  7. | Ieventest
type operation =
  1. | Imove
  2. | Ispill
  3. | Ireload
  4. | Iconst_int of nativeint
  5. | Iconst_float of int64
  6. | Iconst_symbol of string
  7. | Icall_ind
  8. | Icall_imm of {
    1. func : string;
    }
  9. | Itailcall_ind
  10. | Itailcall_imm of {
    1. func : string;
    }
  11. | Iextcall of {
    1. func : string;
    2. ty_res : Cmm.machtype;
    3. ty_args : Cmm.exttype list;
    4. alloc : bool;
    5. stack_ofs : int;
    }
  12. | Istackoffset of int
  13. | Iload of {
    1. memory_chunk : Cmm.memory_chunk;
    2. addressing_mode : Arch.addressing_mode;
    3. mutability : Asttypes.mutable_flag;
    4. is_atomic : bool;
    }
  14. | Istore of Cmm.memory_chunk * Arch.addressing_mode * bool
  15. | Ialloc of {
    1. bytes : int;
    2. dbginfo : Debuginfo.alloc_dbginfo;
    }
  16. | Iintop of integer_operation
  17. | Iintop_imm of integer_operation * int
  18. | Icompf of float_comparison
  19. | Inegf
  20. | Iabsf
  21. | Iaddf
  22. | Isubf
  23. | Imulf
  24. | Idivf
  25. | Ifloatofint
  26. | Iintoffloat
  27. | Iopaque
  28. | Ispecific of Arch.specific_operation
  29. | Ipoll of {
    1. return_label : Cmm.label option;
    }
  30. | Idls_get
type instruction = {
  1. desc : instruction_desc;
  2. next : instruction;
  3. arg : Reg.t array;
  4. res : Reg.t array;
  5. dbg : Debuginfo.t;
  6. mutable live : Reg.Set.t;
}
and instruction_desc =
  1. | Iend
  2. | Iop of operation
  3. | Ireturn
  4. | Iifthenelse of test * instruction * instruction
  5. | Iswitch of int array * instruction array
  6. | Icatch of Cmm.rec_flag * (int * instruction) list * instruction
  7. | Iexit of int
  8. | Itrywith of instruction * instruction
  9. | Iraise of Lambda.raise_kind
type fundecl = {
  1. fun_name : string;
  2. fun_args : Reg.t array;
  3. fun_body : instruction;
  4. fun_codegen_options : Cmm.codegen_option list;
  5. fun_dbg : Debuginfo.t;
  6. fun_poll : Lambda.poll_attribute;
  7. fun_num_stack_slots : int array;
  8. fun_contains_calls : bool;
}
val dummy_instr : instruction
val end_instr : unit -> instruction
val instr_cons : + instruction_desc -> + Reg.t array -> + Reg.t array -> + instruction -> + instruction
val instr_cons_debug : + instruction_desc -> + Reg.t array -> + Reg.t array -> + Debuginfo.t -> + instruction -> + instruction
val instr_iter : (instruction -> unit) -> instruction -> unit
val operation_is_pure : operation -> bool

Returns true if the given operation only produces a result in its destination registers, but has no side effects whatsoever: it doesn't raise exceptions, it doesn't modify already-allocated blocks, it doesn't adjust the stack frame, etc.

val operation_can_raise : operation -> bool

Returns true if the given operation can raise an exception.

diff --git a/findlib-0/compiler-libs/Main/index.html b/findlib-0/compiler-libs/Main/index.html new file mode 100644 index 000000000..a86326fa8 --- /dev/null +++ b/findlib-0/compiler-libs/Main/index.html @@ -0,0 +1,2 @@ + +Main (docs.findlib-0.compiler-libs.Main)

Module Main

diff --git a/findlib-0/compiler-libs/Main_args/Default/Main/index.html b/findlib-0/compiler-libs/Main_args/Default/Main/index.html new file mode 100644 index 000000000..7d575cf03 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/Default/Main/index.html @@ -0,0 +1,2 @@ + +Main (docs.findlib-0.compiler-libs.Main_args.Default.Main)

Module Default.Main

include Core_options
include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _nopervasives : unit -> unit
val _unsafe : unit -> unit
val _warn_error : string -> unit
val _warn_help : unit -> unit
val _dno_unique_ids : unit -> unit
val _dunique_ids : unit -> unit
val _dno_locations : unit -> unit
val _dlocations : unit -> unit
val _dsource : unit -> unit
val _dparsetree : unit -> unit
val _dtypedtree : unit -> unit
val _dshape : unit -> unit
val _drawlambda : unit -> unit
val _dlambda : unit -> unit
include Compiler_options
val _a : unit -> unit
val _annot : unit -> unit
val _binannot : unit -> unit
val _c : unit -> unit
val _cc : string -> unit
val _cclib : string -> unit
val _ccopt : string -> unit
val _cmi_file : string -> unit
val _config : unit -> unit
val _config_var : string -> unit
val _for_pack : string -> unit
val _g : unit -> unit
val _no_g : unit -> unit
val _stop_after : string -> unit
val _i : unit -> unit
val _impl : string -> unit
val _intf : string -> unit
val _intf_suffix : string -> unit
val _keep_docs : unit -> unit
val _no_keep_docs : unit -> unit
val _keep_locs : unit -> unit
val _no_keep_locs : unit -> unit
val _linkall : unit -> unit
val _o : string -> unit
val _opaque : unit -> unit
val _output_obj : unit -> unit
val _output_complete_obj : unit -> unit
val _pack : unit -> unit
val _plugin : string -> unit
val _pp : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _runtime_variant : string -> unit
val _with_runtime : unit -> unit
val _without_runtime : unit -> unit
val _short_paths : unit -> unit
val _thread : unit -> unit
val _v : unit -> unit
val _verbose : unit -> unit
val _where : unit -> unit
val _color : string -> unit
val _error_style : string -> unit
val _match_context_rows : int -> unit
val _dtimings : unit -> unit
val _dprofile : unit -> unit
val _dump_into_file : unit -> unit
val _dump_dir : string -> unit
val _args : string -> string array
val _args0 : string -> string array
val _compat_32 : unit -> unit
val _custom : unit -> unit
val _no_check_prims : unit -> unit
val _dllib : string -> unit
val _dllpath : string -> unit
val _make_runtime : unit -> unit
val _vmthread : unit -> unit
val _use_runtime : string -> unit
val _output_complete_exe : unit -> unit
val _dinstr : unit -> unit
val _dcamlprimc : unit -> unit
val _use_prims : string -> unit
diff --git a/findlib-0/compiler-libs/Main_args/Default/Odoc_args/index.html b/findlib-0/compiler-libs/Main_args/Default/Odoc_args/index.html new file mode 100644 index 000000000..e2f957938 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/Default/Odoc_args/index.html @@ -0,0 +1,2 @@ + +Odoc_args (docs.findlib-0.compiler-libs.Main_args.Default.Odoc_args)

Module Default.Odoc_args

include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _short_paths : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _impl : string -> unit
val _intf : string -> unit
val _intf_suffix : string -> unit
val _pp : string -> unit
val _thread : unit -> unit
val _v : unit -> unit
val _verbose : unit -> unit
val _vmthread : unit -> unit
diff --git a/findlib-0/compiler-libs/Main_args/Default/Optmain/index.html b/findlib-0/compiler-libs/Main_args/Default/Optmain/index.html new file mode 100644 index 000000000..8ff9b5a95 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/Default/Optmain/index.html @@ -0,0 +1,2 @@ + +Optmain (docs.findlib-0.compiler-libs.Main_args.Default.Optmain)

Module Default.Optmain

include Core_options
include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _nopervasives : unit -> unit
val _unsafe : unit -> unit
val _warn_error : string -> unit
val _warn_help : unit -> unit
val _dno_unique_ids : unit -> unit
val _dunique_ids : unit -> unit
val _dno_locations : unit -> unit
val _dlocations : unit -> unit
val _dsource : unit -> unit
val _dparsetree : unit -> unit
val _dtypedtree : unit -> unit
val _dshape : unit -> unit
val _drawlambda : unit -> unit
val _dlambda : unit -> unit
include Compiler_options
val _a : unit -> unit
val _annot : unit -> unit
val _binannot : unit -> unit
val _c : unit -> unit
val _cc : string -> unit
val _cclib : string -> unit
val _ccopt : string -> unit
val _cmi_file : string -> unit
val _config : unit -> unit
val _config_var : string -> unit
val _for_pack : string -> unit
val _g : unit -> unit
val _no_g : unit -> unit
val _stop_after : string -> unit
val _i : unit -> unit
val _impl : string -> unit
val _intf : string -> unit
val _intf_suffix : string -> unit
val _keep_docs : unit -> unit
val _no_keep_docs : unit -> unit
val _keep_locs : unit -> unit
val _no_keep_locs : unit -> unit
val _linkall : unit -> unit
val _o : string -> unit
val _opaque : unit -> unit
val _output_obj : unit -> unit
val _output_complete_obj : unit -> unit
val _pack : unit -> unit
val _plugin : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _runtime_variant : string -> unit
val _with_runtime : unit -> unit
val _without_runtime : unit -> unit
val _short_paths : unit -> unit
val _thread : unit -> unit
val _v : unit -> unit
val _verbose : unit -> unit
val _where : unit -> unit
val _color : string -> unit
val _error_style : string -> unit
val _match_context_rows : int -> unit
val _dtimings : unit -> unit
val _dprofile : unit -> unit
val _dump_into_file : unit -> unit
val _dump_dir : string -> unit
val _args : string -> string array
val _args0 : string -> string array
include Optcommon_options
val _compact : unit -> unit
val _inline : string -> unit
val _inline_toplevel : string -> unit
val _inlining_report : unit -> unit
val _dump_pass : string -> unit
val _inline_max_depth : string -> unit
val _rounds : int -> unit
val _inline_max_unroll : string -> unit
val _classic_inlining : unit -> unit
val _inline_call_cost : string -> unit
val _inline_alloc_cost : string -> unit
val _inline_prim_cost : string -> unit
val _inline_branch_cost : string -> unit
val _inline_indirect_cost : string -> unit
val _inline_lifting_benefit : string -> unit
val _unbox_closures : unit -> unit
val _unbox_closures_factor : int -> unit
val _inline_branch_factor : string -> unit
val _remove_unused_arguments : unit -> unit
val _no_unbox_free_vars_of_closures : unit -> unit
val _no_unbox_specialised_args : unit -> unit
val _o2 : unit -> unit
val _o3 : unit -> unit
val _insn_sched : unit -> unit
val _no_insn_sched : unit -> unit
val _linscan : unit -> unit
val _no_float_const_prop : unit -> unit
val _clambda_checks : unit -> unit
val _dflambda : unit -> unit
val _drawflambda : unit -> unit
val _dflambda_invariants : unit -> unit
val _dflambda_no_invariants : unit -> unit
val _dflambda_let : int -> unit
val _dflambda_verbose : unit -> unit
val _drawclambda : unit -> unit
val _dclambda : unit -> unit
val _dcmm_invariants : unit -> unit
val _dcmm : unit -> unit
val _dsel : unit -> unit
val _dcombine : unit -> unit
val _dcse : unit -> unit
val _dlive : unit -> unit
val _dspill : unit -> unit
val _dsplit : unit -> unit
val _dinterf : unit -> unit
val _dprefer : unit -> unit
val _dalloc : unit -> unit
val _dreload : unit -> unit
val _dscheduling : unit -> unit
val _dlinear : unit -> unit
val _dinterval : unit -> unit
val _dstartup : unit -> unit
val _p : unit -> unit
val _pp : string -> unit
val _S : unit -> unit
val _shared : unit -> unit
val _afl_instrument : unit -> unit
val _afl_inst_ratio : int -> unit
val _function_sections : unit -> unit
val _save_ir_after : string -> unit
diff --git a/findlib-0/compiler-libs/Main_args/Default/Opttopmain/index.html b/findlib-0/compiler-libs/Main_args/Default/Opttopmain/index.html new file mode 100644 index 000000000..d74e0e0f8 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/Default/Opttopmain/index.html @@ -0,0 +1,2 @@ + +Opttopmain (docs.findlib-0.compiler-libs.Main_args.Default.Opttopmain)

Module Default.Opttopmain

include Toplevel_options
include Core_options
include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _short_paths : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _nopervasives : unit -> unit
val _unsafe : unit -> unit
val _warn_error : string -> unit
val _warn_help : unit -> unit
val _dno_unique_ids : unit -> unit
val _dunique_ids : unit -> unit
val _dno_locations : unit -> unit
val _dlocations : unit -> unit
val _dsource : unit -> unit
val _dparsetree : unit -> unit
val _dtypedtree : unit -> unit
val _dshape : unit -> unit
val _drawlambda : unit -> unit
val _dlambda : unit -> unit
val _init : string -> unit
val _noinit : unit -> unit
val _no_version : unit -> unit
val _noprompt : unit -> unit
val _nopromptcont : unit -> unit
val _stdin : unit -> unit
val _args : string -> string array
val _args0 : string -> string array
val _color : string -> unit
val _error_style : string -> unit
val _eval : string -> unit
include Optcommon_options
val _compact : unit -> unit
val _inline : string -> unit
val _inline_toplevel : string -> unit
val _inlining_report : unit -> unit
val _dump_pass : string -> unit
val _inline_max_depth : string -> unit
val _rounds : int -> unit
val _inline_max_unroll : string -> unit
val _classic_inlining : unit -> unit
val _inline_call_cost : string -> unit
val _inline_alloc_cost : string -> unit
val _inline_prim_cost : string -> unit
val _inline_branch_cost : string -> unit
val _inline_indirect_cost : string -> unit
val _inline_lifting_benefit : string -> unit
val _unbox_closures : unit -> unit
val _unbox_closures_factor : int -> unit
val _inline_branch_factor : string -> unit
val _remove_unused_arguments : unit -> unit
val _no_unbox_free_vars_of_closures : unit -> unit
val _no_unbox_specialised_args : unit -> unit
val _o2 : unit -> unit
val _o3 : unit -> unit
val _insn_sched : unit -> unit
val _no_insn_sched : unit -> unit
val _linscan : unit -> unit
val _no_float_const_prop : unit -> unit
val _clambda_checks : unit -> unit
val _dflambda : unit -> unit
val _drawflambda : unit -> unit
val _dflambda_invariants : unit -> unit
val _dflambda_no_invariants : unit -> unit
val _dflambda_let : int -> unit
val _dflambda_verbose : unit -> unit
val _drawclambda : unit -> unit
val _dclambda : unit -> unit
val _dcmm_invariants : unit -> unit
val _dcmm : unit -> unit
val _dsel : unit -> unit
val _dcombine : unit -> unit
val _dcse : unit -> unit
val _dlive : unit -> unit
val _dspill : unit -> unit
val _dsplit : unit -> unit
val _dinterf : unit -> unit
val _dprefer : unit -> unit
val _dalloc : unit -> unit
val _dreload : unit -> unit
val _dscheduling : unit -> unit
val _dlinear : unit -> unit
val _dinterval : unit -> unit
val _dstartup : unit -> unit
val _verbose : unit -> unit
val _S : unit -> unit
diff --git a/findlib-0/compiler-libs/Main_args/Default/Topmain/index.html b/findlib-0/compiler-libs/Main_args/Default/Topmain/index.html new file mode 100644 index 000000000..e4117fd3c --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/Default/Topmain/index.html @@ -0,0 +1,2 @@ + +Topmain (docs.findlib-0.compiler-libs.Main_args.Default.Topmain)

Module Default.Topmain

include Toplevel_options
include Core_options
include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _short_paths : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _nopervasives : unit -> unit
val _unsafe : unit -> unit
val _warn_error : string -> unit
val _warn_help : unit -> unit
val _dno_unique_ids : unit -> unit
val _dunique_ids : unit -> unit
val _dno_locations : unit -> unit
val _dlocations : unit -> unit
val _dsource : unit -> unit
val _dparsetree : unit -> unit
val _dtypedtree : unit -> unit
val _dshape : unit -> unit
val _drawlambda : unit -> unit
val _dlambda : unit -> unit
val _init : string -> unit
val _noinit : unit -> unit
val _no_version : unit -> unit
val _noprompt : unit -> unit
val _nopromptcont : unit -> unit
val _stdin : unit -> unit
val _args : string -> string array
val _args0 : string -> string array
val _color : string -> unit
val _error_style : string -> unit
val _eval : string -> unit
val _dinstr : unit -> unit
diff --git a/findlib-0/compiler-libs/Main_args/Default/index.html b/findlib-0/compiler-libs/Main_args/Default/index.html new file mode 100644 index 000000000..ac9abe563 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/Default/index.html @@ -0,0 +1,2 @@ + +Default (docs.findlib-0.compiler-libs.Main_args.Default)

Module Main_args.Default

diff --git a/findlib-0/compiler-libs/Main_args/Make_bytecomp_options/argument-1-_/index.html b/findlib-0/compiler-libs/Main_args/Make_bytecomp_options/argument-1-_/index.html new file mode 100644 index 000000000..ddeefda76 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/Make_bytecomp_options/argument-1-_/index.html @@ -0,0 +1,2 @@ + +_ (docs.findlib-0.compiler-libs.Main_args.Make_bytecomp_options._)

Parameter Make_bytecomp_options._

include Core_options
include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _nopervasives : unit -> unit
val _unsafe : unit -> unit
val _warn_error : string -> unit
val _warn_help : unit -> unit
val _dno_unique_ids : unit -> unit
val _dunique_ids : unit -> unit
val _dno_locations : unit -> unit
val _dlocations : unit -> unit
val _dsource : unit -> unit
val _dparsetree : unit -> unit
val _dtypedtree : unit -> unit
val _dshape : unit -> unit
val _drawlambda : unit -> unit
val _dlambda : unit -> unit
include Compiler_options
val _a : unit -> unit
val _annot : unit -> unit
val _binannot : unit -> unit
val _c : unit -> unit
val _cc : string -> unit
val _cclib : string -> unit
val _ccopt : string -> unit
val _cmi_file : string -> unit
val _config : unit -> unit
val _config_var : string -> unit
val _for_pack : string -> unit
val _g : unit -> unit
val _no_g : unit -> unit
val _stop_after : string -> unit
val _i : unit -> unit
val _impl : string -> unit
val _intf : string -> unit
val _intf_suffix : string -> unit
val _keep_docs : unit -> unit
val _no_keep_docs : unit -> unit
val _keep_locs : unit -> unit
val _no_keep_locs : unit -> unit
val _linkall : unit -> unit
val _o : string -> unit
val _opaque : unit -> unit
val _output_obj : unit -> unit
val _output_complete_obj : unit -> unit
val _pack : unit -> unit
val _plugin : string -> unit
val _pp : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _runtime_variant : string -> unit
val _with_runtime : unit -> unit
val _without_runtime : unit -> unit
val _short_paths : unit -> unit
val _thread : unit -> unit
val _v : unit -> unit
val _verbose : unit -> unit
val _where : unit -> unit
val _color : string -> unit
val _error_style : string -> unit
val _match_context_rows : int -> unit
val _dtimings : unit -> unit
val _dprofile : unit -> unit
val _dump_into_file : unit -> unit
val _dump_dir : string -> unit
val _args : string -> string array
val _args0 : string -> string array
val _compat_32 : unit -> unit
val _custom : unit -> unit
val _no_check_prims : unit -> unit
val _dllib : string -> unit
val _dllpath : string -> unit
val _make_runtime : unit -> unit
val _vmthread : unit -> unit
val _use_runtime : string -> unit
val _output_complete_exe : unit -> unit
val _dinstr : unit -> unit
val _dcamlprimc : unit -> unit
val _use_prims : string -> unit
diff --git a/findlib-0/compiler-libs/Main_args/Make_bytecomp_options/index.html b/findlib-0/compiler-libs/Main_args/Make_bytecomp_options/index.html new file mode 100644 index 000000000..df82916ce --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/Make_bytecomp_options/index.html @@ -0,0 +1,2 @@ + +Make_bytecomp_options (docs.findlib-0.compiler-libs.Main_args.Make_bytecomp_options)

Module Main_args.Make_bytecomp_options

Parameters

Signature

val list : (string * Arg.spec * string) list
diff --git a/findlib-0/compiler-libs/Main_args/Make_bytetop_options/argument-1-_/index.html b/findlib-0/compiler-libs/Main_args/Make_bytetop_options/argument-1-_/index.html new file mode 100644 index 000000000..35baeb388 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/Make_bytetop_options/argument-1-_/index.html @@ -0,0 +1,2 @@ + +_ (docs.findlib-0.compiler-libs.Main_args.Make_bytetop_options._)

Parameter Make_bytetop_options._

include Toplevel_options
include Core_options
include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _short_paths : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _nopervasives : unit -> unit
val _unsafe : unit -> unit
val _warn_error : string -> unit
val _warn_help : unit -> unit
val _dno_unique_ids : unit -> unit
val _dunique_ids : unit -> unit
val _dno_locations : unit -> unit
val _dlocations : unit -> unit
val _dsource : unit -> unit
val _dparsetree : unit -> unit
val _dtypedtree : unit -> unit
val _dshape : unit -> unit
val _drawlambda : unit -> unit
val _dlambda : unit -> unit
val _init : string -> unit
val _noinit : unit -> unit
val _no_version : unit -> unit
val _noprompt : unit -> unit
val _nopromptcont : unit -> unit
val _stdin : unit -> unit
val _args : string -> string array
val _args0 : string -> string array
val _color : string -> unit
val _error_style : string -> unit
val _eval : string -> unit
val _dinstr : unit -> unit
diff --git a/findlib-0/compiler-libs/Main_args/Make_bytetop_options/index.html b/findlib-0/compiler-libs/Main_args/Make_bytetop_options/index.html new file mode 100644 index 000000000..5c599e7dd --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/Make_bytetop_options/index.html @@ -0,0 +1,2 @@ + +Make_bytetop_options (docs.findlib-0.compiler-libs.Main_args.Make_bytetop_options)

Module Main_args.Make_bytetop_options

Parameters

Signature

val list : (string * Arg.spec * string) list
diff --git a/findlib-0/compiler-libs/Main_args/Make_ocamldoc_options/argument-1-_/index.html b/findlib-0/compiler-libs/Main_args/Make_ocamldoc_options/argument-1-_/index.html new file mode 100644 index 000000000..e7914172d --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/Make_ocamldoc_options/argument-1-_/index.html @@ -0,0 +1,2 @@ + +_ (docs.findlib-0.compiler-libs.Main_args.Make_ocamldoc_options._)

Parameter Make_ocamldoc_options._

include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _short_paths : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _impl : string -> unit
val _intf : string -> unit
val _intf_suffix : string -> unit
val _pp : string -> unit
val _thread : unit -> unit
val _v : unit -> unit
val _verbose : unit -> unit
val _vmthread : unit -> unit
diff --git a/findlib-0/compiler-libs/Main_args/Make_ocamldoc_options/index.html b/findlib-0/compiler-libs/Main_args/Make_ocamldoc_options/index.html new file mode 100644 index 000000000..b2c5cccf0 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/Make_ocamldoc_options/index.html @@ -0,0 +1,2 @@ + +Make_ocamldoc_options (docs.findlib-0.compiler-libs.Main_args.Make_ocamldoc_options)

Module Main_args.Make_ocamldoc_options

Parameters

Signature

val list : (string * Arg.spec * string) list
diff --git a/findlib-0/compiler-libs/Main_args/Make_optcomp_options/argument-1-_/index.html b/findlib-0/compiler-libs/Main_args/Make_optcomp_options/argument-1-_/index.html new file mode 100644 index 000000000..b1b2d425f --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/Make_optcomp_options/argument-1-_/index.html @@ -0,0 +1,2 @@ + +_ (docs.findlib-0.compiler-libs.Main_args.Make_optcomp_options._)

Parameter Make_optcomp_options._

include Core_options
include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _nopervasives : unit -> unit
val _unsafe : unit -> unit
val _warn_error : string -> unit
val _warn_help : unit -> unit
val _dno_unique_ids : unit -> unit
val _dunique_ids : unit -> unit
val _dno_locations : unit -> unit
val _dlocations : unit -> unit
val _dsource : unit -> unit
val _dparsetree : unit -> unit
val _dtypedtree : unit -> unit
val _dshape : unit -> unit
val _drawlambda : unit -> unit
val _dlambda : unit -> unit
include Compiler_options
val _a : unit -> unit
val _annot : unit -> unit
val _binannot : unit -> unit
val _c : unit -> unit
val _cc : string -> unit
val _cclib : string -> unit
val _ccopt : string -> unit
val _cmi_file : string -> unit
val _config : unit -> unit
val _config_var : string -> unit
val _for_pack : string -> unit
val _g : unit -> unit
val _no_g : unit -> unit
val _stop_after : string -> unit
val _i : unit -> unit
val _impl : string -> unit
val _intf : string -> unit
val _intf_suffix : string -> unit
val _keep_docs : unit -> unit
val _no_keep_docs : unit -> unit
val _keep_locs : unit -> unit
val _no_keep_locs : unit -> unit
val _linkall : unit -> unit
val _o : string -> unit
val _opaque : unit -> unit
val _output_obj : unit -> unit
val _output_complete_obj : unit -> unit
val _pack : unit -> unit
val _plugin : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _runtime_variant : string -> unit
val _with_runtime : unit -> unit
val _without_runtime : unit -> unit
val _short_paths : unit -> unit
val _thread : unit -> unit
val _v : unit -> unit
val _verbose : unit -> unit
val _where : unit -> unit
val _color : string -> unit
val _error_style : string -> unit
val _match_context_rows : int -> unit
val _dtimings : unit -> unit
val _dprofile : unit -> unit
val _dump_into_file : unit -> unit
val _dump_dir : string -> unit
val _args : string -> string array
val _args0 : string -> string array
include Optcommon_options
val _compact : unit -> unit
val _inline : string -> unit
val _inline_toplevel : string -> unit
val _inlining_report : unit -> unit
val _dump_pass : string -> unit
val _inline_max_depth : string -> unit
val _rounds : int -> unit
val _inline_max_unroll : string -> unit
val _classic_inlining : unit -> unit
val _inline_call_cost : string -> unit
val _inline_alloc_cost : string -> unit
val _inline_prim_cost : string -> unit
val _inline_branch_cost : string -> unit
val _inline_indirect_cost : string -> unit
val _inline_lifting_benefit : string -> unit
val _unbox_closures : unit -> unit
val _unbox_closures_factor : int -> unit
val _inline_branch_factor : string -> unit
val _remove_unused_arguments : unit -> unit
val _no_unbox_free_vars_of_closures : unit -> unit
val _no_unbox_specialised_args : unit -> unit
val _o2 : unit -> unit
val _o3 : unit -> unit
val _insn_sched : unit -> unit
val _no_insn_sched : unit -> unit
val _linscan : unit -> unit
val _no_float_const_prop : unit -> unit
val _clambda_checks : unit -> unit
val _dflambda : unit -> unit
val _drawflambda : unit -> unit
val _dflambda_invariants : unit -> unit
val _dflambda_no_invariants : unit -> unit
val _dflambda_let : int -> unit
val _dflambda_verbose : unit -> unit
val _drawclambda : unit -> unit
val _dclambda : unit -> unit
val _dcmm_invariants : unit -> unit
val _dcmm : unit -> unit
val _dsel : unit -> unit
val _dcombine : unit -> unit
val _dcse : unit -> unit
val _dlive : unit -> unit
val _dspill : unit -> unit
val _dsplit : unit -> unit
val _dinterf : unit -> unit
val _dprefer : unit -> unit
val _dalloc : unit -> unit
val _dreload : unit -> unit
val _dscheduling : unit -> unit
val _dlinear : unit -> unit
val _dinterval : unit -> unit
val _dstartup : unit -> unit
val _p : unit -> unit
val _pp : string -> unit
val _S : unit -> unit
val _shared : unit -> unit
val _afl_instrument : unit -> unit
val _afl_inst_ratio : int -> unit
val _function_sections : unit -> unit
val _save_ir_after : string -> unit
diff --git a/findlib-0/compiler-libs/Main_args/Make_optcomp_options/index.html b/findlib-0/compiler-libs/Main_args/Make_optcomp_options/index.html new file mode 100644 index 000000000..d498cc423 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/Make_optcomp_options/index.html @@ -0,0 +1,2 @@ + +Make_optcomp_options (docs.findlib-0.compiler-libs.Main_args.Make_optcomp_options)

Module Main_args.Make_optcomp_options

Parameters

Signature

val list : (string * Arg.spec * string) list
diff --git a/findlib-0/compiler-libs/Main_args/Make_opttop_options/argument-1-_/index.html b/findlib-0/compiler-libs/Main_args/Make_opttop_options/argument-1-_/index.html new file mode 100644 index 000000000..0b4013770 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/Make_opttop_options/argument-1-_/index.html @@ -0,0 +1,2 @@ + +_ (docs.findlib-0.compiler-libs.Main_args.Make_opttop_options._)

Parameter Make_opttop_options._

include Toplevel_options
include Core_options
include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _short_paths : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _nopervasives : unit -> unit
val _unsafe : unit -> unit
val _warn_error : string -> unit
val _warn_help : unit -> unit
val _dno_unique_ids : unit -> unit
val _dunique_ids : unit -> unit
val _dno_locations : unit -> unit
val _dlocations : unit -> unit
val _dsource : unit -> unit
val _dparsetree : unit -> unit
val _dtypedtree : unit -> unit
val _dshape : unit -> unit
val _drawlambda : unit -> unit
val _dlambda : unit -> unit
val _init : string -> unit
val _noinit : unit -> unit
val _no_version : unit -> unit
val _noprompt : unit -> unit
val _nopromptcont : unit -> unit
val _stdin : unit -> unit
val _args : string -> string array
val _args0 : string -> string array
val _color : string -> unit
val _error_style : string -> unit
val _eval : string -> unit
include Optcommon_options
val _compact : unit -> unit
val _inline : string -> unit
val _inline_toplevel : string -> unit
val _inlining_report : unit -> unit
val _dump_pass : string -> unit
val _inline_max_depth : string -> unit
val _rounds : int -> unit
val _inline_max_unroll : string -> unit
val _classic_inlining : unit -> unit
val _inline_call_cost : string -> unit
val _inline_alloc_cost : string -> unit
val _inline_prim_cost : string -> unit
val _inline_branch_cost : string -> unit
val _inline_indirect_cost : string -> unit
val _inline_lifting_benefit : string -> unit
val _unbox_closures : unit -> unit
val _unbox_closures_factor : int -> unit
val _inline_branch_factor : string -> unit
val _remove_unused_arguments : unit -> unit
val _no_unbox_free_vars_of_closures : unit -> unit
val _no_unbox_specialised_args : unit -> unit
val _o2 : unit -> unit
val _o3 : unit -> unit
val _insn_sched : unit -> unit
val _no_insn_sched : unit -> unit
val _linscan : unit -> unit
val _no_float_const_prop : unit -> unit
val _clambda_checks : unit -> unit
val _dflambda : unit -> unit
val _drawflambda : unit -> unit
val _dflambda_invariants : unit -> unit
val _dflambda_no_invariants : unit -> unit
val _dflambda_let : int -> unit
val _dflambda_verbose : unit -> unit
val _drawclambda : unit -> unit
val _dclambda : unit -> unit
val _dcmm_invariants : unit -> unit
val _dcmm : unit -> unit
val _dsel : unit -> unit
val _dcombine : unit -> unit
val _dcse : unit -> unit
val _dlive : unit -> unit
val _dspill : unit -> unit
val _dsplit : unit -> unit
val _dinterf : unit -> unit
val _dprefer : unit -> unit
val _dalloc : unit -> unit
val _dreload : unit -> unit
val _dscheduling : unit -> unit
val _dlinear : unit -> unit
val _dinterval : unit -> unit
val _dstartup : unit -> unit
val _verbose : unit -> unit
val _S : unit -> unit
diff --git a/findlib-0/compiler-libs/Main_args/Make_opttop_options/index.html b/findlib-0/compiler-libs/Main_args/Make_opttop_options/index.html new file mode 100644 index 000000000..8adc59bcd --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/Make_opttop_options/index.html @@ -0,0 +1,2 @@ + +Make_opttop_options (docs.findlib-0.compiler-libs.Main_args.Make_opttop_options)

Module Main_args.Make_opttop_options

Parameters

module _ : Opttop_options

Signature

val list : (string * Arg.spec * string) list
diff --git a/findlib-0/compiler-libs/Main_args/index.html b/findlib-0/compiler-libs/Main_args/index.html new file mode 100644 index 000000000..c648e8425 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/index.html @@ -0,0 +1,5 @@ + +Main_args (docs.findlib-0.compiler-libs.Main_args)

Module Main_args

module type Common_options = sig ... end
module type Core_options = sig ... end
module type Compiler_options = sig ... end
module type Toplevel_options = sig ... end
module type Bytecomp_options = sig ... end
module type Bytetop_options = sig ... end
module type Optcommon_options = sig ... end
module type Optcomp_options = sig ... end
module type Opttop_options = sig ... end
module type Ocamldoc_options = sig ... end
module type Arg_list = sig ... end
val options_with_command_line_syntax : + (string * Arg.spec * string) list -> + string list ref -> + (string * Arg.spec * string) list

options_with_command_line_syntax options r returns options2 that behaves like options, but additionally pushes command line argument on r (quoted by Filename.quote when necessary). This is meant for ocamlc,optp, which use this to forward most of their arguments to ocamlc,opt.

module Default : sig ... end
diff --git a/findlib-0/compiler-libs/Main_args/module-type-Arg_list/index.html b/findlib-0/compiler-libs/Main_args/module-type-Arg_list/index.html new file mode 100644 index 000000000..fde592d59 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/module-type-Arg_list/index.html @@ -0,0 +1,2 @@ + +Arg_list (docs.findlib-0.compiler-libs.Main_args.Arg_list)

Module type Main_args.Arg_list

val list : (string * Arg.spec * string) list
diff --git a/findlib-0/compiler-libs/Main_args/module-type-Bytecomp_options/index.html b/findlib-0/compiler-libs/Main_args/module-type-Bytecomp_options/index.html new file mode 100644 index 000000000..1159c71c4 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/module-type-Bytecomp_options/index.html @@ -0,0 +1,2 @@ + +Bytecomp_options (docs.findlib-0.compiler-libs.Main_args.Bytecomp_options)

Module type Main_args.Bytecomp_options

include Core_options
include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _nopervasives : unit -> unit
val _unsafe : unit -> unit
val _warn_error : string -> unit
val _warn_help : unit -> unit
val _dno_unique_ids : unit -> unit
val _dunique_ids : unit -> unit
val _dno_locations : unit -> unit
val _dlocations : unit -> unit
val _dsource : unit -> unit
val _dparsetree : unit -> unit
val _dtypedtree : unit -> unit
val _dshape : unit -> unit
val _drawlambda : unit -> unit
val _dlambda : unit -> unit
include Compiler_options
val _a : unit -> unit
val _annot : unit -> unit
val _binannot : unit -> unit
val _c : unit -> unit
val _cc : string -> unit
val _cclib : string -> unit
val _ccopt : string -> unit
val _cmi_file : string -> unit
val _config : unit -> unit
val _config_var : string -> unit
val _for_pack : string -> unit
val _g : unit -> unit
val _no_g : unit -> unit
val _stop_after : string -> unit
val _i : unit -> unit
val _impl : string -> unit
val _intf : string -> unit
val _intf_suffix : string -> unit
val _keep_docs : unit -> unit
val _no_keep_docs : unit -> unit
val _keep_locs : unit -> unit
val _no_keep_locs : unit -> unit
val _linkall : unit -> unit
val _o : string -> unit
val _opaque : unit -> unit
val _output_obj : unit -> unit
val _output_complete_obj : unit -> unit
val _pack : unit -> unit
val _plugin : string -> unit
val _pp : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _runtime_variant : string -> unit
val _with_runtime : unit -> unit
val _without_runtime : unit -> unit
val _short_paths : unit -> unit
val _thread : unit -> unit
val _v : unit -> unit
val _verbose : unit -> unit
val _where : unit -> unit
val _color : string -> unit
val _error_style : string -> unit
val _match_context_rows : int -> unit
val _dtimings : unit -> unit
val _dprofile : unit -> unit
val _dump_into_file : unit -> unit
val _dump_dir : string -> unit
val _args : string -> string array
val _args0 : string -> string array
val _compat_32 : unit -> unit
val _custom : unit -> unit
val _no_check_prims : unit -> unit
val _dllib : string -> unit
val _dllpath : string -> unit
val _make_runtime : unit -> unit
val _vmthread : unit -> unit
val _use_runtime : string -> unit
val _output_complete_exe : unit -> unit
val _dinstr : unit -> unit
val _dcamlprimc : unit -> unit
val _use_prims : string -> unit
diff --git a/findlib-0/compiler-libs/Main_args/module-type-Bytetop_options/index.html b/findlib-0/compiler-libs/Main_args/module-type-Bytetop_options/index.html new file mode 100644 index 000000000..5a367737b --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/module-type-Bytetop_options/index.html @@ -0,0 +1,2 @@ + +Bytetop_options (docs.findlib-0.compiler-libs.Main_args.Bytetop_options)

Module type Main_args.Bytetop_options

include Toplevel_options
include Core_options
include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _short_paths : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _nopervasives : unit -> unit
val _unsafe : unit -> unit
val _warn_error : string -> unit
val _warn_help : unit -> unit
val _dno_unique_ids : unit -> unit
val _dunique_ids : unit -> unit
val _dno_locations : unit -> unit
val _dlocations : unit -> unit
val _dsource : unit -> unit
val _dparsetree : unit -> unit
val _dtypedtree : unit -> unit
val _dshape : unit -> unit
val _drawlambda : unit -> unit
val _dlambda : unit -> unit
val _init : string -> unit
val _noinit : unit -> unit
val _no_version : unit -> unit
val _noprompt : unit -> unit
val _nopromptcont : unit -> unit
val _stdin : unit -> unit
val _args : string -> string array
val _args0 : string -> string array
val _color : string -> unit
val _error_style : string -> unit
val _eval : string -> unit
val _dinstr : unit -> unit
diff --git a/findlib-0/compiler-libs/Main_args/module-type-Common_options/index.html b/findlib-0/compiler-libs/Main_args/module-type-Common_options/index.html new file mode 100644 index 000000000..a2bf391dd --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/module-type-Common_options/index.html @@ -0,0 +1,2 @@ + +Common_options (docs.findlib-0.compiler-libs.Main_args.Common_options)

Module type Main_args.Common_options

val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _short_paths : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
diff --git a/findlib-0/compiler-libs/Main_args/module-type-Compiler_options/index.html b/findlib-0/compiler-libs/Main_args/module-type-Compiler_options/index.html new file mode 100644 index 000000000..f5c39c227 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/module-type-Compiler_options/index.html @@ -0,0 +1,2 @@ + +Compiler_options (docs.findlib-0.compiler-libs.Main_args.Compiler_options)

Module type Main_args.Compiler_options

val _a : unit -> unit
val _annot : unit -> unit
val _binannot : unit -> unit
val _c : unit -> unit
val _cc : string -> unit
val _cclib : string -> unit
val _ccopt : string -> unit
val _cmi_file : string -> unit
val _config : unit -> unit
val _config_var : string -> unit
val _for_pack : string -> unit
val _g : unit -> unit
val _no_g : unit -> unit
val _stop_after : string -> unit
val _i : unit -> unit
val _impl : string -> unit
val _intf : string -> unit
val _intf_suffix : string -> unit
val _keep_docs : unit -> unit
val _no_keep_docs : unit -> unit
val _keep_locs : unit -> unit
val _no_keep_locs : unit -> unit
val _linkall : unit -> unit
val _o : string -> unit
val _opaque : unit -> unit
val _output_obj : unit -> unit
val _output_complete_obj : unit -> unit
val _pack : unit -> unit
val _plugin : string -> unit
val _pp : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _runtime_variant : string -> unit
val _with_runtime : unit -> unit
val _without_runtime : unit -> unit
val _short_paths : unit -> unit
val _thread : unit -> unit
val _v : unit -> unit
val _verbose : unit -> unit
val _where : unit -> unit
val _color : string -> unit
val _error_style : string -> unit
val _match_context_rows : int -> unit
val _dtimings : unit -> unit
val _dprofile : unit -> unit
val _dump_into_file : unit -> unit
val _dump_dir : string -> unit
val _args : string -> string array
val _args0 : string -> string array
diff --git a/findlib-0/compiler-libs/Main_args/module-type-Core_options/index.html b/findlib-0/compiler-libs/Main_args/module-type-Core_options/index.html new file mode 100644 index 000000000..960f61e40 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/module-type-Core_options/index.html @@ -0,0 +1,2 @@ + +Core_options (docs.findlib-0.compiler-libs.Main_args.Core_options)

Module type Main_args.Core_options

include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _short_paths : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _nopervasives : unit -> unit
val _unsafe : unit -> unit
val _warn_error : string -> unit
val _warn_help : unit -> unit
val _dno_unique_ids : unit -> unit
val _dunique_ids : unit -> unit
val _dno_locations : unit -> unit
val _dlocations : unit -> unit
val _dsource : unit -> unit
val _dparsetree : unit -> unit
val _dtypedtree : unit -> unit
val _dshape : unit -> unit
val _drawlambda : unit -> unit
val _dlambda : unit -> unit
diff --git a/findlib-0/compiler-libs/Main_args/module-type-Ocamldoc_options/index.html b/findlib-0/compiler-libs/Main_args/module-type-Ocamldoc_options/index.html new file mode 100644 index 000000000..296d22ea6 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/module-type-Ocamldoc_options/index.html @@ -0,0 +1,2 @@ + +Ocamldoc_options (docs.findlib-0.compiler-libs.Main_args.Ocamldoc_options)

Module type Main_args.Ocamldoc_options

include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _short_paths : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _impl : string -> unit
val _intf : string -> unit
val _intf_suffix : string -> unit
val _pp : string -> unit
val _thread : unit -> unit
val _v : unit -> unit
val _verbose : unit -> unit
val _vmthread : unit -> unit
diff --git a/findlib-0/compiler-libs/Main_args/module-type-Optcommon_options/index.html b/findlib-0/compiler-libs/Main_args/module-type-Optcommon_options/index.html new file mode 100644 index 000000000..3e9b8e109 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/module-type-Optcommon_options/index.html @@ -0,0 +1,2 @@ + +Optcommon_options (docs.findlib-0.compiler-libs.Main_args.Optcommon_options)

Module type Main_args.Optcommon_options

val _compact : unit -> unit
val _inline : string -> unit
val _inline_toplevel : string -> unit
val _inlining_report : unit -> unit
val _dump_pass : string -> unit
val _inline_max_depth : string -> unit
val _rounds : int -> unit
val _inline_max_unroll : string -> unit
val _classic_inlining : unit -> unit
val _inline_call_cost : string -> unit
val _inline_alloc_cost : string -> unit
val _inline_prim_cost : string -> unit
val _inline_branch_cost : string -> unit
val _inline_indirect_cost : string -> unit
val _inline_lifting_benefit : string -> unit
val _unbox_closures : unit -> unit
val _unbox_closures_factor : int -> unit
val _inline_branch_factor : string -> unit
val _remove_unused_arguments : unit -> unit
val _no_unbox_free_vars_of_closures : unit -> unit
val _no_unbox_specialised_args : unit -> unit
val _o2 : unit -> unit
val _o3 : unit -> unit
val _insn_sched : unit -> unit
val _no_insn_sched : unit -> unit
val _linscan : unit -> unit
val _no_float_const_prop : unit -> unit
val _clambda_checks : unit -> unit
val _dflambda : unit -> unit
val _drawflambda : unit -> unit
val _dflambda_invariants : unit -> unit
val _dflambda_no_invariants : unit -> unit
val _dflambda_let : int -> unit
val _dflambda_verbose : unit -> unit
val _drawclambda : unit -> unit
val _dclambda : unit -> unit
val _dcmm_invariants : unit -> unit
val _dcmm : unit -> unit
val _dsel : unit -> unit
val _dcombine : unit -> unit
val _dcse : unit -> unit
val _dlive : unit -> unit
val _dspill : unit -> unit
val _dsplit : unit -> unit
val _dinterf : unit -> unit
val _dprefer : unit -> unit
val _dalloc : unit -> unit
val _dreload : unit -> unit
val _dscheduling : unit -> unit
val _dlinear : unit -> unit
val _dinterval : unit -> unit
val _dstartup : unit -> unit
diff --git a/findlib-0/compiler-libs/Main_args/module-type-Optcomp_options/index.html b/findlib-0/compiler-libs/Main_args/module-type-Optcomp_options/index.html new file mode 100644 index 000000000..3e086d1e8 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/module-type-Optcomp_options/index.html @@ -0,0 +1,2 @@ + +Optcomp_options (docs.findlib-0.compiler-libs.Main_args.Optcomp_options)

Module type Main_args.Optcomp_options

include Core_options
include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _nopervasives : unit -> unit
val _unsafe : unit -> unit
val _warn_error : string -> unit
val _warn_help : unit -> unit
val _dno_unique_ids : unit -> unit
val _dunique_ids : unit -> unit
val _dno_locations : unit -> unit
val _dlocations : unit -> unit
val _dsource : unit -> unit
val _dparsetree : unit -> unit
val _dtypedtree : unit -> unit
val _dshape : unit -> unit
val _drawlambda : unit -> unit
val _dlambda : unit -> unit
include Compiler_options
val _a : unit -> unit
val _annot : unit -> unit
val _binannot : unit -> unit
val _c : unit -> unit
val _cc : string -> unit
val _cclib : string -> unit
val _ccopt : string -> unit
val _cmi_file : string -> unit
val _config : unit -> unit
val _config_var : string -> unit
val _for_pack : string -> unit
val _g : unit -> unit
val _no_g : unit -> unit
val _stop_after : string -> unit
val _i : unit -> unit
val _impl : string -> unit
val _intf : string -> unit
val _intf_suffix : string -> unit
val _keep_docs : unit -> unit
val _no_keep_docs : unit -> unit
val _keep_locs : unit -> unit
val _no_keep_locs : unit -> unit
val _linkall : unit -> unit
val _o : string -> unit
val _opaque : unit -> unit
val _output_obj : unit -> unit
val _output_complete_obj : unit -> unit
val _pack : unit -> unit
val _plugin : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _runtime_variant : string -> unit
val _with_runtime : unit -> unit
val _without_runtime : unit -> unit
val _short_paths : unit -> unit
val _thread : unit -> unit
val _v : unit -> unit
val _verbose : unit -> unit
val _where : unit -> unit
val _color : string -> unit
val _error_style : string -> unit
val _match_context_rows : int -> unit
val _dtimings : unit -> unit
val _dprofile : unit -> unit
val _dump_into_file : unit -> unit
val _dump_dir : string -> unit
val _args : string -> string array
val _args0 : string -> string array
include Optcommon_options
val _compact : unit -> unit
val _inline : string -> unit
val _inline_toplevel : string -> unit
val _inlining_report : unit -> unit
val _dump_pass : string -> unit
val _inline_max_depth : string -> unit
val _rounds : int -> unit
val _inline_max_unroll : string -> unit
val _classic_inlining : unit -> unit
val _inline_call_cost : string -> unit
val _inline_alloc_cost : string -> unit
val _inline_prim_cost : string -> unit
val _inline_branch_cost : string -> unit
val _inline_indirect_cost : string -> unit
val _inline_lifting_benefit : string -> unit
val _unbox_closures : unit -> unit
val _unbox_closures_factor : int -> unit
val _inline_branch_factor : string -> unit
val _remove_unused_arguments : unit -> unit
val _no_unbox_free_vars_of_closures : unit -> unit
val _no_unbox_specialised_args : unit -> unit
val _o2 : unit -> unit
val _o3 : unit -> unit
val _insn_sched : unit -> unit
val _no_insn_sched : unit -> unit
val _linscan : unit -> unit
val _no_float_const_prop : unit -> unit
val _clambda_checks : unit -> unit
val _dflambda : unit -> unit
val _drawflambda : unit -> unit
val _dflambda_invariants : unit -> unit
val _dflambda_no_invariants : unit -> unit
val _dflambda_let : int -> unit
val _dflambda_verbose : unit -> unit
val _drawclambda : unit -> unit
val _dclambda : unit -> unit
val _dcmm_invariants : unit -> unit
val _dcmm : unit -> unit
val _dsel : unit -> unit
val _dcombine : unit -> unit
val _dcse : unit -> unit
val _dlive : unit -> unit
val _dspill : unit -> unit
val _dsplit : unit -> unit
val _dinterf : unit -> unit
val _dprefer : unit -> unit
val _dalloc : unit -> unit
val _dreload : unit -> unit
val _dscheduling : unit -> unit
val _dlinear : unit -> unit
val _dinterval : unit -> unit
val _dstartup : unit -> unit
val _p : unit -> unit
val _pp : string -> unit
val _S : unit -> unit
val _shared : unit -> unit
val _afl_instrument : unit -> unit
val _afl_inst_ratio : int -> unit
val _function_sections : unit -> unit
val _save_ir_after : string -> unit
diff --git a/findlib-0/compiler-libs/Main_args/module-type-Opttop_options/index.html b/findlib-0/compiler-libs/Main_args/module-type-Opttop_options/index.html new file mode 100644 index 000000000..2e2affdb5 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/module-type-Opttop_options/index.html @@ -0,0 +1,2 @@ + +Opttop_options (docs.findlib-0.compiler-libs.Main_args.Opttop_options)

Module type Main_args.Opttop_options

include Toplevel_options
include Core_options
include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _short_paths : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _nopervasives : unit -> unit
val _unsafe : unit -> unit
val _warn_error : string -> unit
val _warn_help : unit -> unit
val _dno_unique_ids : unit -> unit
val _dunique_ids : unit -> unit
val _dno_locations : unit -> unit
val _dlocations : unit -> unit
val _dsource : unit -> unit
val _dparsetree : unit -> unit
val _dtypedtree : unit -> unit
val _dshape : unit -> unit
val _drawlambda : unit -> unit
val _dlambda : unit -> unit
val _init : string -> unit
val _noinit : unit -> unit
val _no_version : unit -> unit
val _noprompt : unit -> unit
val _nopromptcont : unit -> unit
val _stdin : unit -> unit
val _args : string -> string array
val _args0 : string -> string array
val _color : string -> unit
val _error_style : string -> unit
val _eval : string -> unit
include Optcommon_options
val _compact : unit -> unit
val _inline : string -> unit
val _inline_toplevel : string -> unit
val _inlining_report : unit -> unit
val _dump_pass : string -> unit
val _inline_max_depth : string -> unit
val _rounds : int -> unit
val _inline_max_unroll : string -> unit
val _classic_inlining : unit -> unit
val _inline_call_cost : string -> unit
val _inline_alloc_cost : string -> unit
val _inline_prim_cost : string -> unit
val _inline_branch_cost : string -> unit
val _inline_indirect_cost : string -> unit
val _inline_lifting_benefit : string -> unit
val _unbox_closures : unit -> unit
val _unbox_closures_factor : int -> unit
val _inline_branch_factor : string -> unit
val _remove_unused_arguments : unit -> unit
val _no_unbox_free_vars_of_closures : unit -> unit
val _no_unbox_specialised_args : unit -> unit
val _o2 : unit -> unit
val _o3 : unit -> unit
val _insn_sched : unit -> unit
val _no_insn_sched : unit -> unit
val _linscan : unit -> unit
val _no_float_const_prop : unit -> unit
val _clambda_checks : unit -> unit
val _dflambda : unit -> unit
val _drawflambda : unit -> unit
val _dflambda_invariants : unit -> unit
val _dflambda_no_invariants : unit -> unit
val _dflambda_let : int -> unit
val _dflambda_verbose : unit -> unit
val _drawclambda : unit -> unit
val _dclambda : unit -> unit
val _dcmm_invariants : unit -> unit
val _dcmm : unit -> unit
val _dsel : unit -> unit
val _dcombine : unit -> unit
val _dcse : unit -> unit
val _dlive : unit -> unit
val _dspill : unit -> unit
val _dsplit : unit -> unit
val _dinterf : unit -> unit
val _dprefer : unit -> unit
val _dalloc : unit -> unit
val _dreload : unit -> unit
val _dscheduling : unit -> unit
val _dlinear : unit -> unit
val _dinterval : unit -> unit
val _dstartup : unit -> unit
val _verbose : unit -> unit
val _S : unit -> unit
diff --git a/findlib-0/compiler-libs/Main_args/module-type-Toplevel_options/index.html b/findlib-0/compiler-libs/Main_args/module-type-Toplevel_options/index.html new file mode 100644 index 000000000..8ec76f981 --- /dev/null +++ b/findlib-0/compiler-libs/Main_args/module-type-Toplevel_options/index.html @@ -0,0 +1,2 @@ + +Toplevel_options (docs.findlib-0.compiler-libs.Main_args.Toplevel_options)

Module type Main_args.Toplevel_options

include Core_options
include Common_options
val _absname : unit -> unit
val _no_absname : unit -> unit
val _alert : string -> unit
val _I : string -> unit
val _labels : unit -> unit
val _alias_deps : unit -> unit
val _no_alias_deps : unit -> unit
val _app_funct : unit -> unit
val _no_app_funct : unit -> unit
val _noassert : unit -> unit
val _nolabels : unit -> unit
val _nostdlib : unit -> unit
val _nocwd : unit -> unit
val _open : string -> unit
val _ppx : string -> unit
val _principal : unit -> unit
val _no_principal : unit -> unit
val _rectypes : unit -> unit
val _no_rectypes : unit -> unit
val _safer_matching : unit -> unit
val _short_paths : unit -> unit
val _strict_sequence : unit -> unit
val _no_strict_sequence : unit -> unit
val _strict_formats : unit -> unit
val _no_strict_formats : unit -> unit
val _unboxed_types : unit -> unit
val _no_unboxed_types : unit -> unit
val _version : unit -> unit
val _vnum : unit -> unit
val _w : string -> unit
val anonymous : string -> unit
val _nopervasives : unit -> unit
val _unsafe : unit -> unit
val _warn_error : string -> unit
val _warn_help : unit -> unit
val _dno_unique_ids : unit -> unit
val _dunique_ids : unit -> unit
val _dno_locations : unit -> unit
val _dlocations : unit -> unit
val _dsource : unit -> unit
val _dparsetree : unit -> unit
val _dtypedtree : unit -> unit
val _dshape : unit -> unit
val _drawlambda : unit -> unit
val _dlambda : unit -> unit
val _init : string -> unit
val _noinit : unit -> unit
val _no_version : unit -> unit
val _noprompt : unit -> unit
val _nopromptcont : unit -> unit
val _stdin : unit -> unit
val _args : string -> string array
val _args0 : string -> string array
val _color : string -> unit
val _error_style : string -> unit
val _eval : string -> unit
diff --git a/findlib-0/compiler-libs/Maindriver/index.html b/findlib-0/compiler-libs/Maindriver/index.html new file mode 100644 index 000000000..68634f195 --- /dev/null +++ b/findlib-0/compiler-libs/Maindriver/index.html @@ -0,0 +1,2 @@ + +Maindriver (docs.findlib-0.compiler-libs.Maindriver)

Module Maindriver

val main : string array -> Format.formatter -> int
diff --git a/findlib-0/compiler-libs/Makedepend/index.html b/findlib-0/compiler-libs/Makedepend/index.html new file mode 100644 index 000000000..7d8c4ba7a --- /dev/null +++ b/findlib-0/compiler-libs/Makedepend/index.html @@ -0,0 +1,2 @@ + +Makedepend (docs.findlib-0.compiler-libs.Makedepend)

Module Makedepend

val main : unit -> unit
val main_from_option : unit -> unit
diff --git a/findlib-0/compiler-libs/Matching/index.html b/findlib-0/compiler-libs/Matching/index.html new file mode 100644 index 000000000..429b069b4 --- /dev/null +++ b/findlib-0/compiler-libs/Matching/index.html @@ -0,0 +1,40 @@ + +Matching (docs.findlib-0.compiler-libs.Matching)

Module Matching

val for_function : + scopes:Debuginfo.Scoped_location.scopes -> + Location.t -> + int ref option -> + Lambda.lambda -> + (Typedtree.pattern * Lambda.lambda) list -> + Typedtree.partial -> + Lambda.lambda
val for_multiple_match : + scopes:Debuginfo.Scoped_location.scopes -> + Location.t -> + Lambda.lambda list -> + (Typedtree.pattern * Lambda.lambda) list -> + Typedtree.partial -> + Lambda.lambda
val for_tupled_function : + scopes:Debuginfo.Scoped_location.scopes -> + Location.t -> + Ident.t list -> + (Typedtree.pattern list * Lambda.lambda) list -> + Typedtree.partial -> + Lambda.lambda
exception Cannot_flatten
val flatten_pattern : int -> Typedtree.pattern -> Typedtree.pattern list
val expand_stringswitch : + Lambda.scoped_location -> + Lambda.lambda -> + (string * Lambda.lambda) list -> + Lambda.lambda option -> + Lambda.lambda
val inline_lazy_force : + Lambda.lambda -> + Lambda.scoped_location -> + Lambda.lambda
diff --git a/findlib-0/compiler-libs/Meta/index.html b/findlib-0/compiler-libs/Meta/index.html new file mode 100644 index 000000000..6139d389c --- /dev/null +++ b/findlib-0/compiler-libs/Meta/index.html @@ -0,0 +1,6 @@ + +Meta (docs.findlib-0.compiler-libs.Meta)

Module Meta

val global_data : unit -> Obj.t array
val realloc_global_data : int -> unit
type closure = unit -> Obj.t
type bytecode
val reify_bytecode : + bytes array -> + Instruct.debug_event list array -> + string option -> + bytecode * closure
val release_bytecode : bytecode -> unit
val invoke_traced_function : Obj.raw_data -> Obj.t -> Obj.t -> Obj.t
val get_section_table : unit -> (string * Obj.t) list
diff --git a/findlib-0/compiler-libs/Misc/Color/index.html b/findlib-0/compiler-libs/Misc/Color/index.html new file mode 100644 index 000000000..678bee721 --- /dev/null +++ b/findlib-0/compiler-libs/Misc/Color/index.html @@ -0,0 +1,2 @@ + +Color (docs.findlib-0.compiler-libs.Misc.Color)

Module Misc.Color

type color =
  1. | Black
  2. | Red
  3. | Green
  4. | Yellow
  5. | Blue
  6. | Magenta
  7. | Cyan
  8. | White
type style =
  1. | FG of color
  2. | BG of color
  3. | Bold
  4. | Reset
type Format.stag +=
  1. | Style of style list
val ansi_of_style_l : style list -> string
type styles = {
  1. error : style list;
  2. warning : style list;
  3. loc : style list;
  4. hint : style list;
}
val default_styles : styles
val get_styles : unit -> styles
val set_styles : styles -> unit
type setting =
  1. | Auto
  2. | Always
  3. | Never
val default_setting : setting
val setup : setting option -> unit
val set_color_tag_handling : Format.formatter -> unit
diff --git a/findlib-0/compiler-libs/Misc/Error_style/index.html b/findlib-0/compiler-libs/Misc/Error_style/index.html new file mode 100644 index 000000000..c4611b657 --- /dev/null +++ b/findlib-0/compiler-libs/Misc/Error_style/index.html @@ -0,0 +1,2 @@ + +Error_style (docs.findlib-0.compiler-libs.Misc.Error_style)

Module Misc.Error_style

type setting =
  1. | Contextual
  2. | Short
val default_setting : setting
diff --git a/findlib-0/compiler-libs/Misc/Int_literal_converter/index.html b/findlib-0/compiler-libs/Misc/Int_literal_converter/index.html new file mode 100644 index 000000000..efc8497fa --- /dev/null +++ b/findlib-0/compiler-libs/Misc/Int_literal_converter/index.html @@ -0,0 +1,2 @@ + +Int_literal_converter (docs.findlib-0.compiler-libs.Misc.Int_literal_converter)

Module Misc.Int_literal_converter

val int : string -> int

Convert a string to an integer. Unlike Stdlib.int_of_string, this function accepts the string representation of max_int + 1 and returns min_int in this case.

val int32 : string -> int32

Likewise, at type int32

val int64 : string -> int64

Likewise, at type int64

val nativeint : string -> nativeint

Likewise, at type nativeint

diff --git a/findlib-0/compiler-libs/Misc/LongString/index.html b/findlib-0/compiler-libs/Misc/LongString/index.html new file mode 100644 index 000000000..a273acbf3 --- /dev/null +++ b/findlib-0/compiler-libs/Misc/LongString/index.html @@ -0,0 +1,2 @@ + +LongString (docs.findlib-0.compiler-libs.Misc.LongString)

Module Misc.LongString

type t = bytes array
val create : int -> t
val length : t -> int
val get : t -> int -> char
val set : t -> int -> char -> unit
val blit : t -> int -> t -> int -> int -> unit
val blit_string : string -> int -> t -> int -> int -> unit
val output : out_channel -> t -> int -> int -> unit
val input_bytes_into : t -> in_channel -> int -> unit
val input_bytes : in_channel -> int -> t
diff --git a/findlib-0/compiler-libs/Misc/Magic_number/index.html b/findlib-0/compiler-libs/Misc/Magic_number/index.html new file mode 100644 index 000000000..86ef1ab47 --- /dev/null +++ b/findlib-0/compiler-libs/Misc/Magic_number/index.html @@ -0,0 +1,17 @@ + +Magic_number (docs.findlib-0.compiler-libs.Misc.Magic_number)

Module Misc.Magic_number

a typical magic number is "Caml1999I011"; it is formed of an alphanumeric prefix, here Caml1990I, followed by a version, here 011. The prefix identifies the kind of the versioned data: here the I indicates that it is the magic number for .cmi files.

All magic numbers have the same byte length, magic_length, and this is important for users as it gives them the number of bytes to read to obtain the byte sequence that should be a magic number. Typical user code will look like:

let ic = open_in_bin path in
+let magic =
+  try really_input_string ic Magic_number.magic_length
+  with End_of_file -> ... in
+match Magic_number.parse magic with
+| Error parse_error -> ...
+| Ok info -> ...

A given compiler version expects one specific version for each kind of object file, and will fail if given an unsupported version. Because versions grow monotonically, you can compare the parsed version with the expected "current version" for a kind, to tell whether the wrong-magic object file comes from the past or from the future.

An example of code block that expects the "currently supported version" of a given kind of magic numbers, here Cmxa, is as follows:

let ic = open_in_bin path in
+begin
+  try Magic_number.(expect_current Cmxa (get_info ic)) with
+  | Parse_error error -> ...
+  | Unexpected error -> ...
+end;
+...

Parse errors distinguish inputs that are Not_a_magic_number str, which are likely to come from the file being completely different, and Truncated str, raised by headers that are the (possibly empty) prefix of a valid magic number.

Unexpected errors correspond to valid magic numbers that are not the one expected, either because it corresponds to a different kind, or to a newer or older version.

The helper functions explain_parse_error and explain_unexpected_error will generate a textual explanation of each error, for use in error messages.

type native_obj_config = {
  1. flambda : bool;
}

native object files have a format and magic number that depend on certain native-compiler configuration parameters. This configuration space is expressed by the native_obj_config type.

val native_obj_config : native_obj_config

the native object file configuration of the active/configured compiler.

type version = int
type kind =
  1. | Exec
  2. | Cmi
  3. | Cmo
  4. | Cma
  5. | Cmx of native_obj_config
  6. | Cmxa of native_obj_config
  7. | Cmxs
  8. | Cmt
  9. | Ast_impl
  10. | Ast_intf
type info = {
  1. kind : kind;
  2. version : version;
    (*

    Note: some versions of the compiler use the same version suffix for all kinds, but others use different versions counters for different kinds. We may only assume that versions are growing monotonically (not necessarily always by one) between compiler versions.

    *)
}
type raw = string

the type of raw magic numbers, such as "Caml1999A027" for the .cma files of OCaml 4.10

Parsing magic numbers

type parse_error =
  1. | Truncated of string
  2. | Not_a_magic_number of string
val explain_parse_error : kind option -> parse_error -> string

Produces an explanation for a parse error. If no kind is provided, we use an unspecific formulation suggesting that any compiler-produced object file would have been satisfying.

val parse : raw -> (info, parse_error) result

Parses a raw magic number

val read_info : in_channel -> (info, parse_error) result

Read a raw magic number from an input channel.

If the data read str is not a valid magic number, it can be recovered from the Truncated str | Not_a_magic_number str payload of the Error parse_error case.

If parsing succeeds with an Ok info result, we know that exactly magic_length bytes have been consumed from the input_channel.

If you also wish to enforce that the magic number is at the current version, see read_current_info below.

val magic_length : int

all magic numbers take the same number of bytes

Checking that magic numbers are current

type 'a unexpected = {
  1. expected : 'a;
  2. actual : 'a;
}
type unexpected_error =
  1. | Kind of kind unexpected
  2. | Version of kind * version unexpected
val check_current : kind -> info -> (unit, unexpected_error) result

check_current kind info checks that the provided magic info is the current version of kind's magic header.

val explain_unexpected_error : unexpected_error -> string

Provides an explanation of the unexpected_error.

type error =
  1. | Parse_error of parse_error
  2. | Unexpected_error of unexpected_error
val read_current_info : + expected_kind:kind option -> + in_channel -> + (info, error) result

Read a magic number as read_info, and check that it is the current version as its kind. If the expected_kind argument is None, any kind is accepted.

Information on magic numbers

val string_of_kind : kind -> string

a user-printable string for a kind, eg. "exec" or "cmo", to use in error messages.

val human_name_of_kind : kind -> string

a user-meaningful name for a kind, eg. "executable file" or "bytecode object file", to use in error messages.

val current_raw : kind -> raw

the current magic number of each kind

val current_version : kind -> version

the current version of each kind

Raw representations

Mainly for internal usage and testing.

type raw_kind = string

the type of raw magic numbers kinds, such as "Caml1999A" for .cma files

val parse_kind : raw_kind -> kind option

parse a raw kind into a kind

val raw_kind : kind -> raw_kind

the current raw representation of a kind.

In some cases the raw representation of a kind has changed over compiler versions, so other files of the same kind may have different raw kinds. Note that all currently known cases are parsed correctly by parse_kind.

val raw : info -> raw

A valid raw representation of the magic number.

Due to past and future changes in the string representation of magic numbers, we cannot guarantee that the raw strings returned for past and future versions actually match the expectations of those compilers. The representation is accurate for current versions, and it is correctly parsed back into the desired version by the parsing functions above.

val all_kinds : kind list
diff --git a/findlib-0/compiler-libs/Misc/Stdlib/Array/index.html b/findlib-0/compiler-libs/Misc/Stdlib/Array/index.html new file mode 100644 index 000000000..89eba36e5 --- /dev/null +++ b/findlib-0/compiler-libs/Misc/Stdlib/Array/index.html @@ -0,0 +1,2 @@ + +Array (docs.findlib-0.compiler-libs.Misc.Stdlib.Array)

Module Stdlib.Array

Extensions to the Array module

val exists2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool

Same as Array.exists2 from the standard library.

val for_alli : (int -> 'a -> bool) -> 'a array -> bool

Same as Array.for_all from the standard library, but the function is applied with the index of the element as first argument, and the element itself as second argument.

val all_somes : 'a option array -> 'a array option
diff --git a/findlib-0/compiler-libs/Misc/Stdlib/List/index.html b/findlib-0/compiler-libs/Misc/Stdlib/List/index.html new file mode 100644 index 000000000..fce5b005d --- /dev/null +++ b/findlib-0/compiler-libs/Misc/Stdlib/List/index.html @@ -0,0 +1,6 @@ + +List (docs.findlib-0.compiler-libs.Misc.Stdlib.List)

Module Stdlib.List

Extensions to the List module

type 'a t = 'a list
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

The lexicographic order supported by the provided order. There is no constraint on the relative lengths of the lists.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

Returns true if and only if the given lists have the same length and content with respect to the given equality function.

val some_if_all_elements_are_some : 'a option t -> 'a t option

If all elements of the given list are Some _ then Some xs is returned with the xs being the contents of those Somes, with order preserved. Otherwise return None.

val map2_prefix : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t * 'b t

let r1, r2 = map2_prefix f l1 l2 If l1 is of length n and l2 = h2 @ t2 with h2 of length n, r1 is List.map2 f l1 h1 and r2 is t2.

val split_at : int -> 'a t -> 'a t * 'a t

split_at n l returns the pair before, after where before is the n first elements of l and after the remaining ones. If l has less than n elements, raises Invalid_argument.

val is_prefix : equal:('a -> 'a -> bool) -> 'a list -> of_:'a list -> bool

Returns true if and only if the given list, with respect to the given equality function on list members, is a prefix of the list of_.

type 'a longest_common_prefix_result = private {
  1. longest_common_prefix : 'a list;
  2. first_without_longest_common_prefix : 'a list;
  3. second_without_longest_common_prefix : 'a list;
}
val find_and_chop_longest_common_prefix : + equal:('a -> 'a -> bool) -> + first:'a list -> + second:'a list -> + 'a longest_common_prefix_result

Returns the longest list that, with respect to the provided equality function, is a prefix of both of the given lists. The input lists, each with such longest common prefix removed, are also returned.

diff --git a/findlib-0/compiler-libs/Misc/Stdlib/Option/index.html b/findlib-0/compiler-libs/Misc/Stdlib/Option/index.html new file mode 100644 index 000000000..b30d8fa9e --- /dev/null +++ b/findlib-0/compiler-libs/Misc/Stdlib/Option/index.html @@ -0,0 +1,6 @@ + +Option (docs.findlib-0.compiler-libs.Misc.Stdlib.Option)

Module Stdlib.Option

Extensions to the Option module

type 'a t = 'a option
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Misc/Stdlib/String/Map/index.html b/findlib-0/compiler-libs/Misc/Stdlib/String/Map/index.html new file mode 100644 index 000000000..b3c915288 --- /dev/null +++ b/findlib-0/compiler-libs/Misc/Stdlib/String/Map/index.html @@ -0,0 +1,8 @@ + +Map (docs.findlib-0.compiler-libs.Misc.Stdlib.String.Map)

Module String.Map

Maps

type key = string

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Misc/Stdlib/String/Set/index.html b/findlib-0/compiler-libs/Misc/Stdlib/String/Set/index.html new file mode 100644 index 000000000..800f30d30 --- /dev/null +++ b/findlib-0/compiler-libs/Misc/Stdlib/String/Set/index.html @@ -0,0 +1,3 @@ + +Set (docs.findlib-0.compiler-libs.Misc.Stdlib.String.Set)

Module String.Set

Sets

type elt = string

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Misc/Stdlib/String/Tbl/index.html b/findlib-0/compiler-libs/Misc/Stdlib/String/Tbl/index.html new file mode 100644 index 000000000..0001c8be5 --- /dev/null +++ b/findlib-0/compiler-libs/Misc/Stdlib/String/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Misc.Stdlib.String.Tbl)

Module String.Tbl

type key = string
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/findlib-0/compiler-libs/Misc/Stdlib/String/index.html b/findlib-0/compiler-libs/Misc/Stdlib/String/index.html new file mode 100644 index 000000000..ae0dcad4d --- /dev/null +++ b/findlib-0/compiler-libs/Misc/Stdlib/String/index.html @@ -0,0 +1,3 @@ + +String (docs.findlib-0.compiler-libs.Misc.Stdlib.String)

Module Stdlib.String

Extensions to the String module

include module type of String

Strings

type t = string

The type for strings.

val make : int -> char -> string

make n c is a string of length n with each index holding the character c.

val init : int -> (int -> char) -> string

init n f is a string of length n with index i holding the character f i (called in increasing index order).

  • since 4.02
val empty : string

The empty string.

  • since 4.13
val length : string -> int

length s is the length (number of bytes/characters) of s.

val get : string -> int -> char

get s i is the character at index i in s. This is the same as writing s.[i].

val of_bytes : bytes -> string

Return a new string that contains the same bytes as the given byte sequence.

  • since 4.13
val to_bytes : string -> bytes

Return a new byte sequence that contains the same bytes as the given string.

  • since 4.13
val blit : string -> int -> bytes -> int -> int -> unit

Same as Bytes.blit_string which should be preferred.

Concatenating

Note. The Stdlib.(^) binary operator concatenates two strings.

val concat : string -> string list -> string

concat sep ss concatenates the list of strings ss, inserting the separator string sep between each.

val cat : string -> string -> string

cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

  • since 4.13

Predicates and comparisons

val equal : t -> t -> bool

equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

  • since 4.03 (4.05 in StringLabels)
val compare : t -> t -> int

compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

val starts_with : prefix:string -> string -> bool

starts_with ~prefix s is true if and only if s starts with prefix.

  • since 4.13
val ends_with : suffix:string -> string -> bool

ends_with ~suffix s is true if and only if s ends with suffix.

  • since 4.13
val contains_from : string -> int -> char -> bool

contains_from s start c is true if and only if c appears in s after position start.

val rcontains_from : string -> int -> char -> bool

rcontains_from s stop c is true if and only if c appears in s before position stop+1.

val contains : string -> char -> bool

contains s c is String.contains_from s 0 c.

Extracting substrings

val sub : string -> int -> int -> string

sub s pos len is a string of length len, containing the substring of s that starts at position pos and has length len.

val split_on_char : char -> string -> string list

split_on_char sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

The function's result is specified by the following invariants:

  • The list is not empty.
  • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) + (split_on_char sep s) = s).
  • No string in the result contains the sep character.
  • since 4.04 (4.05 in StringLabels)

Transforming

val map : (char -> char) -> string -> string

map f s is the string resulting from applying f to all the characters of s in increasing order.

  • since 4.00
val mapi : (int -> char -> char) -> string -> string

mapi f s is like map but the index of the character is also passed to f.

  • since 4.02
val fold_left : ('acc -> char -> 'acc) -> 'acc -> string -> 'acc

fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

  • since 4.13
val fold_right : (char -> 'acc -> 'acc) -> string -> 'acc -> 'acc

fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

  • since 4.13
val exists : (char -> bool) -> string -> bool

exists p s checks if at least one character of s satisfies the predicate p.

  • since 4.13
val trim : string -> string

trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

  • since 4.00
val escaped : string -> string

escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

val uppercase_ascii : string -> string

uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

  • since 4.03 (4.05 in StringLabels)
val lowercase_ascii : string -> string

lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

  • since 4.03 (4.05 in StringLabels)
val capitalize_ascii : string -> string

capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

  • since 4.03 (4.05 in StringLabels)
val uncapitalize_ascii : string -> string

uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

  • since 4.03 (4.05 in StringLabels)

Traversing

val iter : (char -> unit) -> string -> unit

iter f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

val iteri : (int -> char -> unit) -> string -> unit

iteri is like iter, but the function is also given the corresponding character index.

  • since 4.00

Searching

val index_from : string -> int -> char -> int

index_from s i c is the index of the first occurrence of c in s after position i.

  • raises Not_found

    if c does not occur in s after position i.

val index_from_opt : string -> int -> char -> int option

index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

  • since 4.05
val rindex_from : string -> int -> char -> int

rindex_from s i c is the index of the last occurrence of c in s before position i+1.

  • raises Not_found

    if c does not occur in s before position i+1.

val rindex_from_opt : string -> int -> char -> int option

rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

  • since 4.05
val index : string -> char -> int

index s c is String.index_from s 0 c.

val index_opt : string -> char -> int option

index_opt s c is String.index_from_opt s 0 c.

  • since 4.05
val rindex : string -> char -> int

rindex s c is String.rindex_from s (length s - 1) c.

val rindex_opt : string -> char -> int option

rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

  • since 4.05

Strings and Sequences

val to_seq : t -> char Seq.t

to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

  • since 4.07
val to_seqi : t -> (int * char) Seq.t

to_seqi s is like to_seq but also tuples the corresponding index.

  • since 4.07
val of_seq : char Seq.t -> t

of_seq s is a string made of the sequence's characters.

  • since 4.07

UTF decoding and validations

  • since 4.14

UTF-8

val get_utf_8_uchar : t -> int -> Uchar.utf_decode

get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

val is_valid_utf_8 : t -> bool

is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

UTF-16BE

val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

val is_valid_utf_16be : t -> bool

is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

UTF-16LE

val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

val is_valid_utf_16le : t -> bool

is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

Binary decoding of integers

The functions in this section binary decode integers from strings.

All following functions raise Invalid_argument if the characters needed at index i to decode the integer are not available.

Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are sign-extended (or zero-extended) for functions which decode 8-bit or 16-bit integers and represented them with int values.

val get_uint8 : string -> int -> int

get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

  • since 4.13
val get_int8 : string -> int -> int

get_int8 b i is b's signed 8-bit integer starting at character index i.

  • since 4.13
val get_uint16_ne : string -> int -> int

get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_uint16_be : string -> int -> int

get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_uint16_le : string -> int -> int

get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_int16_ne : string -> int -> int

get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int16_be : string -> int -> int

get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int16_le : string -> int -> int

get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int32_ne : string -> int -> int32

get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

  • since 4.13
val hash : t -> int

An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.0
val seeded_hash : int -> t -> int

A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.0
val get_int32_be : string -> int -> int32

get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

  • since 4.13
val get_int32_le : string -> int -> int32

get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

  • since 4.13
val get_int64_ne : string -> int -> int64

get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

  • since 4.13
val get_int64_be : string -> int -> int64

get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

  • since 4.13
val get_int64_le : string -> int -> int64

get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

  • since 4.13
module Set : Set.S with type elt = string
module Map : Map.S with type key = string
module Tbl : Hashtbl.S with type key = string
val print : Format.formatter -> t -> unit
val for_all : (char -> bool) -> t -> bool
diff --git a/findlib-0/compiler-libs/Misc/Stdlib/index.html b/findlib-0/compiler-libs/Misc/Stdlib/index.html new file mode 100644 index 000000000..488f4277b --- /dev/null +++ b/findlib-0/compiler-libs/Misc/Stdlib/index.html @@ -0,0 +1,2 @@ + +Stdlib (docs.findlib-0.compiler-libs.Misc.Stdlib)

Module Misc.Stdlib

module List : sig ... end
module Option : sig ... end
module Array : sig ... end
module String : sig ... end
val compare : 'a -> 'a -> int
diff --git a/findlib-0/compiler-libs/Misc/index.html b/findlib-0/compiler-libs/Misc/index.html new file mode 100644 index 000000000..b58e2fb53 --- /dev/null +++ b/findlib-0/compiler-libs/Misc/index.html @@ -0,0 +1,37 @@ + +Misc (docs.findlib-0.compiler-libs.Misc)

Module Misc

Miscellaneous useful types and functions

Warning: this module is unstable and part of compiler-libs.

Reporting fatal errors

val fatal_error : string -> 'a

Raise the Fatal_error exception with the given string.

val fatal_errorf : ('a, Format.formatter, unit, 'b) format4 -> 'a

Format the arguments according to the given format string and raise Fatal_error with the resulting string.

exception Fatal_error

Exceptions and finalization

val try_finally : + ?always:(unit -> unit) -> + ?exceptionally:(unit -> unit) -> + (unit -> 'a) -> + 'a

try_finally work ~always ~exceptionally is designed to run code in work that may fail with an exception, and has two kind of cleanup routines: always, that must be run after any execution of the function (typically, freeing system resources), and exceptionally, that should be run only if work or always failed with an exception (typically, undoing user-visible state changes that would only make sense if the function completes correctly). For example:

let objfile = outputprefix ^ ".cmo" in
+let oc = open_out_bin objfile in
+Misc.try_finally
+  (fun () ->
+     bytecode
+     ++ Timings.(accumulate_time (Generate sourcefile))
+         (Emitcode.to_file oc modulename objfile);
+     Warnings.check_fatal ())
+  ~always:(fun () -> close_out oc)
+  ~exceptionally:(fun _exn -> remove_file objfile);

If exceptionally fail with an exception, it is propagated as usual.

If always or exceptionally use exceptions internally for control-flow but do not raise, then try_finally is careful to preserve any exception backtrace coming from work or always for easier debugging.

val reraise_preserving_backtrace : exn -> (unit -> unit) -> 'a

reraise_preserving_backtrace e f is (f (); raise e) except that the current backtrace is preserved, even if f uses exceptions internally.

List operations

val map_end : ('a -> 'b) -> 'a list -> 'b list -> 'b list

map_end f l t is map f l @ t, just more efficient.

val map_left_right : ('a -> 'b) -> 'a list -> 'b list

Like List.map, with guaranteed left-to-right evaluation order

val for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool

Same as List.for_all but for a binary predicate. In addition, this for_all2 never fails: given two lists with different lengths, it returns false.

val replicate_list : 'a -> int -> 'a list

replicate_list elem n is the list with n elements all identical to elem.

val list_remove : 'a -> 'a list -> 'a list

list_remove x l returns a copy of l with the first element equal to x removed.

val split_last : 'a list -> 'a list * 'a

Return the last element and the other elements of the given list.

Hash table operations

val create_hashtable : int -> ('a * 'b) list -> ('a, 'b) Hashtbl.t

Create a hashtable with the given initial size and fills it with the given bindings.

Extensions to the standard library

module Stdlib : sig ... end

Operations on files and file paths

val find_in_path : string list -> string -> string

Search a file in a list of directories.

val find_in_path_rel : string list -> string -> string

Search a relative file in a list of directories.

val find_in_path_uncap : string list -> string -> string

Same, but search also for uncapitalized name, i.e. if name is Foo.ml, allow /path/Foo.ml and /path/foo.ml to match.

val remove_file : string -> unit

Delete the given file if it exists and is a regular file. Does nothing for other kinds of files. Never raises an error.

val expand_directory : string -> string -> string

expand_directory alt file eventually expands a + at the beginning of file into alt (an alternate root directory)

val split_path_contents : ?sep:char -> string -> string list

split_path_contents ?sep s interprets s as the value of a "PATH"-like variable and returns the corresponding list of directories. s is split using the platform-specific delimiter, or ~sep if it is passed.

Returns the empty list if s is empty.

val copy_file : in_channel -> out_channel -> unit

copy_file ic oc reads the contents of file ic and copies them to oc. It stops when encountering EOF on ic.

val copy_file_chunk : in_channel -> out_channel -> int -> unit

copy_file_chunk ic oc n reads n bytes from ic and copies them to oc. It raises End_of_file when encountering EOF on ic.

val string_of_file : in_channel -> string

string_of_file ic reads the contents of file ic and copies them to a string. It stops when encountering EOF on ic.

val output_to_file_via_temporary : + ?mode:open_flag list -> + string -> + (string -> out_channel -> 'a) -> + 'a

Produce output in temporary file, then rename it (as atomically as possible) to the desired output file name. output_to_file_via_temporary filename fn opens a temporary file which is passed to fn (name + output channel). When fn returns, the channel is closed and the temporary file is renamed to filename.

val protect_writing_to_file : filename:string -> f:(out_channel -> 'a) -> 'a

Open the given filename for writing (in binary mode), pass the out_channel to the given function, then close the channel. If the function raises an exception then filename will be removed.

val concat_null_terminated : string list -> string

concat_null_terminated [x1;x2; ... xn] is x1 ^ "\000" ^ x2 ^ "\000" ^ ... ^ xn ^ "\000"

val split_null_terminated : string -> string list

split_null_terminated s is similar String.split_on_char '\000' but ignores the trailing separator, if any

val chop_extensions : string -> string

Return the given file name without its extensions. The extensions is the longest suffix starting with a period and not including a directory separator, .xyz.uvw for instance.

Return the given name if it does not contain an extension.

Integer operations

val log2 : int -> int

log2 n returns s such that n = 1 lsl s if n is a power of 2

val align : int -> int -> int

align n a rounds n upwards to a multiple of a (a power of 2).

val no_overflow_add : int -> int -> bool

no_overflow_add n1 n2 returns true if the computation of n1 + n2 does not overflow.

val no_overflow_sub : int -> int -> bool

no_overflow_sub n1 n2 returns true if the computation of n1 - n2 does not overflow.

val no_overflow_mul : int -> int -> bool

no_overflow_mul n1 n2 returns true if the computation of n1 * n2 does not overflow.

val no_overflow_lsl : int -> int -> bool

no_overflow_lsl n k returns true if the computation of n lsl k does not overflow.

module Int_literal_converter : sig ... end
val find_first_mono : (int -> bool) -> int

find_first_mono p takes an integer predicate p : int -> bool that we assume: 1. is monotonic on natural numbers: if a <= b then p a implies p b, 2. is satisfied for some natural numbers in range 0; max_int (this is equivalent to: p max_int = true).

find_first_mono p is the smallest natural number N that satisfies p, computed in O(log(N)) calls to p.

Our implementation supports two cases where the preconditions on p are not respected:

  • If p is always false, we silently return max_int instead of looping or crashing.
  • If p is non-monotonic but eventually true, we return some satisfying value.

String operations

val search_substring : string -> string -> int -> int

search_substring pat str start returns the position of the first occurrence of string pat in string str. Search starts at offset start in str. Raise Not_found if pat does not occur.

val replace_substring : before:string -> after:string -> string -> string

replace_substring ~before ~after str replaces all occurrences of before with after in str and returns the resulting string.

val rev_split_words : string -> string list

rev_split_words s splits s in blank-separated words, and returns the list of words in reverse order.

val cut_at : string -> char -> string * string

String.cut_at s c returns a pair containing the sub-string before the first occurrence of c in s, and the sub-string after the first occurrence of c in s. let (before, after) = String.cut_at s c in + before ^ String.make 1 c ^ after is the identity if s contains c.

Raise Not_found if the character does not appear in the string

  • since 4.01
val ordinal_suffix : int -> string

ordinal_suffix n is the appropriate suffix to append to the numeral n as an ordinal number: 1 -> "st", 2 -> "nd", 3 -> "rd", 4 -> "th", and so on. Handles larger numbers (e.g., 42 -> "nd") and the numbers 11--13 (which all get "th") correctly.

val normalise_eol : string -> string

normalise_eol s returns a fresh copy of s with any '\r' characters removed. Intended for pre-processing text which will subsequently be printed on a channel which performs EOL transformations (i.e. Windows)

val delete_eol_spaces : string -> string

delete_eol_spaces s returns a fresh copy of s with any end of line spaces removed. Intended to normalize the output of the toplevel for tests.

Operations on references

type ref_and_value =
  1. | R : 'a ref * 'a -> ref_and_value
val protect_refs : ref_and_value list -> (unit -> 'a) -> 'a

protect_refs l f temporarily sets r to v for each R (r, v) in l while executing f. The previous contents of the references is restored even if f raises an exception, without altering the exception backtrace.

val get_ref : 'a list ref -> 'a list

get_ref lr returns the content of the list reference lr and reset its content to the empty list.

val set_or_ignore : ('a -> 'b option) -> 'b option ref -> 'a -> unit

set_or_ignore f opt x sets opt to f x if it returns Some _, or leaves it unmodified if it returns None.

Operations on triples and quadruples

val fst3 : ('a * 'b * 'c) -> 'a
val snd3 : ('a * 'b * 'c) -> 'b
val thd3 : ('a * 'b * 'c) -> 'c
val fst4 : ('a * 'b * 'c * 'd) -> 'a
val snd4 : ('a * 'b * 'c * 'd) -> 'b
val thd4 : ('a * 'b * 'c * 'd) -> 'c
val for4 : ('a * 'b * 'c * 'd) -> 'd

Long strings

``Long strings'' are mutable arrays of characters that are not limited in length to Sys.max_string_length.

module LongString : sig ... end

Spell checking and ``did you mean'' suggestions

val edit_distance : string -> string -> int -> int option

edit_distance a b cutoff computes the edit distance between strings a and b. To help efficiency, it uses a cutoff: if the distance d is smaller than cutoff, it returns Some d, else None.

The distance algorithm currently used is Damerau-Levenshtein: it computes the number of insertion, deletion, substitution of letters, or swapping of adjacent letters to go from one word to the other. The particular algorithm may change in the future.

val spellcheck : string list -> string -> string list

spellcheck env name takes a list of names env that exist in the current environment and an erroneous name, and returns a list of suggestions taken from env, that are close enough to name that it may be a typo for one of them.

val did_you_mean : Format.formatter -> (unit -> string list) -> unit

did_you_mean ppf get_choices hints that the user may have meant one of the option returned by calling get_choices. It does nothing if the returned list is empty.

The unit -> ... thunking is meant to delay any potentially-slow computation (typically computing edit-distance with many things from the current environment) to when the hint message is to be printed. You should print an understandable error message before calling did_you_mean, so that users get a clear notification of the failure even if producing the hint is slow.

Colored terminal output

module Color : sig ... end
module Error_style : sig ... end

Formatted output

val print_if : + Format.formatter -> + bool ref -> + (Format.formatter -> 'a -> unit) -> + 'a -> + 'a

print_if ppf flag fmt x prints x with fmt on ppf if b is true.

val pp_two_columns : + ?sep:string -> + ?max_lines:int -> + Format.formatter -> + (string * string) list -> + unit

pp_two_columns ?sep ?max_lines ppf l prints the lines in l as two columns separated by sep ("|" by default). max_lines can be used to indicate a maximum number of lines to print -- an ellipsis gets inserted at the middle if the input has too many lines.

Example:

pp_two_columns ~max_lines:3 Format.std_formatter [
+      "abc", "hello";
+      "def", "zzz";
+      "a"  , "bllbl";
+      "bb" , "dddddd";
+    ]

prints

    abc | hello
+    ...
+    bb  | dddddd
val print_see_manual : Format.formatter -> int list -> unit

See manual section

Displaying configuration variables

val show_config_and_exit : unit -> unit

Display the values of all compiler configuration variables from module Config, then exit the program with code 0.

val show_config_variable_and_exit : string -> unit

Display the value of the given configuration variable, then exit the program with code 0.

Handling of build maps

Build maps cause the compiler to normalize file names embedded in object files, thus leading to more reproducible builds.

val get_build_path_prefix_map : unit -> Build_path_prefix_map.map option

Returns the map encoded in the BUILD_PATH_PREFIX_MAP environment variable.

val debug_prefix_map_flags : unit -> string list

Returns the list of --debug-prefix-map flags to be passed to the assembler, built from the BUILD_PATH_PREFIX_MAP environment variable.

Handling of magic numbers

module Magic_number : sig ... end

a typical magic number is "Caml1999I011"; it is formed of an alphanumeric prefix, here Caml1990I, followed by a version, here 011. The prefix identifies the kind of the versioned data: here the I indicates that it is the magic number for .cmi files.

Miscellaneous type aliases

type filepath = string
type modname = string
type crcs = (modname * Digest.t option) list
type alerts = string Stdlib.String.Map.t
diff --git a/findlib-0/compiler-libs/Mtype/index.html b/findlib-0/compiler-libs/Mtype/index.html new file mode 100644 index 000000000..ad9e512d2 --- /dev/null +++ b/findlib-0/compiler-libs/Mtype/index.html @@ -0,0 +1,29 @@ + +Mtype (docs.findlib-0.compiler-libs.Mtype)

Module Mtype

val scrape_for_functor_arg : Env.t -> Types.module_type -> Types.module_type
val scrape_for_type_of : + remove_aliases:bool -> + Env.t -> + Types.module_type -> + Types.module_type
val freshen : scope:int -> Types.module_type -> Types.module_type
val strengthen : + aliasable:bool -> + Env.t -> + Types.module_type -> + Path.t -> + Types.module_type
val strengthen_decl : + aliasable:bool -> + Env.t -> + Types.module_declaration -> + Path.t -> + Types.module_declaration
val nondep_supertype : + Env.t -> + Ident.t list -> + Types.module_type -> + Types.module_type
val nondep_sig_item : + Env.t -> + Ident.t list -> + Types.signature_item -> + Types.signature_item
val no_code_needed : Env.t -> Types.module_type -> bool
val no_code_needed_sig : Env.t -> Types.signature -> bool
val enrich_modtype : Env.t -> Path.t -> Types.module_type -> Types.module_type
val enrich_typedecl : + Env.t -> + Path.t -> + Ident.t -> + Types.type_declaration -> + Types.type_declaration
val type_paths : Env.t -> Path.t -> Types.module_type -> Path.t list
val contains_type : Env.t -> Types.module_type -> bool
val lower_nongen : int -> Types.module_type -> unit
diff --git a/findlib-0/compiler-libs/Mutable_variable/Map/index.html b/findlib-0/compiler-libs/Mutable_variable/Map/index.html new file mode 100644 index 000000000..5a5311dfc --- /dev/null +++ b/findlib-0/compiler-libs/Mutable_variable/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Mutable_variable.Map)

Module Mutable_variable.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Mutable_variable/Set/index.html b/findlib-0/compiler-libs/Mutable_variable/Set/index.html new file mode 100644 index 000000000..d392a5388 --- /dev/null +++ b/findlib-0/compiler-libs/Mutable_variable/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Mutable_variable.Set)

Module Mutable_variable.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Mutable_variable/T/index.html b/findlib-0/compiler-libs/Mutable_variable/T/index.html new file mode 100644 index 000000000..fe9dfd062 --- /dev/null +++ b/findlib-0/compiler-libs/Mutable_variable/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Mutable_variable.T)

Module Mutable_variable.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Mutable_variable/Tbl/index.html b/findlib-0/compiler-libs/Mutable_variable/Tbl/index.html new file mode 100644 index 000000000..89ffc9e60 --- /dev/null +++ b/findlib-0/compiler-libs/Mutable_variable/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Mutable_variable.Tbl)

Module Mutable_variable.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Mutable_variable/index.html b/findlib-0/compiler-libs/Mutable_variable/index.html new file mode 100644 index 000000000..348937261 --- /dev/null +++ b/findlib-0/compiler-libs/Mutable_variable/index.html @@ -0,0 +1,8 @@ + +Mutable_variable (docs.findlib-0.compiler-libs.Mutable_variable)

Module Mutable_variable

include Identifiable.S
type t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val create : + ?current_compilation_unit:Compilation_unit.t -> + Internal_variable_names.t -> + t
val create_with_same_name_as_ident : Ident.t -> t
val create_from_variable : + ?current_compilation_unit:Compilation_unit.t -> + Variable.t -> + t
val rename : ?current_compilation_unit:Compilation_unit.t -> t -> t
val in_compilation_unit : t -> Compilation_unit.t -> bool
val name : t -> string
val unique_name : t -> string
val print_list : Format.formatter -> t list -> unit
val print_opt : Format.formatter -> t option -> unit
val output_full : out_channel -> t -> unit
diff --git a/findlib-0/compiler-libs/Numbers/Float/Map/index.html b/findlib-0/compiler-libs/Numbers/Float/Map/index.html new file mode 100644 index 000000000..c3ac5a68d --- /dev/null +++ b/findlib-0/compiler-libs/Numbers/Float/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Numbers.Float.Map)

Module Float.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Numbers/Float/Set/index.html b/findlib-0/compiler-libs/Numbers/Float/Set/index.html new file mode 100644 index 000000000..1b60057bc --- /dev/null +++ b/findlib-0/compiler-libs/Numbers/Float/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Numbers.Float.Set)

Module Float.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Numbers/Float/T/index.html b/findlib-0/compiler-libs/Numbers/Float/T/index.html new file mode 100644 index 000000000..fbdd8bd38 --- /dev/null +++ b/findlib-0/compiler-libs/Numbers/Float/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Numbers.Float.T)

Module Float.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Numbers/Float/Tbl/index.html b/findlib-0/compiler-libs/Numbers/Float/Tbl/index.html new file mode 100644 index 000000000..0dc09200f --- /dev/null +++ b/findlib-0/compiler-libs/Numbers/Float/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Numbers.Float.Tbl)

Module Float.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Numbers/Float/index.html b/findlib-0/compiler-libs/Numbers/Float/index.html new file mode 100644 index 000000000..1b3619d5f --- /dev/null +++ b/findlib-0/compiler-libs/Numbers/Float/index.html @@ -0,0 +1,2 @@ + +Float (docs.findlib-0.compiler-libs.Numbers.Float)

Module Numbers.Float

type t = float
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
diff --git a/findlib-0/compiler-libs/Numbers/Int/Map/index.html b/findlib-0/compiler-libs/Numbers/Int/Map/index.html new file mode 100644 index 000000000..64da75b01 --- /dev/null +++ b/findlib-0/compiler-libs/Numbers/Int/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Numbers.Int.Map)

Module Int.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Numbers/Int/Set/index.html b/findlib-0/compiler-libs/Numbers/Int/Set/index.html new file mode 100644 index 000000000..20cabee4d --- /dev/null +++ b/findlib-0/compiler-libs/Numbers/Int/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Numbers.Int.Set)

Module Int.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Numbers/Int/T/index.html b/findlib-0/compiler-libs/Numbers/Int/T/index.html new file mode 100644 index 000000000..b6101abd1 --- /dev/null +++ b/findlib-0/compiler-libs/Numbers/Int/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Numbers.Int.T)

Module Int.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Numbers/Int/Tbl/index.html b/findlib-0/compiler-libs/Numbers/Int/Tbl/index.html new file mode 100644 index 000000000..bfcf0b664 --- /dev/null +++ b/findlib-0/compiler-libs/Numbers/Int/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Numbers.Int.Tbl)

Module Int.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Numbers/Int/index.html b/findlib-0/compiler-libs/Numbers/Int/index.html new file mode 100644 index 000000000..2daf70269 --- /dev/null +++ b/findlib-0/compiler-libs/Numbers/Int/index.html @@ -0,0 +1,2 @@ + +Int (docs.findlib-0.compiler-libs.Numbers.Int)

Module Numbers.Int

include Identifiable.S with type t = int
type t = int
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val zero_to_n : int -> Set.t

zero_to_n n is the set of numbers {0, ..., n} (inclusive).

val to_string : int -> string
diff --git a/findlib-0/compiler-libs/Numbers/Int16/index.html b/findlib-0/compiler-libs/Numbers/Int16/index.html new file mode 100644 index 000000000..6fe746d45 --- /dev/null +++ b/findlib-0/compiler-libs/Numbers/Int16/index.html @@ -0,0 +1,2 @@ + +Int16 (docs.findlib-0.compiler-libs.Numbers.Int16)

Module Numbers.Int16

type t
val of_int_exn : int -> t
val of_int64_exn : Int64.t -> t
val to_int : t -> int
diff --git a/findlib-0/compiler-libs/Numbers/Int8/index.html b/findlib-0/compiler-libs/Numbers/Int8/index.html new file mode 100644 index 000000000..afb151dcf --- /dev/null +++ b/findlib-0/compiler-libs/Numbers/Int8/index.html @@ -0,0 +1,2 @@ + +Int8 (docs.findlib-0.compiler-libs.Numbers.Int8)

Module Numbers.Int8

type t
val zero : t
val one : t
val of_int_exn : int -> t
val to_int : t -> int
diff --git a/findlib-0/compiler-libs/Numbers/index.html b/findlib-0/compiler-libs/Numbers/index.html new file mode 100644 index 000000000..7ec542f02 --- /dev/null +++ b/findlib-0/compiler-libs/Numbers/index.html @@ -0,0 +1,2 @@ + +Numbers (docs.findlib-0.compiler-libs.Numbers)

Module Numbers

Modules about numbers, some of which satisfy Identifiable.S.

Warning: this module is unstable and part of compiler-libs.

module Int : sig ... end
module Int8 : sig ... end
module Int16 : sig ... end
module Float : Identifiable.S with type t = float
diff --git a/findlib-0/compiler-libs/Opcodes/index.html b/findlib-0/compiler-libs/Opcodes/index.html new file mode 100644 index 000000000..06f7fb594 --- /dev/null +++ b/findlib-0/compiler-libs/Opcodes/index.html @@ -0,0 +1,2 @@ + +Opcodes (docs.findlib-0.compiler-libs.Opcodes)

Module Opcodes

val opACC0 : int
val opACC1 : int
val opACC2 : int
val opACC3 : int
val opACC4 : int
val opACC5 : int
val opACC6 : int
val opACC7 : int
val opACC : int
val opPUSH : int
val opPUSHACC0 : int
val opPUSHACC1 : int
val opPUSHACC2 : int
val opPUSHACC3 : int
val opPUSHACC4 : int
val opPUSHACC5 : int
val opPUSHACC6 : int
val opPUSHACC7 : int
val opPUSHACC : int
val opPOP : int
val opASSIGN : int
val opENVACC1 : int
val opENVACC2 : int
val opENVACC3 : int
val opENVACC4 : int
val opENVACC : int
val opPUSHENVACC1 : int
val opPUSHENVACC2 : int
val opPUSHENVACC3 : int
val opPUSHENVACC4 : int
val opPUSHENVACC : int
val opPUSH_RETADDR : int
val opAPPLY : int
val opAPPLY1 : int
val opAPPLY2 : int
val opAPPLY3 : int
val opAPPTERM : int
val opAPPTERM1 : int
val opAPPTERM2 : int
val opAPPTERM3 : int
val opRETURN : int
val opRESTART : int
val opGRAB : int
val opCLOSURE : int
val opCLOSUREREC : int
val opOFFSETCLOSUREM3 : int
val opOFFSETCLOSURE0 : int
val opOFFSETCLOSURE3 : int
val opOFFSETCLOSURE : int
val opPUSHOFFSETCLOSUREM3 : int
val opPUSHOFFSETCLOSURE0 : int
val opPUSHOFFSETCLOSURE3 : int
val opPUSHOFFSETCLOSURE : int
val opGETGLOBAL : int
val opPUSHGETGLOBAL : int
val opGETGLOBALFIELD : int
val opPUSHGETGLOBALFIELD : int
val opSETGLOBAL : int
val opATOM0 : int
val opATOM : int
val opPUSHATOM0 : int
val opPUSHATOM : int
val opMAKEBLOCK : int
val opMAKEBLOCK1 : int
val opMAKEBLOCK2 : int
val opMAKEBLOCK3 : int
val opMAKEFLOATBLOCK : int
val opGETFIELD0 : int
val opGETFIELD1 : int
val opGETFIELD2 : int
val opGETFIELD3 : int
val opGETFIELD : int
val opGETFLOATFIELD : int
val opSETFIELD0 : int
val opSETFIELD1 : int
val opSETFIELD2 : int
val opSETFIELD3 : int
val opSETFIELD : int
val opSETFLOATFIELD : int
val opVECTLENGTH : int
val opGETVECTITEM : int
val opSETVECTITEM : int
val opGETBYTESCHAR : int
val opSETBYTESCHAR : int
val opBRANCH : int
val opBRANCHIF : int
val opBRANCHIFNOT : int
val opSWITCH : int
val opBOOLNOT : int
val opPUSHTRAP : int
val opPOPTRAP : int
val opRAISE : int
val opCHECK_SIGNALS : int
val opC_CALL1 : int
val opC_CALL2 : int
val opC_CALL3 : int
val opC_CALL4 : int
val opC_CALL5 : int
val opC_CALLN : int
val opCONST0 : int
val opCONST1 : int
val opCONST2 : int
val opCONST3 : int
val opCONSTINT : int
val opPUSHCONST0 : int
val opPUSHCONST1 : int
val opPUSHCONST2 : int
val opPUSHCONST3 : int
val opPUSHCONSTINT : int
val opNEGINT : int
val opADDINT : int
val opSUBINT : int
val opMULINT : int
val opDIVINT : int
val opMODINT : int
val opANDINT : int
val opORINT : int
val opXORINT : int
val opLSLINT : int
val opLSRINT : int
val opASRINT : int
val opEQ : int
val opNEQ : int
val opLTINT : int
val opLEINT : int
val opGTINT : int
val opGEINT : int
val opOFFSETINT : int
val opOFFSETREF : int
val opISINT : int
val opGETMETHOD : int
val opBEQ : int
val opBNEQ : int
val opBLTINT : int
val opBLEINT : int
val opBGTINT : int
val opBGEINT : int
val opULTINT : int
val opUGEINT : int
val opBULTINT : int
val opBUGEINT : int
val opGETPUBMET : int
val opGETDYNMET : int
val opSTOP : int
val opEVENT : int
val opBREAK : int
val opRERAISE : int
val opRAISE_NOTRACE : int
val opGETSTRINGCHAR : int
val opPERFORM : int
val opRESUME : int
val opRESUMETERM : int
val opREPERFORMTERM : int
diff --git a/findlib-0/compiler-libs/Oprint/index.html b/findlib-0/compiler-libs/Oprint/index.html new file mode 100644 index 000000000..d56ee0a77 --- /dev/null +++ b/findlib-0/compiler-libs/Oprint/index.html @@ -0,0 +1,11 @@ + +Oprint (docs.findlib-0.compiler-libs.Oprint)

Module Oprint

val out_ident : (Format.formatter -> Outcometree.out_ident -> unit) ref
val out_value : (Format.formatter -> Outcometree.out_value -> unit) ref
val out_label : + (Format.formatter -> (string * bool * Outcometree.out_type) -> unit) ref
val out_type : (Format.formatter -> Outcometree.out_type -> unit) ref
val out_type_args : (Format.formatter -> Outcometree.out_type list -> unit) ref
val out_constr : (Format.formatter -> Outcometree.out_constructor -> unit) ref
val out_class_type : + (Format.formatter -> Outcometree.out_class_type -> unit) ref
val out_module_type : + (Format.formatter -> Outcometree.out_module_type -> unit) ref
val out_sig_item : (Format.formatter -> Outcometree.out_sig_item -> unit) ref
val out_signature : + (Format.formatter -> Outcometree.out_sig_item list -> unit) ref
val out_functor_parameters : + (Format.formatter -> + (string option * Outcometree.out_module_type) option list -> + unit) + ref
val out_type_extension : + (Format.formatter -> Outcometree.out_type_extension -> unit) ref
val out_phrase : (Format.formatter -> Outcometree.out_phrase -> unit) ref
val parenthesized_ident : string -> bool
diff --git a/findlib-0/compiler-libs/Optcompile/index.html b/findlib-0/compiler-libs/Optcompile/index.html new file mode 100644 index 000000000..70fb0696a --- /dev/null +++ b/findlib-0/compiler-libs/Optcompile/index.html @@ -0,0 +1,15 @@ + +Optcompile (docs.findlib-0.compiler-libs.Optcompile)

Module Optcompile

Native compilation for .ml and .mli files.

val interface : source_file:string -> output_prefix:string -> unit
val implementation : + backend:(module Backend_intf.S) -> + start_from:Clflags.Compiler_pass.t -> + source_file:string -> + output_prefix:string -> + unit

Internal functions

*

val clambda : + Compile_common.info -> + (module Backend_intf.S) -> + Typedtree.implementation -> + unit

clambda info typed applies the regular compilation pipeline to the given typechecked implementation and outputs the resulting files.

val flambda : + Compile_common.info -> + (module Backend_intf.S) -> + Typedtree.implementation -> + unit

flambda info backend typed applies the Flambda compilation pipeline to the given typechecked implementation and outputs the resulting files.

diff --git a/findlib-0/compiler-libs/Opterrors/index.html b/findlib-0/compiler-libs/Opterrors/index.html new file mode 100644 index 000000000..e53d60e2e --- /dev/null +++ b/findlib-0/compiler-libs/Opterrors/index.html @@ -0,0 +1,2 @@ + +Opterrors (docs.findlib-0.compiler-libs.Opterrors)

Module Opterrors

val report_error : Format.formatter -> exn -> unit
diff --git a/findlib-0/compiler-libs/Optmain/index.html b/findlib-0/compiler-libs/Optmain/index.html new file mode 100644 index 000000000..e7d649a8c --- /dev/null +++ b/findlib-0/compiler-libs/Optmain/index.html @@ -0,0 +1,2 @@ + +Optmain (docs.findlib-0.compiler-libs.Optmain)

Module Optmain

diff --git a/findlib-0/compiler-libs/Optmaindriver/index.html b/findlib-0/compiler-libs/Optmaindriver/index.html new file mode 100644 index 000000000..fae7d9618 --- /dev/null +++ b/findlib-0/compiler-libs/Optmaindriver/index.html @@ -0,0 +1,2 @@ + +Optmaindriver (docs.findlib-0.compiler-libs.Optmaindriver)

Module Optmaindriver

val main : string array -> Format.formatter -> int
diff --git a/findlib-0/compiler-libs/Outcometree/index.html b/findlib-0/compiler-libs/Outcometree/index.html new file mode 100644 index 000000000..b63dc826f --- /dev/null +++ b/findlib-0/compiler-libs/Outcometree/index.html @@ -0,0 +1,10 @@ + +Outcometree (docs.findlib-0.compiler-libs.Outcometree)

Module Outcometree

type out_name = {
  1. mutable printed_name : string;
}

An out_name is a string representation of an identifier which can be rewritten on the fly to avoid name collisions

type out_ident =
  1. | Oide_apply of out_ident * out_ident
  2. | Oide_dot of out_ident * string
  3. | Oide_ident of out_name
type out_string =
  1. | Ostr_string
  2. | Ostr_bytes
type out_attribute = {
  1. oattr_name : string;
}
type out_value =
  1. | Oval_array of out_value list
  2. | Oval_char of char
  3. | Oval_constr of out_ident * out_value list
  4. | Oval_ellipsis
  5. | Oval_float of float
  6. | Oval_int of int
  7. | Oval_int32 of int32
  8. | Oval_int64 of int64
  9. | Oval_nativeint of nativeint
  10. | Oval_list of out_value list
  11. | Oval_printer of Format.formatter -> unit
  12. | Oval_record of (out_ident * out_value) list
  13. | Oval_string of string * int * out_string
  14. | Oval_stuff of string
  15. | Oval_tuple of out_value list
  16. | Oval_variant of string * out_value option
type out_type_param = string * (Asttypes.variance * Asttypes.injectivity)
type out_type =
  1. | Otyp_abstract
  2. | Otyp_open
  3. | Otyp_alias of {
    1. non_gen : bool;
    2. aliased : out_type;
    3. alias : string;
    }
  4. | Otyp_arrow of string * out_type * out_type
  5. | Otyp_class of out_ident * out_type list
  6. | Otyp_constr of out_ident * out_type list
  7. | Otyp_manifest of out_type * out_type
  8. | Otyp_object of {
    1. fields : (string * out_type) list;
    2. open_row : bool;
    }
  9. | Otyp_record of (string * bool * out_type) list
  10. | Otyp_stuff of string
  11. | Otyp_sum of out_constructor list
  12. | Otyp_tuple of out_type list
  13. | Otyp_var of bool * string
  14. | Otyp_variant of out_variant * bool * string list option
  15. | Otyp_poly of string list * out_type
  16. | Otyp_module of out_ident * (string * out_type) list
  17. | Otyp_attribute of out_type * out_attribute
and out_constructor = {
  1. ocstr_name : string;
  2. ocstr_args : out_type list;
  3. ocstr_return_type : out_type option;
}
and out_variant =
  1. | Ovar_fields of (string * bool * out_type list) list
  2. | Ovar_typ of out_type
type out_class_type =
  1. | Octy_constr of out_ident * out_type list
  2. | Octy_arrow of string * out_type * out_class_type
  3. | Octy_signature of out_type option * out_class_sig_item list
and out_class_sig_item =
  1. | Ocsg_constraint of out_type * out_type
  2. | Ocsg_method of string * bool * bool * out_type
  3. | Ocsg_value of string * bool * bool * out_type
type out_module_type =
  1. | Omty_abstract
  2. | Omty_functor of (string option * out_module_type) option * out_module_type
  3. | Omty_ident of out_ident
  4. | Omty_signature of out_sig_item list
  5. | Omty_alias of out_ident
and out_sig_item =
  1. | Osig_class of bool + * string + * out_type_param list + * out_class_type + * out_rec_status
  2. | Osig_class_type of bool + * string + * out_type_param list + * out_class_type + * out_rec_status
  3. | Osig_typext of out_extension_constructor * out_ext_status
  4. | Osig_modtype of string * out_module_type
  5. | Osig_module of string * out_module_type * out_rec_status
  6. | Osig_type of out_type_decl * out_rec_status
  7. | Osig_value of out_val_decl
  8. | Osig_ellipsis
and out_type_decl = {
  1. otype_name : string;
  2. otype_params : out_type_param list;
  3. otype_type : out_type;
  4. otype_private : Asttypes.private_flag;
  5. otype_immediate : Type_immediacy.t;
  6. otype_unboxed : bool;
  7. otype_cstrs : (out_type * out_type) list;
}
and out_extension_constructor = {
  1. oext_name : string;
  2. oext_type_name : string;
  3. oext_type_params : string list;
  4. oext_args : out_type list;
  5. oext_ret_type : out_type option;
  6. oext_private : Asttypes.private_flag;
}
and out_type_extension = {
  1. otyext_name : string;
  2. otyext_params : string list;
  3. otyext_constructors : out_constructor list;
  4. otyext_private : Asttypes.private_flag;
}
and out_val_decl = {
  1. oval_name : string;
  2. oval_type : out_type;
  3. oval_prims : string list;
  4. oval_attributes : out_attribute list;
}
and out_rec_status =
  1. | Orec_not
  2. | Orec_first
  3. | Orec_next
and out_ext_status =
  1. | Oext_first
  2. | Oext_next
  3. | Oext_exception
type out_phrase =
  1. | Ophr_eval of out_value * out_type
  2. | Ophr_signature of (out_sig_item * out_value option) list
  3. | Ophr_exception of exn * out_value
diff --git a/findlib-0/compiler-libs/Parameter/List/index.html b/findlib-0/compiler-libs/Parameter/List/index.html new file mode 100644 index 000000000..dcc534169 --- /dev/null +++ b/findlib-0/compiler-libs/Parameter/List/index.html @@ -0,0 +1,2 @@ + +List (docs.findlib-0.compiler-libs.Parameter.List)

Module Parameter.List

val vars : t list -> Variable.t list

extract variables from a list of parameters, preserving the order

diff --git a/findlib-0/compiler-libs/Parameter/Map/index.html b/findlib-0/compiler-libs/Parameter/Map/index.html new file mode 100644 index 000000000..fdd6b39ba --- /dev/null +++ b/findlib-0/compiler-libs/Parameter/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Parameter.Map)

Module Parameter.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Parameter/Set/index.html b/findlib-0/compiler-libs/Parameter/Set/index.html new file mode 100644 index 000000000..cbda93317 --- /dev/null +++ b/findlib-0/compiler-libs/Parameter/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Parameter.Set)

Module Parameter.Set

include Identifiable.Set with module T := T
include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
val vars : parameter list -> Variable.Set.t
diff --git a/findlib-0/compiler-libs/Parameter/T/index.html b/findlib-0/compiler-libs/Parameter/T/index.html new file mode 100644 index 000000000..d528ce0c3 --- /dev/null +++ b/findlib-0/compiler-libs/Parameter/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Parameter.T)

Module Parameter.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Parameter/Tbl/index.html b/findlib-0/compiler-libs/Parameter/Tbl/index.html new file mode 100644 index 000000000..89a55db42 --- /dev/null +++ b/findlib-0/compiler-libs/Parameter/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Parameter.Tbl)

Module Parameter.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Parameter/index.html b/findlib-0/compiler-libs/Parameter/index.html new file mode 100644 index 000000000..03f3e8dc4 --- /dev/null +++ b/findlib-0/compiler-libs/Parameter/index.html @@ -0,0 +1,2 @@ + +Parameter (docs.findlib-0.compiler-libs.Parameter)

Module Parameter

Parameter.t carries a unique Variable.t used as function parameter. It can also carry annotations about the usage of the variable.

type t
type parameter = t
val wrap : Variable.t -> t

Make a parameter from a variable with default attributes

val var : t -> Variable.t
val rename : ?current_compilation_unit:Compilation_unit.t -> t -> t

Rename the inner variable of the parameter

val map_var : (Variable.t -> Variable.t) -> t -> t
module T : Identifiable.Thing with type t = t
module Set : sig ... end
include Identifiable.S with type t := t and module T := T and module Set := Set
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
module List : sig ... end
diff --git a/findlib-0/compiler-libs/Parmatch/Compat/argument-1-_/index.html b/findlib-0/compiler-libs/Parmatch/Compat/argument-1-_/index.html new file mode 100644 index 000000000..8c3d2a5b7 --- /dev/null +++ b/findlib-0/compiler-libs/Parmatch/Compat/argument-1-_/index.html @@ -0,0 +1,5 @@ + +_ (docs.findlib-0.compiler-libs.Parmatch.Compat._)

Parameter Compat._

diff --git a/findlib-0/compiler-libs/Parmatch/Compat/index.html b/findlib-0/compiler-libs/Parmatch/Compat/index.html new file mode 100644 index 000000000..8b17c071a --- /dev/null +++ b/findlib-0/compiler-libs/Parmatch/Compat/index.html @@ -0,0 +1,2 @@ + +Compat (docs.findlib-0.compiler-libs.Parmatch.Compat)

Module Parmatch.Compat

Exported compatibility functor, abstracted over constructor equality

Parameters

module _ : sig ... end

Signature

val compat : Typedtree.pattern -> Typedtree.pattern -> bool
val compats : Typedtree.pattern list -> Typedtree.pattern list -> bool
diff --git a/findlib-0/compiler-libs/Parmatch/index.html b/findlib-0/compiler-libs/Parmatch/index.html new file mode 100644 index 000000000..f58bee16d --- /dev/null +++ b/findlib-0/compiler-libs/Parmatch/index.html @@ -0,0 +1,27 @@ + +Parmatch (docs.findlib-0.compiler-libs.Parmatch)

Module Parmatch

Detection of partial matches and unused match cases.

val const_compare : Asttypes.constant -> Asttypes.constant -> int

const_compare c1 c2 compares the actual values represented by c1 and c2, while simply using Stdlib.compare would compare the representations.

cf. MPR#5758

val le_pat : Typedtree.pattern -> Typedtree.pattern -> bool

le_pat p q means: forall V, V matches q implies V matches p

val le_pats : Typedtree.pattern list -> Typedtree.pattern list -> bool

le_pats (p1 .. pm) (q1 .. qn) means: forall i <= m, le_pat pi qi

module Compat (_ : sig ... end) : sig ... end

Exported compatibility functor, abstracted over constructor equality

exception Empty

lub p q is a pattern that matches all values matched by p and q. May raise Empty, when p and q are not compatible.

val lubs : + Typedtree.pattern list -> + Typedtree.pattern list -> + Typedtree.pattern list

lubs [p1; ...; pn] [q1; ...; qk], where n < k, is [lub p1 q1; ...; lub pk qk].

val get_mins : ('a -> 'a -> bool) -> 'a list -> 'a list
val set_args : + Typedtree.pattern -> + Typedtree.pattern list -> + Typedtree.pattern list

Those two functions recombine one pattern and its arguments: For instance: (_,_)::p1::p2::rem -> (p1, p2)::rem The second one will replace mutable arguments by '_'

val set_args_erase_mutable : + Typedtree.pattern -> + Typedtree.pattern list -> + Typedtree.pattern list
val pats_of_type : Env.t -> Types.type_expr -> Typedtree.pattern list

pats_of_type builds a list of patterns from a given expected type, for explosion of wildcard patterns in Typecore.type_pat.

There are four interesting cases:

  • the type is empty ()
  • no further explosion is necessary (Pat_any)
  • a single pattern is generated, from a record or tuple type or a single-variant type (tp)
  • a list of patterns, in the case that all branches are GADT constructors (tp1; ..; tpn).
val pressure_variants : Env.t -> Typedtree.pattern list -> unit
val pressure_variants_in_computation_pattern : + Env.t -> + Typedtree.computation Typedtree.general_pattern list -> + unit

check_partial pred loc caselist and check_unused refute pred caselist are called with a function pred which will be given counter-example candidates: they may be partially ill-typed, and have to be type-checked to extract a valid counter-example. pred returns a valid counter-example or None. refute indicates that check_unused was called on a refutation clause.

val check_unused : + (bool -> Typedtree.pattern -> Typedtree.pattern option) -> + Typedtree.value Typedtree.case list -> + unit
val irrefutable : Typedtree.pattern -> bool
val inactive : partial:Typedtree.partial -> Typedtree.pattern -> bool

An inactive pattern is a pattern, matching against which can be duplicated, erased or delayed without change in observable behavior of the program. Patterns containing (lazy _) subpatterns or reads of mutable fields are active.

val check_ambiguous_bindings : Typedtree.value Typedtree.case list -> unit
val some_private_tag : Asttypes.label
diff --git a/findlib-0/compiler-libs/Parse/index.html b/findlib-0/compiler-libs/Parse/index.html new file mode 100644 index 000000000..ba2d53f11 --- /dev/null +++ b/findlib-0/compiler-libs/Parse/index.html @@ -0,0 +1,2 @@ + +Parse (docs.findlib-0.compiler-libs.Parse)

Module Parse

Entry points in the parser

Warning: this module is unstable and part of compiler-libs.

val implementation : Lexing.lexbuf -> Parsetree.structure
val toplevel_phrase : Lexing.lexbuf -> Parsetree.toplevel_phrase

The functions below can be used to parse Longident safely.

val longident : Lexing.lexbuf -> Longident.t

The function longident is guaranteed to parse all subclasses of Longident.t used in OCaml: values, constructors, simple or extended module paths, and types or module types.

However, this function accepts inputs which are not accepted by the compiler, because they combine functor applications and infix operators. In valid OCaml syntax, only value-level identifiers may end with infix operators Foo.( + ). Moreover, in value-level identifiers the module path Foo must be simple (M.N rather than F(X)): functor applications may only appear in type-level identifiers. As a consequence, a path such as F(X).( + ) is not a valid OCaml identifier; but it is accepted by this function.

The next functions are specialized to a subclass of Longident.t

val val_ident : Lexing.lexbuf -> Longident.t

This function parses a syntactically valid path for a value. For instance, x, M.x, and (+.) are valid. Contrarily, M.A, F(X).x, and true are rejected.

Longident for OCaml's value cannot contain functor application. The last component of the Longident.t is not capitalized, but can be an operator A.Path.To.(.%.%.(;..)<-)

val constr_ident : Lexing.lexbuf -> Longident.t

This function parses a syntactically valid path for a variant constructor. For instance, A, M.A and M.(::) are valid, but both M.a and F(X).A are rejected.

Longident for OCaml's variant constructors cannot contain functor application. The last component of the Longident.t is capitalized, or it may be one the special constructors: true,false,(),[],(::). Among those special constructors, only (::) can be prefixed by a module path (A.B.C.(::)).

val simple_module_path : Lexing.lexbuf -> Longident.t

This function parses a syntactically valid path for a module. For instance, A, and M.A are valid, but both M.a and F(X).A are rejected.

Longident for OCaml's module cannot contain functor application. The last component of the Longident.t is capitalized.

val extended_module_path : Lexing.lexbuf -> Longident.t

This function parse syntactically valid path for an extended module. For instance, A.B and F(A).B are valid. Contrarily, (.%()) or [] are both rejected.

The last component of the Longident.t is capitalized.

val type_ident : Lexing.lexbuf -> Longident.t

This function parse syntactically valid path for a type or a module type. For instance, A, t, M.t and F(X).t are valid. Contrarily, (.%()) or [] are both rejected.

In path for type and module types, only operators and special constructors are rejected.

diff --git a/findlib-0/compiler-libs/Parser/Incremental/index.html b/findlib-0/compiler-libs/Parser/Incremental/index.html new file mode 100644 index 000000000..e8920c5cb --- /dev/null +++ b/findlib-0/compiler-libs/Parser/Incremental/index.html @@ -0,0 +1,32 @@ + +Incremental (docs.findlib-0.compiler-libs.Parser.Incremental)

Module Parser.Incremental

val parse_mod_ext_longident : + Lexing.position -> + Longident.t MenhirInterpreter.checkpoint
val parse_constr_longident : + Lexing.position -> + Longident.t MenhirInterpreter.checkpoint
diff --git a/findlib-0/compiler-libs/Parser/MenhirInterpreter/index.html b/findlib-0/compiler-libs/Parser/MenhirInterpreter/index.html new file mode 100644 index 000000000..b8b37ebfe --- /dev/null +++ b/findlib-0/compiler-libs/Parser/MenhirInterpreter/index.html @@ -0,0 +1,35 @@ + +MenhirInterpreter (docs.findlib-0.compiler-libs.Parser.MenhirInterpreter)

Module Parser.MenhirInterpreter

include CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE + with type token = token
type token = token
type production
type 'a env
type 'a checkpoint = private
  1. | InputNeeded of 'a env
  2. | Shifting of 'a env * 'a env * bool
  3. | AboutToReduce of 'a env * production
  4. | HandlingError of 'a env
  5. | Accepted of 'a
  6. | Rejected
type strategy = [
  1. | `Legacy
  2. | `Simplified
]
val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
val lexer_lexbuf_to_supplier : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + supplier
val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
val loop_handle : + ('a -> 'answer) -> + ('a checkpoint -> 'answer) -> + supplier -> + 'a checkpoint -> + 'answer
val loop_handle_undo : + ('a -> 'answer) -> + ('a checkpoint -> 'a checkpoint -> 'answer) -> + supplier -> + 'a checkpoint -> + 'answer
val shifts : 'a checkpoint -> 'a env option
val acceptable : + 'a checkpoint -> + token -> + CamlinternalMenhirLib.IncrementalEngine.position -> + bool
type 'a lr1state
val number : _ lr1state -> int
val production_index : production -> int
val find_production : int -> production
val stack : 'a env -> stack
val top : 'a env -> element option
val pop_many : int -> 'a env -> 'a env option
val get : int -> 'a env -> element option
val current_state_number : 'a env -> int
val equal : 'a env -> 'a env -> bool
val env_has_default_reduction : 'a env -> bool
val state_has_default_reduction : _ lr1state -> bool
val pop : 'a env -> 'a env option
val force_reduction : production -> 'a env -> 'a env
val input_needed : 'a env -> 'a checkpoint
diff --git a/findlib-0/compiler-libs/Parser/index.html b/findlib-0/compiler-libs/Parser/index.html new file mode 100644 index 000000000..38d626304 --- /dev/null +++ b/findlib-0/compiler-libs/Parser/index.html @@ -0,0 +1,47 @@ + +Parser (docs.findlib-0.compiler-libs.Parser)

Module Parser

type token =
  1. | WITH
  2. | WHILE
  3. | WHEN
  4. | VIRTUAL
  5. | VAL
  6. | UNDERSCORE
  7. | UIDENT of string
  8. | TYPE
  9. | TRY
  10. | TRUE
  11. | TO
  12. | TILDE
  13. | THEN
  14. | STRUCT
  15. | STRING of string * Location.t * string option
  16. | STAR
  17. | SIG
  18. | SEMISEMI
  19. | SEMI
  20. | RPAREN
  21. | REC
  22. | RBRACKET
  23. | RBRACE
  24. | QUOTED_STRING_ITEM of string * Location.t * string * Location.t * string option
  25. | QUOTED_STRING_EXPR of string * Location.t * string * Location.t * string option
  26. | QUOTE
  27. | QUESTION
  28. | PRIVATE
  29. | PREFIXOP of string
  30. | PLUSEQ
  31. | PLUSDOT
  32. | PLUS
  33. | PERCENT
  34. | OR
  35. | OPTLABEL of string
  36. | OPEN
  37. | OF
  38. | OBJECT
  39. | NONREC
  40. | NEW
  41. | MUTABLE
  42. | MODULE
  43. | MINUSGREATER
  44. | MINUSDOT
  45. | MINUS
  46. | METHOD
  47. | MATCH
  48. | LPAREN
  49. | LIDENT of string
  50. | LETOP of string
  51. | LET
  52. | LESSMINUS
  53. | LESS
  54. | LBRACKETPERCENTPERCENT
  55. | LBRACKETPERCENT
  56. | LBRACKETLESS
  57. | LBRACKETGREATER
  58. | LBRACKETBAR
  59. | LBRACKETATATAT
  60. | LBRACKETATAT
  61. | LBRACKETAT
  62. | LBRACKET
  63. | LBRACELESS
  64. | LBRACE
  65. | LAZY
  66. | LABEL of string
  67. | INT of string * char option
  68. | INITIALIZER
  69. | INHERIT
  70. | INFIXOP4 of string
  71. | INFIXOP3 of string
  72. | INFIXOP2 of string
  73. | INFIXOP1 of string
  74. | INFIXOP0 of string
  75. | INCLUDE
  76. | IN
  77. | IF
  78. | HASHOP of string
  79. | HASH
  80. | GREATERRBRACKET
  81. | GREATERRBRACE
  82. | GREATER
  83. | FUNCTOR
  84. | FUNCTION
  85. | FUN
  86. | FOR
  87. | FLOAT of string * char option
  88. | FALSE
  89. | EXTERNAL
  90. | EXCEPTION
  91. | EQUAL
  92. | EOL
  93. | EOF
  94. | END
  95. | ELSE
  96. | DOWNTO
  97. | DOTOP of string
  98. | DOTDOT
  99. | DOT
  100. | DONE
  101. | DOCSTRING of Docstrings.docstring
  102. | DO
  103. | CONSTRAINT
  104. | COMMENT of string * Location.t
  105. | COMMA
  106. | COLONGREATER
  107. | COLONEQUAL
  108. | COLONCOLON
  109. | COLON
  110. | CLASS
  111. | CHAR of char
  112. | BEGIN
  113. | BARRBRACKET
  114. | BARBAR
  115. | BAR
  116. | BANG
  117. | BACKQUOTE
  118. | ASSERT
  119. | AS
  120. | ANDOP of string
  121. | AND
  122. | AMPERSAND
  123. | AMPERAMPER
exception Error
val use_file : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + Parsetree.toplevel_phrase list
val toplevel_phrase : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + Parsetree.toplevel_phrase
val parse_val_longident : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + Longident.t
val parse_pattern : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + Parsetree.pattern
val parse_mty_longident : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + Longident.t
val parse_module_type : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + Parsetree.module_type
val parse_module_expr : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + Parsetree.module_expr
val parse_mod_longident : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + Longident.t
val parse_mod_ext_longident : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + Longident.t
val parse_expression : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + Parsetree.expression
val parse_core_type : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + Parsetree.core_type
val parse_constr_longident : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + Longident.t
val parse_any_longident : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + Longident.t
val interface : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + Parsetree.signature
val implementation : + (Lexing.lexbuf -> token) -> + Lexing.lexbuf -> + Parsetree.structure
module MenhirInterpreter : sig ... end
module Incremental : sig ... end
diff --git a/findlib-0/compiler-libs/Parsetree/index.html b/findlib-0/compiler-libs/Parsetree/index.html new file mode 100644 index 000000000..7e510fc8c --- /dev/null +++ b/findlib-0/compiler-libs/Parsetree/index.html @@ -0,0 +1,22 @@ + +Parsetree (docs.findlib-0.compiler-libs.Parsetree)

Module Parsetree

Abstract syntax tree produced by parsing

Warning: this module is unstable and part of compiler-libs.

type constant =
  1. | Pconst_integer of string * char option
    (*

    Integer constants such as 3 3l 3L 3n.

    Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

    *)
  2. | Pconst_char of char
    (*

    Character such as 'c'.

    *)
  3. | Pconst_string of string * Location.t * string option
    (*

    Constant string such as "constant" or {delim|other constant|delim}.

    The location span the content of the string, without the delimiters.

    *)
  4. | Pconst_float of string * char option
    (*

    Float constant such as 3.4, 2e5 or 1.4e-4.

    Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

    *)
type location_stack = Location.t list

Extension points

type attribute = {
  1. attr_name : string Asttypes.loc;
  2. attr_payload : payload;
  3. attr_loc : Location.t;
}

Attributes such as [\@id ARG] and [\@\@id ARG].

Metadata containers passed around within the AST. The compiler ignores unknown attributes.

and extension = string Asttypes.loc * payload

Extension points such as [%id ARG] and [%%id ARG].

Sub-language placeholder -- rejected by the typechecker.

and attributes = attribute list
and payload =
  1. | PStr of structure
  2. | PSig of signature
    (*

    : SIG in an attribute or an extension point

    *)
  3. | PTyp of core_type
    (*

    : T in an attribute or an extension point

    *)
  4. | PPat of pattern * expression option
    (*

    ? P or ? P when E, in an attribute or an extension point

    *)

Core language

Type expressions

and core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_loc_stack : location_stack;
  4. ptyp_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and core_type_desc =
  1. | Ptyp_any
    (*

    _

    *)
  2. | Ptyp_var of string
    (*

    A type variable such as 'a

    *)
  3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
    (*

    Ptyp_arrow(lbl, T1, T2) represents:

    *)
  4. | Ptyp_tuple of core_type list
    (*

    Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

    Invariant: n >= 2.

    *)
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
    (*

    Ptyp_constr(lident, l) represents:

    • tconstr when l=[],
    • T tconstr when l=[T],
    • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
    *)
  6. | Ptyp_object of object_field list * Asttypes.closed_flag
    (*

    Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

    • < l1:T1; ...; ln:Tn > when flag is Closed,
    • < l1:T1; ...; ln:Tn; .. > when flag is Open.
    *)
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
    (*

    Ptyp_class(tconstr, l) represents:

    • #tconstr when l=[],
    • T #tconstr when l=[T],
    • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
    *)
  8. | Ptyp_alias of core_type * string
    (*

    T as 'a.

    *)
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
    (*

    Ptyp_variant([`A;`B], flag, labels) represents:

    • [ `A|`B ] when flag is Closed, and labels is None,
    • [> `A|`B ] when flag is Open, and labels is None,
    • [< `A|`B ] when flag is Closed, and labels is Some [],
    • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
    *)
  10. | Ptyp_poly of string Asttypes.loc list * core_type
    (*

    'a1 ... 'an. T

    Can only appear in the following context:

    • As the core_type of a Ppat_constraint node corresponding to a constraint on a let-binding:

      let x : 'a1 ... 'an. T = e ...
    *)
  11. | Ptyp_package of package_type
    (*

    (module S).

    *)
  12. | Ptyp_extension of extension
    (*

    [%id].

    *)

As package_type typed values:

  • (S, []) represents (module S),
  • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
and row_field = {
  1. prf_desc : row_field_desc;
  2. prf_loc : Location.t;
  3. prf_attributes : attributes;
}
and row_field_desc =
  1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
    (*

    Rtag(`A, b, l) represents:

    • `A when b is true and l is [],
    • `A of T when b is false and l is [T],
    • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
    • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
    • The bool field is true if the tag contains a constant (empty) constructor.
    • & occurs when several types are used for the same constructor (see 4.2 in the manual)
    *)
  2. | Rinherit of core_type
    (*

    [ | t ]

    *)
and object_field = {
  1. pof_desc : object_field_desc;
  2. pof_loc : Location.t;
  3. pof_attributes : attributes;
}
and object_field_desc =
  1. | Otag of Asttypes.label Asttypes.loc * core_type
  2. | Oinherit of core_type

Patterns

and pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_loc_stack : location_stack;
  4. ppat_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and pattern_desc =
  1. | Ppat_any
    (*

    The pattern _.

    *)
  2. | Ppat_var of string Asttypes.loc
    (*

    A variable pattern such as x

    *)
  3. | Ppat_alias of pattern * string Asttypes.loc
    (*

    An alias pattern such as P as 'a

    *)
  4. | Ppat_constant of constant
    (*

    Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  5. | Ppat_interval of constant * constant
    (*

    Patterns such as 'a'..'z'.

    Other forms of interval are recognized by the parser but rejected by the type-checker.

    *)
  6. | Ppat_tuple of pattern list
    (*

    Patterns (P1, ..., Pn).

    Invariant: n >= 2

    *)
  7. | Ppat_construct of Longident.t Asttypes.loc + * (string Asttypes.loc list * pattern) option
    (*

    Ppat_construct(C, args) represents:

    • C when args is None,
    • C P when args is Some ([], P)
    • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
    • C (type a b) P when args is Some ([a; b], P)
    *)
  8. | Ppat_variant of Asttypes.label * pattern option
    (*

    Ppat_variant(`A, pat) represents:

    • `A when pat is None,
    • `A P when pat is Some P
    *)
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
    (*

    Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

    • { l1=P1; ...; ln=Pn } when flag is Closed
    • { l1=P1; ...; ln=Pn; _} when flag is Open

    Invariant: n > 0

    *)
  10. | Ppat_array of pattern list
    (*

    Pattern [| P1; ...; Pn |]

    *)
  11. | Ppat_or of pattern * pattern
    (*

    Pattern P1 | P2

    *)
  12. | Ppat_constraint of pattern * core_type
    (*

    Pattern (P : T)

    *)
  13. | Ppat_type of Longident.t Asttypes.loc
    (*

    Pattern #tconst

    *)
  14. | Ppat_lazy of pattern
    (*

    Pattern lazy P

    *)
  15. | Ppat_unpack of string option Asttypes.loc
    (*

    Ppat_unpack(s) represents:

    • (module P) when s is Some "P"
    • (module _) when s is None

    Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

    *)
  16. | Ppat_exception of pattern
    (*

    Pattern exception P

    *)
  17. | Ppat_extension of extension
    (*

    Pattern [%id]

    *)
  18. | Ppat_open of Longident.t Asttypes.loc * pattern
    (*

    Pattern M.(P)

    *)

Value expressions

and expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_loc_stack : location_stack;
  4. pexp_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
    (*

    Identifiers such as x and M.x

    *)
  2. | Pexp_constant of constant
    (*

    Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
    (*

    Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

    • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
    *)
  4. | Pexp_function of case list
    (*

    function P1 -> E1 | ... | Pn -> En

    *)
  5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
    (*

    Pexp_fun(lbl, exp0, P, E1) represents:

    • fun P -> E1 when lbl is Nolabel and exp0 is None
    • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
    • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
    • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

    Notes:

    • If E0 is provided, only Optional is allowed.
    • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
    • let f P = E is represented using Pexp_fun.
    *)
  6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
    (*

    Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

    li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

    Invariant: n > 0

    *)
  7. | Pexp_match of expression * case list
    (*

    match E0 with P1 -> E1 | ... | Pn -> En

    *)
  8. | Pexp_try of expression * case list
    (*

    try E0 with P1 -> E1 | ... | Pn -> En

    *)
  9. | Pexp_tuple of expression list
    (*

    Expressions (E1, ..., En)

    Invariant: n >= 2

    *)
  10. | Pexp_construct of Longident.t Asttypes.loc * expression option
    (*

    Pexp_construct(C, exp) represents:

    • C when exp is None,
    • C E when exp is Some E,
    • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
    *)
  11. | Pexp_variant of Asttypes.label * expression option
    (*

    Pexp_variant(`A, exp) represents

    • `A when exp is None
    • `A E when exp is Some E
    *)
  12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
    (*

    Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

    • { l1=P1; ...; ln=Pn } when exp0 is None
    • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

    Invariant: n > 0

    *)
  13. | Pexp_field of expression * Longident.t Asttypes.loc
    (*

    E.l

    *)
  14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
    (*

    E1.l <- E2

    *)
  15. | Pexp_array of expression list
    (*

    [| E1; ...; En |]

    *)
  16. | Pexp_ifthenelse of expression * expression * expression option
    (*

    if E1 then E2 else E3

    *)
  17. | Pexp_sequence of expression * expression
    (*

    E1; E2

    *)
  18. | Pexp_while of expression * expression
    (*

    while E1 do E2 done

    *)
  19. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
    (*

    Pexp_for(i, E1, E2, direction, E3) represents:

    • for i = E1 to E2 do E3 done when direction is Upto
    • for i = E1 downto E2 do E3 done when direction is Downto
    *)
  20. | Pexp_constraint of expression * core_type
    (*

    (E : T)

    *)
  21. | Pexp_coerce of expression * core_type option * core_type
    (*

    Pexp_coerce(E, from, T) represents

    • (E :> T) when from is None,
    • (E : T0 :> T) when from is Some T0.
    *)
  22. | Pexp_send of expression * Asttypes.label Asttypes.loc
    (*

    E # m

    *)
  23. | Pexp_new of Longident.t Asttypes.loc
    (*

    new M.c

    *)
  24. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
    (*

    x <- 2

    *)
  25. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
    (*

    {< x1 = E1; ...; xn = En >}

    *)
  26. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
    (*

    let module M = ME in E

    *)
  27. | Pexp_letexception of extension_constructor * expression
    (*

    let exception C in E

    *)
  28. | Pexp_assert of expression
    (*

    assert E.

    Note: assert false is treated in a special way by the type-checker.

    *)
  29. | Pexp_lazy of expression
    (*

    lazy E

    *)
  30. | Pexp_poly of expression * core_type option
    (*

    Used for method bodies.

    Can only be used as the expression under Cfk_concrete for methods (not values).

    *)
  31. | Pexp_object of class_structure
    (*

    object ... end

    *)
  32. | Pexp_newtype of string Asttypes.loc * expression
    (*

    fun (type t) -> E

    *)
  33. | Pexp_pack of module_expr
    (*

    (module ME).

    (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

    *)
  34. | Pexp_open of open_declaration * expression
    (*
    • M.(E)
    • let open M in E
    • let open! M in E
    *)
  35. | Pexp_letop of letop
    (*
    • let* P = E0 in E1
    • let* P0 = E00 and* P1 = E01 in E1
    *)
  36. | Pexp_extension of extension
    (*

    [%id]

    *)
  37. | Pexp_unreachable
    (*

    .

    *)
and case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}

Values of type case represents (P -> E) or (P when E0 -> E)

and letop = {
  1. let_ : binding_op;
  2. ands : binding_op list;
  3. body : expression;
}
and binding_op = {
  1. pbop_op : string Asttypes.loc;
  2. pbop_pat : pattern;
  3. pbop_exp : expression;
  4. pbop_loc : Location.t;
}

Value descriptions

and value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  5. pval_loc : Location.t;
}

Values of type value_description represents:

  • val x: T, when pval_prim is []
  • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

Type declarations

and type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    (*

    ('a1,...'an) t

    *)
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
    (*

    ... constraint T1=T1' ... constraint Tn=Tn'

    *)
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
    (*

    for = private ...

    *)
  6. ptype_manifest : core_type option;
    (*

    represents = T

    *)
  7. ptype_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  8. ptype_loc : Location.t;
}

Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

  • type t when type_kind is Ptype_abstract, and manifest is None,
  • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
  • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
  • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
  • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
  • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
  • type t = .. when type_kind is Ptype_open, and manifest is None.
and type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
    (*

    Invariant: non-empty list

    *)
  4. | Ptype_open
and label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
    (*

    l : T [\@id1] [\@id2]

    *)
}

Note: T can be a Ptyp_poly.

and constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_vars : string Asttypes.loc list;
  3. pcd_args : constructor_arguments;
  4. pcd_res : core_type option;
  5. pcd_loc : Location.t;
  6. pcd_attributes : attributes;
    (*

    C of ... [\@id1] [\@id2]

    *)
}
and constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
    (*

    Values of type constructor_declaration represents the constructor arguments of:

    • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
    • C: T0 when res = Some T0, and args = Pcstr_tuple [],
    • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
    • C of {...} when res = None, and args = Pcstr_record [...],
    • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
    *)
and type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_loc : Location.t;
  6. ptyext_attributes : attributes;
    (*

    ... \@\@id1 \@\@id2

    *)
}

Definition of new extensions constructors for the extensive sum type t (type t += ...).

and extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
    (*

    C of ... [\@id1] [\@id2]

    *)
}
and type_exception = {
  1. ptyexn_constructor : extension_constructor;
  2. ptyexn_loc : Location.t;
  3. ptyexn_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}

Definition of a new exception (exception E).

and extension_constructor_kind =
  1. | Pext_decl of string Asttypes.loc list + * constructor_arguments + * core_type option
    (*

    Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

    • C of T1 * ... * Tn when:

      • existentials is [],
      • c_args is [T1; ...; Tn],
      • t_opt is None
    • C: T0 when

      • existentials is [],
      • c_args is [],
      • t_opt is Some T0.
    • C: T1 * ... * Tn -> T0 when

      • existentials is [],
      • c_args is [T1; ...; Tn],
      • t_opt is Some T0.
    • C: 'a... . T1 * ... * Tn -> T0 when

      • existentials is ['a;...],
      • c_args is [T1; ... ; Tn],
      • t_opt is Some T0.
    *)
  2. | Pext_rebind of Longident.t Asttypes.loc
    (*

    Pext_rebind(D) re-export the constructor D with the new name C

    *)

Class language

Type expressions for the class language

and class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
    (*
    • c
    • ['a1, ..., 'an] c
    *)
  2. | Pcty_signature of class_signature
    (*

    object ... end

    *)
  3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
    (*

    Pcty_arrow(lbl, T, CT) represents:

    *)
  4. | Pcty_extension of extension
    (*

    %id

    *)
  5. | Pcty_open of open_description * class_type
    (*

    let open M in CT

    *)
and class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}

Values of type class_signature represents:

and class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}
and class_type_field_desc =
  1. | Pctf_inherit of class_type
    (*

    inherit CT

    *)
  2. | Pctf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * Asttypes.virtual_flag + * core_type
    (*

    val x: T

    *)
  3. | Pctf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
    (*

    method x: T

    Note: T can be a Ptyp_poly.

    *)
  4. | Pctf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  5. | Pctf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  6. | Pctf_extension of extension
    (*

    [%%id]

    *)
and 'a class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}

Values of type class_expr class_infos represents:

  • class c = ...
  • class ['a1,...,'an] c = ...
  • class virtual c = ...

They are also used for "class type" declaration.

and class_description = class_type class_infos
and class_type_declaration = class_type class_infos

Value expressions for the class language

and class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
    (*

    c and ['a1, ..., 'an] c

    *)
  2. | Pcl_structure of class_structure
    (*

    object ... end

    *)
  3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
    (*

    Pcl_fun(lbl, exp0, P, CE) represents:

    • fun P -> CE when lbl is Nolabel and exp0 is None,
    • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
    • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
    • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
    *)
  4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
    (*

    Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

    Invariant: n > 0

    *)
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
    (*

    Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

    • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
    *)
  6. | Pcl_constraint of class_expr * class_type
    (*

    (CE : CT)

    *)
  7. | Pcl_extension of extension
    (*

    [%id]

    *)
  8. | Pcl_open of open_description * class_expr
    (*

    let open M in CE

    *)
and class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}

Values of type class_structure represents:

and class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}
and class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
    (*

    Pcf_inherit(flag, CE, s) represents:

    • inherit CE when flag is Fresh and s is None,
    • inherit CE as x when flag is Fresh and s is Some x,
    • inherit! CE when flag is Override and s is None,
    • inherit! CE as x when flag is Override and s is Some x
    *)
  2. | Pcf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * class_field_kind
    (*

    Pcf_val(x,flag, kind) represents:

    *)
  3. | Pcf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * class_field_kind
    (**)
  4. | Pcf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  5. | Pcf_initializer of expression
    (*

    initializer E

    *)
  6. | Pcf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  7. | Pcf_extension of extension
    (*

    [%%id]

    *)
and class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

Type expressions for the module language

and module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
    (*

    Pmty_ident(S) represents S

    *)
  2. | Pmty_signature of signature
    (*

    sig ... end

    *)
  3. | Pmty_functor of functor_parameter * module_type
    (*

    functor(X : MT1) -> MT2

    *)
  4. | Pmty_with of module_type * with_constraint list
    (*

    MT with ...

    *)
  5. | Pmty_typeof of module_expr
    (*

    module type of ME

    *)
  6. | Pmty_extension of extension
    (*

    [%id]

    *)
  7. | Pmty_alias of Longident.t Asttypes.loc
    (*

    (module M)

    *)
and functor_parameter =
  1. | Unit
    (*

    ()

    *)
  2. | Named of string option Asttypes.loc * module_type
    (*

    Named(name, MT) represents:

    • (X : MT) when name is Some X,
    • (_ : MT) when name is None
    *)
and signature = signature_item list
and signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc =
  1. | Psig_value of value_description
    (*
    • val x: T
    • external x: T = "s1" ... "sn"
    *)
  2. | Psig_type of Asttypes.rec_flag * type_declaration list
    (*

    type t1 = ... and ... and tn = ...

    *)
  3. | Psig_typesubst of type_declaration list
    (*

    type t1 := ... and ... and tn := ...

    *)
  4. | Psig_typext of type_extension
    (*

    type t1 += ...

    *)
  5. | Psig_exception of type_exception
    (*

    exception C of T

    *)
  6. | Psig_module of module_declaration
    (*

    module X = M and module X : MT

    *)
  7. | Psig_modsubst of module_substitution
    (*

    module X := M

    *)
  8. | Psig_recmodule of module_declaration list
    (*

    module rec X1 : MT1 and ... and Xn : MTn

    *)
  9. | Psig_modtype of module_type_declaration
    (*

    module type S = MT and module type S

    *)
  10. | Psig_modtypesubst of module_type_declaration
    (*

    module type S := ...

    *)
  11. | Psig_open of open_description
    (*

    open X

    *)
  12. | Psig_include of include_description
    (*

    include MT

    *)
  13. | Psig_class of class_description list
    (*

    class c1 : ... and ... and cn : ...

    *)
  14. | Psig_class_type of class_type_declaration list
    (*

    class type ct1 = ... and ... and ctn = ...

    *)
  15. | Psig_attribute of attribute
    (*

    [\@\@\@id]

    *)
  16. | Psig_extension of extension * attributes
    (*

    [%%id]

    *)
and module_declaration = {
  1. pmd_name : string option Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pmd_loc : Location.t;
}

Values of type module_declaration represents S : MT

and module_substitution = {
  1. pms_name : string Asttypes.loc;
  2. pms_manifest : Longident.t Asttypes.loc;
  3. pms_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pms_loc : Location.t;
}

Values of type module_substitution represents S := M

and module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pmtd_loc : Location.t;
}

Values of type module_type_declaration represents:

  • S = MT,
  • S for abstract module type declaration, when pmtd_type is None.
and 'a open_infos = {
  1. popen_expr : 'a;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}

Values of type 'a open_infos represents:

and open_description = Longident.t Asttypes.loc open_infos

Values of type open_description represents:

  • open M.N
  • open M(N).O
and open_declaration = module_expr open_infos

Values of type open_declaration represents:

  • open M.N
  • open M(N).O
  • open struct ... end
and 'a include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos

Values of type include_description represents include MT

and include_declaration = module_expr include_infos

Values of type include_declaration represents include ME

and with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
    (*

    with type X.t = ...

    Note: the last component of the longident must match the name of the type_declaration.

    *)
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    (*

    with module X.Y = Z

    *)
  3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
    (*

    with module type X.Y = Z

    *)
  4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
    (*

    with module type X.Y := sig end

    *)
  5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
    (*

    with type X.t := ..., same format as [Pwith_type]

    *)
  6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    (*

    with module X.Y := Z

    *)

Value expressions for the module language

and module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
    (*

    X

    *)
  2. | Pmod_structure of structure
    (*

    struct ... end

    *)
  3. | Pmod_functor of functor_parameter * module_expr
    (*

    functor(X : MT1) -> ME

    *)
  4. | Pmod_apply of module_expr * module_expr
    (*

    ME1(ME2)

    *)
  5. | Pmod_apply_unit of module_expr
    (*

    ME1()

    *)
  6. | Pmod_constraint of module_expr * module_type
    (*

    (ME : MT)

    *)
  7. | Pmod_unpack of expression
    (*

    (val E)

    *)
  8. | Pmod_extension of extension
    (*

    [%id]

    *)
and structure = structure_item list
and structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc =
  1. | Pstr_eval of expression * attributes
    (*

    E

    *)
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
    (*

    Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

    • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
    *)
  3. | Pstr_primitive of value_description
    (*
    • val x: T
    • external x: T = "s1" ... "sn"
    *)
  4. | Pstr_type of Asttypes.rec_flag * type_declaration list
    (*

    type t1 = ... and ... and tn = ...

    *)
  5. | Pstr_typext of type_extension
    (*

    type t1 += ...

    *)
  6. | Pstr_exception of type_exception
    (*
    • exception C of T
    • exception C = M.X
    *)
  7. | Pstr_module of module_binding
    (*

    module X = ME

    *)
  8. | Pstr_recmodule of module_binding list
    (*

    module rec X1 = ME1 and ... and Xn = MEn

    *)
  9. | Pstr_modtype of module_type_declaration
    (*

    module type S = MT

    *)
  10. | Pstr_open of open_declaration
    (*

    open X

    *)
  11. | Pstr_class of class_declaration list
    (*

    class c1 = ... and ... and cn = ...

    *)
  12. | Pstr_class_type of class_type_declaration list
    (*

    class type ct1 = ... and ... and ctn = ...

    *)
  13. | Pstr_include of include_declaration
    (*

    include ME

    *)
  14. | Pstr_attribute of attribute
    (*

    [\@\@\@id]

    *)
  15. | Pstr_extension of extension * attributes
    (*

    [%%id]

    *)
and value_constraint =
  1. | Pvc_constraint of {
    1. locally_abstract_univars : string Asttypes.loc list;
    2. typ : core_type;
    }
  2. | Pvc_coercion of {
    1. ground : core_type option;
    2. coercion : core_type;
    }
    (*
    • Pvc_constraint { locally_abstract_univars=[]; typ} is a simple type constraint on a value binding: let x : typ
    • More generally, in Pvc_constraint { locally_abstract_univars; typ} locally_abstract_univars is the list of locally abstract type variables in let x: type a ... . typ
    • Pvc_coercion { ground=None; coercion } represents let x :> typ
    • Pvc_coercion { ground=Some g; coercion } represents let x : g :> typ
    *)
and value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_constraint : value_constraint option;
  4. pvb_attributes : attributes;
  5. pvb_loc : Location.t;
}

let pat : type_constraint = exp

and module_binding = {
  1. pmb_name : string option Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Values of type module_binding represents module X = ME

Toplevel

Toplevel phrases

type toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of toplevel_directive
    (*

    #use, #load ...

    *)
and toplevel_directive = {
  1. pdir_name : string Asttypes.loc;
  2. pdir_arg : directive_argument option;
  3. pdir_loc : Location.t;
}
and directive_argument = {
  1. pdira_desc : directive_argument_desc;
  2. pdira_loc : Location.t;
}
and directive_argument_desc =
  1. | Pdir_string of string
  2. | Pdir_int of string * char option
  3. | Pdir_ident of Longident.t
  4. | Pdir_bool of bool
diff --git a/findlib-0/compiler-libs/Pass_wrapper/index.html b/findlib-0/compiler-libs/Pass_wrapper/index.html new file mode 100644 index 000000000..d31f49520 --- /dev/null +++ b/findlib-0/compiler-libs/Pass_wrapper/index.html @@ -0,0 +1,9 @@ + +Pass_wrapper (docs.findlib-0.compiler-libs.Pass_wrapper)

Module Pass_wrapper

val register : pass_name:string -> unit
val with_dump : + ppf_dump:Format.formatter -> + pass_name:string -> + f:(unit -> 'b option) -> + input:'a -> + print_input:(Format.formatter -> 'a -> unit) -> + print_output:(Format.formatter -> 'b -> unit) -> + 'b option
diff --git a/findlib-0/compiler-libs/Path/Map/index.html b/findlib-0/compiler-libs/Path/Map/index.html new file mode 100644 index 000000000..cd48bc8ca --- /dev/null +++ b/findlib-0/compiler-libs/Path/Map/index.html @@ -0,0 +1,8 @@ + +Map (docs.findlib-0.compiler-libs.Path.Map)

Module Path.Map

Maps

type key = t

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Path/Set/index.html b/findlib-0/compiler-libs/Path/Set/index.html new file mode 100644 index 000000000..165dee32f --- /dev/null +++ b/findlib-0/compiler-libs/Path/Set/index.html @@ -0,0 +1,3 @@ + +Set (docs.findlib-0.compiler-libs.Path.Set)

Module Path.Set

Sets

type elt = t

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Path/index.html b/findlib-0/compiler-libs/Path/index.html new file mode 100644 index 000000000..70c1ab563 --- /dev/null +++ b/findlib-0/compiler-libs/Path/index.html @@ -0,0 +1,2 @@ + +Path (docs.findlib-0.compiler-libs.Path)

Module Path

type t =
  1. | Pident of Ident.t
    (*

    Examples: x, List, int

    *)
  2. | Pdot of t * string
    (*

    Examples: List.map, Float.Array

    *)
  3. | Papply of t * t
    (*

    Examples: Set.Make(Int), Map.Make(Set.Make(Int))

    *)
  4. | Pextra_ty of t * extra_ty
    (*

    Pextra_ty (p, extra) are additional paths of types introduced by specific OCaml constructs. See below.

    *)
and extra_ty =
  1. | Pcstr_ty of string
    (*

    Pextra_ty (p, Pcstr_ty c) is the type of the inline record for constructor c inside type p.

    For example, in

    type 'a t = Nil | Cons of {hd : 'a; tl : 'a t}

    The inline record type {hd : 'a; tl : 'a t} cannot be named by the user in the surface syntax, but internally it has the path Pextra_ty (Pident `t`, Pcstr_ty "Cons").

    *)
  2. | Pext_ty
    (*

    Pextra_ty (p, Pext_ty) is the type of the inline record for the extension constructor p.

    For example, in

    type exn += Error of {loc : loc; msg : string}

    The inline record type {loc : loc; msg : string} cannot be named by the user in the surface syntax, but internally it has the path Pextra_ty (Pident `Error`, Pext_ty).

    *)
val same : t -> t -> bool
val compare : t -> t -> int
val compare_extra : extra_ty -> extra_ty -> int
val find_free_opt : Ident.t list -> t -> Ident.t option
val exists_free : Ident.t list -> t -> bool
val scope : t -> int
val flatten : t -> [ `Contains_apply | `Ok of Ident.t * string list ]
val name : ?paren:(string -> bool) -> t -> string
val head : t -> Ident.t
val print : Format.formatter -> t -> unit
val heads : t -> Ident.t list
val last : t -> string
val is_constructor_typath : t -> bool
module Map : Map.S with type key = t
module Set : Set.S with type elt = t
diff --git a/findlib-0/compiler-libs/Patterns/General/index.html b/findlib-0/compiler-libs/Patterns/General/index.html new file mode 100644 index 000000000..12b667d50 --- /dev/null +++ b/findlib-0/compiler-libs/Patterns/General/index.html @@ -0,0 +1,2 @@ + +General (docs.findlib-0.compiler-libs.Patterns.General)

Module Patterns.General

type view = [
  1. | Half_simple.view
  2. | `Var of Ident.t * string Asttypes.loc
  3. | `Alias of Typedtree.pattern * Ident.t * string Asttypes.loc
]
val strip_vars : pattern -> Half_simple.pattern
diff --git a/findlib-0/compiler-libs/Patterns/Half_simple/index.html b/findlib-0/compiler-libs/Patterns/Half_simple/index.html new file mode 100644 index 000000000..91b628f59 --- /dev/null +++ b/findlib-0/compiler-libs/Patterns/Half_simple/index.html @@ -0,0 +1,2 @@ + +Half_simple (docs.findlib-0.compiler-libs.Patterns.Half_simple)

Module Patterns.Half_simple

type view = [
  1. | Simple.view
  2. | `Or of Typedtree.pattern * Typedtree.pattern * Types.row_desc option
]
diff --git a/findlib-0/compiler-libs/Patterns/Head/index.html b/findlib-0/compiler-libs/Patterns/Head/index.html new file mode 100644 index 000000000..b1f31df04 --- /dev/null +++ b/findlib-0/compiler-libs/Patterns/Head/index.html @@ -0,0 +1,2 @@ + +Head (docs.findlib-0.compiler-libs.Patterns.Head)

Module Patterns.Head

type desc =
  1. | Any
  2. | Construct of Types.constructor_description
  3. | Constant of Asttypes.constant
  4. | Tuple of int
  5. | Record of Types.label_description list
  6. | Variant of {
    1. tag : Asttypes.label;
    2. has_arg : bool;
    3. cstr_row : Types.row_desc ref;
    4. type_row : unit -> Types.row_desc;
    }
  7. | Array of int
  8. | Lazy
val arity : t -> int
val deconstruct : Simple.pattern -> t * Typedtree.pattern list

deconstruct p returns the head of p and the list of sub patterns.

  • raises [Invalid_arg

    _] if p is an or- or an exception-pattern.

val to_omega_pattern : t -> Typedtree.pattern

reconstructs a pattern, putting wildcards as sub-patterns.

val omega : t
diff --git a/findlib-0/compiler-libs/Patterns/Non_empty_row/index.html b/findlib-0/compiler-libs/Patterns/Non_empty_row/index.html new file mode 100644 index 000000000..93bf1eb25 --- /dev/null +++ b/findlib-0/compiler-libs/Patterns/Non_empty_row/index.html @@ -0,0 +1,2 @@ + +Non_empty_row (docs.findlib-0.compiler-libs.Patterns.Non_empty_row)

Module Patterns.Non_empty_row

type 'a t = 'a * Typedtree.pattern list
val of_initial : Typedtree.pattern list -> Typedtree.pattern t

'assert false' on empty rows

val map_first : ('a -> 'b) -> 'a t -> 'b t
diff --git a/findlib-0/compiler-libs/Patterns/Simple/index.html b/findlib-0/compiler-libs/Patterns/Simple/index.html new file mode 100644 index 000000000..c34b6b1e2 --- /dev/null +++ b/findlib-0/compiler-libs/Patterns/Simple/index.html @@ -0,0 +1,7 @@ + +Simple (docs.findlib-0.compiler-libs.Patterns.Simple)

Module Patterns.Simple

val omega : [> view ] Typedtree.pattern_data
diff --git a/findlib-0/compiler-libs/Patterns/index.html b/findlib-0/compiler-libs/Patterns/index.html new file mode 100644 index 000000000..3c238f388 --- /dev/null +++ b/findlib-0/compiler-libs/Patterns/index.html @@ -0,0 +1,2 @@ + +Patterns (docs.findlib-0.compiler-libs.Patterns)

Module Patterns

val omega : Typedtree.pattern

aka. "Tpat_any" or "_"

val omegas : int -> Typedtree.pattern list

List.init (fun _ -> omega)

val omega_list : 'a list -> Typedtree.pattern list

List.map (fun _ -> omega)

module Non_empty_row : sig ... end
module Simple : sig ... end
module Half_simple : sig ... end
module General : sig ... end
module Head : sig ... end
diff --git a/findlib-0/compiler-libs/Persistent_env/Consistbl/index.html b/findlib-0/compiler-libs/Persistent_env/Consistbl/index.html new file mode 100644 index 000000000..9ed582fa7 --- /dev/null +++ b/findlib-0/compiler-libs/Persistent_env/Consistbl/index.html @@ -0,0 +1,13 @@ + +Consistbl (docs.findlib-0.compiler-libs.Persistent_env.Consistbl)

Module Persistent_env.Consistbl

val create : unit -> t
val clear : t -> unit
val check : t -> Misc.Stdlib.String.t -> Digest.t -> Misc.filepath -> unit
val check_noadd : + t -> + Misc.Stdlib.String.t -> + Digest.t -> + Misc.filepath -> + unit
val extract : + Misc.Stdlib.String.t list -> + t -> + (Misc.Stdlib.String.t * Digest.t option) list
val extract_map : + Misc.Stdlib.String.Set.t -> + t -> + Digest.t option Misc.Stdlib.String.Map.t
val filter : (Misc.Stdlib.String.t -> bool) -> t -> unit
exception Inconsistency of {
  1. unit_name : Misc.Stdlib.String.t;
  2. inconsistent_source : string;
  3. original_source : string;
}
exception Not_available of Misc.Stdlib.String.t
diff --git a/findlib-0/compiler-libs/Persistent_env/Persistent_signature/index.html b/findlib-0/compiler-libs/Persistent_env/Persistent_signature/index.html new file mode 100644 index 000000000..b097ae488 --- /dev/null +++ b/findlib-0/compiler-libs/Persistent_env/Persistent_signature/index.html @@ -0,0 +1,2 @@ + +Persistent_signature (docs.findlib-0.compiler-libs.Persistent_env.Persistent_signature)

Module Persistent_env.Persistent_signature

type t = {
  1. filename : string;
    (*

    Name of the file containing the signature.

    *)
  2. cmi : Cmi_format.cmi_infos;
}
val load : (unit_name:string -> t option) ref

Function used to load a persistent signature. The default is to look for the .cmi file in the load path. This function can be overridden to load it from memory, for instance to build a self-contained toplevel.

diff --git a/findlib-0/compiler-libs/Persistent_env/index.html b/findlib-0/compiler-libs/Persistent_env/index.html new file mode 100644 index 000000000..1aa2e4d48 --- /dev/null +++ b/findlib-0/compiler-libs/Persistent_env/index.html @@ -0,0 +1,22 @@ + +Persistent_env (docs.findlib-0.compiler-libs.Persistent_env)

Module Persistent_env

module Consistbl : + module type of struct include Consistbl.Make(Misc.Stdlib.String) end
type error =
  1. | Illegal_renaming of Misc.modname * Misc.modname * Misc.filepath
  2. | Inconsistent_import of Misc.modname * Misc.filepath * Misc.filepath
  3. | Need_recursive_types of Misc.modname
exception Error of error
val report_error : Format.formatter -> error -> unit
module Persistent_signature : sig ... end
type can_load_cmis =
  1. | Can_load_cmis
  2. | Cannot_load_cmis of Lazy_backtrack.log
type 'a t
val empty : unit -> 'a t
val clear : 'a t -> unit
val clear_missing : 'a t -> unit
val fold : 'a t -> (Misc.modname -> 'a -> 'b -> 'b) -> 'b -> 'b
val read : + 'a t -> + (Persistent_signature.t -> 'a) -> + Misc.modname -> + Misc.filepath -> + 'a
val find : 'a t -> (Persistent_signature.t -> 'a) -> Misc.modname -> 'a
val find_in_cache : 'a t -> Misc.modname -> 'a option
val check : + 'a t -> + (Persistent_signature.t -> 'a) -> + loc:Location.t -> + Misc.modname -> + unit
val looked_up : 'a t -> Misc.modname -> bool
val is_imported : 'a t -> Misc.modname -> bool
val is_imported_opaque : 'a t -> Misc.modname -> bool
val register_import_as_opaque : 'a t -> Misc.modname -> unit
val make_cmi : + 'a t -> + Misc.modname -> + Types.signature -> + Misc.alerts -> + Cmi_format.cmi_infos
val save_cmi : 'a t -> Persistent_signature.t -> 'a -> unit
val can_load_cmis : 'a t -> can_load_cmis
val set_can_load_cmis : 'a t -> can_load_cmis -> unit
val without_cmis : 'a t -> ('b -> 'c) -> 'b -> 'c
val import_crcs : 'a t -> source:Misc.filepath -> Misc.crcs -> unit
val imports : 'a t -> Misc.crcs
val crc_of_unit : + 'a t -> + (Persistent_signature.t -> 'a) -> + Misc.modname -> + Digest.t
val add_delayed_check_forward : ((unit -> unit) -> unit) ref
diff --git a/findlib-0/compiler-libs/Polling/index.html b/findlib-0/compiler-libs/Polling/index.html new file mode 100644 index 000000000..e9024a3de --- /dev/null +++ b/findlib-0/compiler-libs/Polling/index.html @@ -0,0 +1,9 @@ + +Polling (docs.findlib-0.compiler-libs.Polling)

Module Polling

Analyses related to the insertion of Ipoll operations.

val instrument_fundecl : + future_funcnames:Misc.Stdlib.String.Set.t -> + Mach.fundecl -> + Mach.fundecl
val requires_prologue_poll : + future_funcnames:Misc.Stdlib.String.Set.t -> + fun_name:string -> + Mach.instruction -> + bool
diff --git a/findlib-0/compiler-libs/Pparse/index.html b/findlib-0/compiler-libs/Pparse/index.html new file mode 100644 index 000000000..537823d11 --- /dev/null +++ b/findlib-0/compiler-libs/Pparse/index.html @@ -0,0 +1,20 @@ + +Pparse (docs.findlib-0.compiler-libs.Pparse)

Module Pparse

Driver for the parser and external preprocessors.

Warning: this module is unstable and part of compiler-libs.

type error =
  1. | CannotRun of string
  2. | WrongMagic of string
exception Error of error
val preprocess : string -> string
val remove_preprocessed : string -> unit
type 'a ast_kind =
  1. | Structure : Parsetree.structure ast_kind
  2. | Signature : Parsetree.signature ast_kind
val read_ast : 'a ast_kind -> string -> 'a
val write_ast : 'a ast_kind -> string -> 'a -> unit
val file : + tool_name:string -> + string -> + (Lexing.lexbuf -> 'a) -> + 'a ast_kind -> + 'a
val apply_rewriters : + ?restore:bool -> + tool_name:string -> + 'a ast_kind -> + 'a -> + 'a

If restore = true (the default), cookies set by external rewriters will be kept for later calls.

val apply_rewriters_str : + ?restore:bool -> + tool_name:string -> + Parsetree.structure -> + Parsetree.structure
val apply_rewriters_sig : + ?restore:bool -> + tool_name:string -> + Parsetree.signature -> + Parsetree.signature
val report_error : Format.formatter -> error -> unit
val parse_implementation : tool_name:string -> string -> Parsetree.structure
val parse_interface : tool_name:string -> string -> Parsetree.signature
val call_external_preprocessor : string -> string -> string
val open_and_check_magic : string -> string -> in_channel * bool
diff --git a/findlib-0/compiler-libs/Pprintast/index.html b/findlib-0/compiler-libs/Pprintast/index.html new file mode 100644 index 000000000..9b8c3a6b3 --- /dev/null +++ b/findlib-0/compiler-libs/Pprintast/index.html @@ -0,0 +1,2 @@ + +Pprintast (docs.findlib-0.compiler-libs.Pprintast)

Module Pprintast

Pretty-printers for Parsetree

Warning: this module is unstable and part of compiler-libs.

type space_formatter = (unit, Format.formatter, unit) format
val longident : Format.formatter -> Longident.t -> unit
val expression : Format.formatter -> Parsetree.expression -> unit
val string_of_expression : Parsetree.expression -> string
val pattern : Format.formatter -> Parsetree.pattern -> unit
val core_type : Format.formatter -> Parsetree.core_type -> unit
val signature : Format.formatter -> Parsetree.signature -> unit
val structure : Format.formatter -> Parsetree.structure -> unit
val string_of_structure : Parsetree.structure -> string
val module_expr : Format.formatter -> Parsetree.module_expr -> unit
val toplevel_phrase : Format.formatter -> Parsetree.toplevel_phrase -> unit
val top_phrase : Format.formatter -> Parsetree.toplevel_phrase -> unit
val class_field : Format.formatter -> Parsetree.class_field -> unit
val class_type_field : Format.formatter -> Parsetree.class_type_field -> unit
val class_expr : Format.formatter -> Parsetree.class_expr -> unit
val class_type : Format.formatter -> Parsetree.class_type -> unit
val module_type : Format.formatter -> Parsetree.module_type -> unit
val structure_item : Format.formatter -> Parsetree.structure_item -> unit
val signature_item : Format.formatter -> Parsetree.signature_item -> unit
val binding : Format.formatter -> Parsetree.value_binding -> unit
val payload : Format.formatter -> Parsetree.payload -> unit
val tyvar : Format.formatter -> string -> unit

Print a type variable name, taking care of the special treatment required for the single quote character in second position.

diff --git a/findlib-0/compiler-libs/Predef/index.html b/findlib-0/compiler-libs/Predef/index.html new file mode 100644 index 000000000..2a90ac773 --- /dev/null +++ b/findlib-0/compiler-libs/Predef/index.html @@ -0,0 +1,6 @@ + +Predef (docs.findlib-0.compiler-libs.Predef)

Module Predef

val type_int : Types.type_expr
val type_char : Types.type_expr
val type_string : Types.type_expr
val type_bytes : Types.type_expr
val type_float : Types.type_expr
val type_bool : Types.type_expr
val type_unit : Types.type_expr
val type_exn : Types.type_expr
val type_array : Types.type_expr -> Types.type_expr
val type_list : Types.type_expr -> Types.type_expr
val type_option : Types.type_expr -> Types.type_expr
val type_nativeint : Types.type_expr
val type_int32 : Types.type_expr
val type_int64 : Types.type_expr
val type_lazy_t : Types.type_expr -> Types.type_expr
val type_extension_constructor : Types.type_expr
val type_floatarray : Types.type_expr
val path_int : Path.t
val path_char : Path.t
val path_string : Path.t
val path_bytes : Path.t
val path_float : Path.t
val path_bool : Path.t
val path_unit : Path.t
val path_exn : Path.t
val path_array : Path.t
val path_list : Path.t
val path_option : Path.t
val path_nativeint : Path.t
val path_int32 : Path.t
val path_int64 : Path.t
val path_lazy_t : Path.t
val path_extension_constructor : Path.t
val path_floatarray : Path.t
val path_match_failure : Path.t
val path_assert_failure : Path.t
val path_undefined_recursive_module : Path.t
val ident_false : Ident.t
val ident_true : Ident.t
val ident_void : Ident.t
val ident_nil : Ident.t
val ident_cons : Ident.t
val ident_none : Ident.t
val ident_some : Ident.t
val build_initial_env : + (Ident.t -> Types.type_declaration -> 'a -> 'a) -> + (Ident.t -> Types.extension_constructor -> 'a -> 'a) -> + 'a -> + 'a
val builtin_values : (string * Ident.t) list
val builtin_idents : (string * Ident.t) list
val ident_division_by_zero : Ident.t

All predefined exceptions, exposed as Ident.t for flambda (for building value approximations). The Ident.t for division by zero is also exported explicitly so flambda can generate code to raise it.

val all_predef_exns : Ident.t list
diff --git a/findlib-0/compiler-libs/Primitive/index.html b/findlib-0/compiler-libs/Primitive/index.html new file mode 100644 index 000000000..29b312660 --- /dev/null +++ b/findlib-0/compiler-libs/Primitive/index.html @@ -0,0 +1,12 @@ + +Primitive (docs.findlib-0.compiler-libs.Primitive)

Module Primitive

type boxed_integer =
  1. | Pnativeint
  2. | Pint32
  3. | Pint64
type native_repr =
  1. | Same_as_ocaml_repr
  2. | Unboxed_float
  3. | Unboxed_integer of boxed_integer
  4. | Untagged_int
type description = private {
  1. prim_name : string;
  2. prim_arity : int;
  3. prim_alloc : bool;
  4. prim_native_name : string;
  5. prim_native_repr_args : native_repr list;
  6. prim_native_repr_res : native_repr;
}
val simple : name:string -> arity:int -> alloc:bool -> description
val make : + name:string -> + alloc:bool -> + native_name:string -> + native_repr_args:native_repr list -> + native_repr_res:native_repr -> + description
val parse_declaration : + Parsetree.value_description -> + native_repr_args:native_repr list -> + native_repr_res:native_repr -> + description
val native_name : description -> string
val byte_name : description -> string
val equal_boxed_integer : boxed_integer -> boxed_integer -> bool
val equal_native_repr : native_repr -> native_repr -> bool
val native_name_is_external : description -> bool

native_name_is_externa returns true iff the native_name for the given primitive identifies that the primitive is not implemented in the compiler itself.

type error =
  1. | Old_style_float_with_native_repr_attribute
  2. | Old_style_noalloc_with_noalloc_attribute
  3. | No_native_primitive_with_repr_attribute
exception Error of Location.t * error
diff --git a/findlib-0/compiler-libs/Printast/index.html b/findlib-0/compiler-libs/Printast/index.html new file mode 100644 index 000000000..a762e48de --- /dev/null +++ b/findlib-0/compiler-libs/Printast/index.html @@ -0,0 +1,2 @@ + +Printast (docs.findlib-0.compiler-libs.Printast)

Module Printast

Raw printer for Parsetree

Warning: this module is unstable and part of compiler-libs.

val interface : Format.formatter -> Parsetree.signature_item list -> unit
val implementation : Format.formatter -> Parsetree.structure_item list -> unit
val top_phrase : Format.formatter -> Parsetree.toplevel_phrase -> unit
val expression : int -> Format.formatter -> Parsetree.expression -> unit
val structure : int -> Format.formatter -> Parsetree.structure -> unit
val payload : int -> Format.formatter -> Parsetree.payload -> unit
diff --git a/findlib-0/compiler-libs/Printclambda/index.html b/findlib-0/compiler-libs/Printclambda/index.html new file mode 100644 index 000000000..9602a01e1 --- /dev/null +++ b/findlib-0/compiler-libs/Printclambda/index.html @@ -0,0 +1,8 @@ + +Printclambda (docs.findlib-0.compiler-libs.Printclambda)

Module Printclambda

val clambda : Format.formatter -> Clambda.ulambda -> unit
val structured_constant : + Format.formatter -> + Clambda.ustructured_constant -> + unit
val phantom_defining_expr_opt : + Format.formatter -> + Clambda.uphantom_defining_expr option -> + unit
diff --git a/findlib-0/compiler-libs/Printclambda_primitives/index.html b/findlib-0/compiler-libs/Printclambda_primitives/index.html new file mode 100644 index 000000000..61ee5bcf5 --- /dev/null +++ b/findlib-0/compiler-libs/Printclambda_primitives/index.html @@ -0,0 +1,2 @@ + +Printclambda_primitives (docs.findlib-0.compiler-libs.Printclambda_primitives)

Module Printclambda_primitives

diff --git a/findlib-0/compiler-libs/Printcmm/index.html b/findlib-0/compiler-libs/Printcmm/index.html new file mode 100644 index 000000000..6dae3411a --- /dev/null +++ b/findlib-0/compiler-libs/Printcmm/index.html @@ -0,0 +1,5 @@ + +Printcmm (docs.findlib-0.compiler-libs.Printcmm)

Module Printcmm

val rec_flag : Format.formatter -> Cmm.rec_flag -> unit
val machtype_component : Format.formatter -> Cmm.machtype_component -> unit
val machtype : Format.formatter -> Cmm.machtype -> unit
val exttype : Format.formatter -> Cmm.exttype -> unit
val extcall_signature : + Format.formatter -> + (Cmm.machtype * Cmm.exttype list) -> + unit
val integer_comparison : Cmm.integer_comparison -> string
val float_comparison : Cmm.float_comparison -> string
val chunk : Cmm.memory_chunk -> string
val operation : Debuginfo.t -> Cmm.operation -> string
val expression : Format.formatter -> Cmm.expression -> unit
val fundecl : Format.formatter -> Cmm.fundecl -> unit
val data : Format.formatter -> Cmm.data_item list -> unit
val phrase : Format.formatter -> Cmm.phrase -> unit
diff --git a/findlib-0/compiler-libs/Printinstr/index.html b/findlib-0/compiler-libs/Printinstr/index.html new file mode 100644 index 000000000..ac7a6516b --- /dev/null +++ b/findlib-0/compiler-libs/Printinstr/index.html @@ -0,0 +1,2 @@ + +Printinstr (docs.findlib-0.compiler-libs.Printinstr)

Module Printinstr

val instruction : Format.formatter -> Instruct.instruction -> unit
val instrlist : Format.formatter -> Instruct.instruction list -> unit
diff --git a/findlib-0/compiler-libs/Printlambda/index.html b/findlib-0/compiler-libs/Printlambda/index.html new file mode 100644 index 000000000..1d7d350ba --- /dev/null +++ b/findlib-0/compiler-libs/Printlambda/index.html @@ -0,0 +1,11 @@ + +Printlambda (docs.findlib-0.compiler-libs.Printlambda)

Module Printlambda

val integer_comparison : Format.formatter -> Lambda.integer_comparison -> unit
val float_comparison : Format.formatter -> Lambda.float_comparison -> unit
val structured_constant : + Format.formatter -> + Lambda.structured_constant -> + unit
val lambda : Format.formatter -> Lambda.lambda -> unit
val program : Format.formatter -> Lambda.program -> unit
val primitive : Format.formatter -> Lambda.primitive -> unit
val name_of_primitive : Lambda.primitive -> string
val value_kind : Format.formatter -> Lambda.value_kind -> unit
val block_shape : Format.formatter -> Lambda.value_kind list option -> unit
val record_rep : Format.formatter -> Types.record_representation -> unit
val print_bigarray : + string -> + bool -> + Lambda.bigarray_kind -> + Format.formatter -> + Lambda.bigarray_layout -> + unit
diff --git a/findlib-0/compiler-libs/Printlinear/index.html b/findlib-0/compiler-libs/Printlinear/index.html new file mode 100644 index 000000000..dab3e00d8 --- /dev/null +++ b/findlib-0/compiler-libs/Printlinear/index.html @@ -0,0 +1,2 @@ + +Printlinear (docs.findlib-0.compiler-libs.Printlinear)

Module Printlinear

val instr : Format.formatter -> Linear.instruction -> unit
val fundecl : Format.formatter -> Linear.fundecl -> unit
diff --git a/findlib-0/compiler-libs/Printmach/index.html b/findlib-0/compiler-libs/Printmach/index.html new file mode 100644 index 000000000..6603e770b --- /dev/null +++ b/findlib-0/compiler-libs/Printmach/index.html @@ -0,0 +1,7 @@ + +Printmach (docs.findlib-0.compiler-libs.Printmach)

Module Printmach

val reg : Format.formatter -> Reg.t -> unit
val regs : Format.formatter -> Reg.t array -> unit
val regset : Format.formatter -> Reg.Set.t -> unit
val regsetaddr : Format.formatter -> Reg.Set.t -> unit
val operation : + Mach.operation -> + Reg.t array -> + Format.formatter -> + Reg.t array -> + unit
val test : Mach.test -> Format.formatter -> Reg.t array -> unit
val instr : Format.formatter -> Mach.instruction -> unit
val fundecl : Format.formatter -> Mach.fundecl -> unit
val phase : string -> Format.formatter -> Mach.fundecl -> unit
val interferences : Format.formatter -> unit -> unit
val intervals : Format.formatter -> Interval.result -> unit
val preferences : Format.formatter -> unit -> unit
diff --git a/findlib-0/compiler-libs/Printpat/index.html b/findlib-0/compiler-libs/Printpat/index.html new file mode 100644 index 000000000..8a4266c3a --- /dev/null +++ b/findlib-0/compiler-libs/Printpat/index.html @@ -0,0 +1,5 @@ + +Printpat (docs.findlib-0.compiler-libs.Printpat)

Module Printpat

val pretty_const : Asttypes.constant -> string
val top_pretty : Format.formatter -> 'k Typedtree.general_pattern -> unit
val pretty_pat : 'k Typedtree.general_pattern -> unit
val pretty_line : Format.formatter -> 'k Typedtree.general_pattern list -> unit
val pretty_matrix : + Format.formatter -> + 'k Typedtree.general_pattern list list -> + unit
diff --git a/findlib-0/compiler-libs/Printtyp/Conflicts/index.html b/findlib-0/compiler-libs/Printtyp/Conflicts/index.html new file mode 100644 index 000000000..0c384699c --- /dev/null +++ b/findlib-0/compiler-libs/Printtyp/Conflicts/index.html @@ -0,0 +1,2 @@ + +Conflicts (docs.findlib-0.compiler-libs.Printtyp.Conflicts)

Module Printtyp.Conflicts

The Conflicts module keeps track of conflicts arising when attributing names to identifiers and provides functions that can print explanations for these conflict in error messages

val exists : unit -> bool

exists() returns true if the current naming context renamed an identifier to avoid a name collision

type explanation = {
  1. kind : Shape.Sig_component_kind.t;
  2. name : string;
  3. root_name : string;
  4. location : Location.t;
}
val list_explanations : unit -> explanation list

list_explanations() return the list of conflict explanations collected up to this point, and reset the list of collected explanations

val print_located_explanations : Format.formatter -> explanation list -> unit
val print_explanations : Format.formatter -> unit

Print all conflict explanations collected up to this point

val reset : unit -> unit
diff --git a/findlib-0/compiler-libs/Printtyp/Naming_context/index.html b/findlib-0/compiler-libs/Printtyp/Naming_context/index.html new file mode 100644 index 000000000..7d5ec3029 --- /dev/null +++ b/findlib-0/compiler-libs/Printtyp/Naming_context/index.html @@ -0,0 +1,2 @@ + +Naming_context (docs.findlib-0.compiler-libs.Printtyp.Naming_context)

Module Printtyp.Naming_context

val enable : bool -> unit

When contextual names are enabled, the mapping between identifiers and names is ensured to be one-to-one.

diff --git a/findlib-0/compiler-libs/Printtyp/Out_name/index.html b/findlib-0/compiler-libs/Printtyp/Out_name/index.html new file mode 100644 index 000000000..048502ed5 --- /dev/null +++ b/findlib-0/compiler-libs/Printtyp/Out_name/index.html @@ -0,0 +1,2 @@ + +Out_name (docs.findlib-0.compiler-libs.Printtyp.Out_name)

Module Printtyp.Out_name

val create : string -> Outcometree.out_name
val print : Outcometree.out_name -> string
diff --git a/findlib-0/compiler-libs/Printtyp/Subtype/index.html b/findlib-0/compiler-libs/Printtyp/Subtype/index.html new file mode 100644 index 000000000..6f47af248 --- /dev/null +++ b/findlib-0/compiler-libs/Printtyp/Subtype/index.html @@ -0,0 +1,7 @@ + +Subtype (docs.findlib-0.compiler-libs.Printtyp.Subtype)

Module Printtyp.Subtype

val report_error : + Format.formatter -> + Env.t -> + Errortrace.Subtype.error -> + string -> + unit
diff --git a/findlib-0/compiler-libs/Printtyp/index.html b/findlib-0/compiler-libs/Printtyp/index.html new file mode 100644 index 000000000..13b754eba --- /dev/null +++ b/findlib-0/compiler-libs/Printtyp/index.html @@ -0,0 +1,125 @@ + +Printtyp (docs.findlib-0.compiler-libs.Printtyp)

Module Printtyp

val longident : Format.formatter -> Longident.t -> unit
val ident : Format.formatter -> Ident.t -> unit
val namespaced_ident : Shape.Sig_component_kind.t -> Ident.t -> string
val tree_of_path : Path.t -> Outcometree.out_ident
val path : Format.formatter -> Path.t -> unit
val string_of_path : Path.t -> string
val type_path : Format.formatter -> Path.t -> unit

Print a type path taking account of -short-paths. Calls should be within wrap_printing_env.

module Out_name : sig ... end
type namespace := Shape.Sig_component_kind.t option
val strings_of_paths : namespace -> Path.t list -> string list

Print a list of paths, using the same naming context to avoid name collisions

val raw_type_expr : Format.formatter -> Types.type_expr -> unit
val string_of_label : Asttypes.arg_label -> string
val wrap_printing_env : error:bool -> Env.t -> (unit -> 'a) -> 'a
module Naming_context : sig ... end
module Conflicts : sig ... end

The Conflicts module keeps track of conflicts arising when attributing names to identifiers and provides functions that can print explanations for these conflict in error messages

val reset : unit -> unit
val type_expr : Format.formatter -> Types.type_expr -> unit

Print out a type. This will pick names for type variables, and will not reuse names for common type variables shared across multiple type expressions. (It will also reset the printing state, which matters for other type formatters such as prepared_type_expr.) If you want multiple types to use common names for type variables, see prepare_for_printing and prepared_type_expr.

val prepare_for_printing : Types.type_expr list -> unit

prepare_for_printing resets the global printing environment, a la reset, and prepares the types for printing by reserving names and marking loops. Any type variables that are shared between multiple types in the input list will be given the same name when printed with prepared_type_expr.

val add_type_to_preparation : Types.type_expr -> unit

add_type_to_preparation ty extend a previous type expression preparation to the type expression ty

val prepared_type_expr : Format.formatter -> Types.type_expr -> unit

The function prepared_type_expr is a less-safe but more-flexible version of type_expr that should only be called on type_exprs that have been passed to prepare_for_printing. Unlike type_expr, this function does no extra work before printing a type; in particular, this means that any loops in the type expression may cause a stack overflow (see #8860) since this function does not mark any loops. The benefit of this is that if multiple type expressions are prepared simultaneously and then printed with prepared_type_expr, they will use the same names for the same type variables.

val constructor_arguments : + Format.formatter -> + Types.constructor_arguments -> + unit
val tree_of_type_scheme : Types.type_expr -> Outcometree.out_type
val type_scheme : Format.formatter -> Types.type_expr -> unit
val prepared_type_scheme : Format.formatter -> Types.type_expr -> unit
val shared_type_scheme : Format.formatter -> Types.type_expr -> unit

shared_type_scheme is very similar to type_scheme, but does not reset the printing context first. This is intended to be used in cases where the printing should have a particularly wide context, such as documentation generators; most use cases, such as error messages, have narrower contexts for which type_scheme is better suited.

val tree_of_value_description : + Ident.t -> + Types.value_description -> + Outcometree.out_sig_item
val value_description : + Ident.t -> + Format.formatter -> + Types.value_description -> + unit
val add_constructor_to_preparation : Types.constructor_declaration -> unit
val prepared_constructor : + Format.formatter -> + Types.constructor_declaration -> + unit
val constructor : Format.formatter -> Types.constructor_declaration -> unit
val tree_of_type_declaration : + Ident.t -> + Types.type_declaration -> + Types.rec_status -> + Outcometree.out_sig_item
val add_type_declaration_to_preparation : + Ident.t -> + Types.type_declaration -> + unit
val prepared_type_declaration : + Ident.t -> + Format.formatter -> + Types.type_declaration -> + unit
val type_declaration : + Ident.t -> + Format.formatter -> + Types.type_declaration -> + unit
val tree_of_extension_constructor : + Ident.t -> + Types.extension_constructor -> + Types.ext_status -> + Outcometree.out_sig_item
val add_extension_constructor_to_preparation : + Types.extension_constructor -> + unit
val prepared_extension_constructor : + Ident.t -> + Format.formatter -> + Types.extension_constructor -> + unit
val extension_constructor : + Ident.t -> + Format.formatter -> + Types.extension_constructor -> + unit
val extension_only_constructor : + Ident.t -> + Format.formatter -> + Types.extension_constructor -> + unit
val tree_of_module : + Ident.t -> + ?ellipsis:bool -> + Types.module_type -> + Types.rec_status -> + Outcometree.out_sig_item
val modtype : Format.formatter -> Types.module_type -> unit
val signature : Format.formatter -> Types.signature -> unit
val tree_of_modtype_declaration : + Ident.t -> + Types.modtype_declaration -> + Outcometree.out_sig_item
val functor_parameters : + sep:(Format.formatter -> unit -> unit) -> + ('b -> Format.formatter -> unit) -> + (Ident.t option * 'b) list -> + Format.formatter -> + unit

Print a list of functor parameters while adjusting the printing environment for each functor argument.

Currently, we are disabling disambiguation for functor argument name to avoid the need to track the moving association between identifiers and syntactic names in situation like:

got: (X: sig module type T end) (Y:X.T) (X:sig module type T end) (Z:X.T) expect: (_: sig end) (Y:X.T) (_:sig end) (Z:X.T)

type type_or_scheme =
  1. | Type
  2. | Type_scheme
val tree_of_signature : Types.signature -> Outcometree.out_sig_item list
val modtype_declaration : + Ident.t -> + Format.formatter -> + Types.modtype_declaration -> + unit
val class_type : Format.formatter -> Types.class_type -> unit
val tree_of_class_declaration : + Ident.t -> + Types.class_declaration -> + Types.rec_status -> + Outcometree.out_sig_item
val class_declaration : + Ident.t -> + Format.formatter -> + Types.class_declaration -> + unit
val tree_of_cltype_declaration : + Ident.t -> + Types.class_type_declaration -> + Types.rec_status -> + Outcometree.out_sig_item
val cltype_declaration : + Ident.t -> + Format.formatter -> + Types.class_type_declaration -> + unit
val type_expansion : + type_or_scheme -> + Format.formatter -> + Errortrace.expanded_type -> + unit
val report_ambiguous_type_error : + Format.formatter -> + Env.t -> + (Path.t * Path.t) -> + (Path.t * Path.t) list -> + (Format.formatter -> unit) -> + (Format.formatter -> unit) -> + (Format.formatter -> unit) -> + unit
val report_unification_error : + Format.formatter -> + Env.t -> + Errortrace.unification_error -> + ?type_expected_explanation:(Format.formatter -> unit) -> + (Format.formatter -> unit) -> + (Format.formatter -> unit) -> + unit
val report_equality_error : + Format.formatter -> + type_or_scheme -> + Env.t -> + Errortrace.equality_error -> + (Format.formatter -> unit) -> + (Format.formatter -> unit) -> + unit
val report_moregen_error : + Format.formatter -> + type_or_scheme -> + Env.t -> + Errortrace.moregen_error -> + (Format.formatter -> unit) -> + (Format.formatter -> unit) -> + unit
val report_comparison_error : + Format.formatter -> + type_or_scheme -> + Env.t -> + Errortrace.comparison_error -> + (Format.formatter -> unit) -> + (Format.formatter -> unit) -> + unit
module Subtype : sig ... end
val print_items : + (Env.t -> Types.signature_item -> 'a option) -> + Env.t -> + Types.signature_item list -> + (Outcometree.out_sig_item * 'a option) list
val rewrite_double_underscore_paths : Env.t -> Path.t -> Path.t
val printed_signature : string -> Format.formatter -> Types.signature -> unit

printed_signature sourcefile ppf sg print the signature sg of sourcefile with potential warnings for name collisions

diff --git a/findlib-0/compiler-libs/Printtyped/index.html b/findlib-0/compiler-libs/Printtyped/index.html new file mode 100644 index 000000000..5a1f085fd --- /dev/null +++ b/findlib-0/compiler-libs/Printtyped/index.html @@ -0,0 +1,5 @@ + +Printtyped (docs.findlib-0.compiler-libs.Printtyped)

Module Printtyped

val interface : Format.formatter -> Typedtree.signature -> unit
val implementation : Format.formatter -> Typedtree.structure -> unit
val implementation_with_coercion : + Format.formatter -> + Typedtree.implementation -> + unit
diff --git a/findlib-0/compiler-libs/Proc/index.html b/findlib-0/compiler-libs/Proc/index.html new file mode 100644 index 000000000..683f17b95 --- /dev/null +++ b/findlib-0/compiler-libs/Proc/index.html @@ -0,0 +1,2 @@ + +Proc (docs.findlib-0.compiler-libs.Proc)

Module Proc

val word_addressed : bool
val num_register_classes : int
val register_class : Reg.t -> int
val num_available_registers : int array
val first_available_register : int array
val register_name : int -> string
val phys_reg : int -> Reg.t
val rotate_registers : bool
val loc_arguments : Cmm.machtype -> Reg.t array * int
val loc_results : Cmm.machtype -> Reg.t array
val loc_parameters : Cmm.machtype -> Reg.t array
val loc_external_arguments : Cmm.exttype list -> Reg.t array array * int
val loc_external_results : Cmm.machtype -> Reg.t array
val loc_exn_bucket : Reg.t
val max_arguments_for_tailcalls : int
val safe_register_pressure : Mach.operation -> int
val max_register_pressure : Mach.operation -> int array
val destroyed_at_oper : Mach.instruction_desc -> Reg.t array
val destroyed_at_raise : Reg.t array
val destroyed_at_reloadretaddr : Reg.t array
val frame_required : Mach.fundecl -> bool
val prologue_required : Mach.fundecl -> bool
val dwarf_register_numbers : reg_class:int -> int array

For a given register class, the DWARF register numbering for that class. Given an allocated register with location Reg n and class reg_class, the returned array contains the corresponding DWARF register number at index n - first_available_register.(reg_class).

val stack_ptr_dwarf_register_number : int

The DWARF register number corresponding to the stack pointer.

val assemble_file : string -> string -> int
val init : unit -> unit
diff --git a/findlib-0/compiler-libs/Profile/index.html b/findlib-0/compiler-libs/Profile/index.html new file mode 100644 index 000000000..251169a3a --- /dev/null +++ b/findlib-0/compiler-libs/Profile/index.html @@ -0,0 +1,2 @@ + +Profile (docs.findlib-0.compiler-libs.Profile)

Module Profile

Compiler performance recording

Warning: this module is unstable and part of compiler-libs.

type file = string
val reset : unit -> unit

erase all recorded profile information

val record_call : ?accumulate:bool -> string -> (unit -> 'a) -> 'a

record_call pass f calls f and records its profile information.

val record : ?accumulate:bool -> string -> ('a -> 'b) -> 'a -> 'b

record pass f arg records the profile information of f arg

type column = [
  1. | `Time
  2. | `Alloc
  3. | `Top_heap
  4. | `Abs_top_heap
]
val print : Format.formatter -> column list -> unit

Prints the selected recorded profiling information to the formatter.

Command line flags

val options_doc : string
val all_columns : column list

A few pass names that are needed in several places, and shared to avoid typos.

val generate : string
val transl : string
val typing : string
diff --git a/findlib-0/compiler-libs/Projection/Map/index.html b/findlib-0/compiler-libs/Projection/Map/index.html new file mode 100644 index 000000000..cc5d1a9cd --- /dev/null +++ b/findlib-0/compiler-libs/Projection/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Projection.Map)

Module Projection.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Projection/Set/index.html b/findlib-0/compiler-libs/Projection/Set/index.html new file mode 100644 index 000000000..eb9252a4a --- /dev/null +++ b/findlib-0/compiler-libs/Projection/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Projection.Set)

Module Projection.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Projection/T/index.html b/findlib-0/compiler-libs/Projection/T/index.html new file mode 100644 index 000000000..92abbbcb6 --- /dev/null +++ b/findlib-0/compiler-libs/Projection/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Projection.T)

Module Projection.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Projection/Tbl/index.html b/findlib-0/compiler-libs/Projection/Tbl/index.html new file mode 100644 index 000000000..76a5c52c4 --- /dev/null +++ b/findlib-0/compiler-libs/Projection/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Projection.Tbl)

Module Projection.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Projection/index.html b/findlib-0/compiler-libs/Projection/index.html new file mode 100644 index 000000000..f75d1bdae --- /dev/null +++ b/findlib-0/compiler-libs/Projection/index.html @@ -0,0 +1,8 @@ + +Projection (docs.findlib-0.compiler-libs.Projection)

Module Projection

Representation of projections from closures and blocks.

type project_closure = {
  1. set_of_closures : Variable.t;
    (*

    must yield a set of closures

    *)
  2. closure_id : Closure_id.t;
}

The selection of one closure given a set of closures, required before a function defined by said set of closures can be applied. See more detailed documentation below on set_of_closures.

type move_within_set_of_closures = {
  1. closure : Variable.t;
    (*

    must yield a closure

    *)
  2. start_from : Closure_id.t;
  3. move_to : Closure_id.t;
}

The selection of one closure given another closure in the same set of closures. See more detailed documentation below on set_of_closures. The move_to closure must be part of the free variables of start_from.

type project_var = {
  1. closure : Variable.t;
    (*

    must yield a closure

    *)
  2. closure_id : Closure_id.t;
  3. var : Var_within_closure.t;
}

The selection from a closure of a variable bound by said closure. In other words, access to a function's environment. Also see more detailed documentation below on set_of_closures.

val print_project_closure : Format.formatter -> project_closure -> unit
val print_move_within_set_of_closures : + Format.formatter -> + move_within_set_of_closures -> + unit
val print_project_var : Format.formatter -> project_var -> unit
val compare_project_var : project_var -> project_var -> int
val compare_project_closure : project_closure -> project_closure -> int
val compare_move_within_set_of_closures : + move_within_set_of_closures -> + move_within_set_of_closures -> + int
type t =
  1. | Project_var of project_var
  2. | Project_closure of project_closure
  3. | Move_within_set_of_closures of move_within_set_of_closures
  4. | Field of int * Variable.t
include Identifiable.S with type t := t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val projecting_from : t -> Variable.t

Return which variable the given projection projects from.

val map_projecting_from : t -> f:(Variable.t -> Variable.t) -> t

Change the variable that the given projection projects from.

diff --git a/findlib-0/compiler-libs/Rec_check/index.html b/findlib-0/compiler-libs/Rec_check/index.html new file mode 100644 index 000000000..fa460fe53 --- /dev/null +++ b/findlib-0/compiler-libs/Rec_check/index.html @@ -0,0 +1,5 @@ + +Rec_check (docs.findlib-0.compiler-libs.Rec_check)

Module Rec_check

exception Illegal_expr
val is_valid_recursive_expression : + Ident.t list -> + Typedtree.expression -> + bool
val is_valid_class_expr : Ident.t list -> Typedtree.class_expr -> bool
diff --git a/findlib-0/compiler-libs/Ref_to_variables/index.html b/findlib-0/compiler-libs/Ref_to_variables/index.html new file mode 100644 index 000000000..7c836998b --- /dev/null +++ b/findlib-0/compiler-libs/Ref_to_variables/index.html @@ -0,0 +1,2 @@ + +Ref_to_variables (docs.findlib-0.compiler-libs.Ref_to_variables)

Module Ref_to_variables

Transform let-bound references into variables.

val eliminate_ref : Flambda.program -> Flambda.program
diff --git a/findlib-0/compiler-libs/Reg/Map/index.html b/findlib-0/compiler-libs/Reg/Map/index.html new file mode 100644 index 000000000..ebd028dfe --- /dev/null +++ b/findlib-0/compiler-libs/Reg/Map/index.html @@ -0,0 +1,8 @@ + +Map (docs.findlib-0.compiler-libs.Reg.Map)

Module Reg.Map

Maps

type key = t

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Reg/Raw_name/index.html b/findlib-0/compiler-libs/Reg/Raw_name/index.html new file mode 100644 index 000000000..58bd89664 --- /dev/null +++ b/findlib-0/compiler-libs/Reg/Raw_name/index.html @@ -0,0 +1,2 @@ + +Raw_name (docs.findlib-0.compiler-libs.Reg.Raw_name)

Module Reg.Raw_name

type t
val create_from_var : Backend_var.t -> t
diff --git a/findlib-0/compiler-libs/Reg/Set/index.html b/findlib-0/compiler-libs/Reg/Set/index.html new file mode 100644 index 000000000..84bb0d7ab --- /dev/null +++ b/findlib-0/compiler-libs/Reg/Set/index.html @@ -0,0 +1,3 @@ + +Set (docs.findlib-0.compiler-libs.Reg.Set)

Module Reg.Set

Sets

type elt = t

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Reg/index.html b/findlib-0/compiler-libs/Reg/index.html new file mode 100644 index 000000000..e835c9a3d --- /dev/null +++ b/findlib-0/compiler-libs/Reg/index.html @@ -0,0 +1,2 @@ + +Reg (docs.findlib-0.compiler-libs.Reg)

Module Reg

module Raw_name : sig ... end
type t = {
  1. mutable raw_name : Raw_name.t;
  2. stamp : int;
  3. typ : Cmm.machtype_component;
  4. mutable loc : location;
  5. mutable spill : bool;
  6. mutable part : int option;
  7. mutable interf : t list;
  8. mutable prefer : (t * int) list;
  9. mutable degree : int;
  10. mutable spill_cost : int;
  11. mutable visited : int;
}
and location =
  1. | Unknown
  2. | Reg of int
  3. | Stack of stack_location
and stack_location =
  1. | Local of int
  2. | Incoming of int
  3. | Outgoing of int
  4. | Domainstate of int
val dummy : t
val create : Cmm.machtype_component -> t
val createv : Cmm.machtype -> t array
val createv_like : t array -> t array
val clone : t -> t
val at_location : Cmm.machtype_component -> location -> t
val typv : t array -> Cmm.machtype
val anonymous : t -> bool
val name : t -> string
module Set : Set.S with type elt = t
module Map : Map.S with type key = t
val add_set_array : Set.t -> t array -> Set.t
val diff_set_array : Set.t -> t array -> Set.t
val inter_set_array : Set.t -> t array -> Set.t
val disjoint_set_array : Set.t -> t array -> bool
val set_of_array : t array -> Set.t
val reset : unit -> unit
val all_registers : unit -> t list
val num_registers : unit -> int
val reinit : unit -> unit
val mark_visited : t -> unit
val is_visited : t -> bool
val clear_visited_marks : unit -> unit
diff --git a/findlib-0/compiler-libs/Reload/index.html b/findlib-0/compiler-libs/Reload/index.html new file mode 100644 index 000000000..be99240ef --- /dev/null +++ b/findlib-0/compiler-libs/Reload/index.html @@ -0,0 +1,2 @@ + +Reload (docs.findlib-0.compiler-libs.Reload)

Module Reload

val fundecl : Mach.fundecl -> int array -> Mach.fundecl * bool
diff --git a/findlib-0/compiler-libs/Reloadgen/class-reload_generic/index.html b/findlib-0/compiler-libs/Reloadgen/class-reload_generic/index.html new file mode 100644 index 000000000..beb456671 --- /dev/null +++ b/findlib-0/compiler-libs/Reloadgen/class-reload_generic/index.html @@ -0,0 +1,5 @@ + +reload_generic (docs.findlib-0.compiler-libs.Reloadgen.reload_generic)

Class Reloadgen.reload_generic

method reload_operation : Mach.operation -> + Reg.t array -> + Reg.t array -> + Reg.t array * Reg.t array
method reload_test : Mach.test -> Reg.t array -> Reg.t array
method makereg : Reg.t -> Reg.t
method makeregs : Reg.t array -> Reg.t array
method fundecl : Mach.fundecl -> int array -> Mach.fundecl * bool
diff --git a/findlib-0/compiler-libs/Reloadgen/index.html b/findlib-0/compiler-libs/Reloadgen/index.html new file mode 100644 index 000000000..22a2a0e33 --- /dev/null +++ b/findlib-0/compiler-libs/Reloadgen/index.html @@ -0,0 +1,2 @@ + +Reloadgen (docs.findlib-0.compiler-libs.Reloadgen)

Module Reloadgen

class reload_generic : object ... end
diff --git a/findlib-0/compiler-libs/Remove_free_vars_equal_to_args/index.html b/findlib-0/compiler-libs/Remove_free_vars_equal_to_args/index.html new file mode 100644 index 000000000..fd094afae --- /dev/null +++ b/findlib-0/compiler-libs/Remove_free_vars_equal_to_args/index.html @@ -0,0 +1,5 @@ + +Remove_free_vars_equal_to_args (docs.findlib-0.compiler-libs.Remove_free_vars_equal_to_args)

Module Remove_free_vars_equal_to_args

Replace free variables in closures known to be equal to specialised arguments of such closures with those specialised arguments.

diff --git a/findlib-0/compiler-libs/Remove_unused_arguments/index.html b/findlib-0/compiler-libs/Remove_unused_arguments/index.html new file mode 100644 index 000000000..bde33c4fb --- /dev/null +++ b/findlib-0/compiler-libs/Remove_unused_arguments/index.html @@ -0,0 +1,13 @@ + +Remove_unused_arguments (docs.findlib-0.compiler-libs.Remove_unused_arguments)

Module Remove_unused_arguments

val separate_unused_arguments_in_closures : + Flambda.program -> + backend:(module Backend_intf.S) -> + Flambda.program

Introduce a stub function to avoid depending on unused arguments.

For instance, it turns let rec fact n unused = + if n = 0 then 1 + else n * fact (n-1) unused into let rec fact' n = + if n = 0 then 1 + else n * fact' (n-1) + and fact n unused = fact' n

val separate_unused_arguments_in_set_of_closures : + Flambda.set_of_closures -> + backend:(module Backend_intf.S) -> + Flambda.set_of_closures option
diff --git a/findlib-0/compiler-libs/Remove_unused_closure_vars/index.html b/findlib-0/compiler-libs/Remove_unused_closure_vars/index.html new file mode 100644 index 000000000..caa04f3f0 --- /dev/null +++ b/findlib-0/compiler-libs/Remove_unused_closure_vars/index.html @@ -0,0 +1,5 @@ + +Remove_unused_closure_vars (docs.findlib-0.compiler-libs.Remove_unused_closure_vars)

Module Remove_unused_closure_vars

val remove_unused_closure_variables : + remove_direct_call_surrogates:bool -> + Flambda.program -> + Flambda.program

Eliminate variables bound by sets of closures that are not required. Also eliminate functions within sets of closures that are not required.

diff --git a/findlib-0/compiler-libs/Remove_unused_program_constructs/index.html b/findlib-0/compiler-libs/Remove_unused_program_constructs/index.html new file mode 100644 index 000000000..58fc41f31 --- /dev/null +++ b/findlib-0/compiler-libs/Remove_unused_program_constructs/index.html @@ -0,0 +1,2 @@ + +Remove_unused_program_constructs (docs.findlib-0.compiler-libs.Remove_unused_program_constructs)

Module Remove_unused_program_constructs

val remove_unused_program_constructs : Flambda.program -> Flambda.program
diff --git a/findlib-0/compiler-libs/Runtimedef/index.html b/findlib-0/compiler-libs/Runtimedef/index.html new file mode 100644 index 000000000..809fcc233 --- /dev/null +++ b/findlib-0/compiler-libs/Runtimedef/index.html @@ -0,0 +1,2 @@ + +Runtimedef (docs.findlib-0.compiler-libs.Runtimedef)

Module Runtimedef

val builtin_exceptions : string array
val builtin_primitives : string array
diff --git a/findlib-0/compiler-libs/Schedgen/class-scheduler_generic/index.html b/findlib-0/compiler-libs/Schedgen/class-scheduler_generic/index.html new file mode 100644 index 000000000..5ba7cd8cc --- /dev/null +++ b/findlib-0/compiler-libs/Schedgen/class-scheduler_generic/index.html @@ -0,0 +1,2 @@ + +scheduler_generic (docs.findlib-0.compiler-libs.Schedgen.scheduler_generic)

Class Schedgen.scheduler_generic

method virtual oper_issue_cycles : Mach.operation -> int
method virtual oper_latency : Mach.operation -> int
method reload_retaddr_issue_cycles : int
method reload_retaddr_latency : int
method oper_in_basic_block : Mach.operation -> bool
method is_store : Mach.operation -> bool
method is_load : Mach.operation -> bool
method is_checkbound : Mach.operation -> bool
method schedule_fundecl : Linear.fundecl -> Linear.fundecl
diff --git a/findlib-0/compiler-libs/Schedgen/index.html b/findlib-0/compiler-libs/Schedgen/index.html new file mode 100644 index 000000000..b2839188d --- /dev/null +++ b/findlib-0/compiler-libs/Schedgen/index.html @@ -0,0 +1,2 @@ + +Schedgen (docs.findlib-0.compiler-libs.Schedgen)

Module Schedgen

type code_dag_node = {
  1. instr : Linear.instruction;
  2. delay : int;
  3. mutable sons : (code_dag_node * int) list;
  4. mutable date : int;
  5. mutable length : int;
  6. mutable ancestors : int;
  7. mutable emitted_ancestors : int;
}
class virtual scheduler_generic : object ... end
val reset : unit -> unit
diff --git a/findlib-0/compiler-libs/Scheduling/index.html b/findlib-0/compiler-libs/Scheduling/index.html new file mode 100644 index 000000000..b778b2e42 --- /dev/null +++ b/findlib-0/compiler-libs/Scheduling/index.html @@ -0,0 +1,2 @@ + +Scheduling (docs.findlib-0.compiler-libs.Scheduling)

Module Scheduling

diff --git a/findlib-0/compiler-libs/Selectgen/Coeffect/index.html b/findlib-0/compiler-libs/Selectgen/Coeffect/index.html new file mode 100644 index 000000000..caed55929 --- /dev/null +++ b/findlib-0/compiler-libs/Selectgen/Coeffect/index.html @@ -0,0 +1,2 @@ + +Coeffect (docs.findlib-0.compiler-libs.Selectgen.Coeffect)

Module Selectgen.Coeffect

type t =
  1. | None
  2. | Read_mutable
  3. | Arbitrary
diff --git a/findlib-0/compiler-libs/Selectgen/Effect/index.html b/findlib-0/compiler-libs/Selectgen/Effect/index.html new file mode 100644 index 000000000..4330a8c87 --- /dev/null +++ b/findlib-0/compiler-libs/Selectgen/Effect/index.html @@ -0,0 +1,2 @@ + +Effect (docs.findlib-0.compiler-libs.Selectgen.Effect)

Module Selectgen.Effect

type t =
  1. | None
  2. | Raise
  3. | Arbitrary
diff --git a/findlib-0/compiler-libs/Selectgen/Effect_and_coeffect/index.html b/findlib-0/compiler-libs/Selectgen/Effect_and_coeffect/index.html new file mode 100644 index 000000000..bac1ef425 --- /dev/null +++ b/findlib-0/compiler-libs/Selectgen/Effect_and_coeffect/index.html @@ -0,0 +1,2 @@ + +Effect_and_coeffect (docs.findlib-0.compiler-libs.Selectgen.Effect_and_coeffect)

Module Selectgen.Effect_and_coeffect

type t
val none : t
val arbitrary : t
val effect : t -> Effect.t
val coeffect : t -> Coeffect.t
val effect_only : Effect.t -> t
val coeffect_only : Coeffect.t -> t
val join : t -> t -> t
val join_list_map : 'a list -> ('a -> t) -> t
diff --git a/findlib-0/compiler-libs/Selectgen/class-selector_generic/index.html b/findlib-0/compiler-libs/Selectgen/class-selector_generic/index.html new file mode 100644 index 000000000..a0bc5441e --- /dev/null +++ b/findlib-0/compiler-libs/Selectgen/class-selector_generic/index.html @@ -0,0 +1,45 @@ + +selector_generic (docs.findlib-0.compiler-libs.Selectgen.selector_generic)

Class Selectgen.selector_generic

method is_immediate : Mach.integer_operation -> int -> bool
method virtual is_immediate_test : Mach.integer_comparison -> int -> bool
method virtual select_addressing : Cmm.memory_chunk -> + Cmm.expression -> + Arch.addressing_mode * Cmm.expression
method is_simple_expr : Cmm.expression -> bool
method effects_of : Cmm.expression -> Effect_and_coeffect.t
method select_operation : Cmm.operation -> + Cmm.expression list -> + Debuginfo.t -> + Mach.operation * Cmm.expression list
method select_condition : Cmm.expression -> Mach.test * Cmm.expression
method select_store : bool -> + Arch.addressing_mode -> + Cmm.expression -> + Mach.operation * Cmm.expression
method regs_for : Cmm.machtype -> Reg.t array
method insert_op : environment -> + Mach.operation -> + Reg.t array -> + Reg.t array -> + Reg.t array
method insert_op_debug : environment -> + Mach.operation -> + Debuginfo.t -> + Reg.t array -> + Reg.t array -> + Reg.t array
method insert_move_extcall_arg : environment -> + Cmm.exttype -> + Reg.t array -> + Reg.t array -> + unit
method emit_extcall_args : environment -> + Cmm.exttype list -> + Cmm.expression list -> + Reg.t array * int
method emit_stores : environment -> Cmm.expression list -> Reg.t array -> unit
method mark_call : unit
method mark_tailcall : unit
method mark_c_tailcall : unit
method mark_instr : Mach.instruction_desc -> unit
method emit_fundecl : future_funcnames:Misc.Stdlib.String.Set.t -> + Cmm.fundecl -> + Mach.fundecl
method extract_onto : Mach.instruction -> Mach.instruction
method extract : Mach.instruction
method insert : environment -> + Mach.instruction_desc -> + Reg.t array -> + Reg.t array -> + unit
method insert_debug : environment -> + Mach.instruction_desc -> + Debuginfo.t -> + Reg.t array -> + Reg.t array -> + unit
method insert_move : environment -> Reg.t -> Reg.t -> unit
method insert_move_args : environment -> + Reg.t array -> + Reg.t array -> + int -> + unit
method insert_move_results : environment -> + Reg.t array -> + Reg.t array -> + int -> + unit
method insert_moves : environment -> Reg.t array -> Reg.t array -> unit
method emit_expr : environment -> Cmm.expression -> Reg.t array option
method emit_tail : environment -> Cmm.expression -> unit
val contains_calls : bool ref
diff --git a/findlib-0/compiler-libs/Selectgen/index.html b/findlib-0/compiler-libs/Selectgen/index.html new file mode 100644 index 000000000..9f285e795 --- /dev/null +++ b/findlib-0/compiler-libs/Selectgen/index.html @@ -0,0 +1,7 @@ + +Selectgen (docs.findlib-0.compiler-libs.Selectgen)

Module Selectgen

type environment
val env_find : Backend_var.t -> environment -> Reg.t array
val size_expr : environment -> Cmm.expression -> int
module Effect : sig ... end
module Coeffect : sig ... end
module Effect_and_coeffect : sig ... end
class virtual selector_generic : object ... end
val reset : unit -> unit
diff --git a/findlib-0/compiler-libs/Selection/index.html b/findlib-0/compiler-libs/Selection/index.html new file mode 100644 index 000000000..d6ad9a1f0 --- /dev/null +++ b/findlib-0/compiler-libs/Selection/index.html @@ -0,0 +1,5 @@ + +Selection (docs.findlib-0.compiler-libs.Selection)

Module Selection

val fundecl : + future_funcnames:Misc.Stdlib.String.Set.t -> + Cmm.fundecl -> + Mach.fundecl
diff --git a/findlib-0/compiler-libs/Semantics_of_primitives/index.html b/findlib-0/compiler-libs/Semantics_of_primitives/index.html new file mode 100644 index 000000000..b1a43c72d --- /dev/null +++ b/findlib-0/compiler-libs/Semantics_of_primitives/index.html @@ -0,0 +1,2 @@ + +Semantics_of_primitives (docs.findlib-0.compiler-libs.Semantics_of_primitives)

Module Semantics_of_primitives

Description of the semantics of primitives, to be used for optimization purposes.

"No effects" means that the primitive does not change the observable state of the world. For example, it must not write to any mutable storage, call arbitrary external functions or change control flow (e.g. by raising an exception). Note that allocation is not "No effects" (see below).

It is assumed in the compiler that applications of primitives with no effects, whose results are not used, may be eliminated. It is further assumed that applications of primitives with no effects may be duplicated (and thus possibly executed more than once).

(Exceptions arising from allocation points, for example "out of memory" or exceptions propagated from finalizers or signal handlers, are treated as "effects out of the ether" and thus ignored for our determination here of effectfulness. The same goes for floating point operations that may cause hardware traps on some platforms.)

"Only generative effects" means that a primitive does not change the observable state of the world save for possibly affecting the state of the garbage collector by performing an allocation. Applications of primitives that only have generative effects and whose results are unused may be eliminated by the compiler. However, unlike "No effects" primitives, such applications will never be eligible for duplication.

"Arbitrary effects" covers all other primitives.

"No coeffects" means that the primitive does not observe the effects (in the sense described above) of other expressions. For example, it must not read from any mutable storage or call arbitrary external functions.

It is assumed in the compiler that, subject to data dependencies, expressions with neither effects nor coeffects may be reordered with respect to other expressions.

type effects =
  1. | No_effects
  2. | Only_generative_effects
  3. | Arbitrary_effects
type coeffects =
  1. | No_coeffects
  2. | Has_coeffects

Describe the semantics of a primitive. This does not take into account of the (non-)(co)effectfulness of the arguments in a primitive application. To determine whether such an application is (co)effectful, the arguments must also be analysed.

type return_type =
  1. | Float
  2. | Other
val return_type_of_primitive : Clambda_primitives.primitive -> return_type
diff --git a/findlib-0/compiler-libs/Set_of_closures_id/Map/index.html b/findlib-0/compiler-libs/Set_of_closures_id/Map/index.html new file mode 100644 index 000000000..3eed08ae7 --- /dev/null +++ b/findlib-0/compiler-libs/Set_of_closures_id/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Set_of_closures_id.Map)

Module Set_of_closures_id.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Set_of_closures_id/Set/index.html b/findlib-0/compiler-libs/Set_of_closures_id/Set/index.html new file mode 100644 index 000000000..e9f8e062b --- /dev/null +++ b/findlib-0/compiler-libs/Set_of_closures_id/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Set_of_closures_id.Set)

Module Set_of_closures_id.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Set_of_closures_id/T/index.html b/findlib-0/compiler-libs/Set_of_closures_id/T/index.html new file mode 100644 index 000000000..ed833b066 --- /dev/null +++ b/findlib-0/compiler-libs/Set_of_closures_id/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Set_of_closures_id.T)

Module Set_of_closures_id.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Set_of_closures_id/Tbl/index.html b/findlib-0/compiler-libs/Set_of_closures_id/Tbl/index.html new file mode 100644 index 000000000..de25f13f3 --- /dev/null +++ b/findlib-0/compiler-libs/Set_of_closures_id/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Set_of_closures_id.Tbl)

Module Set_of_closures_id.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Set_of_closures_id/index.html b/findlib-0/compiler-libs/Set_of_closures_id/index.html new file mode 100644 index 000000000..d1874d8c7 --- /dev/null +++ b/findlib-0/compiler-libs/Set_of_closures_id/index.html @@ -0,0 +1,2 @@ + +Set_of_closures_id (docs.findlib-0.compiler-libs.Set_of_closures_id)

Module Set_of_closures_id

An identifier, unique across the whole program, that identifies a set of closures (viz. Set_of_closures).

include Identifiable.S
type t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val create : ?name:string -> Compilation_unit.t -> t
val name : t -> string option
val get_compilation_unit : t -> Compilation_unit.t
diff --git a/findlib-0/compiler-libs/Set_of_closures_origin/Map/index.html b/findlib-0/compiler-libs/Set_of_closures_origin/Map/index.html new file mode 100644 index 000000000..3ba8bf2f4 --- /dev/null +++ b/findlib-0/compiler-libs/Set_of_closures_origin/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Set_of_closures_origin.Map)

Module Set_of_closures_origin.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Set_of_closures_origin/Set/index.html b/findlib-0/compiler-libs/Set_of_closures_origin/Set/index.html new file mode 100644 index 000000000..2cbae7b21 --- /dev/null +++ b/findlib-0/compiler-libs/Set_of_closures_origin/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Set_of_closures_origin.Set)

Module Set_of_closures_origin.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Set_of_closures_origin/T/index.html b/findlib-0/compiler-libs/Set_of_closures_origin/T/index.html new file mode 100644 index 000000000..63afb58a5 --- /dev/null +++ b/findlib-0/compiler-libs/Set_of_closures_origin/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Set_of_closures_origin.T)

Module Set_of_closures_origin.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Set_of_closures_origin/Tbl/index.html b/findlib-0/compiler-libs/Set_of_closures_origin/Tbl/index.html new file mode 100644 index 000000000..0379660de --- /dev/null +++ b/findlib-0/compiler-libs/Set_of_closures_origin/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Set_of_closures_origin.Tbl)

Module Set_of_closures_origin.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Set_of_closures_origin/index.html b/findlib-0/compiler-libs/Set_of_closures_origin/index.html new file mode 100644 index 000000000..d02c2a9c7 --- /dev/null +++ b/findlib-0/compiler-libs/Set_of_closures_origin/index.html @@ -0,0 +1,2 @@ + +Set_of_closures_origin (docs.findlib-0.compiler-libs.Set_of_closures_origin)

Module Set_of_closures_origin

include Identifiable.S
type t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val create : Set_of_closures_id.t -> t
val get_compilation_unit : t -> Compilation_unit.t
diff --git a/findlib-0/compiler-libs/Shape/Item/Map/index.html b/findlib-0/compiler-libs/Shape/Item/Map/index.html new file mode 100644 index 000000000..9c65c6907 --- /dev/null +++ b/findlib-0/compiler-libs/Shape/Item/Map/index.html @@ -0,0 +1,8 @@ + +Map (docs.findlib-0.compiler-libs.Shape.Item.Map)

Module Item.Map

Maps

type key = t

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Shape/Item/index.html b/findlib-0/compiler-libs/Shape/Item/index.html new file mode 100644 index 000000000..5bd7b8d3b --- /dev/null +++ b/findlib-0/compiler-libs/Shape/Item/index.html @@ -0,0 +1,2 @@ + +Item (docs.findlib-0.compiler-libs.Shape.Item)

Module Shape.Item

type t
val make : string -> Sig_component_kind.t -> t
val value : Ident.t -> t
val type_ : Ident.t -> t
val module_ : Ident.t -> t
val module_type : Ident.t -> t
val extension_constructor : Ident.t -> t
val class_ : Ident.t -> t
val class_type : Ident.t -> t
module Map : Map.S with type key = t
diff --git a/findlib-0/compiler-libs/Shape/Make_reduce/argument-1-Context/index.html b/findlib-0/compiler-libs/Shape/Make_reduce/argument-1-Context/index.html new file mode 100644 index 000000000..870141aa1 --- /dev/null +++ b/findlib-0/compiler-libs/Shape/Make_reduce/argument-1-Context/index.html @@ -0,0 +1,2 @@ + +Context (docs.findlib-0.compiler-libs.Shape.Make_reduce.Context)

Parameter Make_reduce.Context

type env
val fuel : int
val read_unit_shape : unit_name:string -> t option
val find_shape : env -> Ident.t -> t
diff --git a/findlib-0/compiler-libs/Shape/Make_reduce/index.html b/findlib-0/compiler-libs/Shape/Make_reduce/index.html new file mode 100644 index 000000000..159ece7cd --- /dev/null +++ b/findlib-0/compiler-libs/Shape/Make_reduce/index.html @@ -0,0 +1,2 @@ + +Make_reduce (docs.findlib-0.compiler-libs.Shape.Make_reduce)

Module Shape.Make_reduce

The Make_reduce functor is used to generate a reduction function for shapes.

It is parametrized by:

Parameters

module Context : sig ... end

Signature

val reduce : Context.env -> t -> t
diff --git a/findlib-0/compiler-libs/Shape/Map/index.html b/findlib-0/compiler-libs/Shape/Map/index.html new file mode 100644 index 000000000..b82aa5652 --- /dev/null +++ b/findlib-0/compiler-libs/Shape/Map/index.html @@ -0,0 +1,2 @@ + +Map (docs.findlib-0.compiler-libs.Shape.Map)

Module Shape.Map

type shape = t
type nonrec t = t Item.Map.t
val empty : t
val add : t -> Item.t -> shape -> t
val add_value : t -> Ident.t -> Uid.t -> t
val add_value_proj : t -> Ident.t -> shape -> t
val add_type : t -> Ident.t -> Uid.t -> t
val add_type_proj : t -> Ident.t -> shape -> t
val add_module : t -> Ident.t -> shape -> t
val add_module_proj : t -> Ident.t -> shape -> t
val add_module_type : t -> Ident.t -> Uid.t -> t
val add_module_type_proj : t -> Ident.t -> shape -> t
val add_extcons : t -> Ident.t -> Uid.t -> t
val add_extcons_proj : t -> Ident.t -> shape -> t
val add_class : t -> Ident.t -> Uid.t -> t
val add_class_proj : t -> Ident.t -> shape -> t
val add_class_type : t -> Ident.t -> Uid.t -> t
val add_class_type_proj : t -> Ident.t -> shape -> t
diff --git a/findlib-0/compiler-libs/Shape/Sig_component_kind/index.html b/findlib-0/compiler-libs/Shape/Sig_component_kind/index.html new file mode 100644 index 000000000..ee3929198 --- /dev/null +++ b/findlib-0/compiler-libs/Shape/Sig_component_kind/index.html @@ -0,0 +1,2 @@ + +Sig_component_kind (docs.findlib-0.compiler-libs.Shape.Sig_component_kind)

Module Shape.Sig_component_kind

type t =
  1. | Value
  2. | Type
  3. | Module
  4. | Module_type
  5. | Extension_constructor
  6. | Class
  7. | Class_type
val to_string : t -> string
val can_appear_in_types : t -> bool

Whether the name of a component of that kind can appear in a type.

diff --git a/findlib-0/compiler-libs/Shape/Uid/Map/index.html b/findlib-0/compiler-libs/Shape/Uid/Map/index.html new file mode 100644 index 000000000..c2195fb50 --- /dev/null +++ b/findlib-0/compiler-libs/Shape/Uid/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Shape.Uid.Map)

Module Uid.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Shape/Uid/Set/index.html b/findlib-0/compiler-libs/Shape/Uid/Set/index.html new file mode 100644 index 000000000..4101db173 --- /dev/null +++ b/findlib-0/compiler-libs/Shape/Uid/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Shape.Uid.Set)

Module Uid.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Shape/Uid/T/index.html b/findlib-0/compiler-libs/Shape/Uid/T/index.html new file mode 100644 index 000000000..4ff007a10 --- /dev/null +++ b/findlib-0/compiler-libs/Shape/Uid/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Shape.Uid.T)

Module Uid.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Shape/Uid/Tbl/index.html b/findlib-0/compiler-libs/Shape/Uid/Tbl/index.html new file mode 100644 index 000000000..e7e7730c7 --- /dev/null +++ b/findlib-0/compiler-libs/Shape/Uid/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Shape.Uid.Tbl)

Module Uid.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Shape/Uid/index.html b/findlib-0/compiler-libs/Shape/Uid/index.html new file mode 100644 index 000000000..c85a092f3 --- /dev/null +++ b/findlib-0/compiler-libs/Shape/Uid/index.html @@ -0,0 +1,2 @@ + +Uid (docs.findlib-0.compiler-libs.Shape.Uid)

Module Shape.Uid

type t = private
  1. | Compilation_unit of string
  2. | Item of {
    1. comp_unit : string;
    2. id : int;
    }
  3. | Internal
  4. | Predef of string
val reinit : unit -> unit
val mk : current_unit:string -> t
val of_compilation_unit_id : Ident.t -> t
val of_predef_id : Ident.t -> t
val internal_not_actually_unique : t
val for_actual_declaration : t -> bool
include Identifiable.S with type t := t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
diff --git a/findlib-0/compiler-libs/Shape/index.html b/findlib-0/compiler-libs/Shape/index.html new file mode 100644 index 000000000..cfcaa870d --- /dev/null +++ b/findlib-0/compiler-libs/Shape/index.html @@ -0,0 +1,6 @@ + +Shape (docs.findlib-0.compiler-libs.Shape)

Module Shape

module Uid : sig ... end
module Sig_component_kind : sig ... end
module Item : sig ... end
type var = Ident.t
type t = {
  1. uid : Uid.t option;
  2. desc : desc;
}
and desc =
  1. | Var of var
  2. | Abs of var * t
  3. | App of t * t
  4. | Struct of t Item.Map.t
  5. | Leaf
  6. | Proj of t * Item.t
  7. | Comp_unit of string
val print : Format.formatter -> t -> unit
val for_unnamed_functor_param : var
val fresh_var : ?name:string -> Uid.t -> var * t
val var : Uid.t -> Ident.t -> t
val abs : ?uid:Uid.t -> var -> t -> t
val app : ?uid:Uid.t -> t -> arg:t -> t
val str : ?uid:Uid.t -> t Item.Map.t -> t
val proj : ?uid:Uid.t -> t -> Item.t -> t
val leaf : Uid.t -> t
val decompose_abs : t -> (var * t) option
val for_persistent_unit : string -> t
val leaf_for_unpack : t
module Map : sig ... end
val dummy_mod : t
val of_path : + find_shape:(Sig_component_kind.t -> Ident.t -> t) -> + namespace:Sig_component_kind.t -> + Path.t -> + t
val set_uid_if_none : t -> Uid.t -> t
module Make_reduce (Context : sig ... end) : sig ... end

The Make_reduce functor is used to generate a reduction function for shapes.

val local_reduce : t -> t
diff --git a/findlib-0/compiler-libs/Share_constants/index.html b/findlib-0/compiler-libs/Share_constants/index.html new file mode 100644 index 000000000..8807bc3ba --- /dev/null +++ b/findlib-0/compiler-libs/Share_constants/index.html @@ -0,0 +1,2 @@ + +Share_constants (docs.findlib-0.compiler-libs.Share_constants)

Module Share_constants

Share lifted constants that are eligible for sharing (e.g. not strings) and have equal definitions.

val share_constants : Flambda.program -> Flambda.program
diff --git a/findlib-0/compiler-libs/Signature_group/index.html b/findlib-0/compiler-libs/Signature_group/index.html new file mode 100644 index 000000000..c6e426f5a --- /dev/null +++ b/findlib-0/compiler-libs/Signature_group/index.html @@ -0,0 +1,7 @@ + +Signature_group (docs.findlib-0.compiler-libs.Signature_group)

Module Signature_group

Iterate on signature by syntactic group of items

Classes, class types and private row types adds ghost components to the signature where they are defined.

When editing or printing a signature it is therefore important to identify those ghost components.

This module provides type grouping together ghost components with the corresponding core item (or recursive group) and the corresponding iterators.

type sig_item = {
  1. src : Types.signature_item;
    (*

    the syntactic item

    *)
  2. post_ghosts : Types.signature_item list;
    (*

    ghost classes types are post-declared

    *)
}

Classes and class types generate ghosts signature items, we group them together before printing

val flatten : sig_item -> Types.signature

flatten sig_item is x.src :: x.post_ghosts

type core_rec_group =
  1. | Not_rec of sig_item
  2. | Rec_group of sig_item list

A group of mutually recursive definition

val rec_items : core_rec_group -> sig_item list

rec_items group is the list of sig_items in the group

type rec_group = {
  1. pre_ghosts : Types.signature_item list;
  2. group : core_rec_group;
}

Private #row types are manifested as a sequence of definitions preceding a recursive group, we collect them and separate them from the syntactic recursive group.

val next : Types.signature -> (rec_group * Types.signature) option

The sequence seq signature iterates over signature rec_group by rec_group. The second element of the tuple in the full_seq case is the not-yet traversed part of the signature.

val iter : (rec_group -> unit) -> Types.signature -> unit
val fold : ('acc -> rec_group -> 'acc) -> 'acc -> Types.signature -> 'acc
type in_place_patch = {
  1. ghosts : Types.signature;
    (*

    updated list of ghost items

    *)
  2. replace_by : Types.signature_item option;
    (*

    replacement for the selected item

    *)
}

Describe how to amend one element of a signature

val replace_in_place : + (ghosts:Types.signature -> + Types.signature_item -> + ('a * in_place_patch) option) -> + Types.signature -> + ('a * Types.signature) option

!replace_in_place patch sg replaces the first element of the signature for which patch ~rec_group ~ghosts component returns Some (value,patch). The rec_group argument is the remaining part of the mutually recursive group of component. The ghosts list is the current prefix of ghost components associated to component

diff --git a/findlib-0/compiler-libs/Simple_value_approx/index.html b/findlib-0/compiler-libs/Simple_value_approx/index.html new file mode 100644 index 000000000..0faeba988 --- /dev/null +++ b/findlib-0/compiler-libs/Simple_value_approx/index.html @@ -0,0 +1,83 @@ + +Simple_value_approx (docs.findlib-0.compiler-libs.Simple_value_approx)

Module Simple_value_approx

Simple approximations to the runtime results of computations. This pass is designed for speed rather than accuracy; the performance is important since it is used heavily during inlining.

type 'a boxed_int =
  1. | Int32 : int32 boxed_int
  2. | Int64 : int64 boxed_int
  3. | Nativeint : nativeint boxed_int
type value_string = {
  1. contents : string option;
  2. size : int;
}
type unresolved_value =
  1. | Set_of_closures_id of Set_of_closures_id.t
  2. | Symbol of Symbol.t
type unknown_because_of =
  1. | Unresolved_value of unresolved_value
  2. | Other
type t = private {
  1. descr : descr;
  2. var : Variable.t option;
  3. symbol : (Symbol.t * int option) option;
}

A value of type t corresponds to an "approximation" of the result of a computation in the program being compiled. That is to say, it represents what knowledge we have about such a result at compile time. The simplification pass exploits this information to partially evaluate computations.

At a high level, an approximation for a value v has three parts:

  • the "description" (for example, "the constant integer 42");
  • an optional variable;
  • an optional symbol or symbol field. If the variable (resp. symbol) is present then that variable (resp. symbol) may be used to obtain the value v.

The exact semantics of the variable and symbol fields follows.

Approximations are deduced at particular points in an expression tree, but may subsequently be propagated to other locations.

At the point at which an approximation is built for some value v, we can construct a set of variables (call the set S) that are known to alias the same value v. Each member of S will have the same or a more precise descr field in its approximation relative to the approximation for v. (An increase in precision may currently be introduced for pattern matches.) If S is non-empty then it is guaranteed that there is a unique member of S that was declared in a scope further out ("earlier") than all other members of S. If such a member exists then it is recorded in the var field. Otherwise var is None.

Analogous to the construction of the set S, we can construct a set T consisting of all symbols that are known to alias the value whose approximation is being constructed. If T is non-empty then the symbol field is set to some member of T; it does not matter which one. (There is no notion of scope for symbols.)

Note about mutable blocks:

Mutable blocks are always represented by Value_unknown or Value_bottom. Any other approximation could leave the door open to a miscompilation. Such bad scenarios are most likely a user using Obj.magic or Obj.set_field in an inappropriate situation. Such a situation might be: let x = (1, 1) in + Obj.set_field (Obj.repr x) 0 (Obj.repr 2); + assert(fst x = 2) The user would probably expect the assertion to be true, but the compiler could in fact propagate the value of x across the Obj.set_field.

Insisting that mutable blocks have Value_unknown or Value_bottom approximations certainly won't always prevent this kind of error, but should help catch many of them.

It is possible that there may be some false positives, with correct but unreachable code causing this check to fail. However the likelihood of this seems sufficiently low, especially compared to the advantages gained by performing the check, that we include it.

An example of a pattern that might trigger a false positive is: type a = { a : int } + type b = { mutable b : int } + type _ t = + | A : a t + | B : b t + let f (type x) (v:x t) (r:x) = + match v with + | A -> r.a + | B -> r.b <- 2; 3 + let v = + let r = + ref A in + r := A; (* Some pattern that the compiler can't understand *) + f !r { a = 1 } When inlining f, the B branch is unreachable, yet the compiler cannot prove it and must therefore keep it.

and descr = private
  1. | Value_block of Tag.t * t array
  2. | Value_int of int
  3. | Value_char of char
  4. | Value_float of float option
  5. | Value_boxed_int : 'a boxed_int * 'a -> descr
  6. | Value_set_of_closures of value_set_of_closures
  7. | Value_closure of value_closure
  8. | Value_string of value_string
  9. | Value_float_array of value_float_array
  10. | Value_unknown of unknown_because_of
  11. | Value_bottom
  12. | Value_extern of Export_id.t
  13. | Value_symbol of Symbol.t
  14. | Value_unresolved of unresolved_value
and value_closure = {
  1. set_of_closures : t;
  2. closure_id : Closure_id.t;
}
and function_declarations = private {
  1. is_classic_mode : bool;
  2. set_of_closures_id : Set_of_closures_id.t;
  3. set_of_closures_origin : Set_of_closures_origin.t;
  4. funs : function_declaration Variable.Map.t;
}
and function_body = private {
  1. free_variables : Variable.Set.t;
  2. free_symbols : Symbol.Set.t;
  3. stub : bool;
  4. dbg : Debuginfo.t;
  5. inline : Lambda.inline_attribute;
  6. specialise : Lambda.specialise_attribute;
  7. is_a_functor : bool;
  8. body : Flambda.t;
  9. poll : Lambda.poll_attribute;
}
and function_declaration = private {
  1. closure_origin : Closure_origin.t;
  2. params : Parameter.t list;
  3. function_body : function_body option;
}
and value_set_of_closures = private {
  1. function_decls : function_declarations;
  2. bound_vars : t Var_within_closure.Map.t;
  3. free_vars : Flambda.specialised_to Variable.Map.t;
  4. invariant_params : Variable.Set.t Variable.Map.t Lazy.t;
  5. recursive : Variable.Set.t Lazy.t;
  6. size : int option Variable.Map.t Lazy.t;
    (*

    For functions that are very likely to be inlined, the size of the function's body.

    *)
  7. specialised_args : Flambda.specialised_to Variable.Map.t;
  8. freshening : Freshening.Project_var.t;
  9. direct_call_surrogates : Closure_id.t Closure_id.Map.t;
}
and value_float_array_contents =
  1. | Contents of t array
  2. | Unknown_or_mutable
and value_float_array = {
  1. contents : value_float_array_contents;
  2. size : int;
}
val descr : t -> descr

Extraction of the description of approximation(s).

val descrs : t list -> descr list
val print : Format.formatter -> t -> unit

Pretty-printing of approximations to a formatter.

val print_descr : Format.formatter -> descr -> unit
val print_value_set_of_closures : + Format.formatter -> + value_set_of_closures -> + unit
val print_function_declarations : + Format.formatter -> + function_declarations -> + unit
val function_declarations_approx : + keep_body:(Variable.t -> Flambda.function_declaration -> bool) -> + Flambda.function_declarations -> + function_declarations
val create_value_set_of_closures : + function_decls:function_declarations -> + bound_vars:t Var_within_closure.Map.t -> + free_vars:Flambda.specialised_to Variable.Map.t -> + invariant_params:Variable.Set.t Variable.Map.t lazy_t -> + recursive:Variable.Set.t Lazy.t -> + specialised_args:Flambda.specialised_to Variable.Map.t -> + freshening:Freshening.Project_var.t -> + direct_call_surrogates:Closure_id.t Closure_id.Map.t -> + value_set_of_closures
val update_freshening_of_value_set_of_closures : + value_set_of_closures -> + freshening:Freshening.Project_var.t -> + value_set_of_closures
val value_unknown : unknown_because_of -> t

Basic construction of approximations.

val value_int : int -> t
val value_char : char -> t
val value_float : float -> t
val value_any_float : t
val value_mutable_float_array : size:int -> t
val value_immutable_float_array : t array -> t
val value_string : int -> string option -> t
val value_boxed_int : 'i boxed_int -> 'i -> t
val value_block : Tag.t -> t array -> t
val value_extern : Export_id.t -> t
val value_symbol : Symbol.t -> t
val value_bottom : t
val value_unresolved : unresolved_value -> t
val value_closure : + ?closure_var:Variable.t -> + ?set_of_closures_var:Variable.t -> + ?set_of_closures_symbol:Symbol.t -> + value_set_of_closures -> + Closure_id.t -> + t

Construct a closure approximation given the approximation of the corresponding set of closures and the closure ID of the closure to be projected from such set. closure_var and/or set_of_closures_var may be specified to augment the approximation with variables that may be used to access the closure value itself, so long as they are in scope at the proposed point of use.

val value_set_of_closures : + ?set_of_closures_var:Variable.t -> + value_set_of_closures -> + t

Construct a set of closures approximation. set_of_closures_var is as for the parameter of the same name in value_closure, above.

val make_const_int : int -> Flambda.t * t

Take the given constant and produce an appropriate approximation for it together with an Flambda expression representing it.

val make_const_char : char -> Flambda.t * t
val make_const_bool : bool -> Flambda.t * t
val make_const_float : float -> Flambda.t * t
val make_const_boxed_int : 'i boxed_int -> 'i -> Flambda.t * t
val make_const_int_named : int -> Flambda.named * t
val make_const_char_named : char -> Flambda.named * t
val make_const_bool_named : bool -> Flambda.named * t
val make_const_float_named : float -> Flambda.named * t
val make_const_boxed_int_named : 'i boxed_int -> 'i -> Flambda.named * t
val augment_with_variable : t -> Variable.t -> t

Augment an approximation with a given variable (see comment above). If the approximation was already augmented with a variable, the one passed to this function replaces it within the approximation.

val augment_with_symbol : t -> Symbol.t -> t

Like augment_with_variable, but for symbol information.

val augment_with_symbol_field : t -> Symbol.t -> int -> t

Like augment_with_symbol, but for symbol field information.

val replace_description : t -> descr -> t

Replace the description within an approximation.

val augment_with_kind : t -> Lambda.value_kind -> t

Improve the description by taking the kind into account

val augment_kind_with_approx : t -> Lambda.value_kind -> Lambda.value_kind

Improve the kind by taking the description into account

val equal_boxed_int : 'a boxed_int -> 'a -> 'b boxed_int -> 'b -> bool
val meet : really_import_approx:(t -> t) -> t -> t -> t
val known : t -> bool

An approximation is "known" iff it is not Value_unknown.

val useful : t -> bool

An approximation is "useful" iff it is neither unknown nor bottom.

val all_not_useful : t list -> bool

Whether all approximations in the given list do *not* satisfy useful.

val warn_on_mutation : t -> bool

Whether to warn on attempts to mutate a value. It must have been resolved (it cannot be Value_extern or Value_symbol). (See comment above for further explanation.)

type simplification_summary =
  1. | Nothing_done
  2. | Replaced_term
type simplification_result = Flambda.t * simplification_summary * t
type simplification_result_named = Flambda.named * simplification_summary * t
val simplify : t -> Flambda.t -> simplification_result

Given an expression and its approximation, attempt to simplify the expression to a constant (with associated approximation), taking into account whether the expression has any side effects.

val simplify_using_env : + t -> + is_present_in_env:(Variable.t -> bool) -> + Flambda.t -> + simplification_result

As for simplify, but also enables us to simplify based on equalities between variables. The caller must provide a function that tells us whether, if we simplify to a given variable, the value of that variable will be accessible in the current environment.

val simplify_named : t -> Flambda.named -> simplification_result_named
val simplify_named_using_env : + t -> + is_present_in_env:(Variable.t -> bool) -> + Flambda.named -> + simplification_result_named
val simplify_var_to_var_using_env : + t -> + is_present_in_env:(Variable.t -> bool) -> + Variable.t option

If the given approximation identifies another variable and is_present_in_env deems it to be in scope, return that variable (wrapped in a Some), otherwise return None.

val simplify_var : t -> (Flambda.named * t) option
type get_field_result =
  1. | Ok of t
  2. | Unreachable
val get_field : t -> field_index:int -> get_field_result

Given the approximation t of a value, expected to correspond to a block (in the Pmakeblock sense of the word), and a field index then return an appropriate approximation for that field of the block (or Unreachable if the code with the approximation t is unreachable). N.B. Not all cases of unreachable code are returned as Unreachable.

type checked_approx_for_block =
  1. | Wrong
  2. | Ok of Tag.t * t array
val check_approx_for_block : t -> checked_approx_for_block

Try to prove that a value with the given approximation may be used as a block.

val approx_for_bound_var : value_set_of_closures -> Var_within_closure.t -> t

Find the approximation for a bound variable in a set-of-closures approximation. A fatal error is produced if the variable is not bound in the given approximation.

val freshen_and_check_closure_id : + value_set_of_closures -> + Closure_id.t -> + Closure_id.t

Given a set-of-closures approximation and a closure ID, apply any freshening specified by the approximation to the closure ID, and return the resulting ID. Causes a fatal error if the resulting closure ID does not correspond to any function declaration in the approximation.

type strict_checked_approx_for_set_of_closures =
  1. | Wrong
  2. | Ok of Variable.t option * value_set_of_closures
val strict_check_approx_for_set_of_closures : + t -> + strict_checked_approx_for_set_of_closures
type checked_approx_for_set_of_closures =
  1. | Wrong
  2. | Unresolved of unresolved_value
  3. | Unknown
  4. | Unknown_because_of_unresolved_value of unresolved_value
  5. | Ok of Variable.t option * value_set_of_closures
val check_approx_for_set_of_closures : t -> checked_approx_for_set_of_closures

Try to prove that a value with the given approximation may be used as a set of closures. Values coming from external compilation units with unresolved approximations are permitted.

type checked_approx_for_closure =
  1. | Wrong
  2. | Ok of value_closure + * Variable.t option + * Symbol.t option + * value_set_of_closures
val check_approx_for_closure : t -> checked_approx_for_closure

Try to prove that a value with the given approximation may be used as a closure. Values coming from external compilation units with unresolved approximations are not permitted.

type checked_approx_for_closure_allowing_unresolved =
  1. | Wrong
  2. | Unresolved of unresolved_value
  3. | Unknown
  4. | Unknown_because_of_unresolved_value of unresolved_value
  5. | Ok of value_closure + * Variable.t option + * Symbol.t option + * value_set_of_closures
val check_approx_for_closure_allowing_unresolved : + t -> + checked_approx_for_closure_allowing_unresolved

As for check_approx_for_closure, but values coming from external compilation units with unresolved approximations are permitted.

val check_approx_for_float : t -> float option

Returns the value if it can be proved to be a constant float

val float_array_as_constant : value_float_array -> float list option

Returns the value if it can be proved to be a constant float array

val check_approx_for_string : t -> string option

Returns the value if it can be proved to be a constant string

type switch_branch_selection =
  1. | Cannot_be_taken
  2. | Can_be_taken
  3. | Must_be_taken
val potentially_taken_const_switch_branch : t -> int -> switch_branch_selection

Check that the branch is compatible with the approximation

val potentially_taken_block_switch_branch : t -> int -> switch_branch_selection
val function_arity : function_declaration -> int
val update_function_declarations : + function_declarations -> + funs:function_declaration Variable.Map.t -> + function_declarations

Create a set of function declarations based on another set of function declarations.

val update_function_declaration_body : + function_declaration -> + (Flambda.t -> Flambda.t) -> + function_declaration

Creates a map from closure IDs to function declarations by iterating over all sets of closures in the given map.

val clear_function_bodies : function_declarations -> function_declarations
diff --git a/findlib-0/compiler-libs/Simplif/index.html b/findlib-0/compiler-libs/Simplif/index.html new file mode 100644 index 000000000..d3c4a6f31 --- /dev/null +++ b/findlib-0/compiler-libs/Simplif/index.html @@ -0,0 +1,10 @@ + +Simplif (docs.findlib-0.compiler-libs.Simplif)

Module Simplif

Lambda simplification.

Warning: this module is unstable and part of compiler-libs.

val simplify_lambda : Lambda.lambda -> Lambda.lambda
val split_default_wrapper : + id:Ident.t -> + kind:Lambda.function_kind -> + params:(Ident.t * Lambda.value_kind) list -> + return:Lambda.value_kind -> + body:Lambda.lambda -> + attr:Lambda.function_attribute -> + loc:Lambda.scoped_location -> + (Ident.t * Lambda.lambda) list
diff --git a/findlib-0/compiler-libs/Simplify_boxed_integer_ops/Simplify_boxed_int32/index.html b/findlib-0/compiler-libs/Simplify_boxed_integer_ops/Simplify_boxed_int32/index.html new file mode 100644 index 000000000..bc569b920 --- /dev/null +++ b/findlib-0/compiler-libs/Simplify_boxed_integer_ops/Simplify_boxed_int32/index.html @@ -0,0 +1,20 @@ + +Simplify_boxed_int32 (docs.findlib-0.compiler-libs.Simplify_boxed_integer_ops.Simplify_boxed_int32)

Module Simplify_boxed_integer_ops.Simplify_boxed_int32

diff --git a/findlib-0/compiler-libs/Simplify_boxed_integer_ops/Simplify_boxed_int64/index.html b/findlib-0/compiler-libs/Simplify_boxed_integer_ops/Simplify_boxed_int64/index.html new file mode 100644 index 000000000..29b753e4e --- /dev/null +++ b/findlib-0/compiler-libs/Simplify_boxed_integer_ops/Simplify_boxed_int64/index.html @@ -0,0 +1,20 @@ + +Simplify_boxed_int64 (docs.findlib-0.compiler-libs.Simplify_boxed_integer_ops.Simplify_boxed_int64)

Module Simplify_boxed_integer_ops.Simplify_boxed_int64

diff --git a/findlib-0/compiler-libs/Simplify_boxed_integer_ops/Simplify_boxed_nativeint/index.html b/findlib-0/compiler-libs/Simplify_boxed_integer_ops/Simplify_boxed_nativeint/index.html new file mode 100644 index 000000000..eacd5cc86 --- /dev/null +++ b/findlib-0/compiler-libs/Simplify_boxed_integer_ops/Simplify_boxed_nativeint/index.html @@ -0,0 +1,20 @@ + +Simplify_boxed_nativeint (docs.findlib-0.compiler-libs.Simplify_boxed_integer_ops.Simplify_boxed_nativeint)

Module Simplify_boxed_integer_ops.Simplify_boxed_nativeint

diff --git a/findlib-0/compiler-libs/Simplify_boxed_integer_ops/index.html b/findlib-0/compiler-libs/Simplify_boxed_integer_ops/index.html new file mode 100644 index 000000000..7980d1e3d --- /dev/null +++ b/findlib-0/compiler-libs/Simplify_boxed_integer_ops/index.html @@ -0,0 +1,5 @@ + +Simplify_boxed_integer_ops (docs.findlib-0.compiler-libs.Simplify_boxed_integer_ops)

Module Simplify_boxed_integer_ops

diff --git a/findlib-0/compiler-libs/Simplify_boxed_integer_ops_intf/index.html b/findlib-0/compiler-libs/Simplify_boxed_integer_ops_intf/index.html new file mode 100644 index 000000000..da5a43bd6 --- /dev/null +++ b/findlib-0/compiler-libs/Simplify_boxed_integer_ops_intf/index.html @@ -0,0 +1,2 @@ + +Simplify_boxed_integer_ops_intf (docs.findlib-0.compiler-libs.Simplify_boxed_integer_ops_intf)

Module Simplify_boxed_integer_ops_intf

module type S = sig ... end
diff --git a/findlib-0/compiler-libs/Simplify_boxed_integer_ops_intf/module-type-S/index.html b/findlib-0/compiler-libs/Simplify_boxed_integer_ops_intf/module-type-S/index.html new file mode 100644 index 000000000..8567995c4 --- /dev/null +++ b/findlib-0/compiler-libs/Simplify_boxed_integer_ops_intf/module-type-S/index.html @@ -0,0 +1,20 @@ + +S (docs.findlib-0.compiler-libs.Simplify_boxed_integer_ops_intf.S)

Module type Simplify_boxed_integer_ops_intf.S

type t
diff --git a/findlib-0/compiler-libs/Simplify_common/index.html b/findlib-0/compiler-libs/Simplify_common/index.html new file mode 100644 index 000000000..f88b81b37 --- /dev/null +++ b/findlib-0/compiler-libs/Simplify_common/index.html @@ -0,0 +1,28 @@ + +Simplify_common (docs.findlib-0.compiler-libs.Simplify_common)

Module Simplify_common

const_*_expr expr v annot, where the expression expr is known to evaluate to the value v, attempt to produce a more simple expression together with its approximation and the benefit gained by replacing expr with this new expression. This simplification is only performed if expr is known to have no side effects. Otherwise, expr itself is returned, with an appropriate approximation but zero benefit.

const_boxed_int_expr takes an additional argument specifying the kind of boxed integer to which the given expression evaluates.

val const_float_expr : + Flambda.named -> + float -> + Flambda.named * Simple_value_approx.t * Inlining_cost.Benefit.t
val const_integer_comparison_expr : + Flambda.named -> + Lambda.integer_comparison -> + 'a -> + 'a -> + Flambda.named * Simple_value_approx.t * Inlining_cost.Benefit.t
val const_float_comparison_expr : + Flambda.named -> + Lambda.float_comparison -> + float -> + float -> + Flambda.named * Simple_value_approx.t * Inlining_cost.Benefit.t
val swap16 : int -> int

Functions for transposing the order of bytes within words of various sizes.

val swap32 : int32 -> int32
val swap64 : int64 -> int64
val swapnative : nativeint -> nativeint
diff --git a/findlib-0/compiler-libs/Simplify_primitives/index.html b/findlib-0/compiler-libs/Simplify_primitives/index.html new file mode 100644 index 000000000..3cfd1ebe5 --- /dev/null +++ b/findlib-0/compiler-libs/Simplify_primitives/index.html @@ -0,0 +1,8 @@ + +Simplify_primitives (docs.findlib-0.compiler-libs.Simplify_primitives)

Module Simplify_primitives

Simplifies an application of a primitive based on approximation information.

diff --git a/findlib-0/compiler-libs/Spill/index.html b/findlib-0/compiler-libs/Spill/index.html new file mode 100644 index 000000000..321a1f8c5 --- /dev/null +++ b/findlib-0/compiler-libs/Spill/index.html @@ -0,0 +1,2 @@ + +Spill (docs.findlib-0.compiler-libs.Spill)

Module Spill

val fundecl : Mach.fundecl -> Mach.fundecl
diff --git a/findlib-0/compiler-libs/Split/index.html b/findlib-0/compiler-libs/Split/index.html new file mode 100644 index 000000000..3117f60ce --- /dev/null +++ b/findlib-0/compiler-libs/Split/index.html @@ -0,0 +1,2 @@ + +Split (docs.findlib-0.compiler-libs.Split)

Module Split

val fundecl : Mach.fundecl -> Mach.fundecl
val reset : unit -> unit
diff --git a/findlib-0/compiler-libs/Static_exception/Map/index.html b/findlib-0/compiler-libs/Static_exception/Map/index.html new file mode 100644 index 000000000..62b5f7181 --- /dev/null +++ b/findlib-0/compiler-libs/Static_exception/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Static_exception.Map)

Module Static_exception.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Static_exception/Set/index.html b/findlib-0/compiler-libs/Static_exception/Set/index.html new file mode 100644 index 000000000..c41198a86 --- /dev/null +++ b/findlib-0/compiler-libs/Static_exception/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Static_exception.Set)

Module Static_exception.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Static_exception/T/index.html b/findlib-0/compiler-libs/Static_exception/T/index.html new file mode 100644 index 000000000..c326ed57a --- /dev/null +++ b/findlib-0/compiler-libs/Static_exception/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Static_exception.T)

Module Static_exception.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Static_exception/Tbl/index.html b/findlib-0/compiler-libs/Static_exception/Tbl/index.html new file mode 100644 index 000000000..0443141e2 --- /dev/null +++ b/findlib-0/compiler-libs/Static_exception/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Static_exception.Tbl)

Module Static_exception.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Static_exception/index.html b/findlib-0/compiler-libs/Static_exception/index.html new file mode 100644 index 000000000..735d8e45f --- /dev/null +++ b/findlib-0/compiler-libs/Static_exception/index.html @@ -0,0 +1,2 @@ + +Static_exception (docs.findlib-0.compiler-libs.Static_exception)

Module Static_exception

An identifier that is used to label static exceptions. Its uniqueness properties are unspecified.

include Identifiable.S
type t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val create : unit -> t
val to_int : t -> int
diff --git a/findlib-0/compiler-libs/Strmatch/Make/argument-1-_/index.html b/findlib-0/compiler-libs/Strmatch/Make/argument-1-_/index.html new file mode 100644 index 000000000..2991430d5 --- /dev/null +++ b/findlib-0/compiler-libs/Strmatch/Make/argument-1-_/index.html @@ -0,0 +1,9 @@ + +_ (docs.findlib-0.compiler-libs.Strmatch.Make._)

Parameter Make._

val string_block_length : Cmm.expression -> Cmm.expression
val transl_switch : + Debuginfo.t -> + Cmm.expression -> + int -> + int -> + (int * Cmm.expression) list -> + Cmm.expression -> + Cmm.expression
diff --git a/findlib-0/compiler-libs/Strmatch/Make/index.html b/findlib-0/compiler-libs/Strmatch/Make/index.html new file mode 100644 index 000000000..e664d083b --- /dev/null +++ b/findlib-0/compiler-libs/Strmatch/Make/index.html @@ -0,0 +1,7 @@ + +Make (docs.findlib-0.compiler-libs.Strmatch.Make)

Module Strmatch.Make

Parameters

module _ : I

Signature

val compile : + Debuginfo.t -> + Cmm.expression -> + Cmm.expression option -> + (string * Cmm.expression) list -> + Cmm.expression
diff --git a/findlib-0/compiler-libs/Strmatch/index.html b/findlib-0/compiler-libs/Strmatch/index.html new file mode 100644 index 000000000..ac9c5a361 --- /dev/null +++ b/findlib-0/compiler-libs/Strmatch/index.html @@ -0,0 +1,2 @@ + +Strmatch (docs.findlib-0.compiler-libs.Strmatch)

Module Strmatch

module type I = sig ... end
module Make (_ : I) : sig ... end
diff --git a/findlib-0/compiler-libs/Strmatch/module-type-I/index.html b/findlib-0/compiler-libs/Strmatch/module-type-I/index.html new file mode 100644 index 000000000..1eee77be1 --- /dev/null +++ b/findlib-0/compiler-libs/Strmatch/module-type-I/index.html @@ -0,0 +1,9 @@ + +I (docs.findlib-0.compiler-libs.Strmatch.I)

Module type Strmatch.I

val string_block_length : Cmm.expression -> Cmm.expression
val transl_switch : + Debuginfo.t -> + Cmm.expression -> + int -> + int -> + (int * Cmm.expression) list -> + Cmm.expression -> + Cmm.expression
diff --git a/findlib-0/compiler-libs/Strongly_connected_components/Make/argument-1-Id/Map/index.html b/findlib-0/compiler-libs/Strongly_connected_components/Make/argument-1-Id/Map/index.html new file mode 100644 index 000000000..77da5163e --- /dev/null +++ b/findlib-0/compiler-libs/Strongly_connected_components/Make/argument-1-Id/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Strongly_connected_components.Make.Id.Map)

Module Id.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Strongly_connected_components/Make/argument-1-Id/Set/index.html b/findlib-0/compiler-libs/Strongly_connected_components/Make/argument-1-Id/Set/index.html new file mode 100644 index 000000000..3581afe33 --- /dev/null +++ b/findlib-0/compiler-libs/Strongly_connected_components/Make/argument-1-Id/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Strongly_connected_components.Make.Id.Set)

Module Id.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Strongly_connected_components/Make/argument-1-Id/T/index.html b/findlib-0/compiler-libs/Strongly_connected_components/Make/argument-1-Id/T/index.html new file mode 100644 index 000000000..7f0e917d6 --- /dev/null +++ b/findlib-0/compiler-libs/Strongly_connected_components/Make/argument-1-Id/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Strongly_connected_components.Make.Id.T)

Module Id.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Strongly_connected_components/Make/argument-1-Id/Tbl/index.html b/findlib-0/compiler-libs/Strongly_connected_components/Make/argument-1-Id/Tbl/index.html new file mode 100644 index 000000000..153da725a --- /dev/null +++ b/findlib-0/compiler-libs/Strongly_connected_components/Make/argument-1-Id/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Strongly_connected_components.Make.Id.Tbl)

Module Id.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Strongly_connected_components/Make/argument-1-Id/index.html b/findlib-0/compiler-libs/Strongly_connected_components/Make/argument-1-Id/index.html new file mode 100644 index 000000000..ff600eb4c --- /dev/null +++ b/findlib-0/compiler-libs/Strongly_connected_components/Make/argument-1-Id/index.html @@ -0,0 +1,2 @@ + +Id (docs.findlib-0.compiler-libs.Strongly_connected_components.Make.Id)

Parameter Make.Id

type t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
diff --git a/findlib-0/compiler-libs/Strongly_connected_components/Make/index.html b/findlib-0/compiler-libs/Strongly_connected_components/Make/index.html new file mode 100644 index 000000000..81cbf2f72 --- /dev/null +++ b/findlib-0/compiler-libs/Strongly_connected_components/Make/index.html @@ -0,0 +1,4 @@ + +Make (docs.findlib-0.compiler-libs.Strongly_connected_components.Make)

Module Strongly_connected_components.Make

Parameters

Signature

type directed_graph = Id.Set.t Id.Map.t

If (a -> set) belongs to the map, it means that there are edges from a to every element of set. It is assumed that no edge points to a vertex not represented in the map.

type component =
  1. | Has_loop of Id.t list
  2. | No_loop of Id.t
val connected_components_sorted_from_roots_to_leaf : + directed_graph -> + component array
val component_graph : directed_graph -> (component * int list) array
diff --git a/findlib-0/compiler-libs/Strongly_connected_components/index.html b/findlib-0/compiler-libs/Strongly_connected_components/index.html new file mode 100644 index 000000000..a4f03c37b --- /dev/null +++ b/findlib-0/compiler-libs/Strongly_connected_components/index.html @@ -0,0 +1,2 @@ + +Strongly_connected_components (docs.findlib-0.compiler-libs.Strongly_connected_components)

Module Strongly_connected_components

Kosaraju's algorithm for strongly connected components.

Warning: this module is unstable and part of compiler-libs.

module type S = sig ... end
module Make (Id : Identifiable.S) : S with module Id := Id
diff --git a/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/Id/Map/index.html b/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/Id/Map/index.html new file mode 100644 index 000000000..178aa61c5 --- /dev/null +++ b/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/Id/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Strongly_connected_components.S.Id.Map)

Module Id.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/Id/Set/index.html b/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/Id/Set/index.html new file mode 100644 index 000000000..8f7c0511c --- /dev/null +++ b/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/Id/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Strongly_connected_components.S.Id.Set)

Module Id.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/Id/T/index.html b/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/Id/T/index.html new file mode 100644 index 000000000..0c62c54b7 --- /dev/null +++ b/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/Id/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Strongly_connected_components.S.Id.T)

Module Id.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/Id/Tbl/index.html b/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/Id/Tbl/index.html new file mode 100644 index 000000000..4461510cb --- /dev/null +++ b/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/Id/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Strongly_connected_components.S.Id.Tbl)

Module Id.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/Id/index.html b/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/Id/index.html new file mode 100644 index 000000000..85252b44b --- /dev/null +++ b/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/Id/index.html @@ -0,0 +1,2 @@ + +Id (docs.findlib-0.compiler-libs.Strongly_connected_components.S.Id)

Module S.Id

type t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
diff --git a/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/index.html b/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/index.html new file mode 100644 index 000000000..56efbcc3a --- /dev/null +++ b/findlib-0/compiler-libs/Strongly_connected_components/module-type-S/index.html @@ -0,0 +1,4 @@ + +S (docs.findlib-0.compiler-libs.Strongly_connected_components.S)

Module type Strongly_connected_components.S

type directed_graph = Id.Set.t Id.Map.t

If (a -> set) belongs to the map, it means that there are edges from a to every element of set. It is assumed that no edge points to a vertex not represented in the map.

type component =
  1. | Has_loop of Id.t list
  2. | No_loop of Id.t
val connected_components_sorted_from_roots_to_leaf : + directed_graph -> + component array
val component_graph : directed_graph -> (component * int list) array
diff --git a/findlib-0/compiler-libs/Stypes/index.html b/findlib-0/compiler-libs/Stypes/index.html new file mode 100644 index 000000000..3a211af22 --- /dev/null +++ b/findlib-0/compiler-libs/Stypes/index.html @@ -0,0 +1,3 @@ + +Stypes (docs.findlib-0.compiler-libs.Stypes)

Module Stypes

type annotation =
  1. | Ti_pat : 'k Typedtree.pattern_category + * 'k Typedtree.general_pattern -> annotation
  2. | Ti_expr of Typedtree.expression
  3. | Ti_class of Typedtree.class_expr
  4. | Ti_mod of Typedtree.module_expr
  5. | An_call of Location.t * Annot.call
  6. | An_ident of Location.t * string * Annot.ident
val record : annotation -> unit
val record_phrase : Location.t -> unit
val dump : string option -> unit
val get_location : annotation -> Location.t
val get_info : unit -> annotation list
diff --git a/findlib-0/compiler-libs/Subst/Lazy/index.html b/findlib-0/compiler-libs/Subst/Lazy/index.html new file mode 100644 index 000000000..2dc88be08 --- /dev/null +++ b/findlib-0/compiler-libs/Subst/Lazy/index.html @@ -0,0 +1,18 @@ + +Lazy (docs.findlib-0.compiler-libs.Subst.Lazy)

Module Subst.Lazy

type module_decl = {
  1. mdl_type : modtype;
  2. mdl_attributes : Parsetree.attributes;
  3. mdl_loc : Location.t;
  4. mdl_uid : Types.Uid.t;
}
and modtype =
  1. | MtyL_ident of Path.t
  2. | MtyL_signature of signature
  3. | MtyL_functor of functor_parameter * modtype
  4. | MtyL_alias of Path.t
and modtype_declaration = {
  1. mtdl_type : modtype option;
  2. mtdl_attributes : Parsetree.attributes;
  3. mtdl_loc : Location.t;
  4. mtdl_uid : Types.Uid.t;
}
and signature
and functor_parameter =
  1. | Unit
  2. | Named of Ident.t option * modtype
val of_module_decl : Types.module_declaration -> module_decl
val of_modtype : Types.module_type -> modtype
val of_signature : Types.signature -> signature
val of_signature_items : signature_item list -> signature
val of_signature_item : Types.signature_item -> signature_item
val module_decl : scoping -> t -> module_decl -> module_decl
val modtype : scoping -> t -> modtype -> modtype
val modtype_decl : scoping -> t -> modtype_declaration -> modtype_declaration
val signature : scoping -> t -> signature -> signature
val signature_item : scoping -> t -> signature_item -> signature_item
val force_module_decl : module_decl -> Types.module_declaration
val force_modtype : modtype -> Types.module_type
val force_signature : signature -> Types.signature
val force_signature_once : signature -> signature_item list
val force_signature_item : signature_item -> Types.signature_item
diff --git a/findlib-0/compiler-libs/Subst/index.html b/findlib-0/compiler-libs/Subst/index.html new file mode 100644 index 000000000..b430b2fcd --- /dev/null +++ b/findlib-0/compiler-libs/Subst/index.html @@ -0,0 +1,30 @@ + +Subst (docs.findlib-0.compiler-libs.Subst)

Module Subst

type t
val identity : t
val add_type : Ident.t -> Path.t -> t -> t
val add_type_path : Path.t -> Path.t -> t -> t
val add_type_function : + Path.t -> + params:Types.type_expr list -> + body:Types.type_expr -> + t -> + t
val add_module : Ident.t -> Path.t -> t -> t
val add_module_path : Path.t -> Path.t -> t -> t
val add_modtype : Ident.t -> Types.module_type -> t -> t
val add_modtype_path : Path.t -> Types.module_type -> t -> t
val for_saving : t -> t
val reset_for_saving : unit -> unit
val change_locs : t -> Location.t -> t
val module_path : t -> Path.t -> Path.t
val type_path : t -> Path.t -> Path.t
val modtype_path : t -> Path.t -> Path.t
val type_expr : t -> Types.type_expr -> Types.type_expr
val class_type : t -> Types.class_type -> Types.class_type
val value_description : t -> Types.value_description -> Types.value_description
val type_declaration : t -> Types.type_declaration -> Types.type_declaration
val extension_constructor : + t -> + Types.extension_constructor -> + Types.extension_constructor
val class_declaration : t -> Types.class_declaration -> Types.class_declaration
val cltype_declaration : + t -> + Types.class_type_declaration -> + Types.class_type_declaration
type scoping =
  1. | Keep
  2. | Make_local
  3. | Rescope of int
val signature : scoping -> t -> Types.signature -> Types.signature
val signature_item : + scoping -> + t -> + Types.signature_item -> + Types.signature_item
val modtype_declaration : + scoping -> + t -> + Types.modtype_declaration -> + Types.modtype_declaration
val module_declaration : + scoping -> + t -> + Types.module_declaration -> + Types.module_declaration
val compose : t -> t -> t
val ctype_apply_env_empty : + (Types.type_expr list -> + Types.type_expr -> + Types.type_expr list -> + Types.type_expr) + ref
module Lazy : sig ... end
diff --git a/findlib-0/compiler-libs/Switch/CtxStore/argument-1-A/index.html b/findlib-0/compiler-libs/Switch/CtxStore/argument-1-A/index.html new file mode 100644 index 000000000..846f4ea35 --- /dev/null +++ b/findlib-0/compiler-libs/Switch/CtxStore/argument-1-A/index.html @@ -0,0 +1,2 @@ + +A (docs.findlib-0.compiler-libs.Switch.CtxStore.A)

Parameter CtxStore.A

include Stored
type t
type key
val compare_key : key -> key -> int
type context
val make_key : context -> t -> key option
diff --git a/findlib-0/compiler-libs/Switch/CtxStore/index.html b/findlib-0/compiler-libs/Switch/CtxStore/index.html new file mode 100644 index 000000000..1bcb5447c --- /dev/null +++ b/findlib-0/compiler-libs/Switch/CtxStore/index.html @@ -0,0 +1,2 @@ + +CtxStore (docs.findlib-0.compiler-libs.Switch.CtxStore)

Module Switch.CtxStore

Parameters

module A : CtxStored

Signature

val mk_store : unit -> (A.t, A.context) t_store
diff --git a/findlib-0/compiler-libs/Switch/Make/argument-1-Arg/index.html b/findlib-0/compiler-libs/Switch/Make/argument-1-Arg/index.html new file mode 100644 index 000000000..caf9b0d7b --- /dev/null +++ b/findlib-0/compiler-libs/Switch/Make/argument-1-Arg/index.html @@ -0,0 +1,2 @@ + +Arg (docs.findlib-0.compiler-libs.Switch.Make.Arg)

Parameter Make.Arg

type primitive
val eqint : primitive
val neint : primitive
val leint : primitive
val ltint : primitive
val geint : primitive
val gtint : primitive
type loc
type arg
type test
type act
val bind : arg -> (arg -> act) -> act
val make_const : int -> arg
val make_offset : arg -> int -> arg
val make_prim : primitive -> arg list -> test
val make_isout : arg -> arg -> test
val make_isin : arg -> arg -> test
val make_is_nonzero : arg -> test
val arg_as_test : arg -> test
val make_if : test -> act -> act -> act
val make_switch : loc -> arg -> int array -> act array -> act
val make_catch : act -> int * (act -> act)
val make_exit : int -> act
diff --git a/findlib-0/compiler-libs/Switch/Make/index.html b/findlib-0/compiler-libs/Switch/Make/index.html new file mode 100644 index 000000000..b2aa09baf --- /dev/null +++ b/findlib-0/compiler-libs/Switch/Make/index.html @@ -0,0 +1,12 @@ + +Make (docs.findlib-0.compiler-libs.Switch.Make)

Module Switch.Make

Parameters

module Arg : S

Signature

val zyva : + Arg.loc -> + (int * int) -> + Arg.arg -> + (int * int * int) array -> + (Arg.act, _) t_store -> + Arg.act
val test_sequence : + Arg.arg -> + (int * int * int) array -> + (Arg.act, _) t_store -> + Arg.act
diff --git a/findlib-0/compiler-libs/Switch/Store/argument-1-A/index.html b/findlib-0/compiler-libs/Switch/Store/argument-1-A/index.html new file mode 100644 index 000000000..71e53cf51 --- /dev/null +++ b/findlib-0/compiler-libs/Switch/Store/argument-1-A/index.html @@ -0,0 +1,2 @@ + +A (docs.findlib-0.compiler-libs.Switch.Store.A)

Parameter Store.A

type t
type key
val compare_key : key -> key -> int
val make_key : t -> key option
diff --git a/findlib-0/compiler-libs/Switch/Store/index.html b/findlib-0/compiler-libs/Switch/Store/index.html new file mode 100644 index 000000000..c80287296 --- /dev/null +++ b/findlib-0/compiler-libs/Switch/Store/index.html @@ -0,0 +1,2 @@ + +Store (docs.findlib-0.compiler-libs.Switch.Store)

Module Switch.Store

Parameters

module A : Stored

Signature

val mk_store : unit -> (A.t, unit) t_store
diff --git a/findlib-0/compiler-libs/Switch/index.html b/findlib-0/compiler-libs/Switch/index.html new file mode 100644 index 000000000..4303eff0f --- /dev/null +++ b/findlib-0/compiler-libs/Switch/index.html @@ -0,0 +1,2 @@ + +Switch (docs.findlib-0.compiler-libs.Switch)

Module Switch

type 'a shared =
  1. | Shared of 'a
  2. | Single of 'a
type ('a, 'ctx) t_store = {
  1. act_get : unit -> 'a array;
  2. act_get_shared : unit -> 'a shared array;
  3. act_store : 'ctx -> 'a -> int;
  4. act_store_shared : 'ctx -> 'a -> int;
}
module type Stored = sig ... end
module type CtxStored = sig ... end
module CtxStore (A : CtxStored) : sig ... end
module Store (A : Stored) : sig ... end
module type S = sig ... end
module Make (Arg : S) : sig ... end
diff --git a/findlib-0/compiler-libs/Switch/module-type-CtxStored/index.html b/findlib-0/compiler-libs/Switch/module-type-CtxStored/index.html new file mode 100644 index 000000000..17da0a155 --- /dev/null +++ b/findlib-0/compiler-libs/Switch/module-type-CtxStored/index.html @@ -0,0 +1,2 @@ + +CtxStored (docs.findlib-0.compiler-libs.Switch.CtxStored)

Module type Switch.CtxStored

include Stored
type t
type key
val compare_key : key -> key -> int
type context
val make_key : context -> t -> key option
diff --git a/findlib-0/compiler-libs/Switch/module-type-S/index.html b/findlib-0/compiler-libs/Switch/module-type-S/index.html new file mode 100644 index 000000000..773cf814d --- /dev/null +++ b/findlib-0/compiler-libs/Switch/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (docs.findlib-0.compiler-libs.Switch.S)

Module type Switch.S

type primitive
val eqint : primitive
val neint : primitive
val leint : primitive
val ltint : primitive
val geint : primitive
val gtint : primitive
type loc
type arg
type test
type act
val bind : arg -> (arg -> act) -> act
val make_const : int -> arg
val make_offset : arg -> int -> arg
val make_prim : primitive -> arg list -> test
val make_isout : arg -> arg -> test
val make_isin : arg -> arg -> test
val make_is_nonzero : arg -> test
val arg_as_test : arg -> test
val make_if : test -> act -> act -> act
val make_switch : loc -> arg -> int array -> act array -> act
val make_catch : act -> int * (act -> act)
val make_exit : int -> act
diff --git a/findlib-0/compiler-libs/Switch/module-type-Stored/index.html b/findlib-0/compiler-libs/Switch/module-type-Stored/index.html new file mode 100644 index 000000000..33560fa49 --- /dev/null +++ b/findlib-0/compiler-libs/Switch/module-type-Stored/index.html @@ -0,0 +1,2 @@ + +Stored (docs.findlib-0.compiler-libs.Switch.Stored)

Module type Switch.Stored

type t
type key
val compare_key : key -> key -> int
val make_key : t -> key option
diff --git a/findlib-0/compiler-libs/Symbol/Map/index.html b/findlib-0/compiler-libs/Symbol/Map/index.html new file mode 100644 index 000000000..3c24a3910 --- /dev/null +++ b/findlib-0/compiler-libs/Symbol/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Symbol.Map)

Module Symbol.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Symbol/Set/index.html b/findlib-0/compiler-libs/Symbol/Set/index.html new file mode 100644 index 000000000..9418f9a0e --- /dev/null +++ b/findlib-0/compiler-libs/Symbol/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Symbol.Set)

Module Symbol.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Symbol/T/index.html b/findlib-0/compiler-libs/Symbol/T/index.html new file mode 100644 index 000000000..1c0390033 --- /dev/null +++ b/findlib-0/compiler-libs/Symbol/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Symbol.T)

Module Symbol.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Symbol/Tbl/index.html b/findlib-0/compiler-libs/Symbol/Tbl/index.html new file mode 100644 index 000000000..b4c8b2909 --- /dev/null +++ b/findlib-0/compiler-libs/Symbol/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Symbol.Tbl)

Module Symbol.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Symbol/index.html b/findlib-0/compiler-libs/Symbol/index.html new file mode 100644 index 000000000..061500811 --- /dev/null +++ b/findlib-0/compiler-libs/Symbol/index.html @@ -0,0 +1,2 @@ + +Symbol (docs.findlib-0.compiler-libs.Symbol)

Module Symbol

A symbol identifies a constant provided by either:

* sym_unit is the compilation unit containing the value. * sym_label is the linkage name of the variable.

The label must be globally unique: two compilation units linked in the same program must not share labels.

include Identifiable.S
type t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val of_variable : Variable.t -> t
val of_global_linkage : Compilation_unit.t -> Linkage_name.t -> t
val import_for_pack : pack:Compilation_unit.t -> t -> t
val compilation_unit : t -> Compilation_unit.t
val label : t -> Linkage_name.t
val print_opt : Format.formatter -> t option -> unit
val compare_lists : t list -> t list -> int
diff --git a/findlib-0/compiler-libs/Symtable/index.html b/findlib-0/compiler-libs/Symtable/index.html new file mode 100644 index 000000000..649e2fb71 --- /dev/null +++ b/findlib-0/compiler-libs/Symtable/index.html @@ -0,0 +1,5 @@ + +Symtable (docs.findlib-0.compiler-libs.Symtable)

Module Symtable

val init : unit -> unit
val patch_object : + Misc.LongString.t -> + (Cmo_format.reloc_info * int) list -> + unit
val require_primitive : string -> unit
val initial_global_table : unit -> Obj.t array
val output_global_map : out_channel -> unit
val output_primitive_names : out_channel -> unit
val output_primitive_table : out_channel -> unit
val data_global_map : unit -> Obj.t
val data_primitive_names : unit -> string
val transl_const : Lambda.structured_constant -> Obj.t
val init_toplevel : unit -> (string * Digest.t option) list
val update_global_table : unit -> unit
val get_global_value : Ident.t -> Obj.t
val is_global_defined : Ident.t -> bool
val assign_global_value : Ident.t -> Obj.t -> unit
val get_global_position : Ident.t -> int
val check_global_initialized : (Cmo_format.reloc_info * int) list -> unit
val defined_globals : (Cmo_format.reloc_info * int) list -> Ident.t list
val required_globals : (Cmo_format.reloc_info * int) list -> Ident.t list
type global_map
val empty_global_map : global_map
val current_state : unit -> global_map
val restore_state : global_map -> unit
val hide_additions : global_map -> unit
val filter_global_map : (Ident.t -> bool) -> global_map -> global_map
val iter_global_map : (Ident.t -> int -> unit) -> global_map -> unit
val is_defined_in_global_map : global_map -> Ident.t -> bool
type error =
  1. | Undefined_global of string
  2. | Unavailable_primitive of string
  3. | Wrong_vm of string
  4. | Uninitialized_global of string
exception Error of error
val report_error : Format.formatter -> error -> unit
val reset : unit -> unit
diff --git a/findlib-0/compiler-libs/Syntaxerr/index.html b/findlib-0/compiler-libs/Syntaxerr/index.html new file mode 100644 index 000000000..b6f79dd14 --- /dev/null +++ b/findlib-0/compiler-libs/Syntaxerr/index.html @@ -0,0 +1,2 @@ + +Syntaxerr (docs.findlib-0.compiler-libs.Syntaxerr)

Module Syntaxerr

Auxiliary type for reporting syntax errors

Warning: this module is unstable and part of compiler-libs.

type error =
  1. | Unclosed of Location.t * string * Location.t * string
  2. | Expecting of Location.t * string
  3. | Not_expecting of Location.t * string
  4. | Applicative_path of Location.t
  5. | Variable_in_scope of Location.t * string
  6. | Other of Location.t
  7. | Ill_formed_ast of Location.t * string
  8. | Invalid_package_type of Location.t * string
  9. | Removed_string_set of Location.t
exception Error of error
exception Escape_error
val location_of_error : error -> Location.t
val ill_formed_ast : Location.t -> string -> 'a
diff --git a/findlib-0/compiler-libs/Tag/Map/index.html b/findlib-0/compiler-libs/Tag/Map/index.html new file mode 100644 index 000000000..cc9e9a717 --- /dev/null +++ b/findlib-0/compiler-libs/Tag/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Tag.Map)

Module Tag.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Tag/Set/index.html b/findlib-0/compiler-libs/Tag/Set/index.html new file mode 100644 index 000000000..ebe958499 --- /dev/null +++ b/findlib-0/compiler-libs/Tag/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Tag.Set)

Module Tag.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Tag/T/index.html b/findlib-0/compiler-libs/Tag/T/index.html new file mode 100644 index 000000000..d4049d560 --- /dev/null +++ b/findlib-0/compiler-libs/Tag/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Tag.T)

Module Tag.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Tag/Tbl/index.html b/findlib-0/compiler-libs/Tag/Tbl/index.html new file mode 100644 index 000000000..c260c2359 --- /dev/null +++ b/findlib-0/compiler-libs/Tag/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Tag.Tbl)

Module Tag.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Tag/index.html b/findlib-0/compiler-libs/Tag/index.html new file mode 100644 index 000000000..79a1aeeb2 --- /dev/null +++ b/findlib-0/compiler-libs/Tag/index.html @@ -0,0 +1,2 @@ + +Tag (docs.findlib-0.compiler-libs.Tag)

Module Tag

Tags on runtime boxed values.

include Identifiable.S
type t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val create_exn : int -> t
val to_int : t -> int
val zero : t
val object_tag : t
val compare : t -> t -> int
diff --git a/findlib-0/compiler-libs/Targetint/index.html b/findlib-0/compiler-libs/Targetint/index.html new file mode 100644 index 000000000..f58d36d30 --- /dev/null +++ b/findlib-0/compiler-libs/Targetint/index.html @@ -0,0 +1,3 @@ + +Targetint (docs.findlib-0.compiler-libs.Targetint)

Module Targetint

Target processor-native integers.

This module provides operations on the type of signed 32-bit integers (on 32-bit target platforms) or signed 64-bit integers (on 64-bit target platforms). This integer type has exactly the same width as that of a pointer type in the C compiler. All arithmetic operations over are taken modulo 232 or 264 depending on the word size of the target architecture.

Warning: this module is unstable and part of compiler-libs.

type t

The type of target integers.

val zero : t

The target integer 0.

val one : t

The target integer 1.

val minus_one : t

The target integer -1.

val neg : t -> t

Unary negation.

val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Integer division. Raise Division_by_zero if the second argument is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val unsigned_div : t -> t -> t

Same as div, except that arguments and result are interpreted as unsigned integers.

val rem : t -> t -> t

Integer remainder. If y is not zero, the result of Targetint.rem x y satisfies the following properties: Targetint.zero <= Nativeint.rem x y < Targetint.abs y and x = Targetint.add (Targetint.mul (Targetint.div x y) y) + (Targetint.rem x y). If y = 0, Targetint.rem x y raises Division_by_zero.

val unsigned_rem : t -> t -> t

Same as rem, except that arguments and result are interpreted as unsigned integers.

val succ : t -> t

Successor. Targetint.succ x is Targetint.add x Targetint.one.

val pred : t -> t

Predecessor. Targetint.pred x is Targetint.sub x Targetint.one.

val abs : t -> t

abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

val size : int

The size in bits of a target native integer.

val max_int : t

The greatest representable target integer, either 231 - 1 on a 32-bit platform, or 263 - 1 on a 64-bit platform.

val min_int : t

The smallest representable target integer, either -231 on a 32-bit platform, or -263 on a 64-bit platform.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val lognot : t -> t

Bitwise logical negation.

val shift_left : t -> int -> t

Targetint.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= bitsize, where bitsize is 32 on a 32-bit platform and 64 on a 64-bit platform.

val shift_right : t -> int -> t

Targetint.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= bitsize.

val shift_right_logical : t -> int -> t

Targetint.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= bitsize.

val of_int : int -> t

Convert the given integer (type int) to a target integer (type t), module the target word size.

val of_int_exn : int -> t

Convert the given integer (type int) to a target integer (type t). Raises a fatal error if the conversion is not exact.

val to_int : t -> int

Convert the given target integer (type t) to an integer (type int). The high-order bit is lost during the conversion.

val of_float : float -> t

Convert the given floating-point number to a target integer, discarding the fractional part (truncate towards 0). The result of the conversion is undefined if, after truncation, the number is outside the range [Targetint.min_int, Targetint.max_int].

val to_float : t -> float

Convert the given target integer to a floating-point number.

val of_int32 : int32 -> t

Convert the given 32-bit integer (type int32) to a target integer.

val to_int32 : t -> int32

Convert the given target integer to a 32-bit integer (type int32). On 64-bit platforms, the 64-bit native integer is taken modulo 232, i.e. the top 32 bits are lost. On 32-bit platforms, the conversion is exact.

val of_int64 : int64 -> t

Convert the given 64-bit integer (type int64) to a target integer.

val to_int64 : t -> int64

Convert the given target integer to a 64-bit integer (type int64).

val of_string : string -> t

Convert the given string to a target integer. The string is read in decimal (by default) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively. Raise Failure "int_of_string" if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type nativeint.

val to_string : t -> string

Return the string representation of its argument, in decimal.

val compare : t -> t -> int

The comparison function for target integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Targetint to be passed as argument to the functors Set.Make and Map.Make.

val unsigned_compare : t -> t -> int

Same as compare, except that arguments are interpreted as unsigned integers.

val equal : t -> t -> bool

The equal function for target ints.

type repr =
  1. | Int32 of int32
  2. | Int64 of int64
val repr : t -> repr

The concrete representation of a native integer.

val print : Format.formatter -> t -> unit

Print a target integer to a formatter.

diff --git a/findlib-0/compiler-libs/Tast_iterator/index.html b/findlib-0/compiler-libs/Tast_iterator/index.html new file mode 100644 index 000000000..05c5e6364 --- /dev/null +++ b/findlib-0/compiler-libs/Tast_iterator/index.html @@ -0,0 +1,8 @@ + +Tast_iterator (docs.findlib-0.compiler-libs.Tast_iterator)

Module Tast_iterator

Allows the implementation of typed tree inspection using open recursion

type iterator = {
  1. attribute : iterator -> Typedtree.attribute -> unit;
  2. attributes : iterator -> Typedtree.attributes -> unit;
  3. binding_op : iterator -> Typedtree.binding_op -> unit;
  4. case : 'k. iterator -> 'k Typedtree.case -> unit;
  5. class_declaration : iterator -> Typedtree.class_declaration -> unit;
  6. class_description : iterator -> Typedtree.class_description -> unit;
  7. class_expr : iterator -> Typedtree.class_expr -> unit;
  8. class_field : iterator -> Typedtree.class_field -> unit;
  9. class_signature : iterator -> Typedtree.class_signature -> unit;
  10. class_structure : iterator -> Typedtree.class_structure -> unit;
  11. class_type : iterator -> Typedtree.class_type -> unit;
  12. class_type_declaration : iterator -> Typedtree.class_type_declaration -> unit;
  13. class_type_field : iterator -> Typedtree.class_type_field -> unit;
  14. env : iterator -> Env.t -> unit;
  15. expr : iterator -> Typedtree.expression -> unit;
  16. extension_constructor : iterator -> Typedtree.extension_constructor -> unit;
  17. location : iterator -> Location.t -> unit;
  18. module_binding : iterator -> Typedtree.module_binding -> unit;
  19. module_coercion : iterator -> Typedtree.module_coercion -> unit;
  20. module_declaration : iterator -> Typedtree.module_declaration -> unit;
  21. module_substitution : iterator -> Typedtree.module_substitution -> unit;
  22. module_expr : iterator -> Typedtree.module_expr -> unit;
  23. module_type : iterator -> Typedtree.module_type -> unit;
  24. module_type_declaration : iterator -> + Typedtree.module_type_declaration -> + unit;
  25. package_type : iterator -> Typedtree.package_type -> unit;
  26. pat : 'k. iterator -> 'k Typedtree.general_pattern -> unit;
  27. row_field : iterator -> Typedtree.row_field -> unit;
  28. object_field : iterator -> Typedtree.object_field -> unit;
  29. open_declaration : iterator -> Typedtree.open_declaration -> unit;
  30. open_description : iterator -> Typedtree.open_description -> unit;
  31. signature : iterator -> Typedtree.signature -> unit;
  32. signature_item : iterator -> Typedtree.signature_item -> unit;
  33. structure : iterator -> Typedtree.structure -> unit;
  34. structure_item : iterator -> Typedtree.structure_item -> unit;
  35. typ : iterator -> Typedtree.core_type -> unit;
  36. type_declaration : iterator -> Typedtree.type_declaration -> unit;
  37. type_declarations : iterator -> + (Asttypes.rec_flag * Typedtree.type_declaration list) -> + unit;
  38. type_extension : iterator -> Typedtree.type_extension -> unit;
  39. type_exception : iterator -> Typedtree.type_exception -> unit;
  40. type_kind : iterator -> Typedtree.type_kind -> unit;
  41. value_binding : iterator -> Typedtree.value_binding -> unit;
  42. value_bindings : iterator -> + (Asttypes.rec_flag * Typedtree.value_binding list) -> + unit;
  43. value_description : iterator -> Typedtree.value_description -> unit;
  44. with_constraint : iterator -> Typedtree.with_constraint -> unit;
}
val default_iterator : iterator
diff --git a/findlib-0/compiler-libs/Tast_mapper/index.html b/findlib-0/compiler-libs/Tast_mapper/index.html new file mode 100644 index 000000000..b4c3f275a --- /dev/null +++ b/findlib-0/compiler-libs/Tast_mapper/index.html @@ -0,0 +1,50 @@ + +Tast_mapper (docs.findlib-0.compiler-libs.Tast_mapper)

Module Tast_mapper

A generic Typedtree mapper

type mapper = {
  1. attribute : mapper -> Typedtree.attribute -> Typedtree.attribute;
  2. attributes : mapper -> Typedtree.attributes -> Typedtree.attributes;
  3. binding_op : mapper -> Typedtree.binding_op -> Typedtree.binding_op;
  4. case : 'k. mapper -> 'k Typedtree.case -> 'k Typedtree.case;
  5. class_declaration : mapper -> + Typedtree.class_declaration -> + Typedtree.class_declaration;
  6. class_description : mapper -> + Typedtree.class_description -> + Typedtree.class_description;
  7. class_expr : mapper -> Typedtree.class_expr -> Typedtree.class_expr;
  8. class_field : mapper -> Typedtree.class_field -> Typedtree.class_field;
  9. class_signature : mapper -> + Typedtree.class_signature -> + Typedtree.class_signature;
  10. class_structure : mapper -> + Typedtree.class_structure -> + Typedtree.class_structure;
  11. class_type : mapper -> Typedtree.class_type -> Typedtree.class_type;
  12. class_type_declaration : mapper -> + Typedtree.class_type_declaration -> + Typedtree.class_type_declaration;
  13. class_type_field : mapper -> + Typedtree.class_type_field -> + Typedtree.class_type_field;
  14. env : mapper -> Env.t -> Env.t;
  15. expr : mapper -> Typedtree.expression -> Typedtree.expression;
  16. extension_constructor : mapper -> + Typedtree.extension_constructor -> + Typedtree.extension_constructor;
  17. location : mapper -> Location.t -> Location.t;
  18. module_binding : mapper -> + Typedtree.module_binding -> + Typedtree.module_binding;
  19. module_coercion : mapper -> + Typedtree.module_coercion -> + Typedtree.module_coercion;
  20. module_declaration : mapper -> + Typedtree.module_declaration -> + Typedtree.module_declaration;
  21. module_substitution : mapper -> + Typedtree.module_substitution -> + Typedtree.module_substitution;
  22. module_expr : mapper -> Typedtree.module_expr -> Typedtree.module_expr;
  23. module_type : mapper -> Typedtree.module_type -> Typedtree.module_type;
  24. module_type_declaration : mapper -> + Typedtree.module_type_declaration -> + Typedtree.module_type_declaration;
  25. package_type : mapper -> Typedtree.package_type -> Typedtree.package_type;
  26. pat : 'k. mapper -> + 'k Typedtree.general_pattern -> + 'k Typedtree.general_pattern;
  27. row_field : mapper -> Typedtree.row_field -> Typedtree.row_field;
  28. object_field : mapper -> Typedtree.object_field -> Typedtree.object_field;
  29. open_declaration : mapper -> + Typedtree.open_declaration -> + Typedtree.open_declaration;
  30. open_description : mapper -> + Typedtree.open_description -> + Typedtree.open_description;
  31. signature : mapper -> Typedtree.signature -> Typedtree.signature;
  32. signature_item : mapper -> + Typedtree.signature_item -> + Typedtree.signature_item;
  33. structure : mapper -> Typedtree.structure -> Typedtree.structure;
  34. structure_item : mapper -> + Typedtree.structure_item -> + Typedtree.structure_item;
  35. typ : mapper -> Typedtree.core_type -> Typedtree.core_type;
  36. type_declaration : mapper -> + Typedtree.type_declaration -> + Typedtree.type_declaration;
  37. type_declarations : mapper -> + (Asttypes.rec_flag * Typedtree.type_declaration list) -> + Asttypes.rec_flag * Typedtree.type_declaration list;
  38. type_extension : mapper -> + Typedtree.type_extension -> + Typedtree.type_extension;
  39. type_exception : mapper -> + Typedtree.type_exception -> + Typedtree.type_exception;
  40. type_kind : mapper -> Typedtree.type_kind -> Typedtree.type_kind;
  41. value_binding : mapper -> Typedtree.value_binding -> Typedtree.value_binding;
  42. value_bindings : mapper -> + (Asttypes.rec_flag * Typedtree.value_binding list) -> + Asttypes.rec_flag * Typedtree.value_binding list;
  43. value_description : mapper -> + Typedtree.value_description -> + Typedtree.value_description;
  44. with_constraint : mapper -> + Typedtree.with_constraint -> + Typedtree.with_constraint;
}
val default : mapper
diff --git a/findlib-0/compiler-libs/Terminfo/index.html b/findlib-0/compiler-libs/Terminfo/index.html new file mode 100644 index 000000000..40a84bebc --- /dev/null +++ b/findlib-0/compiler-libs/Terminfo/index.html @@ -0,0 +1,2 @@ + +Terminfo (docs.findlib-0.compiler-libs.Terminfo)

Module Terminfo

Basic interface to the terminfo database

Warning: this module is unstable and part of compiler-libs.

type status =
  1. | Uninitialised
  2. | Bad_term
  3. | Good_term
val setup : out_channel -> status
val num_lines : out_channel -> int
val backup : out_channel -> int -> unit
val standout : out_channel -> bool -> unit
val resume : out_channel -> int -> unit
diff --git a/findlib-0/compiler-libs/Tmc/index.html b/findlib-0/compiler-libs/Tmc/index.html new file mode 100644 index 000000000..bb59bbc37 --- /dev/null +++ b/findlib-0/compiler-libs/Tmc/index.html @@ -0,0 +1,23 @@ + +Tmc (docs.findlib-0.compiler-libs.Tmc)

Module Tmc

Tail-modulo-cons optimization.

Warning: this module is unstable and part of compiler-libs.

TMC (Tail Modulo Cons) is a code transformation that rewrites transformed functions in destination-passing-style, in such a way that certain calls that were not in tail position in the original program become tail-calls in the transformed program.

As a classic example, the following program | + let[@tail_mod_cons] rec map f = function + | [] -> [] + | x :: xs -> + let y = f x in + y :: map f xs + | becomes (expressed in almost-source-form; the translation is in fact at the Lambda-level) | + let rec map f = function + | [] -> [] + | x :: xs -> + let y = f x in + let dst = y :: Placeholder in + map_dps dst 1 f xs; dst + and map_dps dst offset f = function + | [] -> + dst.offset <- [] + | x :: xs -> + let y = f x in + let dst' = y :: Placeholder in + dst.offset <- dst'; + map_dps dst 1 f fx + |

In this example, the expression (y :: map f xs) had a call in non-tail-position, and it gets rewritten into tail-calls. TMC handles all such cases where the continuation of the call (what needs to be done after the return) is a "construction", the creation of a (possibly nested) data block.

The code transformation generates two versions of the input function, the "direct" version with the same type and behavior as the original one (here just map), and the "destination-passing-style" version (here map_dps).

Any call to the original function from outside the let..rec declaration gets transformed into a call into the direct version, which will itself call the destination-passing-style versions on recursive calls that may benefit from it (they are in tail-position modulo constructors).

Because of this inherent code duplication, the transformation may not always improve performance. In this implementation, TMC is opt-in, we only transform functions that the user has annotated with an attribute to request the transformation.

val rewrite : Lambda.lambda -> Lambda.lambda
diff --git a/findlib-0/compiler-libs/Topcommon/index.html b/findlib-0/compiler-libs/Topcommon/index.html new file mode 100644 index 000000000..693fd9dc5 --- /dev/null +++ b/findlib-0/compiler-libs/Topcommon/index.html @@ -0,0 +1,5 @@ + +Topcommon (docs.findlib-0.compiler-libs.Topcommon)

Module Topcommon

This module provides common implementations for internals of Toploop, for bytecode and native code (see Topeval for the diverging parts of the implementation).

You should not use it directly, refer to the functions in Toploop instead.

type evaluation_outcome =
  1. | Result of Obj.t
  2. | Exception of exn
val backtrace : string option ref
val parse_mod_use_file : + string -> + Lexing.lexbuf -> + Parsetree.toplevel_phrase list
val refill_lexbuf : bytes -> int -> int
diff --git a/findlib-0/compiler-libs/Topdirs/index.html b/findlib-0/compiler-libs/Topdirs/index.html new file mode 100644 index 000000000..395a13bf3 --- /dev/null +++ b/findlib-0/compiler-libs/Topdirs/index.html @@ -0,0 +1,2 @@ + +Topdirs (docs.findlib-0.compiler-libs.Topdirs)

Module Topdirs

val dir_quit : unit -> unit
val dir_directory : string -> unit
val dir_remove_directory : string -> unit
val dir_cd : string -> unit
val dir_load : Format.formatter -> string -> unit
val dir_use : Format.formatter -> string -> unit
val dir_use_output : Format.formatter -> string -> unit
val dir_install_printer : Format.formatter -> Longident.t -> unit
val dir_remove_printer : Format.formatter -> Longident.t -> unit
val section_general : string
val section_run : string
val section_env : string
val section_print : string
val section_trace : string
val section_options : string
val section_undocumented : string
val load_file : Format.formatter -> string -> bool
  • deprecated
diff --git a/findlib-0/compiler-libs/Topeval/index.html b/findlib-0/compiler-libs/Topeval/index.html new file mode 100644 index 000000000..2b7c91759 --- /dev/null +++ b/findlib-0/compiler-libs/Topeval/index.html @@ -0,0 +1,2 @@ + +Topeval (docs.findlib-0.compiler-libs.Topeval)

Module Topeval

This module provides two alternative implementations for internals of Toploop, for bytecode and native code.

You should not use it directly, refer to the functions in Toploop instead.

diff --git a/findlib-0/compiler-libs/Tophooks/index.html b/findlib-0/compiler-libs/Tophooks/index.html new file mode 100644 index 000000000..9bf3a9e3c --- /dev/null +++ b/findlib-0/compiler-libs/Tophooks/index.html @@ -0,0 +1,6 @@ + +Tophooks (docs.findlib-0.compiler-libs.Tophooks)

Module Tophooks

type lookup_fn = string -> Obj.t option
type load_fn = + Format.formatter -> + string -> + Lambda.program -> + Topcommon.evaluation_outcome
val lookup : lookup_fn
val load : load_fn
val register_loader : lookup:lookup_fn -> load:load_fn -> unit
diff --git a/findlib-0/compiler-libs/Toploop/index.html b/findlib-0/compiler-libs/Toploop/index.html new file mode 100644 index 000000000..04b9a4fc6 --- /dev/null +++ b/findlib-0/compiler-libs/Toploop/index.html @@ -0,0 +1,29 @@ + +Toploop (docs.findlib-0.compiler-libs.Toploop)

Module Toploop

type input =
  1. | Stdin
  2. | File of string
  3. | String of string
val getvalue : string -> Obj.t
val setvalue : string -> Obj.t -> unit
val filename_of_input : input -> string
val set_paths : ?auto_include:Load_path.auto_include_callback -> unit -> unit
val loop : Format.formatter -> unit
val run_script : Format.formatter -> input -> string array -> bool
type directive_fun =
  1. | Directive_none of unit -> unit
  2. | Directive_string of string -> unit
  3. | Directive_int of int -> unit
  4. | Directive_ident of Longident.t -> unit
  5. | Directive_bool of bool -> unit
type directive_info = {
  1. section : string;
  2. doc : string;
}
val add_directive : string -> directive_fun -> directive_info -> unit
val get_directive : string -> directive_fun option
val get_directive_info : string -> directive_info option
val all_directive_names : unit -> string list
val directive_table : (string, directive_fun) Hashtbl.t
  • deprecated
val directive_info_table : (string, directive_info) Hashtbl.t
  • deprecated
val toplevel_env : Env.t ref
val initialize_toplevel_env : unit -> unit
val print_exception_outcome : Format.formatter -> exn -> unit
val execute_phrase : + bool -> + Format.formatter -> + Parsetree.toplevel_phrase -> + bool
val use_input : Format.formatter -> input -> bool
val use_output : Format.formatter -> string -> bool
val use_silently : Format.formatter -> input -> bool
val mod_use_input : Format.formatter -> input -> bool
val use_file : Format.formatter -> string -> bool
val eval_module_path : Env.t -> Path.t -> Obj.t
val eval_value_path : Env.t -> Path.t -> Obj.t
val eval_extension_path : Env.t -> Path.t -> Obj.t
val eval_class_path : Env.t -> Path.t -> Obj.t
val record_backtrace : unit -> unit
val load_file : Format.formatter -> string -> bool
val print_value : Env.t -> Obj.t -> Format.formatter -> Types.type_expr -> unit
val print_untyped_exception : Format.formatter -> Obj.t -> unit
type ('a, 'b) gen_printer =
  1. | Zero of 'b
  2. | Succ of 'a -> ('a, 'b) gen_printer
val install_printer : + Path.t -> + Types.type_expr -> + (Format.formatter -> Obj.t -> unit) -> + unit
val install_generic_printer : + Path.t -> + Path.t -> + (int -> + (int -> Obj.t -> Outcometree.out_value, Obj.t -> Outcometree.out_value) + gen_printer) -> + unit
val install_generic_printer' : + Path.t -> + Path.t -> + (Format.formatter -> Obj.t -> unit, Format.formatter -> Obj.t -> unit) + gen_printer -> + unit
val remove_printer : Path.t -> unit
val max_printer_depth : int ref
val max_printer_steps : int ref
val parse_toplevel_phrase : (Lexing.lexbuf -> Parsetree.toplevel_phrase) ref
val parse_use_file : (Lexing.lexbuf -> Parsetree.toplevel_phrase list) ref
val print_location : Format.formatter -> Location.t -> unit
val print_error : Format.formatter -> Location.error -> unit
val print_warning : Location.t -> Format.formatter -> Warnings.t -> unit
val input_name : string ref
val print_out_value : (Format.formatter -> Outcometree.out_value -> unit) ref
val print_out_type : (Format.formatter -> Outcometree.out_type -> unit) ref
val print_out_class_type : + (Format.formatter -> Outcometree.out_class_type -> unit) ref
val print_out_module_type : + (Format.formatter -> Outcometree.out_module_type -> unit) ref
val print_out_type_extension : + (Format.formatter -> Outcometree.out_type_extension -> unit) ref
val print_out_sig_item : + (Format.formatter -> Outcometree.out_sig_item -> unit) ref
val print_out_signature : + (Format.formatter -> Outcometree.out_sig_item list -> unit) ref
val print_out_phrase : (Format.formatter -> Outcometree.out_phrase -> unit) ref
val read_interactive_input : (string -> bytes -> int -> int * bool) ref
val toplevel_startup_hook : (unit -> unit) ref
type event = ..
type event +=
  1. | Startup
  2. | After_setup
val add_hook : (event -> unit) -> unit
val run_hooks : event -> unit
val may_trace : bool ref
val override_sys_argv : string array -> unit
diff --git a/findlib-0/compiler-libs/Topmain/index.html b/findlib-0/compiler-libs/Topmain/index.html new file mode 100644 index 000000000..695c0f7f0 --- /dev/null +++ b/findlib-0/compiler-libs/Topmain/index.html @@ -0,0 +1,2 @@ + +Topmain (docs.findlib-0.compiler-libs.Topmain)

Module Topmain

val main : unit -> int
diff --git a/findlib-0/compiler-libs/Topprinters/index.html b/findlib-0/compiler-libs/Topprinters/index.html new file mode 100644 index 000000000..738cd38d5 --- /dev/null +++ b/findlib-0/compiler-libs/Topprinters/index.html @@ -0,0 +1,2 @@ + +Topprinters (docs.findlib-0.compiler-libs.Topprinters)

Module Topprinters

type printer_type = Types.type_expr -> Types.type_expr
val printer_type_new : printer_type
val printer_type_old : printer_type
diff --git a/findlib-0/compiler-libs/Topstart/index.html b/findlib-0/compiler-libs/Topstart/index.html new file mode 100644 index 000000000..bbcf291fa --- /dev/null +++ b/findlib-0/compiler-libs/Topstart/index.html @@ -0,0 +1,2 @@ + +Topstart (docs.findlib-0.compiler-libs.Topstart)

Module Topstart

diff --git a/findlib-0/compiler-libs/Trace/index.html b/findlib-0/compiler-libs/Trace/index.html new file mode 100644 index 000000000..239c92229 --- /dev/null +++ b/findlib-0/compiler-libs/Trace/index.html @@ -0,0 +1,10 @@ + +Trace (docs.findlib-0.compiler-libs.Trace)

Module Trace

type codeptr
type traced_function = {
  1. path : Path.t;
  2. closure : Obj.t;
  3. actual_code : codeptr;
  4. instrumented_fun : codeptr -> Obj.t -> Obj.t -> Obj.t;
}
val traced_functions : traced_function list ref
val is_traced : Obj.t -> Path.t option
val get_code_pointer : Obj.t -> codeptr
val set_code_pointer : Obj.t -> codeptr -> unit
val instrument_closure : + Env.t -> + Longident.t -> + Format.formatter -> + Types.type_expr -> + codeptr -> + Obj.t -> + Obj.t -> + Obj.t
val print_trace : Obj.t -> Obj.t -> Obj.t
diff --git a/findlib-0/compiler-libs/Translattribute/index.html b/findlib-0/compiler-libs/Translattribute/index.html new file mode 100644 index 000000000..c358cb77e --- /dev/null +++ b/findlib-0/compiler-libs/Translattribute/index.html @@ -0,0 +1,31 @@ + +Translattribute (docs.findlib-0.compiler-libs.Translattribute)

Module Translattribute

val check_attribute : Typedtree.expression -> Parsetree.attribute -> unit
val check_attribute_on_module : + Typedtree.module_expr -> + Parsetree.attribute -> + unit
val add_inline_attribute : + Lambda.lambda -> + Location.t -> + Parsetree.attributes -> + Lambda.lambda
val get_inline_attribute : Parsetree.attributes -> Lambda.inline_attribute
val add_specialise_attribute : + Lambda.lambda -> + Location.t -> + Parsetree.attributes -> + Lambda.lambda
val get_specialise_attribute : + Parsetree.attributes -> + Lambda.specialise_attribute
val add_local_attribute : + Lambda.lambda -> + Location.t -> + Parsetree.attributes -> + Lambda.lambda
val get_local_attribute : Parsetree.attributes -> Lambda.local_attribute
val get_and_remove_inlined_attribute : + Typedtree.expression -> + Lambda.inline_attribute * Typedtree.expression
val get_and_remove_inlined_attribute_on_module : + Typedtree.module_expr -> + Lambda.inline_attribute * Typedtree.module_expr
val get_and_remove_specialised_attribute : + Typedtree.expression -> + Lambda.specialise_attribute * Typedtree.expression
val add_function_attributes : + Lambda.lambda -> + Location.t -> + Parsetree.attributes -> + Lambda.lambda
diff --git a/findlib-0/compiler-libs/Translclass/index.html b/findlib-0/compiler-libs/Translclass/index.html new file mode 100644 index 000000000..e0da092cc --- /dev/null +++ b/findlib-0/compiler-libs/Translclass/index.html @@ -0,0 +1,9 @@ + +Translclass (docs.findlib-0.compiler-libs.Translclass)

Module Translclass

val transl_class : + scopes:Debuginfo.Scoped_location.scopes -> + Ident.t list -> + Ident.t -> + string list -> + Typedtree.class_expr -> + Asttypes.virtual_flag -> + Lambda.lambda
type error =
  1. | Tags of string * string
exception Error of Location.t * error
val report_error : Format.formatter -> error -> unit
diff --git a/findlib-0/compiler-libs/Translcore/index.html b/findlib-0/compiler-libs/Translcore/index.html new file mode 100644 index 000000000..bfb14c73a --- /dev/null +++ b/findlib-0/compiler-libs/Translcore/index.html @@ -0,0 +1,39 @@ + +Translcore (docs.findlib-0.compiler-libs.Translcore)

Module Translcore

val transl_let : + scopes:Debuginfo.Scoped_location.scopes -> + ?in_structure:bool -> + Asttypes.rec_flag -> + Typedtree.value_binding list -> + Lambda.lambda -> + Lambda.lambda
val transl_extension_constructor : + scopes:Debuginfo.Scoped_location.scopes -> + Env.t -> + Path.t option -> + Typedtree.extension_constructor -> + Lambda.lambda
val transl_scoped_exp : + scopes:Debuginfo.Scoped_location.scopes -> + Typedtree.expression -> + Lambda.lambda
type error =
  1. | Free_super_var
  2. | Unreachable_reached
exception Error of Location.t * error
val report_error : Format.formatter -> error -> unit
val transl_object : + (scopes:Debuginfo.Scoped_location.scopes -> + Ident.t -> + string list -> + Typedtree.class_expr -> + Lambda.lambda) + ref
diff --git a/findlib-0/compiler-libs/Translmod/index.html b/findlib-0/compiler-libs/Translmod/index.html new file mode 100644 index 000000000..f42003750 --- /dev/null +++ b/findlib-0/compiler-libs/Translmod/index.html @@ -0,0 +1,22 @@ + +Translmod (docs.findlib-0.compiler-libs.Translmod)

Module Translmod

val transl_implementation : + string -> + (Typedtree.structure * Typedtree.module_coercion) -> + Lambda.program
val transl_store_phrases : string -> Typedtree.structure -> int * Lambda.lambda
val transl_store_implementation : + string -> + (Typedtree.structure * Typedtree.module_coercion) -> + Lambda.program
val transl_implementation_flambda : + string -> + (Typedtree.structure * Typedtree.module_coercion) -> + Lambda.program
val transl_toplevel_definition : Typedtree.structure -> Lambda.lambda
val transl_package : + Ident.t option list -> + Ident.t -> + Typedtree.module_coercion -> + Lambda.lambda
val transl_store_package : + Ident.t option list -> + Ident.t -> + Typedtree.module_coercion -> + int * Lambda.lambda
val transl_package_flambda : + Ident.t option list -> + Typedtree.module_coercion -> + int * Lambda.lambda
val toplevel_name : Ident.t -> string
val nat_toplevel_name : Ident.t -> Ident.t * int
val primitive_declarations : Primitive.description list ref
type unsafe_component =
  1. | Unsafe_module_binding
  2. | Unsafe_functor
  3. | Unsafe_non_function
  4. | Unsafe_typext
type unsafe_info =
  1. | Unsafe of {
    1. reason : unsafe_component;
    2. loc : Location.t;
    3. subid : Ident.t;
    }
  2. | Unnamed
type error =
  1. | Circular_dependency of (Ident.t * unsafe_info) list
  2. | Conflicting_inline_attributes
exception Error of Location.t * error
val report_error : Location.t -> error -> Location.error
val reset : unit -> unit
diff --git a/findlib-0/compiler-libs/Translobj/index.html b/findlib-0/compiler-libs/Translobj/index.html new file mode 100644 index 000000000..fcd3fe746 --- /dev/null +++ b/findlib-0/compiler-libs/Translobj/index.html @@ -0,0 +1,7 @@ + +Translobj (docs.findlib-0.compiler-libs.Translobj)

Module Translobj

val oo_prim : string -> Lambda.lambda
val meth : Lambda.lambda -> string -> Lambda.lambda * Lambda.lambda list
val reset_labels : unit -> unit
val transl_label_init : (unit -> Lambda.lambda * 'a) -> Lambda.lambda * 'a
val transl_store_label_init : + Ident.t -> + int -> + ('a -> Lambda.lambda) -> + 'a -> + int * Lambda.lambda
val method_ids : Ident.Set.t ref
val oo_wrap : Env.t -> bool -> ('a -> Lambda.lambda) -> 'a -> Lambda.lambda
val oo_add_class : Ident.t -> Env.t * bool
val reset : unit -> unit
diff --git a/findlib-0/compiler-libs/Translprim/index.html b/findlib-0/compiler-libs/Translprim/index.html new file mode 100644 index 000000000..ab494163f --- /dev/null +++ b/findlib-0/compiler-libs/Translprim/index.html @@ -0,0 +1,25 @@ + +Translprim (docs.findlib-0.compiler-libs.Translprim)

Module Translprim

val add_exception_ident : Ident.t -> unit
val remove_exception_ident : Ident.t -> unit
val clear_used_primitives : unit -> unit
val get_used_primitives : unit -> Path.t list
val check_primitive_arity : Location.t -> Primitive.description -> unit
val transl_primitive : + Lambda.scoped_location -> + Primitive.description -> + Env.t -> + Types.type_expr -> + Path.t option -> + Lambda.lambda
val transl_primitive_application : + Lambda.scoped_location -> + Primitive.description -> + Env.t -> + Types.type_expr -> + Path.t -> + Typedtree.expression option -> + Lambda.lambda list -> + Typedtree.expression list -> + Lambda.lambda
type error =
  1. | Unknown_builtin_primitive of string
  2. | Wrong_arity_builtin_primitive of string
exception Error of Location.t * error
val report_error : Format.formatter -> error -> unit
diff --git a/findlib-0/compiler-libs/Traverse_for_exported_symbols/index.html b/findlib-0/compiler-libs/Traverse_for_exported_symbols/index.html new file mode 100644 index 000000000..97f9d296c --- /dev/null +++ b/findlib-0/compiler-libs/Traverse_for_exported_symbols/index.html @@ -0,0 +1,10 @@ + +Traverse_for_exported_symbols (docs.findlib-0.compiler-libs.Traverse_for_exported_symbols)

Module Traverse_for_exported_symbols

type symbols_to_export = {
  1. symbols : Symbol.Set.t;
  2. export_ids : Export_id.Set.t;
  3. set_of_closure_ids : Set_of_closures_id.Set.t;
  4. set_of_closure_ids_keep_declaration : Set_of_closures_id.Set.t;
  5. relevant_imported_closure_ids : Closure_id.Set.t;
  6. relevant_local_closure_ids : Closure_id.Set.t;
  7. relevant_imported_vars_within_closure : Var_within_closure.Set.t;
  8. relevant_local_vars_within_closure : Var_within_closure.Set.t;
}
val traverse : + sets_of_closures_map:Flambda.set_of_closures Set_of_closures_id.Map.t -> + closure_id_to_set_of_closures_id:Set_of_closures_id.t Closure_id.Map.t -> + function_declarations_map: + Simple_value_approx.function_declarations Set_of_closures_id.Map.t -> + values:Export_info.descr Export_id.Map.t -> + symbol_id:Export_id.t Symbol.Map.t -> + root_symbol:Symbol.t -> + symbols_to_export

Computes the transitive closure in Symbol.t, Closure_id.t and Set_of_closures_id.t and determines which ones of those should be exported (i.e: included in the cmx files). *

diff --git a/findlib-0/compiler-libs/Type_immediacy/Violation/index.html b/findlib-0/compiler-libs/Type_immediacy/Violation/index.html new file mode 100644 index 000000000..547de021c --- /dev/null +++ b/findlib-0/compiler-libs/Type_immediacy/Violation/index.html @@ -0,0 +1,2 @@ + +Violation (docs.findlib-0.compiler-libs.Type_immediacy.Violation)

Module Type_immediacy.Violation

type t =
  1. | Not_always_immediate
  2. | Not_always_immediate_on_64bits
diff --git a/findlib-0/compiler-libs/Type_immediacy/index.html b/findlib-0/compiler-libs/Type_immediacy/index.html new file mode 100644 index 000000000..f2b087d4f --- /dev/null +++ b/findlib-0/compiler-libs/Type_immediacy/index.html @@ -0,0 +1,2 @@ + +Type_immediacy (docs.findlib-0.compiler-libs.Type_immediacy)

Module Type_immediacy

Immediacy status of a type

type t =
  1. | Unknown
    (*

    We don't know anything

    *)
  2. | Always
    (*

    We know for sure that values of this type are always immediate

    *)
  3. | Always_on_64bits
    (*

    We know for sure that values of this type are always immediate on 64 bit platforms. For other platforms, we know nothing.

    *)
module Violation : sig ... end
val coerce : t -> as_:t -> (unit, Violation.t) result

coerce t ~as_ returns Ok () iff t can be seen as type immediacy as_. For instance, Always can be seen as Always_on_64bits but the opposite is not true. Return Error _ if the coercion is not possible.

val of_attributes : Parsetree.attributes -> t

Return the immediateness of a type as indicated by the user via attributes

diff --git a/findlib-0/compiler-libs/Typeclass/index.html b/findlib-0/compiler-libs/Typeclass/index.html new file mode 100644 index 000000000..88e1e3a07 --- /dev/null +++ b/findlib-0/compiler-libs/Typeclass/index.html @@ -0,0 +1,23 @@ + +Typeclass (docs.findlib-0.compiler-libs.Typeclass)

Module Typeclass

type 'a class_info = {
  1. cls_id : Ident.t;
  2. cls_id_loc : string Asttypes.loc;
  3. cls_decl : Types.class_declaration;
  4. cls_ty_id : Ident.t;
  5. cls_ty_decl : Types.class_type_declaration;
  6. cls_obj_id : Ident.t;
  7. cls_obj_abbr : Types.type_declaration;
  8. cls_abbr : Types.type_declaration;
  9. cls_arity : int;
  10. cls_pub_methods : string list;
  11. cls_info : 'a;
}
type class_type_info = {
  1. clsty_ty_id : Ident.t;
  2. clsty_id_loc : string Asttypes.loc;
  3. clsty_ty_decl : Types.class_type_declaration;
  4. clsty_obj_id : Ident.t;
  5. clsty_obj_abbr : Types.type_declaration;
  6. clsty_abbr : Types.type_declaration;
  7. clsty_info : Typedtree.class_type_declaration;
}
val class_declarations : + Env.t -> + Parsetree.class_declaration list -> + Typedtree.class_declaration class_info list * Env.t
val class_descriptions : + Env.t -> + Parsetree.class_description list -> + Typedtree.class_description class_info list * Env.t
val class_type_declarations : + Env.t -> + Parsetree.class_description list -> + class_type_info list * Env.t
val approx_class_declarations : + Env.t -> + Parsetree.class_description list -> + class_type_info list * Env.t
type kind =
  1. | Object
  2. | Class
  3. | Class_type
type error =
  1. | Unconsistent_constraint of Errortrace.unification_error
  2. | Field_type_mismatch of string * string * Errortrace.unification_error
  3. | Unexpected_field of Types.type_expr * string
  4. | Structure_expected of Types.class_type
  5. | Cannot_apply of Types.class_type
  6. | Apply_wrong_label of Asttypes.arg_label
  7. | Pattern_type_clash of Types.type_expr
  8. | Repeated_parameter
  9. | Unbound_class_2 of Longident.t
  10. | Unbound_class_type_2 of Longident.t
  11. | Abbrev_type_clash of Types.type_expr * Types.type_expr * Types.type_expr
  12. | Constructor_type_mismatch of string * Errortrace.unification_error
  13. | Virtual_class of kind * string list * string list
  14. | Undeclared_methods of kind * string list
  15. | Parameter_arity_mismatch of Longident.t * int * int
  16. | Parameter_mismatch of Errortrace.unification_error
  17. | Bad_parameters of Ident.t * Types.type_expr list * Types.type_expr list
  18. | Bad_class_type_parameters of Ident.t + * Types.type_expr list + * Types.type_expr list
  19. | Class_match_failure of Ctype.class_match_failure list
  20. | Unbound_val of string
  21. | Unbound_type_var of Format.formatter -> unit * Ctype.closed_class_failure
  22. | Non_generalizable_class of {
    1. id : Ident.t;
    2. clty : Types.class_declaration;
    3. nongen_vars : Types.type_expr list;
    }
  23. | Cannot_coerce_self of Types.type_expr
  24. | Non_collapsable_conjunction of Ident.t + * Types.class_declaration + * Errortrace.unification_error
  25. | Self_clash of Errortrace.unification_error
  26. | Mutability_mismatch of string * Asttypes.mutable_flag
  27. | No_overriding of string * string
  28. | Duplicate of string * string
  29. | Closing_self_type of Types.class_signature
exception Error of Location.t * Env.t * error
exception Error_forward of Location.error
val report_error : Env.t -> Format.formatter -> error -> unit
val type_open_descr : + (?used_slot:bool ref -> + Env.t -> + Parsetree.open_description -> + Typedtree.open_description * Env.t) + ref
diff --git a/findlib-0/compiler-libs/Typecore/Datatype_kind/index.html b/findlib-0/compiler-libs/Typecore/Datatype_kind/index.html new file mode 100644 index 000000000..5fd46cb0d --- /dev/null +++ b/findlib-0/compiler-libs/Typecore/Datatype_kind/index.html @@ -0,0 +1,2 @@ + +Datatype_kind (docs.findlib-0.compiler-libs.Typecore.Datatype_kind)

Module Typecore.Datatype_kind

type t =
  1. | Record
  2. | Variant
val type_name : t -> string
val label_name : t -> string
diff --git a/findlib-0/compiler-libs/Typecore/index.html b/findlib-0/compiler-libs/Typecore/index.html new file mode 100644 index 000000000..583419723 --- /dev/null +++ b/findlib-0/compiler-libs/Typecore/index.html @@ -0,0 +1,83 @@ + +Typecore (docs.findlib-0.compiler-libs.Typecore)

Module Typecore

type type_forcing_context =
  1. | If_conditional
  2. | If_no_else_branch
  3. | While_loop_conditional
  4. | While_loop_body
  5. | For_loop_start_index
  6. | For_loop_stop_index
  7. | For_loop_body
  8. | Assert_condition
  9. | Sequence_left_hand_side
  10. | When_guard
type type_expected = private {
  1. ty : Types.type_expr;
  2. explanation : type_forcing_context option;
}
type pattern_variable = {
  1. pv_id : Ident.t;
  2. pv_type : Types.type_expr;
  3. pv_loc : Location.t;
  4. pv_as_var : bool;
  5. pv_attributes : Typedtree.attributes;
}
val mk_expected : + ?explanation:type_forcing_context -> + Types.type_expr -> + type_expected
val is_nonexpansive : Typedtree.expression -> bool
module Datatype_kind : sig ... end
type wrong_name = {
  1. type_path : Path.t;
  2. kind : Datatype_kind.t;
  3. name : string Asttypes.loc;
  4. valid_names : string list;
}
type wrong_kind_context =
  1. | Pattern
  2. | Expression of type_forcing_context option
type wrong_kind_sort =
  1. | Constructor
  2. | Record
  3. | Boolean
  4. | List
  5. | Unit
type existential_restriction =
  1. | At_toplevel
    (*

    no existential types at the toplevel

    *)
  2. | In_group
    (*

    nor with let ... and ...

    *)
  3. | In_rec
    (*

    or recursive definition

    *)
  4. | With_attributes
    (*

    or let[@any_attribute] = ...

    *)
  5. | In_class_args
    (*

    or in class arguments class c (...) = ...

    *)
  6. | In_class_def
    (*

    or in class c = let ... in ...

    *)
  7. | In_self_pattern
    (*

    or in self pattern

    *)
type module_patterns_restriction =
  1. | Modules_allowed of {
    1. scope : int;
    }
  2. | Modules_rejected
val type_binding : + Env.t -> + Asttypes.rec_flag -> + Parsetree.value_binding list -> + Typedtree.value_binding list * Env.t
val type_expression : Env.t -> Parsetree.expression -> Typedtree.expression
val type_class_arg_pattern : + string -> + Env.t -> + Env.t -> + Asttypes.arg_label -> + Parsetree.pattern -> + Typedtree.pattern + * (Ident.t * Ident.t * Types.type_expr) list + * Env.t + * Env.t
val type_self_pattern : + Env.t -> + Parsetree.pattern -> + Typedtree.pattern * pattern_variable list
val check_partial : + ?lev:int -> + module_patterns_restriction -> + Env.t -> + Types.type_expr -> + Location.t -> + Typedtree.value Typedtree.case list -> + Typedtree.partial
val type_expect : + ?in_function:(Location.t * Types.type_expr) -> + Env.t -> + Parsetree.expression -> + type_expected -> + Typedtree.expression
val option_none : + Env.t -> + Types.type_expr -> + Location.t -> + Typedtree.expression
val extract_option_type : Env.t -> Types.type_expr -> Types.type_expr
val generalizable : int -> Types.type_expr -> bool
val generalize_structure_exp : Typedtree.expression -> unit
val reset_delayed_checks : unit -> unit
val force_delayed_checks : unit -> unit
val name_pattern : string -> Typedtree.pattern list -> Ident.t
val name_cases : string -> Typedtree.value Typedtree.case list -> Ident.t
val self_coercion : (Path.t * Location.t list ref) list ref
type error =
  1. | Constructor_arity_mismatch of Longident.t * int * int
  2. | Label_mismatch of Longident.t * Errortrace.unification_error
  3. | Pattern_type_clash : Errortrace.unification_error + * Parsetree.pattern_desc option -> error
  4. | Or_pattern_type_clash of Ident.t * Errortrace.unification_error
  5. | Multiply_bound_variable of string
  6. | Orpat_vars of Ident.t * Ident.t list
  7. | Expr_type_clash of Errortrace.unification_error + * type_forcing_context option + * Parsetree.expression_desc option
  8. | Apply_non_function of {
    1. funct : Typedtree.expression;
    2. func_ty : Types.type_expr;
    3. res_ty : Types.type_expr;
    4. previous_arg_loc : Location.t;
    5. extra_arg_loc : Location.t;
    }
  9. | Apply_wrong_label of Asttypes.arg_label * Types.type_expr * bool
  10. | Label_multiply_defined of string
  11. | Label_missing of Ident.t list
  12. | Label_not_mutable of Longident.t
  13. | Wrong_name of string * type_expected * wrong_name
  14. | Name_type_mismatch of Datatype_kind.t + * Longident.t + * Path.t * Path.t + * (Path.t * Path.t) list
  15. | Invalid_format of string
  16. | Not_an_object of Types.type_expr * type_forcing_context option
  17. | Undefined_method of Types.type_expr * string * string list option
  18. | Undefined_self_method of string * string list
  19. | Virtual_class of Longident.t
  20. | Private_type of Types.type_expr
  21. | Private_label of Longident.t * Types.type_expr
  22. | Private_constructor of Types.constructor_description * Types.type_expr
  23. | Unbound_instance_variable of string * string list
  24. | Instance_variable_not_mutable of string
  25. | Not_subtype of Errortrace.Subtype.error
  26. | Outside_class
  27. | Value_multiply_overridden of string
  28. | Coercion_failure of Errortrace.expanded_type + * Errortrace.unification_error + * bool
  29. | Not_a_function of Types.type_expr * type_forcing_context option
  30. | Too_many_arguments of Types.type_expr * type_forcing_context option
  31. | Abstract_wrong_label of {
    1. got : Asttypes.arg_label;
    2. expected : Asttypes.arg_label;
    3. expected_type : Types.type_expr;
    4. explanation : type_forcing_context option;
    }
  32. | Scoping_let_module of string * Types.type_expr
  33. | Not_a_polymorphic_variant_type of Longident.t
  34. | Incoherent_label_order
  35. | Less_general of string * Errortrace.unification_error
  36. | Modules_not_allowed
  37. | Cannot_infer_signature
  38. | Not_a_packed_module of Types.type_expr
  39. | Unexpected_existential of existential_restriction * string * string list
  40. | Invalid_interval
  41. | Invalid_for_loop_index
  42. | No_value_clauses
  43. | Exception_pattern_disallowed
  44. | Mixed_value_and_exception_patterns_under_guard
  45. | Inlined_record_escape
  46. | Inlined_record_expected
  47. | Unrefuted_pattern of Typedtree.pattern
  48. | Invalid_extension_constructor_payload
  49. | Not_an_extension_constructor
  50. | Literal_overflow of string
  51. | Unknown_literal of string * char
  52. | Illegal_letrec_pat
  53. | Illegal_letrec_expr
  54. | Illegal_class_expr
  55. | Letop_type_clash of string * Errortrace.unification_error
  56. | Andop_type_clash of string * Errortrace.unification_error
  57. | Bindings_type_clash of Errortrace.unification_error
  58. | Unbound_existential of Ident.t list * Types.type_expr
  59. | Missing_type_constraint
  60. | Wrong_expected_kind of wrong_kind_sort * wrong_kind_context * Types.type_expr
  61. | Expr_not_a_record_type of Types.type_expr
exception Error of Location.t * Env.t * error
exception Error_forward of Location.error
val report_error : loc:Location.t -> Env.t -> error -> Location.error
val type_open : + (?used_slot:bool ref -> + Asttypes.override_flag -> + Env.t -> + Location.t -> + Longident.t Asttypes.loc -> + Path.t * Env.t) + ref
val type_open_decl : + (?used_slot:bool ref -> + Env.t -> + Parsetree.open_declaration -> + Typedtree.open_declaration * Types.signature * Env.t) + ref
val type_object : + (Env.t -> + Location.t -> + Parsetree.class_structure -> + Typedtree.class_structure * string list) + ref
val type_package : + (Env.t -> + Parsetree.module_expr -> + Path.t -> + (Longident.t * Types.type_expr) list -> + Typedtree.module_expr * (Longident.t * Types.type_expr) list) + ref
val check_recursive_bindings : Env.t -> Typedtree.value_binding list -> unit
val check_recursive_class_bindings : + Env.t -> + Ident.t list -> + Typedtree.class_expr list -> + unit
diff --git a/findlib-0/compiler-libs/Typedecl/index.html b/findlib-0/compiler-libs/Typedecl/index.html new file mode 100644 index 000000000..46d7eae5a --- /dev/null +++ b/findlib-0/compiler-libs/Typedecl/index.html @@ -0,0 +1,43 @@ + +Typedecl (docs.findlib-0.compiler-libs.Typedecl)

Module Typedecl

val transl_type_decl : + Env.t -> + Asttypes.rec_flag -> + Parsetree.type_declaration list -> + Typedtree.type_declaration list * Env.t
val transl_type_exception : + Env.t -> + Parsetree.type_exception -> + Typedtree.type_exception * Env.t
val transl_type_extension : + bool -> + Env.t -> + Location.t -> + Parsetree.type_extension -> + Typedtree.type_extension * Env.t
val transl_with_constraint : + Ident.t -> + ?fixed_row_path:Path.t -> + sig_env:Env.t -> + sig_decl:Types.type_declaration -> + outer_env:Env.t -> + Parsetree.type_declaration -> + Typedtree.type_declaration
val abstract_type_decl : injective:bool -> int -> Types.type_declaration
val approx_type_decl : + Parsetree.type_declaration list -> + (Ident.t * Types.type_declaration) list
val check_recmod_typedecl : + Env.t -> + Location.t -> + Ident.t list -> + Path.t -> + Types.type_declaration -> + unit
val check_coherence : + Env.t -> + Location.t -> + Path.t -> + Types.type_declaration -> + unit
val is_fixed_type : Parsetree.type_declaration -> bool
type native_repr_kind =
  1. | Unboxed
  2. | Untagged
type reaching_type_path = reaching_type_step list
and reaching_type_step =
  1. | Expands_to of Types.type_expr * Types.type_expr
  2. | Contains of Types.type_expr * Types.type_expr
type error =
  1. | Repeated_parameter
  2. | Duplicate_constructor of string
  3. | Too_many_constructors
  4. | Duplicate_label of string
  5. | Recursive_abbrev of string * Env.t * reaching_type_path
  6. | Cycle_in_def of string * Env.t * reaching_type_path
  7. | Definition_mismatch of Types.type_expr + * Env.t + * Includecore.type_mismatch option
  8. | Constraint_failed of Env.t * Errortrace.unification_error
  9. | Inconsistent_constraint of Env.t * Errortrace.unification_error
  10. | Type_clash of Env.t * Errortrace.unification_error
  11. | Non_regular of {
    1. definition : Path.t;
    2. used_as : Types.type_expr;
    3. defined_as : Types.type_expr;
    4. reaching_path : reaching_type_path;
    }
  12. | Null_arity_external
  13. | Missing_native_external
  14. | Unbound_type_var of Types.type_expr * Types.type_declaration
  15. | Cannot_extend_private_type of Path.t
  16. | Not_extensible_type of Path.t
  17. | Extension_mismatch of Path.t * Env.t * Includecore.type_mismatch
  18. | Rebind_wrong_type of Longident.t * Env.t * Errortrace.unification_error
  19. | Rebind_mismatch of Longident.t * Path.t * Path.t
  20. | Rebind_private of Longident.t
  21. | Variance of Typedecl_variance.error
  22. | Unavailable_type_constructor of Path.t
  23. | Unbound_type_var_ext of Types.type_expr * Types.extension_constructor
  24. | Val_in_structure
  25. | Multiple_native_repr_attributes
  26. | Cannot_unbox_or_untag_type of native_repr_kind
  27. | Deep_unbox_or_untag_attribute of native_repr_kind
  28. | Immediacy of Typedecl_immediacy.error
  29. | Separability of Typedecl_separability.error
  30. | Bad_unboxed_attribute of string
  31. | Boxed_and_unboxed
  32. | Nonrec_gadt
  33. | Invalid_private_row_declaration of Types.type_expr
exception Error of Location.t * error
val report_error : Format.formatter -> error -> unit
diff --git a/findlib-0/compiler-libs/Typedecl_immediacy/index.html b/findlib-0/compiler-libs/Typedecl_immediacy/index.html new file mode 100644 index 000000000..42572c345 --- /dev/null +++ b/findlib-0/compiler-libs/Typedecl_immediacy/index.html @@ -0,0 +1,5 @@ + +Typedecl_immediacy (docs.findlib-0.compiler-libs.Typedecl_immediacy)

Module Typedecl_immediacy

type error =
  1. | Bad_immediacy_attribute of Type_immediacy.Violation.t
exception Error of Location.t * error
val update_decls : + Env.t -> + (Ident.t * Typedecl_properties.decl) list -> + (Ident.t * Typedecl_properties.decl) list
diff --git a/findlib-0/compiler-libs/Typedecl_properties/index.html b/findlib-0/compiler-libs/Typedecl_properties/index.html new file mode 100644 index 000000000..078f13d56 --- /dev/null +++ b/findlib-0/compiler-libs/Typedecl_properties/index.html @@ -0,0 +1,11 @@ + +Typedecl_properties (docs.findlib-0.compiler-libs.Typedecl_properties)

Module Typedecl_properties

An abstract interface for properties of type definitions, such as variance and immediacy, that are computed by a fixpoint on mutually-recursive type declarations. This interface contains all the operations needed to initialize and run the fixpoint computation, and then (optionally) check that the result is consistent with the declaration or user expectations.

type ('prop, 'req) property = {
  1. eq : 'prop -> 'prop -> bool;
  2. merge : prop:'prop -> new_prop:'prop -> 'prop;
  3. default : decl -> 'prop;
  4. compute : Env.t -> decl -> 'req -> 'prop;
  5. update_decl : decl -> 'prop -> decl;
  6. check : Env.t -> Ident.t -> decl -> 'req -> unit;
}

'prop represents the type of property values (Types.Variance.t, just 'bool' for immediacy, etc).

'req represents the property value required by the author of the declaration, if they gave an expectation: type +'a t = ....

Some properties have no natural notion of user requirement, or their requirement is global, or already stored in type_declaration; they can just use unit as 'req parameter.

val compute_property : + ('prop, 'req) property -> + Env.t -> + (Ident.t * decl) list -> + 'req list -> + (Ident.t * decl) list

compute_property prop env decls req performs a fixpoint computation to determine the final values of a property on a set of mutually-recursive type declarations. The req argument must be a list of the same size as decls, providing the user requirement for each declaration.

val compute_property_noreq : + ('prop, unit) property -> + Env.t -> + (Ident.t * decl) list -> + (Ident.t * decl) list
diff --git a/findlib-0/compiler-libs/Typedecl_separability/index.html b/findlib-0/compiler-libs/Typedecl_separability/index.html new file mode 100644 index 000000000..516a1523a --- /dev/null +++ b/findlib-0/compiler-libs/Typedecl_separability/index.html @@ -0,0 +1,7 @@ + +Typedecl_separability (docs.findlib-0.compiler-libs.Typedecl_separability)

Module Typedecl_separability

The OCaml runtime assumes for type-directed optimizations that all types are "separable". A type is "separable" if either all its inhabitants (the values of this type) are floating-point numbers, or none of them are.

(Note: This assumption is required for the dynamic float array optimization; it is only made if Config.flat_float_array is set, otherwise the code in this module becomes trivial -- see compute_decl.)

This soundness requirement could be broken by type declarations mixing existentials and the "@@unboxed" annotation. Consider the declaration

type any = Any : 'a -> any [@@unboxed]

which corresponds to the existential type "exists a. a". If this type is allowed to be unboxed, then it is inhabited by both float values and non-float values. On the contrary, if unboxing is disallowed, the inhabitants are all blocks with the Any constructors pointing to its parameter: they may point to a float, but they are not floats.

The present module contains a static analysis ensuring that declarations annotated with "@@unboxed" can be safely unboxed. The idea is to check the "separability" (in the above sense) of the argument type that would be unboxed, and reject the unboxed declaration if it would create a non-separable type.

Checking mutually-recursive type declarations is a bit subtle. Consider, for example, the following declarations.

type foo = Foo : 'a t -> foo   [@@unboxed]
+and 'a t = ...

Deciding whether the type foo should be accepted requires inspecting the declaration of 'a t, which may itself refer to foo in turn. In general, the analysis performs a fixpoint computation. It is somewhat similar to what is done for inferring the variance of type parameters.

Our analysis is defined using inference rules for our judgment Def; Gamma |- t : m, in which a type expression t is checked against a "mode" m. This "mode" describes the separability requirement on the type expression (see below for more details). The mode Gamma maps type variables to modes and Def records the "mode signature" of the mutually-recursive type declarations that are being checked.

The "mode signature" of a type with parameters ('a, 'b) t is of the form ('a : m1, 'b : m2) t, where m1 and m2 are modes. Its meaning is the following: a concrete instance (foo, bar) t of the type is separable if foo has mode m1 and bar has mode m2.

type error =
  1. | Non_separable_evar of string option
exception Error of Location.t * error

Exception raised when a type declaration is not separable, or when its separability cannot be established.

type mode = Types.Separability.t =
  1. | Ind
  2. | Sep
  3. | Deepsep
    (*

    The mode Sep ("separable") characterizes types that are indeed separable: either they only contain floating-point values, or none of the values at this type are floating-point values. On a type parameter, it indicates that this parameter must be separable for the whole type definition to be separable. For example, the mode signature for the type declaration type 'a + t = 'a is ('a : Sep) t. For the right-hand side to be separable, the parameter 'a must be separable.

    The mode Ind ("indifferent") characterizes any type -- separable or not. On a type parameter, it indicates that this parameter needs not be separable for the whole type definition to be separable. For example, type 'a t = 'a * bool does not require its parameter 'a to be separable as 'a * bool can never contain float values. Its mode signature is thus ('a : Ind) t.

    Finally, the mode Deepsep ("deeply separable") characterizes types that are separable, and whose type sub-expressions are also separable. This advanced feature is only used in the presence of constraints. For example, type 'a t = 'b constraint 'a = 'b * bool may not be separable even if 'a is (its separately depends on 'b, a fragment of 'a), so its mode signature is ('a : Deepsep) t.

    The different modes are ordered as Ind < Sep < Deepsep (from the least demanding to the most demanding).

    *)
val compute_decl : Env.t -> Types.type_declaration -> mode list

compute_decl env def returns the signature required for the type definition def in the typing environment env -- including signatures for the current recursive block.

The Error exception is raised if no such signature exists -- the definition will always be invalid. This only happens when the definition is marked to be unboxed.

Variant (or record) declarations that are not marked with the "@@unboxed" annotation, including those that contain several variants (or labels), are always separable. In particular, their mode signatures do not require anything of their type parameters, which are marked Ind.

Finally, if Config.flat_float_array is not set, then separability is not required anymore; we just use Ind as the mode of each parameter without any check.

Property interface (see Typedecl_properties). These functions rely on compute_decl and raise the Error exception on error.

val property : (prop, unit) Typedecl_properties.property
val update_decls : + Env.t -> + (Ident.t * Typedecl_properties.decl) list -> + (Ident.t * Typedecl_properties.decl) list
diff --git a/findlib-0/compiler-libs/Typedecl_unboxed/index.html b/findlib-0/compiler-libs/Typedecl_unboxed/index.html new file mode 100644 index 000000000..13e6cf851 --- /dev/null +++ b/findlib-0/compiler-libs/Typedecl_unboxed/index.html @@ -0,0 +1,5 @@ + +Typedecl_unboxed (docs.findlib-0.compiler-libs.Typedecl_unboxed)

Module Typedecl_unboxed

val get_unboxed_type_representation : + Env.t -> + Types.type_expr -> + Types.type_expr option
diff --git a/findlib-0/compiler-libs/Typedecl_variance/index.html b/findlib-0/compiler-libs/Typedecl_variance/index.html new file mode 100644 index 000000000..caaa04d08 --- /dev/null +++ b/findlib-0/compiler-libs/Typedecl_variance/index.html @@ -0,0 +1,29 @@ + +Typedecl_variance (docs.findlib-0.compiler-libs.Typedecl_variance)

Module Typedecl_variance

type surface_variance = bool * bool * bool
val variance_of_params : + (Parsetree.core_type * (Asttypes.variance * Asttypes.injectivity)) list -> + surface_variance list
val variance_of_sdecl : Parsetree.type_declaration -> surface_variance list
type prop = Types.Variance.t list
type req = surface_variance list
type variance_variable_context =
  1. | Type_declaration of Ident.t * Types.type_declaration
  2. | Gadt_constructor of Types.constructor_declaration
  3. | Extension_constructor of Ident.t * Types.extension_constructor
type variance_variable_error =
  1. | No_variable
  2. | Variance_not_reflected
  3. | Variance_not_deducible
type variance_error =
  1. | Variance_not_satisfied of int
  2. | Variance_variable_error of {
    1. error : variance_variable_error;
    2. context : variance_variable_context;
    3. variable : Types.type_expr;
    }
type error =
  1. | Bad_variance of variance_error * surface_variance * surface_variance
  2. | Varying_anonymous
exception Error of Location.t * error
val check_variance_extension : + Env.t -> + Types.type_declaration -> + Typedtree.extension_constructor -> + (req * Location.t) -> + unit
val compute_decl : + Env.t -> + check:Ident.t option -> + Types.type_declaration -> + req -> + prop
val update_decls : + Env.t -> + Parsetree.type_declaration list -> + (Ident.t * Types.type_declaration) list -> + (Ident.t * Types.type_declaration) list
diff --git a/findlib-0/compiler-libs/Typedtree/index.html b/findlib-0/compiler-libs/Typedtree/index.html new file mode 100644 index 000000000..221fa585d --- /dev/null +++ b/findlib-0/compiler-libs/Typedtree/index.html @@ -0,0 +1,81 @@ + +Typedtree (docs.findlib-0.compiler-libs.Typedtree)

Module Typedtree

Abstract syntax tree after typing

By comparison with Parsetree:

type partial =
  1. | Partial
  2. | Total

Extension points

type attribute = Parsetree.attribute
type attributes = attribute list

Core language

type value =
  1. | Value_pattern
type computation =
  1. | Computation_pattern
type _ pattern_category =
  1. | Value : value pattern_category
  2. | Computation : computation pattern_category
type pattern = value general_pattern
and 'k general_pattern = 'k pattern_desc pattern_data
and 'a pattern_data = {
  1. pat_desc : 'a;
  2. pat_loc : Location.t;
  3. pat_extra : (pat_extra * Location.t * attributes) list;
  4. pat_type : Types.type_expr;
  5. pat_env : Env.t;
  6. pat_attributes : attributes;
}
and pat_extra =
  1. | Tpat_constraint of core_type
    (*

    P : T pat_desc = P + ; pat_extra = (Tpat_constraint T, _, _) :: ...

    *)
  2. | Tpat_type of Path.t * Longident.t Asttypes.loc
    (*

    #tconst pat_desc = disjunction + ; pat_extra = (Tpat_type (P, "tconst"), _, _) :: ...

    where disjunction is a Tpat_or _ representing the branches of tconst.

    *)
  3. | Tpat_open of Path.t * Longident.t Asttypes.loc * Env.t
  4. | Tpat_unpack
    (*

    (module P) pat_desc = Tpat_var "P" + ; pat_extra = (Tpat_unpack, _, _) :: ... (module _) pat_desc = Tpat_any + ; pat_extra = (Tpat_unpack, _, _) :: ...

    *)
and 'k pattern_desc =
  1. | Tpat_any : value pattern_desc
    (*

    _

    *)
  2. | Tpat_var : Ident.t * string Asttypes.loc -> value pattern_desc
    (*

    x

    *)
  3. | Tpat_alias : value general_pattern + * Ident.t + * string Asttypes.loc -> value pattern_desc
    (*

    P as a

    *)
  4. | Tpat_constant : Asttypes.constant -> value pattern_desc
    (*

    1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  5. | Tpat_tuple : value general_pattern list -> value pattern_desc
    (*

    (P1, ..., Pn)

    Invariant: n >= 2

    *)
  6. | Tpat_construct : Longident.t Asttypes.loc + * Types.constructor_description + * value general_pattern list + * (Ident.t Asttypes.loc list * core_type) option -> value pattern_desc
    (*

    C (, None) C P (P, None) C (P1, ..., Pn) (P1; ...; Pn, None) C (P : t) (P, Some (, t)) C (P1, ..., Pn : t) (P1; ...; Pn, Some (, t)) C (type a) (P : t) (P, Some (a, t)) C (type a) (P1, ..., Pn : t) (P1; ...; Pn, Some (a, t))

    *)
  7. | Tpat_variant : Asttypes.label + * value general_pattern option + * Types.row_desc ref -> value pattern_desc
    (*

    `A (None) `A P (Some P)

    See Types.row_desc for an explanation of the last parameter.

    *)
  8. | Tpat_record : (Longident.t Asttypes.loc + * Types.label_description + * value general_pattern) + list + * Asttypes.closed_flag -> value pattern_desc
    (*

    l1=P1; ...; ln=Pn (flag = Closed) l1=P1; ...; ln=Pn; _ (flag = Open)

    Invariant: n > 0

    *)
  9. | Tpat_array : value general_pattern list -> value pattern_desc
    (*

    | P1; ...; Pn |

    *)
  10. | Tpat_lazy : value general_pattern -> value pattern_desc
    (*

    lazy P

    *)
  11. | Tpat_value : tpat_value_argument -> computation pattern_desc
    (*

    P

    Invariant: Tpat_value pattern should not carry pat_attributes or pat_extra metadata coming from user syntax, which must be on the inner pattern node -- to facilitate searching for a certain value pattern constructor with a specific attributed.

    To enforce this restriction, we made the argument of the Tpat_value constructor a private synonym of pattern, requiring you to use the as_computation_pattern function below instead of using the Tpat_value constructor directly.

    *)
  12. | Tpat_exception : value general_pattern -> computation pattern_desc
    (*

    exception P

    *)
  13. | Tpat_or : 'k general_pattern + * 'k general_pattern + * Types.row_desc option -> 'k pattern_desc
    (*

    P1 | P2

    row_desc = Some _ when translating Ppat_type _, None otherwise.

    *)
and tpat_value_argument = private value general_pattern
and expression = {
  1. exp_desc : expression_desc;
  2. exp_loc : Location.t;
  3. exp_extra : (exp_extra * Location.t * attributes) list;
  4. exp_type : Types.type_expr;
  5. exp_env : Env.t;
  6. exp_attributes : attributes;
}
and exp_extra =
  1. | Texp_constraint of core_type
    (*

    E : T

    *)
  2. | Texp_coerce of core_type option * core_type
    (*

    E :> T Texp_coerce (None, T) E : T0 :> T Texp_coerce (Some T0, T)

    *)
  3. | Texp_poly of core_type option
    (*

    Used for method bodies.

    *)
  4. | Texp_newtype of string
    (*

    fun (type t) ->

    *)
and expression_desc =
  1. | Texp_ident of Path.t * Longident.t Asttypes.loc * Types.value_description
    (*

    x M.x

    *)
  2. | Texp_constant of Asttypes.constant
    (*

    1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  3. | Texp_let of Asttypes.rec_flag * value_binding list * expression
    (*

    let P1 = E1 and ... and Pn = EN in E (flag = Nonrecursive) let rec P1 = E1 and ... and Pn = EN in E (flag = Recursive)

    *)
  4. | Texp_function of {
    1. arg_label : Asttypes.arg_label;
    2. param : Ident.t;
    3. cases : value case list;
    4. partial : partial;
    }
    (*

    Pexp_fun and Pexp_function both translate to Texp_function. See Parsetree for more details.

    param is the identifier that is to be used to name the parameter of the function.

    partial = Partial if the pattern match is partial Total otherwise.

    *)
  5. | Texp_apply of expression * (Asttypes.arg_label * expression option) list
    (*

    E0 ~l1:E1 ... ~ln:En

    The expression can be None if the expression is abstracted over this argument. It currently appears when a label is applied.

    For example: let f x ~y = x + y in f ~y:3

    The resulting typedtree for the application is: Texp_apply (Texp_ident "f/1037", (Nolabel, None); + (Labelled "y", Some (Texp_constant Const_int 3)) + )

    *)
  6. | Texp_match of expression * computation case list * partial
    (*

    match E0 with | P1 -> E1 | P2 | exception P3 -> E2 | exception P4 -> E3

    Texp_match (E0, [(P1, E1); (P2 | exception P3, E2); + (exception P4, E3)], _)

    *)
  7. | Texp_try of expression * value case list
    (*

    try E with P1 -> E1 | ... | PN -> EN

    *)
  8. | Texp_tuple of expression list
    (*

    (E1, ..., EN)

    *)
  9. | Texp_construct of Longident.t Asttypes.loc + * Types.constructor_description + * expression list
    (*

    C C E E C (E1, ..., En) E1;...;En

    *)
  10. | Texp_variant of Asttypes.label * expression option
  11. | Texp_record of {
    1. fields : (Types.label_description * record_label_definition) array;
    2. representation : Types.record_representation;
    3. extended_expression : expression option;
    }
    (*

    l1=P1; ...; ln=Pn (extended_expression = None) E0 with l1=P1; ...; ln=Pn (extended_expression = Some E0)

    Invariant: n > 0

    If the type is l1: t1; l2: t2 , the expression E0 with t2=P2 is represented as Texp_record fields = [| l1, Kept t1; l2 Override P2 |]; representation; + extended_expression = Some E0

    *)
  12. | Texp_field of expression * Longident.t Asttypes.loc * Types.label_description
  13. | Texp_setfield of expression + * Longident.t Asttypes.loc + * Types.label_description + * expression
  14. | Texp_array of expression list
  15. | Texp_ifthenelse of expression * expression * expression option
  16. | Texp_sequence of expression * expression
  17. | Texp_while of expression * expression
  18. | Texp_for of Ident.t + * Parsetree.pattern + * expression + * expression + * Asttypes.direction_flag + * expression
  19. | Texp_send of expression * meth
  20. | Texp_new of Path.t * Longident.t Asttypes.loc * Types.class_declaration
  21. | Texp_instvar of Path.t * Path.t * string Asttypes.loc
  22. | Texp_setinstvar of Path.t * Path.t * string Asttypes.loc * expression
  23. | Texp_override of Path.t * (Ident.t * string Asttypes.loc * expression) list
  24. | Texp_letmodule of Ident.t option + * string option Asttypes.loc + * Types.module_presence + * module_expr + * expression
  25. | Texp_letexception of extension_constructor * expression
  26. | Texp_assert of expression * Location.t
  27. | Texp_lazy of expression
  28. | Texp_object of class_structure * string list
  29. | Texp_pack of module_expr
  30. | Texp_letop of {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. param : Ident.t;
    4. body : value case;
    5. partial : partial;
    }
  31. | Texp_unreachable
  32. | Texp_extension_constructor of Longident.t Asttypes.loc * Path.t
  33. | Texp_open of open_declaration * expression
    (*

    let open! M in e

    *)
and meth =
  1. | Tmeth_name of string
  2. | Tmeth_val of Ident.t
  3. | Tmeth_ancestor of Ident.t * Path.t
and 'k case = {
  1. c_lhs : 'k general_pattern;
  2. c_guard : expression option;
  3. c_rhs : expression;
}
and record_label_definition =
  1. | Kept of Types.type_expr * Asttypes.mutable_flag
  2. | Overridden of Longident.t Asttypes.loc * expression
and binding_op = {
  1. bop_op_path : Path.t;
  2. bop_op_name : string Asttypes.loc;
  3. bop_op_val : Types.value_description;
  4. bop_op_type : Types.type_expr;
  5. bop_exp : expression;
  6. bop_loc : Location.t;
}
and class_expr = {
  1. cl_desc : class_expr_desc;
  2. cl_loc : Location.t;
  3. cl_type : Types.class_type;
  4. cl_env : Env.t;
  5. cl_attributes : attributes;
}
and class_expr_desc =
  1. | Tcl_ident of Path.t * Longident.t Asttypes.loc * core_type list
  2. | Tcl_structure of class_structure
  3. | Tcl_fun of Asttypes.arg_label + * pattern + * (Ident.t * expression) list + * class_expr + * partial
  4. | Tcl_apply of class_expr * (Asttypes.arg_label * expression option) list
  5. | Tcl_let of Asttypes.rec_flag + * value_binding list + * (Ident.t * expression) list + * class_expr
  6. | Tcl_constraint of class_expr + * class_type option + * string list + * string list + * Types.MethSet.t
  7. | Tcl_open of open_description * class_expr
and class_structure = {
  1. cstr_self : pattern;
  2. cstr_fields : class_field list;
  3. cstr_type : Types.class_signature;
  4. cstr_meths : Ident.t Types.Meths.t;
}
and class_field = {
  1. cf_desc : class_field_desc;
  2. cf_loc : Location.t;
  3. cf_attributes : attributes;
}
and class_field_kind =
  1. | Tcfk_virtual of core_type
  2. | Tcfk_concrete of Asttypes.override_flag * expression
and class_field_desc =
  1. | Tcf_inherit of Asttypes.override_flag + * class_expr + * string option + * (string * Ident.t) list + * (string * Ident.t) list
  2. | Tcf_val of string Asttypes.loc + * Asttypes.mutable_flag + * Ident.t + * class_field_kind + * bool
  3. | Tcf_method of string Asttypes.loc * Asttypes.private_flag * class_field_kind
  4. | Tcf_constraint of core_type * core_type
  5. | Tcf_initializer of expression
  6. | Tcf_attribute of attribute
and module_expr = {
  1. mod_desc : module_expr_desc;
  2. mod_loc : Location.t;
  3. mod_type : Types.module_type;
  4. mod_env : Env.t;
  5. mod_attributes : attributes;
}
and module_type_constraint =
  1. | Tmodtype_implicit
    (*

    The module type constraint has been synthesized during typechecking.

    *)
  2. | Tmodtype_explicit of module_type
    (*

    The module type was in the source file.

    *)

Annotations for Tmod_constraint.

and functor_parameter =
  1. | Unit
  2. | Named of Ident.t option * string option Asttypes.loc * module_type
and module_expr_desc =
  1. | Tmod_ident of Path.t * Longident.t Asttypes.loc
  2. | Tmod_structure of structure
  3. | Tmod_functor of functor_parameter * module_expr
  4. | Tmod_apply of module_expr * module_expr * module_coercion
  5. | Tmod_apply_unit of module_expr
  6. | Tmod_constraint of module_expr + * Types.module_type + * module_type_constraint + * module_coercion
    (*

    ME (constraint = Tmodtype_implicit) (ME : MT) (constraint = Tmodtype_explicit MT)

    *)
  7. | Tmod_unpack of expression * Types.module_type
and structure = {
  1. str_items : structure_item list;
  2. str_type : Types.signature;
  3. str_final_env : Env.t;
}
and structure_item = {
  1. str_desc : structure_item_desc;
  2. str_loc : Location.t;
  3. str_env : Env.t;
}
and structure_item_desc =
  1. | Tstr_eval of expression * attributes
  2. | Tstr_value of Asttypes.rec_flag * value_binding list
  3. | Tstr_primitive of value_description
  4. | Tstr_type of Asttypes.rec_flag * type_declaration list
  5. | Tstr_typext of type_extension
  6. | Tstr_exception of type_exception
  7. | Tstr_module of module_binding
  8. | Tstr_recmodule of module_binding list
  9. | Tstr_modtype of module_type_declaration
  10. | Tstr_open of open_declaration
  11. | Tstr_class of (class_declaration * string list) list
  12. | Tstr_class_type of (Ident.t * string Asttypes.loc * class_type_declaration) + list
  13. | Tstr_include of include_declaration
  14. | Tstr_attribute of attribute
and module_binding = {
  1. mb_id : Ident.t option;
  2. mb_name : string option Asttypes.loc;
  3. mb_presence : Types.module_presence;
  4. mb_expr : module_expr;
  5. mb_attributes : attributes;
  6. mb_loc : Location.t;
}
and value_binding = {
  1. vb_pat : pattern;
  2. vb_expr : expression;
  3. vb_attributes : attributes;
  4. vb_loc : Location.t;
}
and module_coercion =
  1. | Tcoerce_none
  2. | Tcoerce_structure of (int * module_coercion) list + * (Ident.t * int * module_coercion) list
  3. | Tcoerce_functor of module_coercion * module_coercion
  4. | Tcoerce_primitive of primitive_coercion
  5. | Tcoerce_alias of Env.t * Path.t * module_coercion
and module_type = {
  1. mty_desc : module_type_desc;
  2. mty_type : Types.module_type;
  3. mty_env : Env.t;
  4. mty_loc : Location.t;
  5. mty_attributes : attributes;
}
and module_type_desc =
  1. | Tmty_ident of Path.t * Longident.t Asttypes.loc
  2. | Tmty_signature of signature
  3. | Tmty_functor of functor_parameter * module_type
  4. | Tmty_with of module_type + * (Path.t * Longident.t Asttypes.loc * with_constraint) list
  5. | Tmty_typeof of module_expr
  6. | Tmty_alias of Path.t * Longident.t Asttypes.loc
and primitive_coercion = {
  1. pc_desc : Primitive.description;
  2. pc_type : Types.type_expr;
  3. pc_env : Env.t;
  4. pc_loc : Location.t;
}
and signature = {
  1. sig_items : signature_item list;
  2. sig_type : Types.signature;
  3. sig_final_env : Env.t;
}
and signature_item = {
  1. sig_desc : signature_item_desc;
  2. sig_env : Env.t;
  3. sig_loc : Location.t;
}
and signature_item_desc =
  1. | Tsig_value of value_description
  2. | Tsig_type of Asttypes.rec_flag * type_declaration list
  3. | Tsig_typesubst of type_declaration list
  4. | Tsig_typext of type_extension
  5. | Tsig_exception of type_exception
  6. | Tsig_module of module_declaration
  7. | Tsig_modsubst of module_substitution
  8. | Tsig_recmodule of module_declaration list
  9. | Tsig_modtype of module_type_declaration
  10. | Tsig_modtypesubst of module_type_declaration
  11. | Tsig_open of open_description
  12. | Tsig_include of include_description
  13. | Tsig_class of class_description list
  14. | Tsig_class_type of class_type_declaration list
  15. | Tsig_attribute of attribute
and module_declaration = {
  1. md_id : Ident.t option;
  2. md_name : string option Asttypes.loc;
  3. md_presence : Types.module_presence;
  4. md_type : module_type;
  5. md_attributes : attributes;
  6. md_loc : Location.t;
}
and module_substitution = {
  1. ms_id : Ident.t;
  2. ms_name : string Asttypes.loc;
  3. ms_manifest : Path.t;
  4. ms_txt : Longident.t Asttypes.loc;
  5. ms_attributes : attributes;
  6. ms_loc : Location.t;
}
and module_type_declaration = {
  1. mtd_id : Ident.t;
  2. mtd_name : string Asttypes.loc;
  3. mtd_type : module_type option;
  4. mtd_attributes : attributes;
  5. mtd_loc : Location.t;
}
and 'a open_infos = {
  1. open_expr : 'a;
  2. open_bound_items : Types.signature;
  3. open_override : Asttypes.override_flag;
  4. open_env : Env.t;
  5. open_loc : Location.t;
  6. open_attributes : attribute list;
}
and open_description = (Path.t * Longident.t Asttypes.loc) open_infos
and open_declaration = module_expr open_infos
and 'a include_infos = {
  1. incl_mod : 'a;
  2. incl_type : Types.signature;
  3. incl_loc : Location.t;
  4. incl_attributes : attribute list;
}
and include_description = module_type include_infos
and include_declaration = module_expr include_infos
and with_constraint =
  1. | Twith_type of type_declaration
  2. | Twith_module of Path.t * Longident.t Asttypes.loc
  3. | Twith_modtype of module_type
  4. | Twith_typesubst of type_declaration
  5. | Twith_modsubst of Path.t * Longident.t Asttypes.loc
  6. | Twith_modtypesubst of module_type
and core_type = {
  1. mutable ctyp_desc : core_type_desc;
    (*

    mutable because of Typeclass.declare_method

    *)
  2. mutable ctyp_type : Types.type_expr;
    (*

    mutable because of Typeclass.declare_method

    *)
  3. ctyp_env : Env.t;
  4. ctyp_loc : Location.t;
  5. ctyp_attributes : attributes;
}
and core_type_desc =
  1. | Ttyp_any
  2. | Ttyp_var of string
  3. | Ttyp_arrow of Asttypes.arg_label * core_type * core_type
  4. | Ttyp_tuple of core_type list
  5. | Ttyp_constr of Path.t * Longident.t Asttypes.loc * core_type list
  6. | Ttyp_object of object_field list * Asttypes.closed_flag
  7. | Ttyp_class of Path.t * Longident.t Asttypes.loc * core_type list
  8. | Ttyp_alias of core_type * string
  9. | Ttyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
  10. | Ttyp_poly of string list * core_type
  11. | Ttyp_package of package_type
and package_type = {
  1. pack_path : Path.t;
  2. pack_fields : (Longident.t Asttypes.loc * core_type) list;
  3. pack_type : Types.module_type;
  4. pack_txt : Longident.t Asttypes.loc;
}
and row_field = {
  1. rf_desc : row_field_desc;
  2. rf_loc : Location.t;
  3. rf_attributes : attributes;
}
and row_field_desc =
  1. | Ttag of string Asttypes.loc * bool * core_type list
  2. | Tinherit of core_type
and object_field = {
  1. of_desc : object_field_desc;
  2. of_loc : Location.t;
  3. of_attributes : attributes;
}
and object_field_desc =
  1. | OTtag of string Asttypes.loc * core_type
  2. | OTinherit of core_type
and value_description = {
  1. val_id : Ident.t;
  2. val_name : string Asttypes.loc;
  3. val_desc : core_type;
  4. val_val : Types.value_description;
  5. val_prim : string list;
  6. val_loc : Location.t;
  7. val_attributes : attributes;
}
and type_declaration = {
  1. typ_id : Ident.t;
  2. typ_name : string Asttypes.loc;
  3. typ_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  4. typ_type : Types.type_declaration;
  5. typ_cstrs : (core_type * core_type * Location.t) list;
  6. typ_kind : type_kind;
  7. typ_private : Asttypes.private_flag;
  8. typ_manifest : core_type option;
  9. typ_loc : Location.t;
  10. typ_attributes : attributes;
}
and type_kind =
  1. | Ttype_abstract
  2. | Ttype_variant of constructor_declaration list
  3. | Ttype_record of label_declaration list
  4. | Ttype_open
and label_declaration = {
  1. ld_id : Ident.t;
  2. ld_name : string Asttypes.loc;
  3. ld_mutable : Asttypes.mutable_flag;
  4. ld_type : core_type;
  5. ld_loc : Location.t;
  6. ld_attributes : attributes;
}
and constructor_declaration = {
  1. cd_id : Ident.t;
  2. cd_name : string Asttypes.loc;
  3. cd_vars : string Asttypes.loc list;
  4. cd_args : constructor_arguments;
  5. cd_res : core_type option;
  6. cd_loc : Location.t;
  7. cd_attributes : attributes;
}
and constructor_arguments =
  1. | Cstr_tuple of core_type list
  2. | Cstr_record of label_declaration list
and type_extension = {
  1. tyext_path : Path.t;
  2. tyext_txt : Longident.t Asttypes.loc;
  3. tyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  4. tyext_constructors : extension_constructor list;
  5. tyext_private : Asttypes.private_flag;
  6. tyext_loc : Location.t;
  7. tyext_attributes : attributes;
}
and type_exception = {
  1. tyexn_constructor : extension_constructor;
  2. tyexn_loc : Location.t;
  3. tyexn_attributes : attribute list;
}
and extension_constructor = {
  1. ext_id : Ident.t;
  2. ext_name : string Asttypes.loc;
  3. ext_type : Types.extension_constructor;
  4. ext_kind : extension_constructor_kind;
  5. ext_loc : Location.t;
  6. ext_attributes : attributes;
}
and extension_constructor_kind =
  1. | Text_decl of string Asttypes.loc list + * constructor_arguments + * core_type option
  2. | Text_rebind of Path.t * Longident.t Asttypes.loc
and class_type = {
  1. cltyp_desc : class_type_desc;
  2. cltyp_type : Types.class_type;
  3. cltyp_env : Env.t;
  4. cltyp_loc : Location.t;
  5. cltyp_attributes : attributes;
}
and class_type_desc =
  1. | Tcty_constr of Path.t * Longident.t Asttypes.loc * core_type list
  2. | Tcty_signature of class_signature
  3. | Tcty_arrow of Asttypes.arg_label * core_type * class_type
  4. | Tcty_open of open_description * class_type
and class_signature = {
  1. csig_self : core_type;
  2. csig_fields : class_type_field list;
  3. csig_type : Types.class_signature;
}
and class_type_field = {
  1. ctf_desc : class_type_field_desc;
  2. ctf_loc : Location.t;
  3. ctf_attributes : attributes;
}
and class_type_field_desc =
  1. | Tctf_inherit of class_type
  2. | Tctf_val of string * Asttypes.mutable_flag * Asttypes.virtual_flag * core_type
  3. | Tctf_method of string + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
  4. | Tctf_constraint of core_type * core_type
  5. | Tctf_attribute of attribute
and class_declaration = class_expr class_infos
and class_description = class_type class_infos
and class_type_declaration = class_type class_infos
and 'a class_infos = {
  1. ci_virt : Asttypes.virtual_flag;
  2. ci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. ci_id_name : string Asttypes.loc;
  4. ci_id_class : Ident.t;
  5. ci_id_class_type : Ident.t;
  6. ci_id_object : Ident.t;
  7. ci_expr : 'a;
  8. ci_decl : Types.class_declaration;
  9. ci_type_decl : Types.class_type_declaration;
  10. ci_loc : Location.t;
  11. ci_attributes : attributes;
}
type implementation = {
  1. structure : structure;
  2. coercion : module_coercion;
  3. signature : Types.signature;
  4. shape : Shape.t;
}

A typechecked implementation including its module structure, its exported signature, and a coercion of the module against that signature.

If an .mli file is present, the signature will come from that file and be the exported signature of the module.

If there isn't one, the signature will be inferred from the module structure.

val as_computation_pattern : pattern -> computation general_pattern

as_computation_pattern p is a computation pattern with description Tpat_value p, which enforces a correct placement of pat_attributes and pat_extra metadata (on the inner value pattern, rather than on the computation pattern).

val classify_pattern_desc : 'k pattern_desc -> 'k pattern_category
val classify_pattern : 'k general_pattern -> 'k pattern_category
type pattern_action = {
  1. f : 'k. 'k general_pattern -> unit;
}
val shallow_iter_pattern_desc : pattern_action -> 'k pattern_desc -> unit
type pattern_transformation = {
  1. f : 'k. 'k general_pattern -> 'k general_pattern;
}
val shallow_map_pattern_desc : + pattern_transformation -> + 'k pattern_desc -> + 'k pattern_desc
val iter_general_pattern : pattern_action -> 'k general_pattern -> unit
val iter_pattern : (pattern -> unit) -> pattern -> unit
type pattern_predicate = {
  1. f : 'k. 'k general_pattern -> bool;
}
val exists_general_pattern : pattern_predicate -> 'k general_pattern -> bool
val exists_pattern : (pattern -> bool) -> pattern -> bool
val let_bound_idents : value_binding list -> Ident.t list
val let_bound_idents_full : + value_binding list -> + (Ident.t * string Asttypes.loc * Types.type_expr) list
val alpha_pat : + (Ident.t * Ident.t) list -> + 'k general_pattern -> + 'k general_pattern

Alpha conversion of patterns

val mknoloc : 'a -> 'a Asttypes.loc
val mkloc : 'a -> Location.t -> 'a Asttypes.loc
val pat_bound_idents : 'k general_pattern -> Ident.t list
val pat_bound_idents_full : + 'k general_pattern -> + (Ident.t * string Asttypes.loc * Types.type_expr) list
val split_pattern : + computation general_pattern -> + pattern option * pattern option

Splits an or pattern into its value (left) and exception (right) parts.

val exp_is_nominal : expression -> bool

Whether an expression looks nice as the subject of a sentence in a error message.

diff --git a/findlib-0/compiler-libs/Typemod/Sig_component_kind/index.html b/findlib-0/compiler-libs/Typemod/Sig_component_kind/index.html new file mode 100644 index 000000000..870945b16 --- /dev/null +++ b/findlib-0/compiler-libs/Typemod/Sig_component_kind/index.html @@ -0,0 +1,2 @@ + +Sig_component_kind (docs.findlib-0.compiler-libs.Typemod.Sig_component_kind)

Module Typemod.Sig_component_kind

type t =
  1. | Value
  2. | Type
  3. | Module
  4. | Module_type
  5. | Extension_constructor
  6. | Class
  7. | Class_type
val to_string : t -> string
diff --git a/findlib-0/compiler-libs/Typemod/Signature_names/index.html b/findlib-0/compiler-libs/Typemod/Signature_names/index.html new file mode 100644 index 000000000..d03f42e55 --- /dev/null +++ b/findlib-0/compiler-libs/Typemod/Signature_names/index.html @@ -0,0 +1,2 @@ + +Signature_names (docs.findlib-0.compiler-libs.Typemod.Signature_names)

Module Typemod.Signature_names

type t
val simplify : Env.t -> t -> Types.signature -> Types.signature
diff --git a/findlib-0/compiler-libs/Typemod/index.html b/findlib-0/compiler-libs/Typemod/index.html new file mode 100644 index 000000000..fafeeb8c7 --- /dev/null +++ b/findlib-0/compiler-libs/Typemod/index.html @@ -0,0 +1,40 @@ + +Typemod (docs.findlib-0.compiler-libs.Typemod)

Module Typemod

Type-checking of the module language and typed ast hooks

Warning: this module is unstable and part of compiler-libs.

module Signature_names : sig ... end
val type_implementation : + string -> + string -> + string -> + Env.t -> + Parsetree.structure -> + Typedtree.implementation
val type_interface : Env.t -> Parsetree.signature -> Typedtree.signature
val transl_signature : Env.t -> Parsetree.signature -> Typedtree.signature
val check_nongen_signature : Env.t -> Types.signature -> unit
val modtype_of_package : + Env.t -> + Location.t -> + Path.t -> + (Longident.t * Types.type_expr) list -> + Types.module_type
val path_of_module : Typedtree.module_expr -> Path.t option
val save_signature : + string -> + Typedtree.signature -> + string -> + string -> + Env.t -> + Cmi_format.cmi_infos -> + unit
val package_units : + Env.t -> + string list -> + string -> + string -> + Typedtree.module_coercion
val initial_env : + loc:Location.t -> + initially_opened_module:string option -> + open_implicit_modules:string list -> + Env.t
module Sig_component_kind : sig ... end
type hiding_error =
  1. | Illegal_shadowing of {
    1. shadowed_item_id : Ident.t;
    2. shadowed_item_kind : Sig_component_kind.t;
    3. shadowed_item_loc : Location.t;
    4. shadower_id : Ident.t;
    5. user_id : Ident.t;
    6. user_kind : Sig_component_kind.t;
    7. user_loc : Location.t;
    }
  2. | Appears_in_signature of {
    1. opened_item_id : Ident.t;
    2. opened_item_kind : Sig_component_kind.t;
    3. user_id : Ident.t;
    4. user_kind : Sig_component_kind.t;
    5. user_loc : Location.t;
    }
type error =
  1. | Cannot_apply of Types.module_type
  2. | Not_included of Includemod.explanation
  3. | Cannot_eliminate_dependency of Types.module_type
  4. | Signature_expected
  5. | Structure_expected of Types.module_type
  6. | With_no_component of Longident.t
  7. | With_mismatch of Longident.t * Includemod.explanation
  8. | With_makes_applicative_functor_ill_typed of Longident.t + * Path.t + * Includemod.explanation
  9. | With_changes_module_alias of Longident.t * Ident.t * Path.t
  10. | With_cannot_remove_constrained_type
  11. | Repeated_name of Sig_component_kind.t * string
  12. | Non_generalizable of {
    1. vars : Types.type_expr list;
    2. expression : Types.type_expr;
    }
  13. | Non_generalizable_module of {
    1. vars : Types.type_expr list;
    2. item : Types.value_description;
    3. mty : Types.module_type;
    }
  14. | Implementation_is_required of string
  15. | Interface_not_compiled of string
  16. | Not_allowed_in_functor_body
  17. | Not_a_packed_module of Types.type_expr
  18. | Incomplete_packed_module of Types.type_expr
  19. | Scoping_pack of Longident.t * Types.type_expr
  20. | Recursive_module_require_explicit_type
  21. | Apply_generative
  22. | Cannot_scrape_alias of Path.t
  23. | Cannot_scrape_package_type of Path.t
  24. | Badly_formed_signature of string * Typedecl.error
  25. | Cannot_hide_id of hiding_error
  26. | Invalid_type_subst_rhs
  27. | Unpackable_local_modtype_subst of Path.t
  28. | With_cannot_remove_packed_modtype of Path.t * Types.module_type
exception Error of Location.t * Env.t * error
exception Error_forward of Location.error
val report_error : Env.t -> loc:Location.t -> error -> Location.error
diff --git a/findlib-0/compiler-libs/Typeopt/index.html b/findlib-0/compiler-libs/Typeopt/index.html new file mode 100644 index 000000000..ceb0107d8 --- /dev/null +++ b/findlib-0/compiler-libs/Typeopt/index.html @@ -0,0 +1,19 @@ + +Typeopt (docs.findlib-0.compiler-libs.Typeopt)

Module Typeopt

val is_function_type : + Env.t -> + Types.type_expr -> + (Types.type_expr * Types.type_expr) option
val is_base_type : Env.t -> Types.type_expr -> Path.t -> bool
val maybe_pointer_type : + Env.t -> + Types.type_expr -> + Lambda.immediate_or_pointer
val array_type_kind : Env.t -> Types.type_expr -> Lambda.array_kind
val array_pattern_kind : Typedtree.pattern -> Lambda.array_kind
val bigarray_type_kind_and_layout : + Env.t -> + Types.type_expr -> + Lambda.bigarray_kind * Lambda.bigarray_layout
val value_kind : Env.t -> Types.type_expr -> Lambda.value_kind
val function_return_value_kind : Env.t -> Types.type_expr -> Lambda.value_kind
val classify_lazy_argument : + Typedtree.expression -> + [ `Constant_or_function + | `Float_that_cannot_be_shortcut + | `Identifier of [ `Forward_value | `Other ] + | `Other ]
val value_kind_union : + Lambda.value_kind -> + Lambda.value_kind -> + Lambda.value_kind

value_kind_union k1 k2 is a value_kind at least as general as k1 and k2

diff --git a/findlib-0/compiler-libs/Types/MethSet/index.html b/findlib-0/compiler-libs/Types/MethSet/index.html new file mode 100644 index 000000000..0e698dba7 --- /dev/null +++ b/findlib-0/compiler-libs/Types/MethSet/index.html @@ -0,0 +1,3 @@ + +MethSet (docs.findlib-0.compiler-libs.Types.MethSet)

Module Types.MethSet

Sets

type elt = string

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Types/Meths/index.html b/findlib-0/compiler-libs/Types/Meths/index.html new file mode 100644 index 000000000..5ef30b87e --- /dev/null +++ b/findlib-0/compiler-libs/Types/Meths/index.html @@ -0,0 +1,8 @@ + +Meths (docs.findlib-0.compiler-libs.Types.Meths)

Module Types.Meths

Maps

type key = string

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Types/Separability/index.html b/findlib-0/compiler-libs/Types/Separability/index.html new file mode 100644 index 000000000..ca3c4ad6e --- /dev/null +++ b/findlib-0/compiler-libs/Types/Separability/index.html @@ -0,0 +1,2 @@ + +Separability (docs.findlib-0.compiler-libs.Types.Separability)

Module Types.Separability

see Typedecl_separability for an explanation of separability and separability modes.

type t =
  1. | Ind
  2. | Sep
  3. | Deepsep
val eq : t -> t -> bool
val print : Format.formatter -> t -> unit
val rank : t -> int

Modes are ordered from the least to the most demanding: Ind < Sep < Deepsep. 'rank' maps them to integers in an order-respecting way: m1 < m2 <=> rank m1 < rank m2

val compare : t -> t -> int

Compare two mode according to their mode ordering.

val max : t -> t -> t

max_mode m1 m2 returns the most demanding mode. It is used to express the conjunction of two parameter mode constraints.

type signature = t list

The 'separability signature' of a type assigns a mode for each of its parameters. ('a, 'b) t has mode (m1, m2) if (t1, t2) t is separable whenever t1, t2 have mode m1, m2.

val print_signature : Format.formatter -> signature -> unit
val default_signature : arity:int -> signature

The most pessimistic separability for a completely unknown type.

diff --git a/findlib-0/compiler-libs/Types/TransientTypeOps/index.html b/findlib-0/compiler-libs/Types/TransientTypeOps/index.html new file mode 100644 index 000000000..434d9adfb --- /dev/null +++ b/findlib-0/compiler-libs/Types/TransientTypeOps/index.html @@ -0,0 +1,2 @@ + +TransientTypeOps (docs.findlib-0.compiler-libs.Types.TransientTypeOps)

Module Types.TransientTypeOps

Comparisons for functors

val compare : t -> t -> int
val equal : t -> t -> bool
val hash : t -> int
diff --git a/findlib-0/compiler-libs/Types/Transient_expr/index.html b/findlib-0/compiler-libs/Types/Transient_expr/index.html new file mode 100644 index 000000000..ac7bbc389 --- /dev/null +++ b/findlib-0/compiler-libs/Types/Transient_expr/index.html @@ -0,0 +1,2 @@ + +Transient_expr (docs.findlib-0.compiler-libs.Types.Transient_expr)

Module Types.Transient_expr

Operations on transient_expr

val create : type_desc -> level:int -> scope:int -> id:int -> transient_expr
val set_desc : transient_expr -> type_desc -> unit
val set_level : transient_expr -> int -> unit
val set_scope : transient_expr -> int -> unit
val type_expr : transient_expr -> type_expr
val coerce : type_expr -> transient_expr

Coerce without normalizing with repr

val set_stub_desc : type_expr -> type_desc -> unit

Instantiate a not yet instantiated stub. Fail if already instantiated.

diff --git a/findlib-0/compiler-libs/Types/VarSet/index.html b/findlib-0/compiler-libs/Types/VarSet/index.html new file mode 100644 index 000000000..bb511147d --- /dev/null +++ b/findlib-0/compiler-libs/Types/VarSet/index.html @@ -0,0 +1,3 @@ + +VarSet (docs.findlib-0.compiler-libs.Types.VarSet)

Module Types.VarSet

Sets

type elt = string

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Types/Variance/index.html b/findlib-0/compiler-libs/Types/Variance/index.html new file mode 100644 index 000000000..ba80126d9 --- /dev/null +++ b/findlib-0/compiler-libs/Types/Variance/index.html @@ -0,0 +1,2 @@ + +Variance (docs.findlib-0.compiler-libs.Types.Variance)

Module Types.Variance

type t
type f =
  1. | May_pos
  2. | May_neg
  3. | May_weak
  4. | Inj
  5. | Pos
  6. | Neg
  7. | Inv
val null : t
val full : t
val covariant : t
val unknown : t
val union : t -> t -> t
val inter : t -> t -> t
val subset : t -> t -> bool
val eq : t -> t -> bool
val set : f -> t -> t
val set_if : bool -> f -> t -> t
val mem : f -> t -> bool
val conjugate : t -> t
val compose : t -> t -> t
val strengthen : t -> t
val get_upper : t -> bool * bool
val get_lower : t -> bool * bool * bool
val unknown_signature : injective:bool -> arity:int -> t list

The most pessimistic variance for a completely unknown type.

diff --git a/findlib-0/compiler-libs/Types/Vars/index.html b/findlib-0/compiler-libs/Types/Vars/index.html new file mode 100644 index 000000000..0afacff58 --- /dev/null +++ b/findlib-0/compiler-libs/Types/Vars/index.html @@ -0,0 +1,8 @@ + +Vars (docs.findlib-0.compiler-libs.Types.Vars)

Module Types.Vars

Maps

type key = string

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/findlib-0/compiler-libs/Types/index.html b/findlib-0/compiler-libs/Types/index.html new file mode 100644 index 000000000..1cf621ba4 --- /dev/null +++ b/findlib-0/compiler-libs/Types/index.html @@ -0,0 +1,37 @@ + +Types (docs.findlib-0.compiler-libs.Types)

Module Types

Representation of types and declarations

Types defines the representation of types and declarations (that is, the content of module signatures).

CMI files are made of marshalled types.

Asttypes exposes basic definitions shared both by Parsetree and Types.

type type_expr

Type expressions for the core language.

The type_desc variant defines all the possible type expressions one can find in OCaml. type_expr wraps this with some annotations.

The level field tracks the level of polymorphism associated to a type, guiding the generalization algorithm. Put shortly, when referring to a type in a given environment, both the type and the environment have a level. If the type has an higher level, then it can be considered fully polymorphic (type variables will be printed as 'a), otherwise it'll be weakly polymorphic, or non generalized (type variables printed as '_a). See http://okmij.org/ftp/ML/generalization.html for more information.

Note about type_declaration: one should not make the confusion between type_expr and type_declaration.

type_declaration refers specifically to the type construct in OCaml language, where you create and name a new type or type alias.

type_expr is used when you refer to existing types, e.g. when annotating the expected type of a value.

Also, as the type system of OCaml is generative, a type_declaration can have the side-effect of introducing a new type constructor, different from all other known types. Whereas type_expr is a pure construct which allows referring to existing types.

Note on mutability: TBD.

type row_desc
type row_field
type field_kind
type commutable
type type_desc =
  1. | Tvar of string option
    (*

    Tvar (Some "a") ==> 'a or '_a Tvar None ==> _

    *)
  2. | Tarrow of Asttypes.arg_label * type_expr * type_expr * commutable
    (*

    Tarrow (Nolabel, e1, e2, c) ==> e1 -> e2 Tarrow (Labelled "l", e1, e2, c) ==> l:e1 -> e2 Tarrow (Optional "l", e1, e2, c) ==> ?l:e1 -> e2

    See commutable for the last argument.

    *)
  3. | Ttuple of type_expr list
    (*

    Ttuple [t1;...;tn] ==> (t1 * ... * tn)

    *)
  4. | Tconstr of Path.t * type_expr list * abbrev_memo ref
    (*

    Tconstr (`A.B.t', [t1;...;tn], _) ==> (t1,...,tn) A.B.t The last parameter keep tracks of known expansions, see abbrev_memo.

    *)
  5. | Tobject of type_expr * (Path.t * type_expr list) option ref
    (*

    Tobject (`f1:t1;...;fn: tn', `None') ==> < f1: t1; ...; fn: tn > f1, fn are represented as a linked list of types using Tfield and Tnil constructors.

    Tobject (_, `Some (`A.ct', [t1;...;tn]') ==> (t1, ..., tn) A.ct. where A.ct is the type of some class.

    There are also special cases for so-called "class-types", cf. Typeclass and Ctype.set_object_name:

    Tobject (Tfield(_,_,...(Tfield(_,_,rv)...), + Some(`A.#ct`, [rv;t1;...;tn]) ==> (t1, ..., tn) #A.ct Tobject (_, Some(`A.#ct`, [Tnil;t1;...;tn]) ==> (t1, ..., tn) A.ct

    where rv is the hidden row variable.

    *)
  6. | Tfield of string * field_kind * type_expr * type_expr
    (*

    Tfield ("foo", field_public, t, ts) ==> <...; foo : t; ts>

    *)
  7. | Tnil
    (*

    Tnil ==> <...; >

    *)
  8. | Tsubst of type_expr * type_expr option
    (*

    Tsubst is used temporarily to store information in low-level functions manipulating representation of types, such as instantiation or copy. The first argument contains a copy of the original node. The second is available only when the first is the row variable of a polymorphic variant. It then contains a copy of the whole variant. This constructor should not appear outside of these cases.

    *)
  9. | Tvariant of row_desc
    (*

    Representation of polymorphic variants, see row_desc.

    *)
  10. | Tunivar of string option
    (*

    Occurrence of a type variable introduced by a forall quantifier / Tpoly.

    *)
  11. | Tpoly of type_expr * type_expr list
    (*

    Tpoly (ty,tyl) ==> 'a1... 'an. ty, where 'a1 ... 'an are names given to types in tyl and occurrences of those types in ty.

    *)
  12. | Tpackage of Path.t * (Longident.t * type_expr) list
    (*

    Type of a first-class module (a.k.a package).

    *)
and fixed_explanation =
  1. | Univar of type_expr
    (*

    The row type was bound to an univar

    *)
  2. | Fixed_private
    (*

    The row type is private

    *)
  3. | Reified of Path.t
    (*

    The row was reified

    *)
  4. | Rigid
    (*

    The row type was made rigid during constraint verification

    *)
and abbrev_memo =
  1. | Mnil
    (*

    No known abbreviation

    *)
  2. | Mcons of Asttypes.private_flag * Path.t * type_expr * type_expr * abbrev_memo
    (*

    Found one abbreviation. A valid abbreviation should be at least as visible and reachable by the same path. The first expression is the abbreviation and the second the expansion.

    *)

abbrev_memo allows one to keep track of different expansions of a type alias. This is done for performance purposes.

For instance, when defining type 'a pair = 'a * 'a, when one refers to an 'a pair, it is just a shortcut for the 'a * 'a type. This expansion will be stored in the abbrev_memo of the corresponding Tconstr node.

In practice, abbrev_memo behaves like list of expansions with a mutable tail.

Note on marshalling: abbrev_memo must not appear in saved types. Btype, with cleanup_abbrev and memo, takes care of tracking and removing abbreviations.

commutable is a flag appended to every arrow type.

When typing an application, if the type of the functional is known, its type is instantiated with commu_ok arrows, otherwise as commu_var ().

When the type is not known, the application will be used to infer the actual type. This is fragile in presence of labels where there is no principal type.

Two incompatible applications must rely on is_commu_ok arrows, otherwise they will trigger an error.

let f g = g ~a:() ~b:(); g ~b:() ~a:();

Error: This function is applied to arguments in an order different from other calls. This is only allowed when the real type is known.

val is_commu_ok : commutable -> bool
val commu_ok : commutable
val commu_var : unit -> commutable

field_kind indicates the accessibility of a method.

An Fprivate field may become Fpublic or Fabsent during unification, but not the other way round.

The same field_kind is kept shared when copying Tfield nodes so that the copies of the self-type of a class share the same accessibility (see also PR#10539).

type field_kind_view =
  1. | Fprivate
  2. | Fpublic
  3. | Fabsent
val field_kind_repr : field_kind -> field_kind_view
val field_public : field_kind
val field_absent : field_kind
val field_private : unit -> field_kind
val field_kind_internal_repr : field_kind -> field_kind

Getters for type_expr; calls repr before answering a value

val get_desc : type_expr -> type_desc
val get_level : type_expr -> int
val get_scope : type_expr -> int
val get_id : type_expr -> int
type transient_expr = private {
  1. mutable desc : type_desc;
  2. mutable level : int;
  3. mutable scope : int;
  4. id : int;
}

Transient type_expr. Should only be used immediately after Transient_expr.repr

module Transient_expr : sig ... end

Operations on transient_expr

val create_expr : type_desc -> level:int -> scope:int -> id:int -> type_expr

Functions and definitions moved from Btype

val newty3 : level:int -> scope:int -> type_desc -> type_expr

Create a type with a fresh id

val newty2 : level:int -> type_desc -> type_expr

Create a type with a fresh id and no scope

module TransientTypeOps : sig ... end

Comparisons for functors

Comparisons for type_expr; cannot be used for functors

val eq_type : type_expr -> type_expr -> bool
val compare_type : type_expr -> type_expr -> int

Constructor and accessors for row_desc

`X | `Y (row_closed = true) < `X | `Y (row_closed = true) > `X | `Y (row_closed = false) < `X | `Y > `X (row_closed = true)

type t = > `X as 'a (row_more = Tvar a) type t = private > `X (row_more = Tconstr ("t#row", , ref Mnil))

And for:

let f = function `X -> `X -> | `Y -> `X

the type of "f" will be a Tarrow whose lhs will (basically) be:

Tvariant row_fields = [("X", _)]; + row_more = + Tvariant { row_fields = [("Y", _)]; + row_more = + Tvariant { row_fields = []; + row_more = _; + _ ; _

}

; _

}

val create_row : + fields:(Asttypes.label * row_field) list -> + more:type_expr -> + closed:bool -> + fixed:fixed_explanation option -> + name:(Path.t * type_expr list) option -> + row_desc
val row_fields : row_desc -> (Asttypes.label * row_field) list
val row_more : row_desc -> type_expr
val row_closed : row_desc -> bool
val row_fixed : row_desc -> fixed_explanation option
val row_name : row_desc -> (Path.t * type_expr list) option
val set_row_name : row_desc -> (Path.t * type_expr list) option -> row_desc
val get_row_field : Asttypes.label -> row_desc -> row_field
type row_desc_repr =
  1. | Row of {
    1. fields : (Asttypes.label * row_field) list;
    2. more : type_expr;
    3. closed : bool;
    4. fixed : fixed_explanation option;
    5. name : (Path.t * type_expr list) option;
    }

get all fields at once; different from the old row_repr

val row_repr : row_desc -> row_desc_repr
type row_field_view =
  1. | Rpresent of type_expr option
  2. | Reither of bool * type_expr list * bool
  3. | Rabsent

Current contents of a row field

val row_field_repr : row_field -> row_field_view
val rf_present : type_expr option -> row_field
val rf_absent : row_field
val rf_either : + ?use_ext_of:row_field -> + no_arg:bool -> + type_expr list -> + matched:bool -> + row_field
val rf_either_of : type_expr option -> row_field
val eq_row_field_ext : row_field -> row_field -> bool
val changed_row_field_exts : row_field list -> (unit -> unit) -> bool
val match_row_field : + present:(type_expr option -> 'a) -> + absent:(unit -> 'a) -> + either:(bool -> type_expr list -> bool -> row_field option -> 'a) -> + row_field -> + 'a
module Uid = Shape.Uid
module MethSet : Set.S with type elt = string
module VarSet : Set.S with type elt = string
module Meths : Map.S with type key = string
module Vars : Map.S with type key = string
type value_description = {
  1. val_type : type_expr;
  2. val_kind : value_kind;
  3. val_loc : Location.t;
  4. val_attributes : Parsetree.attributes;
  5. val_uid : Uid.t;
}
and value_kind =
  1. | Val_reg
  2. | Val_prim of Primitive.description
  3. | Val_ivar of Asttypes.mutable_flag * string
  4. | Val_self of class_signature * self_meths * Ident.t Vars.t * string
  5. | Val_anc of class_signature * Ident.t Meths.t * string
and self_meths =
  1. | Self_concrete of Ident.t Meths.t
  2. | Self_virtual of Ident.t Meths.t ref
and class_signature = {
  1. csig_self : type_expr;
  2. mutable csig_self_row : type_expr;
  3. mutable csig_vars : (Asttypes.mutable_flag * Asttypes.virtual_flag * type_expr) + Vars.t;
  4. mutable csig_meths : (method_privacy * Asttypes.virtual_flag * type_expr) + Meths.t;
}
and method_privacy =
  1. | Mpublic
  2. | Mprivate of field_kind
module Variance : sig ... end
module Separability : sig ... end

see Typedecl_separability for an explanation of separability and separability modes.

type type_declaration = {
  1. type_params : type_expr list;
  2. type_arity : int;
  3. type_kind : type_decl_kind;
  4. type_private : Asttypes.private_flag;
  5. type_manifest : type_expr option;
  6. type_variance : Variance.t list;
  7. type_separability : Separability.t list;
  8. type_is_newtype : bool;
  9. type_expansion_scope : int;
  10. type_loc : Location.t;
  11. type_attributes : Parsetree.attributes;
  12. type_immediate : Type_immediacy.t;
  13. type_unboxed_default : bool;
  14. type_uid : Uid.t;
}
and ('lbl, 'cstr) type_kind =
  1. | Type_abstract
  2. | Type_record of 'lbl list * record_representation
  3. | Type_variant of 'cstr list * variant_representation
  4. | Type_open
and record_representation =
  1. | Record_regular
  2. | Record_float
  3. | Record_unboxed of bool
  4. | Record_inlined of int
  5. | Record_extension of Path.t
and variant_representation =
  1. | Variant_regular
  2. | Variant_unboxed
and label_declaration = {
  1. ld_id : Ident.t;
  2. ld_mutable : Asttypes.mutable_flag;
  3. ld_type : type_expr;
  4. ld_loc : Location.t;
  5. ld_attributes : Parsetree.attributes;
  6. ld_uid : Uid.t;
}
and constructor_declaration = {
  1. cd_id : Ident.t;
  2. cd_args : constructor_arguments;
  3. cd_res : type_expr option;
  4. cd_loc : Location.t;
  5. cd_attributes : Parsetree.attributes;
  6. cd_uid : Uid.t;
}
and constructor_arguments =
  1. | Cstr_tuple of type_expr list
  2. | Cstr_record of label_declaration list
type extension_constructor = {
  1. ext_type_path : Path.t;
  2. ext_type_params : type_expr list;
  3. ext_args : constructor_arguments;
  4. ext_ret_type : type_expr option;
  5. ext_private : Asttypes.private_flag;
  6. ext_loc : Location.t;
  7. ext_attributes : Parsetree.attributes;
  8. ext_uid : Uid.t;
}
and type_transparence =
  1. | Type_public
  2. | Type_new
  3. | Type_private
type class_type =
  1. | Cty_constr of Path.t * type_expr list * class_type
  2. | Cty_signature of class_signature
  3. | Cty_arrow of Asttypes.arg_label * type_expr * class_type
type class_declaration = {
  1. cty_params : type_expr list;
  2. mutable cty_type : class_type;
  3. cty_path : Path.t;
  4. cty_new : type_expr option;
  5. cty_variance : Variance.t list;
  6. cty_loc : Location.t;
  7. cty_attributes : Parsetree.attributes;
  8. cty_uid : Uid.t;
}
type class_type_declaration = {
  1. clty_params : type_expr list;
  2. clty_type : class_type;
  3. clty_path : Path.t;
  4. clty_hash_type : type_declaration;
  5. clty_variance : Variance.t list;
  6. clty_loc : Location.t;
  7. clty_attributes : Parsetree.attributes;
  8. clty_uid : Uid.t;
}
type visibility =
  1. | Exported
  2. | Hidden
type module_type =
  1. | Mty_ident of Path.t
  2. | Mty_signature of signature
  3. | Mty_functor of functor_parameter * module_type
  4. | Mty_alias of Path.t
and functor_parameter =
  1. | Unit
  2. | Named of Ident.t option * module_type
and module_presence =
  1. | Mp_present
  2. | Mp_absent
and signature = signature_item list
and module_declaration = {
  1. md_type : module_type;
  2. md_attributes : Parsetree.attributes;
  3. md_loc : Location.t;
  4. md_uid : Uid.t;
}
and modtype_declaration = {
  1. mtd_type : module_type option;
  2. mtd_attributes : Parsetree.attributes;
  3. mtd_loc : Location.t;
  4. mtd_uid : Uid.t;
}
and rec_status =
  1. | Trec_not
  2. | Trec_first
  3. | Trec_next
and ext_status =
  1. | Text_first
  2. | Text_next
  3. | Text_exception
val item_visibility : signature_item -> visibility
type constructor_description = {
  1. cstr_name : string;
  2. cstr_res : type_expr;
  3. cstr_existentials : type_expr list;
  4. cstr_args : type_expr list;
  5. cstr_arity : int;
  6. cstr_tag : constructor_tag;
  7. cstr_consts : int;
  8. cstr_nonconsts : int;
  9. cstr_generalized : bool;
  10. cstr_private : Asttypes.private_flag;
  11. cstr_loc : Location.t;
  12. cstr_attributes : Parsetree.attributes;
  13. cstr_inlined : type_declaration option;
  14. cstr_uid : Uid.t;
}
and constructor_tag =
  1. | Cstr_constant of int
  2. | Cstr_block of int
  3. | Cstr_unboxed
  4. | Cstr_extension of Path.t * bool
val equal_tag : constructor_tag -> constructor_tag -> bool
val may_equal_constr : + constructor_description -> + constructor_description -> + bool
type label_description = {
  1. lbl_name : string;
  2. lbl_res : type_expr;
  3. lbl_arg : type_expr;
  4. lbl_mut : Asttypes.mutable_flag;
  5. lbl_pos : int;
  6. lbl_all : label_description array;
  7. lbl_repres : record_representation;
  8. lbl_private : Asttypes.private_flag;
  9. lbl_loc : Location.t;
  10. lbl_attributes : Parsetree.attributes;
  11. lbl_uid : Uid.t;
}
val bound_value_identifiers : signature -> Ident.t list

Extracts the list of "value" identifiers bound by a signature. "Value" identifiers are identifiers for signature components that correspond to a run-time value: values, extensions, modules, classes. Note: manifest primitives do not correspond to a run-time value!

val signature_item_id : signature_item -> Ident.t
type snapshot
val snapshot : unit -> snapshot
val backtrack : cleanup_abbrev:(unit -> unit) -> snapshot -> unit
val undo_first_change_after : snapshot -> unit
val undo_compress : snapshot -> unit

Functions to use when modifying a type (only Ctype?). The old values are logged and reverted on backtracking.

val set_type_desc : type_expr -> type_desc -> unit
val set_level : type_expr -> int -> unit
val set_scope : type_expr -> int -> unit
val set_name : + (Path.t * type_expr list) option ref -> + (Path.t * type_expr list) option -> + unit
val set_univar : type_expr option ref -> type_expr -> unit
val set_commu_ok : commutable -> unit
diff --git a/findlib-0/compiler-libs/Typetexp/TyVarEnv/index.html b/findlib-0/compiler-libs/Typetexp/TyVarEnv/index.html new file mode 100644 index 000000000..d4911f877 --- /dev/null +++ b/findlib-0/compiler-libs/Typetexp/TyVarEnv/index.html @@ -0,0 +1,10 @@ + +TyVarEnv (docs.findlib-0.compiler-libs.Typetexp.TyVarEnv)

Module Typetexp.TyVarEnv

val reset : unit -> unit

removes all type variables from scope

val with_local_scope : (unit -> 'a) -> 'a

Evaluate in a narrowed type-variable scope

type poly_univars
val make_poly_univars : string list -> poly_univars

remember that a list of strings connotes univars; this must always be paired with a check_poly_univars.

val check_poly_univars : + Env.t -> + Location.t -> + poly_univars -> + Types.type_expr list

Verify that the given univars are universally quantified, and return the list of variables. The type in which the univars are used must be generalised

val instance_poly_univars : + Env.t -> + Location.t -> + poly_univars -> + Types.type_expr list

Same as check_poly_univars, but instantiates the resulting type scheme (i.e. variables become Tvar rather than Tunivar)

diff --git a/findlib-0/compiler-libs/Typetexp/index.html b/findlib-0/compiler-libs/Typetexp/index.html new file mode 100644 index 000000000..25480bc1b --- /dev/null +++ b/findlib-0/compiler-libs/Typetexp/index.html @@ -0,0 +1,15 @@ + +Typetexp (docs.findlib-0.compiler-libs.Typetexp)

Module Typetexp

module TyVarEnv : sig ... end
val valid_tyvar_name : string -> bool
val transl_simple_type : + Env.t -> + ?univars:TyVarEnv.poly_univars -> + closed:bool -> + Parsetree.core_type -> + Typedtree.core_type
val transl_simple_type_univars : + Env.t -> + Parsetree.core_type -> + Typedtree.core_type
val transl_simple_type_delayed : + Env.t -> + Parsetree.core_type -> + Typedtree.core_type * Types.type_expr * (unit -> unit)
val transl_type_scheme : Env.t -> Parsetree.core_type -> Typedtree.core_type
val transl_type_param : Env.t -> Parsetree.core_type -> Typedtree.core_type
exception Already_bound
type error =
  1. | Unbound_type_variable of string * string list
  2. | No_type_wildcards
  3. | Undefined_type_constructor of Path.t
  4. | Type_arity_mismatch of Longident.t * int * int
  5. | Bound_type_variable of string
  6. | Recursive_type
  7. | Unbound_row_variable of Longident.t
  8. | Type_mismatch of Errortrace.unification_error
  9. | Alias_type_mismatch of Errortrace.unification_error
  10. | Present_has_conjunction of string
  11. | Present_has_no_type of string
  12. | Constructor_mismatch of Types.type_expr * Types.type_expr
  13. | Not_a_variant of Types.type_expr
  14. | Variant_tags of string * string
  15. | Invalid_variable_name of string
  16. | Cannot_quantify of string * Types.type_expr
  17. | Multiple_constraints_on_type of Longident.t
  18. | Method_mismatch of string * Types.type_expr * Types.type_expr
  19. | Opened_object of Path.t option
  20. | Not_an_object of Types.type_expr
exception Error of Location.t * Env.t * error
val report_error : Env.t -> Format.formatter -> error -> unit
val transl_modtype_longident : + (Location.t -> Env.t -> Longident.t -> Path.t) ref
val transl_modtype : + (Env.t -> Parsetree.module_type -> Typedtree.module_type) ref
diff --git a/findlib-0/compiler-libs/Un_anf/index.html b/findlib-0/compiler-libs/Un_anf/index.html new file mode 100644 index 000000000..f7e5197ab --- /dev/null +++ b/findlib-0/compiler-libs/Un_anf/index.html @@ -0,0 +1,6 @@ + +Un_anf (docs.findlib-0.compiler-libs.Un_anf)

Module Un_anf

val apply : + what:Symbol.t -> + ppf_dump:Format.formatter -> + Clambda.ulambda -> + Clambda.ulambda

Expand ANF-like constructs so that pattern matches in Cmmgen will work correctly.

diff --git a/findlib-0/compiler-libs/Unbox_closures/index.html b/findlib-0/compiler-libs/Unbox_closures/index.html new file mode 100644 index 000000000..ae0095055 --- /dev/null +++ b/findlib-0/compiler-libs/Unbox_closures/index.html @@ -0,0 +1,11 @@ + +Unbox_closures (docs.findlib-0.compiler-libs.Unbox_closures)

Module Unbox_closures

Turn free variables of closures into specialised arguments. The aim is to cause the closure to become closed.

val rewrite_set_of_closures : + env:Inline_and_simplify_aux.Env.t -> + duplicate_function: + (env:Inline_and_simplify_aux.Env.t -> + set_of_closures:Flambda.set_of_closures -> + fun_var:Variable.t -> + new_fun_var:Variable.t -> + Flambda.function_declaration * Flambda.specialised_to Variable.Map.t) -> + set_of_closures:Flambda.set_of_closures -> + (Flambda.expr * Inlining_cost.Benefit.t) option
diff --git a/findlib-0/compiler-libs/Unbox_free_vars_of_closures/index.html b/findlib-0/compiler-libs/Unbox_free_vars_of_closures/index.html new file mode 100644 index 000000000..84953533f --- /dev/null +++ b/findlib-0/compiler-libs/Unbox_free_vars_of_closures/index.html @@ -0,0 +1,5 @@ + +Unbox_free_vars_of_closures (docs.findlib-0.compiler-libs.Unbox_free_vars_of_closures)

Module Unbox_free_vars_of_closures

When approximations of free variables of closures indicate that they are closures or blocks, rewrite projections from such blocks to new variables (which become free in the closures), with the defining expressions of the projections lifted out of the corresponding sets of closures.

diff --git a/findlib-0/compiler-libs/Unbox_specialised_args/index.html b/findlib-0/compiler-libs/Unbox_specialised_args/index.html new file mode 100644 index 000000000..f8f693257 --- /dev/null +++ b/findlib-0/compiler-libs/Unbox_specialised_args/index.html @@ -0,0 +1,11 @@ + +Unbox_specialised_args (docs.findlib-0.compiler-libs.Unbox_specialised_args)

Module Unbox_specialised_args

When approximations of specialised arguments indicate that they are closures or blocks, add more specialised arguments corresponding to the projections from such blocks (with definitions of such projections lifted out), such that the original specialised arguments may later be eliminated.

This in particular enables elimination of closure allocations in examples such as:

let rec map f = function | -> | a::l -> let r = f a in r :: map f l

let g x = map (fun y -> x + y) 1; 2; 3; 4

Here, the specialised version of map initially has a specialised argument f; and upon inlining there will be a projection of x from the closure of f. This pass adds a new specialised argument to carry that projection, at which point the closure of f is redundant.

val rewrite_set_of_closures : + env:Inline_and_simplify_aux.Env.t -> + duplicate_function: + (env:Inline_and_simplify_aux.Env.t -> + set_of_closures:Flambda.set_of_closures -> + fun_var:Variable.t -> + new_fun_var:Variable.t -> + Flambda.function_declaration * Flambda.specialised_to Variable.Map.t) -> + set_of_closures:Flambda.set_of_closures -> + (Flambda.expr * Inlining_cost.Benefit.t) option
diff --git a/findlib-0/compiler-libs/Untypeast/index.html b/findlib-0/compiler-libs/Untypeast/index.html new file mode 100644 index 000000000..4556af2c2 --- /dev/null +++ b/findlib-0/compiler-libs/Untypeast/index.html @@ -0,0 +1,65 @@ + +Untypeast (docs.findlib-0.compiler-libs.Untypeast)

Module Untypeast

val lident_of_path : Path.t -> Longident.t
type mapper = {
  1. attribute : mapper -> Typedtree.attribute -> Parsetree.attribute;
  2. attributes : mapper -> Typedtree.attribute list -> Parsetree.attribute list;
  3. binding_op : mapper -> + Typedtree.binding_op -> + Typedtree.pattern -> + Parsetree.binding_op;
  4. case : 'k. mapper -> 'k Typedtree.case -> Parsetree.case;
  5. class_declaration : mapper -> + Typedtree.class_declaration -> + Parsetree.class_declaration;
  6. class_description : mapper -> + Typedtree.class_description -> + Parsetree.class_description;
  7. class_expr : mapper -> Typedtree.class_expr -> Parsetree.class_expr;
  8. class_field : mapper -> Typedtree.class_field -> Parsetree.class_field;
  9. class_signature : mapper -> + Typedtree.class_signature -> + Parsetree.class_signature;
  10. class_structure : mapper -> + Typedtree.class_structure -> + Parsetree.class_structure;
  11. class_type : mapper -> Typedtree.class_type -> Parsetree.class_type;
  12. class_type_declaration : mapper -> + Typedtree.class_type_declaration -> + Parsetree.class_type_declaration;
  13. class_type_field : mapper -> + Typedtree.class_type_field -> + Parsetree.class_type_field;
  14. constructor_declaration : mapper -> + Typedtree.constructor_declaration -> + Parsetree.constructor_declaration;
  15. expr : mapper -> Typedtree.expression -> Parsetree.expression;
  16. extension_constructor : mapper -> + Typedtree.extension_constructor -> + Parsetree.extension_constructor;
  17. include_declaration : mapper -> + Typedtree.include_declaration -> + Parsetree.include_declaration;
  18. include_description : mapper -> + Typedtree.include_description -> + Parsetree.include_description;
  19. label_declaration : mapper -> + Typedtree.label_declaration -> + Parsetree.label_declaration;
  20. location : mapper -> Location.t -> Location.t;
  21. module_binding : mapper -> + Typedtree.module_binding -> + Parsetree.module_binding;
  22. module_declaration : mapper -> + Typedtree.module_declaration -> + Parsetree.module_declaration;
  23. module_substitution : mapper -> + Typedtree.module_substitution -> + Parsetree.module_substitution;
  24. module_expr : mapper -> Typedtree.module_expr -> Parsetree.module_expr;
  25. module_type : mapper -> Typedtree.module_type -> Parsetree.module_type;
  26. module_type_declaration : mapper -> + Typedtree.module_type_declaration -> + Parsetree.module_type_declaration;
  27. package_type : mapper -> Typedtree.package_type -> Parsetree.package_type;
  28. open_declaration : mapper -> + Typedtree.open_declaration -> + Parsetree.open_declaration;
  29. open_description : mapper -> + Typedtree.open_description -> + Parsetree.open_description;
  30. pat : 'k. mapper -> 'k Typedtree.general_pattern -> Parsetree.pattern;
  31. row_field : mapper -> Typedtree.row_field -> Parsetree.row_field;
  32. object_field : mapper -> Typedtree.object_field -> Parsetree.object_field;
  33. signature : mapper -> Typedtree.signature -> Parsetree.signature;
  34. signature_item : mapper -> + Typedtree.signature_item -> + Parsetree.signature_item;
  35. structure : mapper -> Typedtree.structure -> Parsetree.structure;
  36. structure_item : mapper -> + Typedtree.structure_item -> + Parsetree.structure_item;
  37. typ : mapper -> Typedtree.core_type -> Parsetree.core_type;
  38. type_declaration : mapper -> + Typedtree.type_declaration -> + Parsetree.type_declaration;
  39. type_extension : mapper -> + Typedtree.type_extension -> + Parsetree.type_extension;
  40. type_exception : mapper -> + Typedtree.type_exception -> + Parsetree.type_exception;
  41. type_kind : mapper -> Typedtree.type_kind -> Parsetree.type_kind;
  42. value_binding : mapper -> Typedtree.value_binding -> Parsetree.value_binding;
  43. value_description : mapper -> + Typedtree.value_description -> + Parsetree.value_description;
  44. with_constraint : mapper -> + (Path.t * Longident.t Location.loc * Typedtree.with_constraint) -> + Parsetree.with_constraint;
}
val default_mapper : mapper
val untype_structure : + ?mapper:mapper -> + Typedtree.structure -> + Parsetree.structure
val untype_signature : + ?mapper:mapper -> + Typedtree.signature -> + Parsetree.signature
val untype_expression : + ?mapper:mapper -> + Typedtree.expression -> + Parsetree.expression
val untype_pattern : + ?mapper:mapper -> + _ Typedtree.general_pattern -> + Parsetree.pattern
diff --git a/findlib-0/compiler-libs/Var_within_closure/Map/index.html b/findlib-0/compiler-libs/Var_within_closure/Map/index.html new file mode 100644 index 000000000..fe8bcd5b0 --- /dev/null +++ b/findlib-0/compiler-libs/Var_within_closure/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Var_within_closure.Map)

Module Var_within_closure.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Var_within_closure/Set/index.html b/findlib-0/compiler-libs/Var_within_closure/Set/index.html new file mode 100644 index 000000000..4429d0470 --- /dev/null +++ b/findlib-0/compiler-libs/Var_within_closure/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Var_within_closure.Set)

Module Var_within_closure.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Var_within_closure/T/index.html b/findlib-0/compiler-libs/Var_within_closure/T/index.html new file mode 100644 index 000000000..f4fb82a72 --- /dev/null +++ b/findlib-0/compiler-libs/Var_within_closure/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Var_within_closure.T)

Module Var_within_closure.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Var_within_closure/Tbl/index.html b/findlib-0/compiler-libs/Var_within_closure/Tbl/index.html new file mode 100644 index 000000000..196cba9a7 --- /dev/null +++ b/findlib-0/compiler-libs/Var_within_closure/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Var_within_closure.Tbl)

Module Var_within_closure.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Var_within_closure/index.html b/findlib-0/compiler-libs/Var_within_closure/index.html new file mode 100644 index 000000000..cec34e240 --- /dev/null +++ b/findlib-0/compiler-libs/Var_within_closure/index.html @@ -0,0 +1,2 @@ + +Var_within_closure (docs.findlib-0.compiler-libs.Var_within_closure)

Module Var_within_closure

An identifier, unique across the whole program, that identifies a particular variable within a particular closure. Only Project_var, and not Var, nodes are tagged with these identifiers.

include module type of Closure_element
include Identifiable.S
type t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val wrap : Variable.t -> t
val unwrap : t -> Variable.t
val wrap_map : 'a Variable.Map.t -> 'a Map.t
val unwrap_set : Set.t -> Variable.Set.t
val in_compilation_unit : t -> Compilation_unit.t -> bool
val get_compilation_unit : t -> Compilation_unit.t
val unique_name : t -> string
val output_full : out_channel -> t -> unit
diff --git a/findlib-0/compiler-libs/Variable/Map/index.html b/findlib-0/compiler-libs/Variable/Map/index.html new file mode 100644 index 000000000..d68fb246f --- /dev/null +++ b/findlib-0/compiler-libs/Variable/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Variable.Map)

Module Variable.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Variable/Pair/Map/index.html b/findlib-0/compiler-libs/Variable/Pair/Map/index.html new file mode 100644 index 000000000..178ba11ed --- /dev/null +++ b/findlib-0/compiler-libs/Variable/Pair/Map/index.html @@ -0,0 +1,17 @@ + +Map (docs.findlib-0.compiler-libs.Variable.Pair.Map)

Module Pair.Map

include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

Maps

type key = T.t

The type of the map keys.

type 'a t = 'a Map.Make(T).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val of_list : (key * 'a) list -> 'a t
val disjoint_union : + ?eq:('a -> 'a -> bool) -> + ?print:(Format.formatter -> 'a -> unit) -> + 'a t -> + 'a t -> + 'a t

disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

val union_right : 'a t -> 'a t -> 'a t

union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

val union_left : 'a t -> 'a t -> 'a t

union_left m1 m2 = union_right m2 m1

val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val rename : key t -> key -> key
val map_keys : (key -> key) -> 'a t -> 'a t
val keys : 'a t -> Set.Make(T).t
val data : 'a t -> 'a list
val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t
val transpose_keys_and_data : key t -> key t
val transpose_keys_and_data_set : key t -> Set.Make(T).t t
val print : + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a t -> + unit
diff --git a/findlib-0/compiler-libs/Variable/Pair/Set/index.html b/findlib-0/compiler-libs/Variable/Pair/Set/index.html new file mode 100644 index 000000000..8cfecde88 --- /dev/null +++ b/findlib-0/compiler-libs/Variable/Pair/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Variable.Pair.Set)

Module Pair.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Variable/Pair/T/index.html b/findlib-0/compiler-libs/Variable/Pair/T/index.html new file mode 100644 index 000000000..cd461a19b --- /dev/null +++ b/findlib-0/compiler-libs/Variable/Pair/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Variable.Pair.T)

Module Pair.T

type t = pair
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Variable/Pair/Tbl/index.html b/findlib-0/compiler-libs/Variable/Pair/Tbl/index.html new file mode 100644 index 000000000..bab2c21ec --- /dev/null +++ b/findlib-0/compiler-libs/Variable/Pair/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Variable.Pair.Tbl)

Module Pair.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Variable/Pair/index.html b/findlib-0/compiler-libs/Variable/Pair/index.html new file mode 100644 index 000000000..56f7458b5 --- /dev/null +++ b/findlib-0/compiler-libs/Variable/Pair/index.html @@ -0,0 +1,2 @@ + +Pair (docs.findlib-0.compiler-libs.Variable.Pair)

Module Variable.Pair

module T : Identifiable.Thing with type t = pair
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
diff --git a/findlib-0/compiler-libs/Variable/Set/index.html b/findlib-0/compiler-libs/Variable/Set/index.html new file mode 100644 index 000000000..a03feb893 --- /dev/null +++ b/findlib-0/compiler-libs/Variable/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-0.compiler-libs.Variable.Set)

Module Variable.Set

include Set.S with type elt = T.t and type t = Set.Make(T).t

Sets

type elt = T.t

The type of the set elements.

type t = Set.Make(T).t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
val to_string : t -> string
val of_list : elt list -> t
val map : (elt -> elt) -> t -> t
diff --git a/findlib-0/compiler-libs/Variable/T/index.html b/findlib-0/compiler-libs/Variable/T/index.html new file mode 100644 index 000000000..9a3b026d2 --- /dev/null +++ b/findlib-0/compiler-libs/Variable/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-0.compiler-libs.Variable.T)

Module Variable.T

type t = t
include Hashtbl.HashedType with type t := t
val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := t
val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> t -> unit
val print : Format.formatter -> t -> unit
diff --git a/findlib-0/compiler-libs/Variable/Tbl/index.html b/findlib-0/compiler-libs/Variable/Tbl/index.html new file mode 100644 index 000000000..ed98ff9db --- /dev/null +++ b/findlib-0/compiler-libs/Variable/Tbl/index.html @@ -0,0 +1,2 @@ + +Tbl (docs.findlib-0.compiler-libs.Variable.Tbl)

Module Variable.Tbl

include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
type key = T.t
type 'a t = 'a Hashtbl.Make(T).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
val to_list : 'a t -> (T.t * 'a) list
val of_list : (T.t * 'a) list -> 'a t
val to_map : 'a t -> 'a Map.Make(T).t
val of_map : 'a Map.Make(T).t -> 'a t
val memoize : 'a t -> (key -> 'a) -> key -> 'a
val map : 'a t -> ('a -> 'b) -> 'b t
diff --git a/findlib-0/compiler-libs/Variable/index.html b/findlib-0/compiler-libs/Variable/index.html new file mode 100644 index 000000000..dc018c7fb --- /dev/null +++ b/findlib-0/compiler-libs/Variable/index.html @@ -0,0 +1,5 @@ + +Variable (docs.findlib-0.compiler-libs.Variable)

Module Variable

Variable.t is the equivalent of a non-persistent Ident.t in the Flambda tree. It wraps an Ident.t together with its source compilation_unit. As such, it is unique within a whole program, not just one compilation unit.

Introducing a new type helps in tracing the source of identifiers when debugging the inliner. It also avoids Ident renaming when importing cmx files.

include Identifiable.S
type t
module T : Identifiable.Thing with type t = t
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val compare : T.t -> T.t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

val output : out_channel -> T.t -> unit
val print : Format.formatter -> T.t -> unit
module Set : Identifiable.Set with module T := T
module Map : Identifiable.Map with module T := T
module Tbl : Identifiable.Tbl with module T := T
val create : + ?current_compilation_unit:Compilation_unit.t -> + Internal_variable_names.t -> + t
val create_with_same_name_as_ident : Ident.t -> t
val rename : ?current_compilation_unit:Compilation_unit.t -> t -> t
val in_compilation_unit : t -> Compilation_unit.t -> bool
val name : t -> string
val unique_name : t -> string
val get_compilation_unit : t -> Compilation_unit.t
val print_list : Format.formatter -> t list -> unit
val print_opt : Format.formatter -> t option -> unit
val debug_when_stamp_matches : t -> stamp:int -> f:(unit -> unit) -> unit

If the given variable has the given stamp, call the user-supplied function. For debugging purposes only.

type pair = t * t
module Pair : Identifiable.S with type t := pair
val compare_lists : t list -> t list -> int
val output_full : out_channel -> t -> unit

Unlike output, output_full includes the compilation unit.

diff --git a/findlib-0/compiler-libs/Warnings/index.html b/findlib-0/compiler-libs/Warnings/index.html new file mode 100644 index 000000000..80589d044 --- /dev/null +++ b/findlib-0/compiler-libs/Warnings/index.html @@ -0,0 +1,2 @@ + +Warnings (docs.findlib-0.compiler-libs.Warnings)

Module Warnings

Warning definitions

Warning: this module is unstable and part of compiler-libs.

type loc = {
  1. loc_start : Lexing.position;
  2. loc_end : Lexing.position;
  3. loc_ghost : bool;
}
val ghost_loc_in_file : string -> loc

Return an empty ghost range located in a given file

type field_usage_warning =
  1. | Unused
  2. | Not_read
  3. | Not_mutated
type constructor_usage_warning =
  1. | Unused
  2. | Not_constructed
  3. | Only_exported_private
type t =
  1. | Comment_start
  2. | Comment_not_end
  3. | Fragile_match of string
  4. | Ignored_partial_application
  5. | Labels_omitted of string list
  6. | Method_override of string list
  7. | Partial_match of string
  8. | Missing_record_field_pattern of string
  9. | Non_unit_statement
  10. | Redundant_case
  11. | Redundant_subpat
  12. | Instance_variable_override of string list
  13. | Illegal_backslash
  14. | Implicit_public_methods of string list
  15. | Unerasable_optional_argument
  16. | Undeclared_virtual_method of string
  17. | Not_principal of string
  18. | Non_principal_labels of string
  19. | Ignored_extra_argument
  20. | Nonreturning_statement
  21. | Preprocessor of string
  22. | Useless_record_with
  23. | Bad_module_name of string
  24. | All_clauses_guarded
  25. | Unused_var of string
  26. | Unused_var_strict of string
  27. | Wildcard_arg_to_constant_constr
  28. | Eol_in_string
  29. | Duplicate_definitions of string * string * string * string
  30. | Unused_value_declaration of string
  31. | Unused_open of string
  32. | Unused_type_declaration of string
  33. | Unused_for_index of string
  34. | Unused_ancestor of string
  35. | Unused_constructor of string * constructor_usage_warning
  36. | Unused_extension of string * bool * constructor_usage_warning
  37. | Unused_rec_flag
  38. | Name_out_of_scope of string * string list * bool
  39. | Ambiguous_name of string list * string list * bool * string
  40. | Disambiguated_name of string
  41. | Nonoptional_label of string
  42. | Open_shadow_identifier of string * string
  43. | Open_shadow_label_constructor of string * string
  44. | Bad_env_variable of string * string
  45. | Attribute_payload of string * string
  46. | Eliminated_optional_arguments of string list
  47. | No_cmi_file of string * string option
  48. | Unexpected_docstring of bool
  49. | Wrong_tailcall_expectation of bool
  50. | Fragile_literal_pattern
  51. | Misplaced_attribute of string
  52. | Duplicated_attribute of string
  53. | Inlining_impossible of string
  54. | Unreachable_case
  55. | Ambiguous_var_in_pattern_guard of string list
  56. | No_cmx_file of string
  57. | Flambda_assignment_to_non_mutable_value
  58. | Unused_module of string
  59. | Unboxable_type_in_prim_decl of string
  60. | Constraint_on_gadt
  61. | Erroneous_printed_signature of string
  62. | Unsafe_array_syntax_without_parsing
  63. | Redefining_unit of string
  64. | Unused_open_bang of string
  65. | Unused_functor_parameter of string
  66. | Match_on_mutable_state_prevent_uncurry
  67. | Unused_field of string * field_usage_warning
  68. | Missing_mli
  69. | Unused_tmc_attribute
  70. | Tmc_breaks_tailcall
  71. | Generative_application_expects_unit
type alert = {
  1. kind : string;
  2. message : string;
  3. def : loc;
  4. use : loc;
}
val parse_options : bool -> string -> alert option
val parse_alert_option : string -> unit

Disable/enable alerts based on the parameter to the -alert command-line option. Raises Arg.Bad if the string is not a valid specification.

val without_warnings : (unit -> 'a) -> 'a

Run the thunk with all warnings and alerts disabled.

val is_active : t -> bool
val is_error : t -> bool
val defaults_w : string
val defaults_warn_error : string
type reporting_information = {
  1. id : string;
  2. message : string;
  3. is_error : bool;
  4. sub_locs : (loc * string) list;
}
val report : t -> [ `Active of reporting_information | `Inactive ]
val report_alert : alert -> [ `Active of reporting_information | `Inactive ]
exception Errors
val check_fatal : unit -> unit
val reset_fatal : unit -> unit
val help_warnings : unit -> unit
type state
val backup : unit -> state
val restore : state -> unit
val with_state : state -> (unit -> 'a) -> 'a
val mk_lazy : (unit -> 'a) -> 'a Lazy.t

Like Lazy.of_fun, but the function is applied with the warning/alert settings at the time mk_lazy is called.

type description = {
  1. number : int;
  2. names : string list;
  3. description : string;
  4. since : Sys.ocaml_release_info option;
}
val descriptions : description list
diff --git a/findlib-0/compiler-libs/X86_ast/index.html b/findlib-0/compiler-libs/X86_ast/index.html new file mode 100644 index 000000000..fd0efd6d3 --- /dev/null +++ b/findlib-0/compiler-libs/X86_ast/index.html @@ -0,0 +1,2 @@ + +X86_ast (docs.findlib-0.compiler-libs.X86_ast)

Module X86_ast

Structured representation of Intel assembly language (32 and 64 bit).

type condition =
  1. | L
  2. | GE
  3. | LE
  4. | G
  5. | B
  6. | AE
  7. | BE
  8. | A
  9. | E
  10. | NE
  11. | O
  12. | NO
  13. | S
  14. | NS
  15. | P
  16. | NP
type float_condition =
  1. | EQf
  2. | LTf
  3. | LEf
  4. | UNORDf
  5. | NEQf
  6. | NLTf
  7. | NLEf
  8. | ORDf
type rounding =
  1. | RoundUp
  2. | RoundDown
  3. | RoundNearest
  4. | RoundTruncate
type constant =
  1. | Const of int64
  2. | ConstThis
  3. | ConstLabel of string
  4. | ConstAdd of constant * constant
  5. | ConstSub of constant * constant
type data_type =
  1. | NONE
  2. | REAL4
  3. | REAL8
  4. | BYTE
  5. | WORD
  6. | DWORD
  7. | QWORD
  8. | OWORD
  9. | NEAR
  10. | PROC
type reg64 =
  1. | RAX
  2. | RBX
  3. | RCX
  4. | RDX
  5. | RSP
  6. | RBP
  7. | RSI
  8. | RDI
  9. | R8
  10. | R9
  11. | R10
  12. | R11
  13. | R12
  14. | R13
  15. | R14
  16. | R15
type reg8h =
  1. | AH
  2. | BH
  3. | CH
  4. | DH
type registerf =
  1. | XMM of int
  2. | TOS
  3. | ST of int
type arch =
  1. | X64
  2. | X86
type addr = {
  1. arch : arch;
  2. typ : data_type;
  3. idx : reg64;
  4. scale : int;
  5. base : reg64 option;
  6. sym : string option;
  7. displ : int;
}

Addressing modes: displ + sym + base + idx * scale (if scale = 0, idx is ignored and base must be None)

type arg =
  1. | Imm of int64
    (*

    Operand is an immediate constant integer

    *)
  2. | Sym of string
    (*

    Address of a symbol (absolute address except for call/jmp target where it is interpreted as a relative displacement

    *)
  3. | Reg8L of reg64
  4. | Reg8H of reg8h
  5. | Reg16 of reg64
  6. | Reg32 of reg64
  7. | Reg64 of reg64
  8. | Regf of registerf
  9. | Mem of addr
  10. | Mem64_RIP of data_type * string * int
type instruction =
  1. | ADD of arg * arg
  2. | ADDSD of arg * arg
  3. | AND of arg * arg
  4. | ANDPD of arg * arg
  5. | BSWAP of arg
  6. | CALL of arg
  7. | CDQ
  8. | CMOV of condition * arg * arg
  9. | CMP of arg * arg
  10. | CMPSD of float_condition * arg * arg
  11. | COMISD of arg * arg
  12. | CQO
  13. | CVTSD2SI of arg * arg
  14. | CVTSD2SS of arg * arg
  15. | CVTSI2SD of arg * arg
  16. | CVTSS2SD of arg * arg
  17. | CVTTSD2SI of arg * arg
  18. | DEC of arg
  19. | DIVSD of arg * arg
  20. | FABS
  21. | FADD of arg
  22. | FADDP of arg * arg
  23. | FCHS
  24. | FCOMP of arg
  25. | FCOMPP
  26. | FCOS
  27. | FDIV of arg
  28. | FDIVP of arg * arg
  29. | FDIVR of arg
  30. | FDIVRP of arg * arg
  31. | FILD of arg
  32. | FISTP of arg
  33. | FLD of arg
  34. | FLD1
  35. | FLDCW of arg
  36. | FLDLG2
  37. | FLDLN2
  38. | FLDZ
  39. | FMUL of arg
  40. | FMULP of arg * arg
  41. | FNSTCW of arg
  42. | FNSTSW of arg
  43. | FPATAN
  44. | FPTAN
  45. | FSIN
  46. | FSQRT
  47. | FSTP of arg
  48. | FSUB of arg
  49. | FSUBP of arg * arg
  50. | FSUBR of arg
  51. | FSUBRP of arg * arg
  52. | FXCH of arg
  53. | FYL2X
  54. | HLT
  55. | IDIV of arg
  56. | IMUL of arg * arg option
  57. | INC of arg
  58. | J of condition * arg
  59. | JMP of arg
  60. | LEA of arg * arg
  61. | LEAVE
  62. | MOV of arg * arg
  63. | MOVAPD of arg * arg
  64. | MOVD of arg * arg
  65. | MOVLPD of arg * arg
  66. | MOVSD of arg * arg
  67. | MOVSS of arg * arg
  68. | MOVSX of arg * arg
  69. | MOVSXD of arg * arg
  70. | MOVZX of arg * arg
  71. | MULSD of arg * arg
  72. | NEG of arg
  73. | NOP
  74. | OR of arg * arg
  75. | POP of arg
  76. | PUSH of arg
  77. | RET
  78. | ROUNDSD of rounding * arg * arg
  79. | SAL of arg * arg
  80. | SAR of arg * arg
  81. | SET of condition * arg
  82. | SHR of arg * arg
  83. | SQRTSD of arg * arg
  84. | SUB of arg * arg
  85. | SUBSD of arg * arg
  86. | TEST of arg * arg
  87. | UCOMISD of arg * arg
  88. | XCHG of arg * arg
  89. | XOR of arg * arg
  90. | XORPD of arg * arg
type asm_line =
  1. | Ins of instruction
  2. | Align of bool * int
  3. | Byte of constant
  4. | Bytes of string
  5. | Comment of string
  6. | Global of string
  7. | Long of constant
  8. | NewLabel of string * data_type
  9. | Quad of constant
  10. | Section of string list * string option * string list
  11. | Space of int
  12. | Word of constant
  13. | External of string * data_type
  14. | Mode386
  15. | Model of string
  16. | Cfi_adjust_cfa_offset of int
  17. | Cfi_endproc
  18. | Cfi_startproc
  19. | Cfi_remember_state
  20. | Cfi_restore_state
  21. | Cfi_def_cfa_register of string
  22. | Cfi_def_cfa_offset of int
  23. | File of int * string
  24. | Indirect_symbol of string
  25. | Loc of int * int * int
  26. | Private_extern of string
  27. | Set of string * constant
  28. | Size of string * constant
  29. | Type of string * string
type asm_program = asm_line list
diff --git a/findlib-0/compiler-libs/X86_dsl/D/index.html b/findlib-0/compiler-libs/X86_dsl/D/index.html new file mode 100644 index 000000000..012fd9c59 --- /dev/null +++ b/findlib-0/compiler-libs/X86_dsl/D/index.html @@ -0,0 +1,2 @@ + +D (docs.findlib-0.compiler-libs.X86_dsl.D)

Module X86_dsl.D

Directives

val align : int -> unit
val byte : X86_ast.constant -> unit
val bytes : string -> unit
val cfi_adjust_cfa_offset : int -> unit
val cfi_endproc : unit -> unit
val cfi_startproc : unit -> unit
val cfi_remember_state : unit -> unit
val cfi_restore_state : unit -> unit
val cfi_def_cfa_register : string -> unit
val cfi_def_cfa_offset : int -> unit
val comment : string -> unit
val data : unit -> unit
val extrn : string -> X86_ast.data_type -> unit
val file : file_num:int -> file_name:string -> unit
val global : string -> unit
val indirect_symbol : string -> unit
val label : ?typ:X86_ast.data_type -> string -> unit
val loc : file_num:int -> line:int -> col:int -> unit
val long : X86_ast.constant -> unit
val mode386 : unit -> unit
val model : string -> unit
val private_extern : string -> unit
val qword : X86_ast.constant -> unit
val section : string list -> string option -> string list -> unit
val setvar : (string * X86_ast.constant) -> unit
val size : string -> X86_ast.constant -> unit
val space : int -> unit
val text : unit -> unit
val type_ : string -> string -> unit
val word : X86_ast.constant -> unit
diff --git a/findlib-0/compiler-libs/X86_dsl/I/index.html b/findlib-0/compiler-libs/X86_dsl/I/index.html new file mode 100644 index 000000000..1da17b363 --- /dev/null +++ b/findlib-0/compiler-libs/X86_dsl/I/index.html @@ -0,0 +1,2 @@ + +I (docs.findlib-0.compiler-libs.X86_dsl.I)

Module X86_dsl.I

val add : X86_ast.arg -> X86_ast.arg -> unit
val addsd : X86_ast.arg -> X86_ast.arg -> unit
val and_ : X86_ast.arg -> X86_ast.arg -> unit
val andpd : X86_ast.arg -> X86_ast.arg -> unit
val bswap : X86_ast.arg -> unit
val call : X86_ast.arg -> unit
val cdq : unit -> unit
val cmp : X86_ast.arg -> X86_ast.arg -> unit
val comisd : X86_ast.arg -> X86_ast.arg -> unit
val cqo : unit -> unit
val cvtsd2ss : X86_ast.arg -> X86_ast.arg -> unit
val cvtsi2sd : X86_ast.arg -> X86_ast.arg -> unit
val cvtss2sd : X86_ast.arg -> X86_ast.arg -> unit
val cvttsd2si : X86_ast.arg -> X86_ast.arg -> unit
val dec : X86_ast.arg -> unit
val divsd : X86_ast.arg -> X86_ast.arg -> unit
val fabs : unit -> unit
val fadd : X86_ast.arg -> unit
val faddp : X86_ast.arg -> X86_ast.arg -> unit
val fchs : unit -> unit
val fcomp : X86_ast.arg -> unit
val fcompp : unit -> unit
val fcos : unit -> unit
val fdiv : X86_ast.arg -> unit
val fdivp : X86_ast.arg -> X86_ast.arg -> unit
val fdivr : X86_ast.arg -> unit
val fdivrp : X86_ast.arg -> X86_ast.arg -> unit
val fild : X86_ast.arg -> unit
val fistp : X86_ast.arg -> unit
val fld1 : unit -> unit
val fld : X86_ast.arg -> unit
val fldcw : X86_ast.arg -> unit
val fldlg2 : unit -> unit
val fldln2 : unit -> unit
val fldz : unit -> unit
val fmul : X86_ast.arg -> unit
val fmulp : X86_ast.arg -> X86_ast.arg -> unit
val fnstcw : X86_ast.arg -> unit
val fnstsw : X86_ast.arg -> unit
val fpatan : unit -> unit
val fptan : unit -> unit
val fsin : unit -> unit
val fsqrt : unit -> unit
val fstp : X86_ast.arg -> unit
val fsub : X86_ast.arg -> unit
val fsubp : X86_ast.arg -> X86_ast.arg -> unit
val fsubr : X86_ast.arg -> unit
val fsubrp : X86_ast.arg -> X86_ast.arg -> unit
val fxch : X86_ast.arg -> unit
val fyl2x : unit -> unit
val hlt : unit -> unit
val idiv : X86_ast.arg -> unit
val imul : X86_ast.arg -> X86_ast.arg option -> unit
val inc : X86_ast.arg -> unit
val j : X86_ast.condition -> X86_ast.arg -> unit
val ja : X86_ast.arg -> unit
val jae : X86_ast.arg -> unit
val jb : X86_ast.arg -> unit
val jbe : X86_ast.arg -> unit
val je : X86_ast.arg -> unit
val jg : X86_ast.arg -> unit
val jmp : X86_ast.arg -> unit
val jne : X86_ast.arg -> unit
val jp : X86_ast.arg -> unit
val lea : X86_ast.arg -> X86_ast.arg -> unit
val mov : X86_ast.arg -> X86_ast.arg -> unit
val movapd : X86_ast.arg -> X86_ast.arg -> unit
val movd : X86_ast.arg -> X86_ast.arg -> unit
val movsd : X86_ast.arg -> X86_ast.arg -> unit
val movss : X86_ast.arg -> X86_ast.arg -> unit
val movsx : X86_ast.arg -> X86_ast.arg -> unit
val movsxd : X86_ast.arg -> X86_ast.arg -> unit
val movzx : X86_ast.arg -> X86_ast.arg -> unit
val mulsd : X86_ast.arg -> X86_ast.arg -> unit
val neg : X86_ast.arg -> unit
val nop : unit -> unit
val or_ : X86_ast.arg -> X86_ast.arg -> unit
val pop : X86_ast.arg -> unit
val push : X86_ast.arg -> unit
val ret : unit -> unit
val sal : X86_ast.arg -> X86_ast.arg -> unit
val sar : X86_ast.arg -> X86_ast.arg -> unit
val set : X86_ast.condition -> X86_ast.arg -> unit
val shr : X86_ast.arg -> X86_ast.arg -> unit
val sqrtsd : X86_ast.arg -> X86_ast.arg -> unit
val sub : X86_ast.arg -> X86_ast.arg -> unit
val subsd : X86_ast.arg -> X86_ast.arg -> unit
val test : X86_ast.arg -> X86_ast.arg -> unit
val ucomisd : X86_ast.arg -> X86_ast.arg -> unit
val xchg : X86_ast.arg -> X86_ast.arg -> unit
val xor : X86_ast.arg -> X86_ast.arg -> unit
val xorpd : X86_ast.arg -> X86_ast.arg -> unit
diff --git a/findlib-0/compiler-libs/X86_dsl/index.html b/findlib-0/compiler-libs/X86_dsl/index.html new file mode 100644 index 000000000..5824ef93b --- /dev/null +++ b/findlib-0/compiler-libs/X86_dsl/index.html @@ -0,0 +1,16 @@ + +X86_dsl (docs.findlib-0.compiler-libs.X86_dsl)

Module X86_dsl

Helpers for Intel code generators

val sym : string -> X86_ast.arg
val nat : nativeint -> X86_ast.arg
val int : int -> X86_ast.arg
val const_32 : int32 -> X86_ast.constant
val const_nat : nativeint -> X86_ast.constant
val const : int -> X86_ast.constant
val al : X86_ast.arg
val ah : X86_ast.arg
val cl : X86_ast.arg
val ax : X86_ast.arg
val rax : X86_ast.arg
val rbx : X86_ast.arg
val rdx : X86_ast.arg
val r10 : X86_ast.arg
val r11 : X86_ast.arg
val r12 : X86_ast.arg
val r13 : X86_ast.arg
val r14 : X86_ast.arg
val r15 : X86_ast.arg
val rsp : X86_ast.arg
val rbp : X86_ast.arg
val xmm15 : X86_ast.arg
val eax : X86_ast.arg
val ebx : X86_ast.arg
val ecx : X86_ast.arg
val edx : X86_ast.arg
val ebp : X86_ast.arg
val esp : X86_ast.arg
val st0 : X86_ast.arg
val st1 : X86_ast.arg
val mem32 : + X86_ast.data_type -> + ?scale:int -> + ?base:X86_ast.reg64 -> + ?sym:string -> + int -> + X86_ast.reg64 -> + X86_ast.arg
val mem64 : + X86_ast.data_type -> + ?scale:int -> + ?base:X86_ast.reg64 -> + ?sym:string -> + int -> + X86_ast.reg64 -> + X86_ast.arg
val mem64_rip : X86_ast.data_type -> ?ofs:int -> string -> X86_ast.arg
module D : sig ... end

Directives

module I : sig ... end
diff --git a/findlib-0/compiler-libs/X86_gas/index.html b/findlib-0/compiler-libs/X86_gas/index.html new file mode 100644 index 000000000..74b96175a --- /dev/null +++ b/findlib-0/compiler-libs/X86_gas/index.html @@ -0,0 +1,2 @@ + +X86_gas (docs.findlib-0.compiler-libs.X86_gas)

Module X86_gas

Emit assembly instructions for gas.

val generate_asm : out_channel -> X86_ast.asm_line list -> unit
diff --git a/findlib-0/compiler-libs/X86_masm/index.html b/findlib-0/compiler-libs/X86_masm/index.html new file mode 100644 index 000000000..da9bdb9d4 --- /dev/null +++ b/findlib-0/compiler-libs/X86_masm/index.html @@ -0,0 +1,2 @@ + +X86_masm (docs.findlib-0.compiler-libs.X86_masm)

Module X86_masm

Emit assembly instructions for MASM (Intel syntax).

val generate_asm : out_channel -> X86_ast.asm_line list -> unit
diff --git a/findlib-0/compiler-libs/X86_proc/index.html b/findlib-0/compiler-libs/X86_proc/index.html new file mode 100644 index 000000000..ffd4209e2 --- /dev/null +++ b/findlib-0/compiler-libs/X86_proc/index.html @@ -0,0 +1,7 @@ + +X86_proc (docs.findlib-0.compiler-libs.X86_proc)

Module X86_proc

Definitions shared between the 32 and 64 bit Intel backends.

Helpers for textual emitters

val string_of_reg8l : X86_ast.reg64 -> string
val string_of_reg8h : X86_ast.reg8h -> string
val string_of_reg16 : X86_ast.reg64 -> string
val string_of_reg32 : X86_ast.reg64 -> string
val string_of_reg64 : X86_ast.reg64 -> string
val string_of_registerf : X86_ast.registerf -> string
val string_of_string_literal : string -> string
val string_of_condition : X86_ast.condition -> string
val string_of_float_condition : X86_ast.float_condition -> string
val string_of_symbol : string -> string -> string
val string_of_rounding : X86_ast.rounding -> string
val buf_bytes_directive : Buffer.t -> string -> string -> unit

Buffer of assembly code

val emit : X86_ast.instruction -> unit
val directive : X86_ast.asm_line -> unit
val reset_asm_code : unit -> unit

Code emission

val generate_code : (X86_ast.asm_line list -> unit) option -> unit

Post-process the stream of instructions. Dump it (using the provided syntax emitter) in a file (if provided) and compile it with an internal assembler (if registered through register_internal_assembler).

val assemble_file : string -> string -> int

Generate an object file corresponding to the last call to generate_code. An internal assembler is used if available (and the input file is ignored). Otherwise, the source asm file with an external assembler.

System detection

type system =
  1. | S_macosx
  2. | S_gnu
  3. | S_cygwin
  4. | S_solaris
  5. | S_win32
  6. | S_linux_elf
  7. | S_bsd_elf
  8. | S_beos
  9. | S_mingw
  10. | S_win64
  11. | S_linux
  12. | S_mingw64
  13. | S_freebsd
  14. | S_netbsd
  15. | S_openbsd
  16. | S_unknown
val system : system
val masm : bool
val windows : bool
val use_plt : bool

Whether calls need to go via the PLT.

Support for plumbing a binary code emitter

val register_internal_assembler : + (X86_ast.asm_program -> string -> unit) -> + unit
val with_internal_assembler : + (X86_ast.asm_program -> string -> unit) -> + (unit -> 'a) -> + 'a
diff --git a/findlib-0/compiler-libs/index.html b/findlib-0/compiler-libs/index.html new file mode 100644 index 000000000..9d73d7c1f --- /dev/null +++ b/findlib-0/compiler-libs/index.html @@ -0,0 +1,2 @@ + +compiler-libs (docs.findlib-0.compiler-libs)

Directory compiler-libs

Libraries

The following libraries are found in this directory.

Modules

The following is a list of all of the modules found at this filesystem path.

diff --git a/findlib-0/index.html b/findlib-0/index.html new file mode 100644 index 000000000..9b488aa23 --- /dev/null +++ b/findlib-0/index.html @@ -0,0 +1,2 @@ + +findlib-0 (docs.findlib-0)

Opam index

Packages installed in /home/runner/work/server-reason-react/server-reason-react/_opam/lib/ocaml

Sub-indexes

diff --git a/findlib-0/str/Str/index.html b/findlib-0/str/Str/index.html new file mode 100644 index 000000000..bd96eebad --- /dev/null +++ b/findlib-0/str/Str/index.html @@ -0,0 +1,4 @@ + +Str (docs.findlib-0.str.Str)

Module Str

Regular expressions and high-level string processing

Regular expressions

The Str library provides regular expressions on sequences of bytes. It is, in general, unsuitable to match Unicode characters.

type regexp

The type of compiled regular expressions.

val regexp : string -> regexp

Compile a regular expression. The following constructs are recognized:

  • . Matches any character except newline.
  • * (postfix) Matches the preceding expression zero, one or several times
  • + (postfix) Matches the preceding expression one or several times
  • ? (postfix) Matches the preceding expression once or not at all
  • [..] Character set. Ranges are denoted with -, as in [a-z]. An initial ^, as in [^0-9], complements the set. To include a ] character in a set, make it the first character of the set. To include a - character in a set, make it the first or the last character of the set.
  • ^ Matches at beginning of line: either at the beginning of the matched string, or just after a '\n' character.
  • $ Matches at end of line: either at the end of the matched string, or just before a '\n' character.
  • \| (infix) Alternative between two expressions.
  • \(..\) Grouping and naming of the enclosed expression.
  • \1 The text matched by the first \(...\) expression (\2 for the second expression, and so on up to \9).
  • \b Matches word boundaries.
  • \ Quotes special characters. The special characters are $^\.*+?[].

In regular expressions you will often use backslash characters; it's easier to use a quoted string literal {|...|} to avoid having to escape backslashes.

For example, the following expression:

let r = Str.regexp {|hello \([A-Za-z]+\)|} in
+Str.replace_first r {|\1|} "hello world" 

returns the string "world".

If you want a regular expression that matches a literal backslash character, you need to double it: Str.regexp {|\\|}.

You can use regular string literals "..." too, however you will have to escape backslashes. The example above can be rewritten with a regular string literal as:

let r = Str.regexp "hello \\([A-Za-z]+\\)" in
+Str.replace_first r "\\1" "hello world" 

And the regular expression for matching a backslash becomes a quadruple backslash: Str.regexp "\\\\".

val regexp_case_fold : string -> regexp

Same as regexp, but the compiled expression will match text in a case-insensitive way: uppercase and lowercase letters will be considered equivalent.

val quote : string -> string

Str.quote s returns a regexp string that matches exactly s and nothing else.

val regexp_string : string -> regexp

Str.regexp_string s returns a regular expression that matches exactly s and nothing else.

val regexp_string_case_fold : string -> regexp

Str.regexp_string_case_fold is similar to Str.regexp_string, but the regexp matches in a case-insensitive way.

String matching and searching

val string_match : regexp -> string -> int -> bool

string_match r s start tests whether a substring of s that starts at position start matches the regular expression r. The first character of a string has position 0, as usual.

val search_forward : regexp -> string -> int -> int

search_forward r s start searches the string s for a substring matching the regular expression r. The search starts at position start and proceeds towards the end of the string. Return the position of the first character of the matched substring.

val search_backward : regexp -> string -> int -> int

search_backward r s last searches the string s for a substring matching the regular expression r. The search first considers substrings that start at position last and proceeds towards the beginning of string. Return the position of the first character of the matched substring.

val string_partial_match : regexp -> string -> int -> bool

Similar to Str.string_match, but also returns true if the argument string is a prefix of a string that matches. This includes the case of a true complete match.

val matched_string : string -> string

matched_string s returns the substring of s that was matched by the last call to one of the following matching or searching functions:

provided that none of the following functions was called in between:

Note: in the case of global_substitute and substitute_first, a call to matched_string is only valid within the subst argument, not after global_substitute or substitute_first returns.

The user must make sure that the parameter s is the same string that was passed to the matching or searching function.

val match_beginning : unit -> int

match_beginning() returns the position of the first character of the substring that was matched by the last call to a matching or searching function (see Str.matched_string for details).

val match_end : unit -> int

match_end() returns the position of the character following the last character of the substring that was matched by the last call to a matching or searching function (see Str.matched_string for details).

val matched_group : int -> string -> string

matched_group n s returns the substring of s that was matched by the nth group \(...\) of the regular expression that was matched by the last call to a matching or searching function (see Str.matched_string for details). When n is 0, it returns the substring matched by the whole regular expression. The user must make sure that the parameter s is the same string that was passed to the matching or searching function.

  • raises Not_found

    if the nth group of the regular expression was not matched. This can happen with groups inside alternatives \|, options ? or repetitions *. For instance, the empty string will match \(a\)*, but matched_group 1 "" will raise Not_found because the first group itself was not matched.

val group_beginning : int -> int

group_beginning n returns the position of the first character of the substring that was matched by the nth group of the regular expression that was matched by the last call to a matching or searching function (see Str.matched_string for details).

  • raises Not_found

    if the nth group of the regular expression was not matched.

  • raises Invalid_argument

    if there are fewer than n groups in the regular expression.

val group_end : int -> int

group_end n returns the position of the character following the last character of substring that was matched by the nth group of the regular expression that was matched by the last call to a matching or searching function (see Str.matched_string for details).

  • raises Not_found

    if the nth group of the regular expression was not matched.

  • raises Invalid_argument

    if there are fewer than n groups in the regular expression.

Replacement

val global_replace : regexp -> string -> string -> string

global_replace regexp templ s returns a string identical to s, except that all substrings of s that match regexp have been replaced by templ. The replacement template templ can contain \1, \2, etc; these sequences will be replaced by the text matched by the corresponding group in the regular expression. \0 stands for the text matched by the whole regular expression.

val replace_first : regexp -> string -> string -> string

Same as Str.global_replace, except that only the first substring matching the regular expression is replaced.

val global_substitute : regexp -> (string -> string) -> string -> string

global_substitute regexp subst s returns a string identical to s, except that all substrings of s that match regexp have been replaced by the result of function subst. The function subst is called once for each matching substring, and receives s (the whole text) as argument.

val substitute_first : regexp -> (string -> string) -> string -> string

Same as Str.global_substitute, except that only the first substring matching the regular expression is replaced.

val replace_matched : string -> string -> string

replace_matched repl s returns the replacement text repl in which \1, \2, etc. have been replaced by the text matched by the corresponding groups in the regular expression that was matched by the last call to a matching or searching function (see Str.matched_string for details). s must be the same string that was passed to the matching or searching function.

Splitting

val split : regexp -> string -> string list

split r s splits s into substrings, taking as delimiters the substrings that match r, and returns the list of substrings. For instance, split (regexp "[ \t]+") s splits s into blank-separated words. An occurrence of the delimiter at the beginning or at the end of the string is ignored.

val bounded_split : regexp -> string -> int -> string list

Same as Str.split, but splits into at most n substrings, where n is the extra integer parameter.

val split_delim : regexp -> string -> string list

Same as Str.split but occurrences of the delimiter at the beginning and at the end of the string are recognized and returned as empty strings in the result. For instance, split_delim (regexp " ") " abc " returns [""; "abc"; ""], while split with the same arguments returns ["abc"].

val bounded_split_delim : regexp -> string -> int -> string list

Same as Str.bounded_split, but occurrences of the delimiter at the beginning and at the end of the string are recognized and returned as empty strings in the result.

type split_result =
  1. | Text of string
  2. | Delim of string
val full_split : regexp -> string -> split_result list

Same as Str.split_delim, but returns the delimiters as well as the substrings contained between delimiters. The former are tagged Delim in the result list; the latter are tagged Text. For instance, full_split (regexp "[{}]") "{ab}" returns [Delim "{"; Text "ab"; Delim "}"].

val bounded_full_split : regexp -> string -> int -> split_result list

Same as Str.bounded_split_delim, but returns the delimiters as well as the substrings contained between delimiters. The former are tagged Delim in the result list; the latter are tagged Text.

Extracting substrings

val string_before : string -> int -> string

string_before s n returns the substring of all characters of s that precede position n (excluding the character at position n).

val string_after : string -> int -> string

string_after s n returns the substring of all characters of s that follow position n (including the character at position n).

val first_chars : string -> int -> string

first_chars s n returns the first n characters of s. This is the same function as Str.string_before.

val last_chars : string -> int -> string

last_chars s n returns the last n characters of s.

diff --git a/findlib-0/str/index.html b/findlib-0/str/index.html new file mode 100644 index 000000000..b42b2123d --- /dev/null +++ b/findlib-0/str/index.html @@ -0,0 +1,2 @@ + +str (docs.findlib-0.str)

Directory str

Libraries

The following libraries are found in this directory.

Modules

The following is a list of all of the modules found at this filesystem path.

diff --git a/findlib-1/angstrom/Angstrom/BE/index.html b/findlib-1/angstrom/Angstrom/BE/index.html new file mode 100644 index 000000000..7d4140b28 --- /dev/null +++ b/findlib-1/angstrom/Angstrom/BE/index.html @@ -0,0 +1,2 @@ + +BE (docs.findlib-1.angstrom.Angstrom.BE)

Module Angstrom.BE

Big endian parsers

val int16 : int -> unit t

int16 i accept two bytes that match the two lower order bytes of i and returns unit.

val int32 : int32 -> unit t

int32 i accept four bytes that match the four bytes of i and returns unit.

val int64 : int64 -> unit t

int64 i accept eight bytes that match the eight bytes of i and returns unit.

val any_int16 : int t
val any_int32 : int32 t
val any_int64 : int64 t

any_intN reads N bits and interprets them as big endian signed integers.

val any_uint16 : int t

any_uint16 reads 16 bits and interprets them as a big endian unsigned integer.

val any_float : float t

any_float reads 32 bits and interprets them as a big endian floating point value.

val any_double : float t

any_double reads 64 bits and interprets them as a big endian floating point value.

diff --git a/findlib-1/angstrom/Angstrom/Buffered/index.html b/findlib-1/angstrom/Angstrom/Buffered/index.html new file mode 100644 index 000000000..0dde75fae --- /dev/null +++ b/findlib-1/angstrom/Angstrom/Buffered/index.html @@ -0,0 +1,2 @@ + +Buffered (docs.findlib-1.angstrom.Angstrom.Buffered)

Module Angstrom.Buffered

Buffered parsing interface.

Parsers run through this module perform internal buffering of input. The parser state will keep track of unconsumed input and attempt to minimize memory allocation and copying. The Buffered.state.Partial parser state will accept newly-read, incremental input and copy it into the internal buffer. Users can feed parser states using the feed function. As a result, the interface is much easier to use than the one exposed by the Unbuffered module.

On success or failure, any unconsumed input will be returned to the user for additional processing. The buffer that the unconsumed input is returned in can also be reused.

type unconsumed = {
  1. buf : bigstring;
  2. off : int;
  3. len : int;
}
type input = [
  1. | `Bigstring of bigstring
  2. | `String of string
]
type 'a state =
  1. | Partial of [ input | `Eof ] -> 'a state
    (*

    The parser requires more input.

    *)
  2. | Done of unconsumed * 'a
    (*

    The parser succeeded.

    *)
  3. | Fail of unconsumed * string list * string
    (*

    The parser failed.

    *)
val parse : ?initial_buffer_size:int -> 'a t -> 'a state

parse ?initial_buffer_size t runs t and awaits input if needed. parse will allocate a buffer of size initial_buffer_size (defaulting to 4k bytes) to do input buffering and automatically grows the buffer as needed.

val feed : 'a state -> [ input | `Eof ] -> 'a state

feed state input supplies the parser state with more input. If state is Partial, then parsing will continue where it left off. Otherwise, the parser is in a Fail or Done state, in which case the input will be copied into the state's buffer for later use by the caller.

val state_to_option : 'a state -> 'a option

state_to_option state returns Some v if the parser is in the Done (bs, v) state and None otherwise. This function has no effect on the current state of the parser.

val state_to_result : 'a state -> ('a, string) result

state_to_result state returns Ok v if the parser is in the Done (bs, v) state and Error msg if it is in the Fail or Partial state.

This function has no effect on the current state of the parser.

val state_to_unconsumed : _ state -> unconsumed option

state_to_unconsumed state returns Some bs if state = Done(bs, _) or state = Fail(bs, _, _) and None otherwise.

diff --git a/findlib-1/angstrom/Angstrom/Consume/index.html b/findlib-1/angstrom/Angstrom/Consume/index.html new file mode 100644 index 000000000..736b7620f --- /dev/null +++ b/findlib-1/angstrom/Angstrom/Consume/index.html @@ -0,0 +1,2 @@ + +Consume (docs.findlib-1.angstrom.Angstrom.Consume)

Module Angstrom.Consume

type t =
  1. | Prefix
  2. | All
diff --git a/findlib-1/angstrom/Angstrom/LE/index.html b/findlib-1/angstrom/Angstrom/LE/index.html new file mode 100644 index 000000000..6816b9770 --- /dev/null +++ b/findlib-1/angstrom/Angstrom/LE/index.html @@ -0,0 +1,2 @@ + +LE (docs.findlib-1.angstrom.Angstrom.LE)

Module Angstrom.LE

Little endian parsers

val int16 : int -> unit t

int16 i accept two bytes that match the two lower order bytes of i and returns unit.

val int32 : int32 -> unit t

int32 i accept four bytes that match the four bytes of i and returns unit.

val int64 : int64 -> unit t

int32 i accept eight bytes that match the eight bytes of i and returns unit.

val any_int16 : int t
val any_int32 : int32 t
val any_int64 : int64 t

any_intN reads N bits and interprets them as little endian signed integers.

val any_uint16 : int t

uint16 reads 16 bits and interprets them as a little endian unsigned integer.

val any_float : float t

any_float reads 32 bits and interprets them as a little endian floating point value.

val any_double : float t

any_double reads 64 bits and interprets them as a little endian floating point value.

diff --git a/findlib-1/angstrom/Angstrom/Let_syntax/Let_syntax/index.html b/findlib-1/angstrom/Angstrom/Let_syntax/Let_syntax/index.html new file mode 100644 index 000000000..1994a24c6 --- /dev/null +++ b/findlib-1/angstrom/Angstrom/Let_syntax/Let_syntax/index.html @@ -0,0 +1,8 @@ + +Let_syntax (docs.findlib-1.angstrom.Angstrom.Let_syntax.Let_syntax)

Module Let_syntax.Let_syntax

val return : 'a -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t
val bind : 'a t -> f:('a -> 'b t) -> 'b t
val both : 'a t -> 'b t -> ('a * 'b) t
val map2 : 'a t -> 'b t -> f:('a -> 'b -> 'c) -> 'c t
val map3 : 'a t -> 'b t -> 'c t -> f:('a -> 'b -> 'c -> 'd) -> 'd t
val map4 : + 'a t -> + 'b t -> + 'c t -> + 'd t -> + f:('a -> 'b -> 'c -> 'd -> 'e) -> + 'e t
diff --git a/findlib-1/angstrom/Angstrom/Let_syntax/index.html b/findlib-1/angstrom/Angstrom/Let_syntax/index.html new file mode 100644 index 000000000..2f514231e --- /dev/null +++ b/findlib-1/angstrom/Angstrom/Let_syntax/index.html @@ -0,0 +1,2 @@ + +Let_syntax (docs.findlib-1.angstrom.Angstrom.Let_syntax)

Module Angstrom.Let_syntax

The Let_syntax module is intended to be used with the ppx_let pre-processor, and just contains copies of functions described elsewhere.

val return : 'a -> 'a t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
module Let_syntax : sig ... end
diff --git a/findlib-1/angstrom/Angstrom/Unbuffered/index.html b/findlib-1/angstrom/Angstrom/Unbuffered/index.html new file mode 100644 index 000000000..24d579a16 --- /dev/null +++ b/findlib-1/angstrom/Angstrom/Unbuffered/index.html @@ -0,0 +1,2 @@ + +Unbuffered (docs.findlib-1.angstrom.Angstrom.Unbuffered)

Module Angstrom.Unbuffered

Unbuffered parsing interface.

Use this module for total control over memory allocation and copying. Parsers run through this module perform no internal buffering. Instead, the user is responsible for managing a buffer containing the entirety of the input that has yet to be consumed by the parser. The Unbuffered.state.Partial parser state reports to the user how much input the parser consumed during its last run, via the Unbuffered.partial.committed field. This area of input must be discarded before parsing can resume. Once additional input has been collected, the unconsumed input as well as new input must be passed to the parser state via the Unbuffered.partial.continue function, together with an indication of whether there is Unbuffered.more input to come.

The logic that must be implemented in order to make proper use of this module is intricate and tied to your OS environment. It's advisable to use the Buffered module when initially developing and testing your parsers. For production use-cases, consider the Async and Lwt support that this library includes before attempting to use this module directly.

type more =
  1. | Complete
  2. | Incomplete
type 'a state =
  1. | Partial of 'a partial
    (*

    The parser requires more input.

    *)
  2. | Done of int * 'a
    (*

    The parser succeeded, consuming specified bytes.

    *)
  3. | Fail of int * string list * string
    (*

    The parser failed, consuming specified bytes.

    *)
and 'a partial = {
  1. committed : int;
    (*

    The number of bytes committed during the last input feeding. Callers must drop this number of bytes from the beginning of the input on subsequent calls. See commit for additional details.

    *)
  2. continue : bigstring -> off:int -> len:int -> more -> 'a state;
    (*

    A continuation of a parse that requires additional input. The input should include all uncommitted input (as reported by previous partial states) in addition to any new input that has become available, as well as an indication of whether there is more input to come.

    *)
}
val parse : 'a t -> 'a state

parse t runs t and await input if needed.

val state_to_option : 'a state -> 'a option

state_to_option state returns Some v if the parser is in the Done (bs, v) state and None otherwise. This function has no effect on the current state of the parser.

val state_to_result : 'a state -> ('a, string) result

state_to_result state returns Ok v if the parser is in the Done (bs, v) state and Error msg if it is in the Fail or Partial state.

This function has no effect on the current state of the parser.

diff --git a/findlib-1/angstrom/Angstrom/Unsafe/index.html b/findlib-1/angstrom/Angstrom/Unsafe/index.html new file mode 100644 index 000000000..3550204ea --- /dev/null +++ b/findlib-1/angstrom/Angstrom/Unsafe/index.html @@ -0,0 +1,11 @@ + +Unsafe (docs.findlib-1.angstrom.Angstrom.Unsafe)

Module Angstrom.Unsafe

Unsafe Operations on Angstrom's Internal Buffer

These functions are considered unsafe as they expose the input buffer to client code without any protections against modification, or leaking references. They are exposed to support performance-sensitive parsers that want to avoid allocation at all costs. Client code should take care to write the input buffer callback functions such that they:

If the input buffer callback functions do not do any of these things, then the client may consider their use safe.

val take : int -> (bigstring -> off:int -> len:int -> 'a) -> 'a t

take n f accepts exactly n characters of input into the parser's internal buffer then calls f buffer ~off ~len. buffer is the parser's internal buffer. off is the offset from the start of buffer containing the requested content. len is the length of the requested content. len is guaranteed to be equal to n.

val take_while : + (char -> bool) -> + (bigstring -> off:int -> len:int -> 'a) -> + 'a t

take_while check f accepts input into the parser's interal buffer as long as check returns true then calls f buffer ~off ~len. buffer is the parser's internal buffer. off is the offset from the start of buffer containing the requested content. len is the length of the content matched by check.

This parser does not fail. If check returns false on the first character, len will be 0.

val take_while1 : + (char -> bool) -> + (bigstring -> off:int -> len:int -> 'a) -> + 'a t

take_while1 check f accepts input into the parser's interal buffer as long as check returns true then calls f buffer ~off ~len. buffer is the parser's internal buffer. off is the offset from the start of buffer containing the requested content. len is the length of the content matched by check.

This parser requires that f return true for at least one character of input, and will fail otherwise.

val take_till : + (char -> bool) -> + (bigstring -> off:int -> len:int -> 'a) -> + 'a t

take_till check f accepts input into the parser's interal buffer as long as check returns false then calls f buffer ~off ~len. buffer is the parser's internal buffer. off is the offset from the start of buffer containing the requested content. len is the length of the content matched by check.

This parser does not fail. If check returns true on the first character, len will be 0.

val peek : int -> (bigstring -> off:int -> len:int -> 'a) -> 'a t

peek n ~f accepts exactly n characters and calls f buffer ~off ~len with len = n. If there is not enough input, it will fail.

This parser does not advance the input. Use it for lookahead.

diff --git a/findlib-1/angstrom/Angstrom/index.html b/findlib-1/angstrom/Angstrom/index.html new file mode 100644 index 000000000..fe4d2f5e1 --- /dev/null +++ b/findlib-1/angstrom/Angstrom/index.html @@ -0,0 +1,24 @@ + +Angstrom (docs.findlib-1.angstrom.Angstrom)

Module Angstrom

Parser combinators built for speed and memory-efficiency.

Angstrom is a parser-combinator library that provides monadic and applicative interfaces for constructing parsers with unbounded lookahead. Its parsers can consume input incrementally, whether in a blocking or non-blocking environment. To achieve efficient incremental parsing, Angstrom offers both a buffered and unbuffered interface to input streams, with the Unbuffered interface enabling zero-copy IO. With these features and low-level iteration parser primitives like take_while and skip_while, Angstrom makes it easy to write efficient, expressive, and reusable parsers suitable for high-performance applications.

type +'a t

A parser for values of type 'a.

type bigstring = Bigstringaf.t

Basic parsers

val peek_char : char option t

peek_char accepts any char and returns it, or returns None if the end of input has been reached.

This parser does not advance the input. Use it for lookahead.

val peek_char_fail : char t

peek_char_fail accepts any char and returns it. If end of input has been reached, it will fail.

This parser does not advance the input. Use it for lookahead.

val peek_string : int -> string t

peek_string n accepts exactly n characters and returns them as a string. If there is not enough input, it will fail.

This parser does not advance the input. Use it for lookahead.

val char : char -> char t

char c accepts c and returns it.

val not_char : char -> char t

not_char accepts any character that is not c and returns the matched character.

val any_char : char t

any_char accepts any character and returns it.

val satisfy : (char -> bool) -> char t

satisfy f accepts any character for which f returns true and returns the accepted character. In the case that none of the parser succeeds, then the parser will fail indicating the offending character.

val string : string -> string t

string s accepts s exactly and returns it.

val string_ci : string -> string t

string_ci s accepts s, ignoring case, and returns the matched string, preserving the case of the original input.

val skip : (char -> bool) -> unit t

skip f accepts any character for which f returns true and discards the accepted character. skip f is equivalent to satisfy f but discards the accepted character.

val skip_while : (char -> bool) -> unit t

skip_while f accepts input as long as f returns true and discards the accepted characters.

val take : int -> string t

take n accepts exactly n characters of input and returns them as a string.

val take_while : (char -> bool) -> string t

take_while f accepts input as long as f returns true and returns the accepted characters as a string.

This parser does not fail. If f returns false on the first character, it will return the empty string.

val take_while1 : (char -> bool) -> string t

take_while1 f accepts input as long as f returns true and returns the accepted characters as a string.

This parser requires that f return true for at least one character of input, and will fail otherwise.

val take_till : (char -> bool) -> string t

take_till f accepts input as long as f returns false and returns the accepted characters as a string.

This parser does not fail. If f returns true on the first character, it will return the empty string.

val consumed : _ t -> string t

consumed p runs p and returns the contents that were consumed during the parsing as a string

val take_bigstring : int -> bigstring t

take_bigstring n accepts exactly n characters of input and returns them as a newly allocated bigstring.

val take_bigstring_while : (char -> bool) -> bigstring t

take_bigstring_while f accepts input as long as f returns true and returns the accepted characters as a newly allocated bigstring.

This parser does not fail. If f returns false on the first character, it will return the empty bigstring.

val take_bigstring_while1 : (char -> bool) -> bigstring t

take_bigstring_while1 f accepts input as long as f returns true and returns the accepted characters as a newly allocated bigstring.

This parser requires that f return true for at least one character of input, and will fail otherwise.

val take_bigstring_till : (char -> bool) -> bigstring t

take_bigstring_till f accepts input as long as f returns false and returns the accepted characters as a newly allocated bigstring.

This parser does not fail. If f returns true on the first character, it will return the empty bigstring.

val consumed_bigstring : _ t -> bigstring t

consumed p runs p and returns the contents that were consumed during the parsing as a bigstring

val advance : int -> unit t

advance n advances the input n characters, failing if the remaining input is less than n.

val end_of_line : unit t

end_of_line accepts either a line feed \n, or a carriage return followed by a line feed \r\n and returns unit.

val at_end_of_input : bool t

at_end_of_input returns whether the end of the end of input has been reached. This parser always succeeds.

val end_of_input : unit t

end_of_input succeeds if all the input has been consumed, and fails otherwise.

val scan : 'state -> ('state -> char -> 'state option) -> (string * 'state) t

scan init f consumes until f returns None. Returns the final state before None and the accumulated string

val scan_state : 'state -> ('state -> char -> 'state option) -> 'state t

scan_state init f is like scan but only returns the final state before None. Much more efficient than scan.

val scan_string : 'state -> ('state -> char -> 'state option) -> string t

scan_string init f is like scan but discards the final state and returns the accumulated string.

val int8 : int -> int t

int8 i accepts one byte that matches the lower-order byte of i and returns unit.

val any_uint8 : int t

any_uint8 accepts any byte and returns it as an unsigned int8.

val any_int8 : int t

any_int8 accepts any byte and returns it as a signed int8.

module BE : sig ... end

Big endian parsers

module LE : sig ... end

Little endian parsers

Combinators

val option : 'a -> 'a t -> 'a t

option v p runs p, returning the result of p if it succeeds and v if it fails.

val both : 'a t -> 'b t -> ('a * 'b) t

both p q runs p followed by q and returns both results in a tuple

val list : 'a t list -> 'a list t

list ps runs each p in ps in sequence, returning a list of results of each p.

val count : int -> 'a t -> 'a list t

count n p runs p n times, returning a list of the results.

val many : 'a t -> 'a list t

many p runs p zero or more times and returns a list of results from the runs of p.

val many1 : 'a t -> 'a list t

many1 p runs p one or more times and returns a list of results from the runs of p.

val many_till : 'a t -> _ t -> 'a list t

many_till p e runs parser p zero or more times until action e succeeds and returns the list of result from the runs of p.

val sep_by : _ t -> 'a t -> 'a list t

sep_by s p runs p zero or more times, interspersing runs of s in between.

val sep_by1 : _ t -> 'a t -> 'a list t

sep_by1 s p runs p one or more times, interspersing runs of s in between.

val skip_many : _ t -> unit t

skip_many p runs p zero or more times, discarding the results.

val skip_many1 : _ t -> unit t

skip_many1 p runs p one or more times, discarding the results.

val fix : ('a t -> 'a t) -> 'a t

fix f computes the fixpoint of f and runs the resultant parser. The argument that f receives is the result of fix f, which f must use, paradoxically, to define fix f.

fix is useful when constructing parsers for inductively-defined types such as sequences, trees, etc. Consider for example the implementation of the many combinator defined in this library:

let many p =
+fix (fun m ->
+  (cons <$> p <*> m) <|> return [])

many p is a parser that will run p zero or more times, accumulating the result of every run into a list, returning the result. It's defined by passing fix a function. This function assumes its argument m is a parser that behaves exactly like many p. You can see this in the expression comprising the left hand side of the alternative operator <|>. This expression runs the parser p followed by the parser m, and after which the result of p is cons'd onto the list that m produces. The right-hand side of the alternative operator provides a base case for the combinator: if p fails and the parse cannot proceed, return an empty list.

Another way to illustrate the uses of fix is to construct a JSON parser. Assuming that parsers exist for the basic types such as false, true, null, strings, and numbers, the question then becomes how to define a parser for objects and arrays? Both contain values that are themselves JSON values, so it seems as though it's impossible to write a parser that will accept JSON objects and arrays before writing a parser for JSON values as a whole.

This is the exact situation that fix was made for. By defining the parsers for arrays and objects within the function that you pass to fix, you will gain access to a parser that you can use to parse JSON values, the very parser you are defining!

let json =
+fix (fun json ->
+  let arr = char '[' *> sep_by (char ',') json <* char ']' in
+  let obj = char '{' *> ... json ... <* char '}' in
+  choice [str; num; arr json, ...])
val fix_lazy : max_steps:int -> ('a t -> 'a t) -> 'a t

fix_lazy is like fix, but after the function reaches max_steps deep, it wraps up the remaining computation and yields back to the root of the parsing loop where it continues from there.

This is an effective way to break up the stack trace into more managable chunks, which is important for Js_of_ocaml due to the lack of tailrec optimizations for CPS-style tail calls. When compiling for Js_of_ocaml, fix itself is defined as fix_lazy ~max_steps:20.

Alternatives

val (<|>) : 'a t -> 'a t -> 'a t

p <|> q runs p and returns the result if succeeds. If p fails, then the input will be reset and q will run instead.

val choice : ?failure_msg:string -> 'a t list -> 'a t

choice ?failure_msg ts runs each parser in ts in order until one succeeds and returns that result. In the case that none of the parser succeeds, then the parser will fail with the message failure_msg, if provided, or a much less informative message otherwise.

val (<?>) : 'a t -> string -> 'a t

p <?> name associates name with the parser p, which will be reported in the case of failure.

val commit : unit t

commit prevents backtracking beyond the current position of the input, allowing the manager of the input buffer to reuse the preceding bytes for other purposes.

The Unbuffered parsing interface will report directly to the caller the number of bytes committed to the when returning a Unbuffered.state.Partial state, allowing the caller to reuse those bytes for any purpose. The Buffered will keep track of the region of committed bytes in its internal buffer and reuse that region to store additional input when necessary.

Monadic/Applicative interface

val return : 'a -> 'a t

return v creates a parser that will always succeed and return v

val fail : string -> _ t

fail msg creates a parser that will always fail with the message msg

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t

p >>= f creates a parser that will run p, pass its result to f, run the parser that f produces, and return its result.

val bind : 'a t -> f:('a -> 'b t) -> 'b t

bind is a prefix version of >>=

val (>>|) : 'a t -> ('a -> 'b) -> 'b t

p >>| f creates a parser that will run p, and if it succeeds with result v, will return f v

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

f <*> p is equivalent to f >>= fun f -> p >>| f.

val (<$>) : ('a -> 'b) -> 'a t -> 'b t

f <$> p is equivalent to p >>| f

val (*>) : _ t -> 'a t -> 'a t

p *> q runs p, discards its result and then runs q, and returns its result.

val (<*) : 'a t -> _ t -> 'a t

p <* q runs p, then runs q, discards its result, and returns the result of p.

val lift : ('a -> 'b) -> 'a t -> 'b t
val lift2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val lift3 : ('a -> 'b -> 'c -> 'd) -> 'a t -> 'b t -> 'c t -> 'd t
val lift4 : + ('a -> 'b -> 'c -> 'd -> 'e) -> + 'a t -> + 'b t -> + 'c t -> + 'd t -> + 'e t

The liftn family of functions promote functions to the parser monad. For any of these functions, the following equivalence holds:

liftn f p1 ... pn = f <$> p1 <*> ... <*> pn

These functions are more efficient than using the applicative interface directly, mostly in terms of memory allocation but also in terms of speed. Prefer them over the applicative interface, even when the arity of the function to be lifted exceeds the maximum n for which there is an implementation for liftn. In other words, if f has an arity of 5 but only lift4 is provided, do the following:

lift4 f m1 m2 m3 m4 <*> m5

Even with the partial application, it will be more efficient than the applicative implementation.

val map : 'a t -> f:('a -> 'b) -> 'b t
val map2 : 'a t -> 'b t -> f:('a -> 'b -> 'c) -> 'c t
val map3 : 'a t -> 'b t -> 'c t -> f:('a -> 'b -> 'c -> 'd) -> 'd t
val map4 : + 'a t -> + 'b t -> + 'c t -> + 'd t -> + f:('a -> 'b -> 'c -> 'd -> 'e) -> + 'e t

The mapn family of functions are just like liftn, with a slightly different interface.

module Let_syntax : sig ... end

The Let_syntax module is intended to be used with the ppx_let pre-processor, and just contains copies of functions described elsewhere.

val let+ : 'a t -> ('a -> 'b) -> 'b t
val let* : 'a t -> ('a -> 'b t) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
module Unsafe : sig ... end

Unsafe Operations on Angstrom's Internal Buffer

Running

module Consume : sig ... end
val parse_bigstring : + consume:Consume.t -> + 'a t -> + bigstring -> + ('a, string) result

parse_bigstring ~consume t bs runs t on bs. The parser will receive an `Eof after all of bs has been consumed. Passing Prefix in the consume argument allows the parse to successfully complete without reaching eof. To require the parser to reach eof, pass All in the consume argument.

For use-cases requiring that the parser be fed input incrementally, see the Buffered and Unbuffered modules below.

val parse_string : consume:Consume.t -> 'a t -> string -> ('a, string) result

parse_string ~consume t bs runs t on bs. The parser will receive an `Eof after all of bs has been consumed. Passing Prefix in the consume argument allows the parse to successfully complete without reaching eof. To require the parser to reach eof, pass All in the consume argument.

For use-cases requiring that the parser be fed input incrementally, see the Buffered and Unbuffered modules below.

module Buffered : sig ... end

Buffered parsing interface.

module Unbuffered : sig ... end

Unbuffered parsing interface.

Expert Parsers

For people that know what they're doing. If you want to use them, read the code. No further documentation will be provided.

val pos : int t
val available : int t
diff --git a/findlib-1/angstrom/index.html b/findlib-1/angstrom/index.html new file mode 100644 index 000000000..8680bc9f2 --- /dev/null +++ b/findlib-1/angstrom/index.html @@ -0,0 +1,2 @@ + +angstrom (docs.findlib-1.angstrom)

Directory angstrom

Libraries

The following libraries are found in this directory.

Modules

The following is a list of all of the modules found at this filesystem path.

diff --git a/findlib-1/bigarray-compat/Bigarray_compat/index.html b/findlib-1/bigarray-compat/Bigarray_compat/index.html new file mode 100644 index 000000000..dd3f480f6 --- /dev/null +++ b/findlib-1/bigarray-compat/Bigarray_compat/index.html @@ -0,0 +1,24 @@ + +Bigarray_compat (docs.findlib-1.bigarray-compat.Bigarray_compat)

Module Bigarray_compat

include module type of struct include Bigarray end

Element kinds

Bigarrays can contain elements of the following kinds:

Each element kind is represented at the type level by one of the *_elt types defined below (defined with a single constructor instead of abstract types for technical injectivity reasons).

  • since 4.07 Moved from otherlibs to stdlib.
type float32_elt = Bigarray.float32_elt =
  1. | Float32_elt
type float64_elt = Bigarray.float64_elt =
  1. | Float64_elt
type int8_signed_elt = Bigarray.int8_signed_elt =
  1. | Int8_signed_elt
type int8_unsigned_elt = Bigarray.int8_unsigned_elt =
  1. | Int8_unsigned_elt
type int16_signed_elt = Bigarray.int16_signed_elt =
  1. | Int16_signed_elt
type int16_unsigned_elt = Bigarray.int16_unsigned_elt =
  1. | Int16_unsigned_elt
type int32_elt = Bigarray.int32_elt =
  1. | Int32_elt
type int64_elt = Bigarray.int64_elt =
  1. | Int64_elt
type int_elt = Bigarray.int_elt =
  1. | Int_elt
type nativeint_elt = Bigarray.nativeint_elt =
  1. | Nativeint_elt
type complex32_elt = Bigarray.complex32_elt =
  1. | Complex32_elt
type complex64_elt = Bigarray.complex64_elt =
  1. | Complex64_elt
type ('a, 'b) kind = ('a, 'b) Bigarray.kind =
  1. | Float32 : (float, float32_elt) kind
  2. | Float64 : (float, float64_elt) kind
  3. | Int8_signed : (int, int8_signed_elt) kind
  4. | Int8_unsigned : (int, int8_unsigned_elt) kind
  5. | Int16_signed : (int, int16_signed_elt) kind
  6. | Int16_unsigned : (int, int16_unsigned_elt) kind
  7. | Int32 : (int32, int32_elt) kind
  8. | Int64 : (int64, int64_elt) kind
  9. | Int : (int, int_elt) kind
  10. | Nativeint : (nativeint, nativeint_elt) kind
  11. | Complex32 : (Complex.t, complex32_elt) kind
  12. | Complex64 : (Complex.t, complex64_elt) kind
  13. | Char : (char, int8_unsigned_elt) kind

To each element kind is associated an OCaml type, which is the type of OCaml values that can be stored in the Bigarray or read back from it. This type is not necessarily the same as the type of the array elements proper: for instance, a Bigarray whose elements are of kind float32_elt contains 32-bit single precision floats, but reading or writing one of its elements from OCaml uses the OCaml type float, which is 64-bit double precision floats.

The GADT type ('a, 'b) kind captures this association of an OCaml type 'a for values read or written in the Bigarray, and of an element kind 'b which represents the actual contents of the Bigarray. Its constructors list all possible associations of OCaml types with element kinds, and are re-exported below for backward-compatibility reasons.

Using a generalized algebraic datatype (GADT) here allows writing well-typed polymorphic functions whose return type depend on the argument type, such as:

let zero : type a b. (a, b) kind -> a = function
+  | Float32 -> 0.0 | Complex32 -> Complex.zero
+  | Float64 -> 0.0 | Complex64 -> Complex.zero
+  | Int8_signed -> 0 | Int8_unsigned -> 0
+  | Int16_signed -> 0 | Int16_unsigned -> 0
+  | Int32 -> 0l | Int64 -> 0L
+  | Int -> 0 | Nativeint -> 0n
+  | Char -> '\000'
val float32 : (float, float32_elt) kind
val float64 : (float, float64_elt) kind
val complex32 : (Complex.t, complex32_elt) kind
val complex64 : (Complex.t, complex64_elt) kind
val int8_signed : (int, int8_signed_elt) kind
val int8_unsigned : (int, int8_unsigned_elt) kind
val int16_signed : (int, int16_signed_elt) kind
val int16_unsigned : (int, int16_unsigned_elt) kind
val int : (int, int_elt) kind
val int32 : (int32, int32_elt) kind
val int64 : (int64, int64_elt) kind
val nativeint : (nativeint, nativeint_elt) kind
val char : (char, int8_unsigned_elt) kind

As shown by the types of the values above, Bigarrays of kind float32_elt and float64_elt are accessed using the OCaml type float. Bigarrays of complex kinds complex32_elt, complex64_elt are accessed with the OCaml type Complex.t. Bigarrays of integer kinds are accessed using the smallest OCaml integer type large enough to represent the array elements: int for 8- and 16-bit integer Bigarrays, as well as OCaml-integer Bigarrays; int32 for 32-bit integer Bigarrays; int64 for 64-bit integer Bigarrays; and nativeint for platform-native integer Bigarrays. Finally, Bigarrays of kind int8_unsigned_elt can also be accessed as arrays of characters instead of arrays of small integers, by using the kind value char instead of int8_unsigned.

val kind_size_in_bytes : ('a, 'b) kind -> int

kind_size_in_bytes k is the number of bytes used to store an element of type k.

  • since 4.03

Array layouts

type c_layout = Bigarray.c_layout =
  1. | C_layout_typ
type fortran_layout = Bigarray.fortran_layout =
  1. | Fortran_layout_typ

To facilitate interoperability with existing C and Fortran code, this library supports two different memory layouts for Bigarrays, one compatible with the C conventions, the other compatible with the Fortran conventions.

In the C-style layout, array indices start at 0, and multi-dimensional arrays are laid out in row-major format. That is, for a two-dimensional array, all elements of row 0 are contiguous in memory, followed by all elements of row 1, etc. In other terms, the array elements at (x,y) and (x, y+1) are adjacent in memory.

In the Fortran-style layout, array indices start at 1, and multi-dimensional arrays are laid out in column-major format. That is, for a two-dimensional array, all elements of column 0 are contiguous in memory, followed by all elements of column 1, etc. In other terms, the array elements at (x,y) and (x+1, y) are adjacent in memory.

Each layout style is identified at the type level by the phantom types Bigarray.c_layout and Bigarray.fortran_layout respectively.

Supported layouts

The GADT type 'a layout represents one of the two supported memory layouts: C-style or Fortran-style. Its constructors are re-exported as values below for backward-compatibility reasons.

type 'a layout = 'a Bigarray.layout =
  1. | C_layout : c_layout layout
  2. | Fortran_layout : fortran_layout layout
val c_layout : c_layout layout
val fortran_layout : fortran_layout layout

Generic arrays (of arbitrarily many dimensions)

module Genarray = Bigarray.Genarray

Zero-dimensional arrays

module Array0 = Bigarray.Array0

Zero-dimensional arrays. The Array0 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of zero-dimensional arrays that only contain a single scalar value. Statically knowing the number of dimensions of the array allows faster operations, and more precise static type-checking.

One-dimensional arrays

module Array1 = Bigarray.Array1

One-dimensional arrays. The Array1 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of one-dimensional arrays. (The Array2 and Array3 structures below provide operations specialized for two- and three-dimensional arrays.) Statically knowing the number of dimensions of the array allows faster operations, and more precise static type-checking.

Two-dimensional arrays

module Array2 = Bigarray.Array2

Two-dimensional arrays. The Array2 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of two-dimensional arrays.

Three-dimensional arrays

module Array3 = Bigarray.Array3

Three-dimensional arrays. The Array3 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of three-dimensional arrays.

Coercions between generic Bigarrays and fixed-dimension Bigarrays

val genarray_of_array0 : ('a, 'b, 'c) Array0.t -> ('a, 'b, 'c) Genarray.t

Return the generic Bigarray corresponding to the given zero-dimensional Bigarray.

  • since 4.05
val genarray_of_array1 : ('a, 'b, 'c) Array1.t -> ('a, 'b, 'c) Genarray.t

Return the generic Bigarray corresponding to the given one-dimensional Bigarray.

val genarray_of_array2 : ('a, 'b, 'c) Array2.t -> ('a, 'b, 'c) Genarray.t

Return the generic Bigarray corresponding to the given two-dimensional Bigarray.

val genarray_of_array3 : ('a, 'b, 'c) Array3.t -> ('a, 'b, 'c) Genarray.t

Return the generic Bigarray corresponding to the given three-dimensional Bigarray.

val array0_of_genarray : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array0.t

Return the zero-dimensional Bigarray corresponding to the given generic Bigarray.

  • raises Invalid_argument

    if the generic Bigarray does not have exactly zero dimension.

  • since 4.05
val array1_of_genarray : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array1.t

Return the one-dimensional Bigarray corresponding to the given generic Bigarray.

  • raises Invalid_argument

    if the generic Bigarray does not have exactly one dimension.

val array2_of_genarray : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array2.t

Return the two-dimensional Bigarray corresponding to the given generic Bigarray.

  • raises Invalid_argument

    if the generic Bigarray does not have exactly two dimensions.

val array3_of_genarray : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array3.t

Return the three-dimensional Bigarray corresponding to the given generic Bigarray.

  • raises Invalid_argument

    if the generic Bigarray does not have exactly three dimensions.

Re-shaping Bigarrays

val reshape : ('a, 'b, 'c) Genarray.t -> int array -> ('a, 'b, 'c) Genarray.t

reshape b [|d1;...;dN|] converts the Bigarray b to a N-dimensional array of dimensions d1...dN. The returned array and the original array b share their data and have the same layout. For instance, assuming that b is a one-dimensional array of dimension 12, reshape b [|3;4|] returns a two-dimensional array b' of dimensions 3 and 4. If b has C layout, the element (x,y) of b' corresponds to the element x * 3 + y of b. If b has Fortran layout, the element (x,y) of b' corresponds to the element x + (y - 1) * 4 of b. The returned Bigarray must have exactly the same number of elements as the original Bigarray b. That is, the product of the dimensions of b must be equal to i1 * ... * iN. Otherwise, Invalid_argument is raised.

val reshape_0 : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array0.t

Specialized version of Bigarray.reshape for reshaping to zero-dimensional arrays.

  • since 4.05
val reshape_1 : ('a, 'b, 'c) Genarray.t -> int -> ('a, 'b, 'c) Array1.t

Specialized version of Bigarray.reshape for reshaping to one-dimensional arrays.

val reshape_2 : ('a, 'b, 'c) Genarray.t -> int -> int -> ('a, 'b, 'c) Array2.t

Specialized version of Bigarray.reshape for reshaping to two-dimensional arrays.

val reshape_3 : + ('a, 'b, 'c) Genarray.t -> + int -> + int -> + int -> + ('a, 'b, 'c) Array3.t

Specialized version of Bigarray.reshape for reshaping to three-dimensional arrays.

Bigarrays and concurrency safety

Care must be taken when concurrently accessing bigarrays from multiple domains: accessing a bigarray will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every bigarray operation that accesses more than one array element is not atomic. This includes slicing, bliting, and filling bigarrays.

For example, consider the following program:

open Bigarray
+let size = 100_000_000
+let a = Array1.init Int C_layout size (fun _ -> 1)
+let update f a () =
+  for i = 0 to size - 1 do a.{i} <- f a.{i} done
+let d1 = Domain.spawn (update (fun x -> x + 1) a)
+let d2 = Domain.spawn (update (fun x -> 2 * x + 1) a)
+let () = Domain.join d1; Domain.join d2

After executing this code, each field of the bigarray a is either 2, 3, 4 or 5. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

Data races

If two domains only access disjoint parts of the bigarray, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

A data race is said to occur when two domains access the same bigarray element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the bigarray elements.

Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains.

Tearing

Bigarrays have a distinct caveat in the presence of data races: concurrent bigarray operations might produce surprising values due to tearing. More precisely, the interleaving of partial writes and reads might create values that would not exist with a sequential execution. For instance, at the end of

let res = Array1.init Complex64 c_layout size (fun _ -> Complex.zero)
+let d1 = Domain.spawn (fun () -> Array1.fill res Complex.one)
+let d2 = Domain.spawn (fun () -> Array1.fill res Complex.i)
+let () = Domain.join d1; Domain.join d2

the res bigarray might contain values that are neither Complex.i nor Complex.one (for instance 1 + i).

diff --git a/findlib-1/bigarray-compat/index.html b/findlib-1/bigarray-compat/index.html new file mode 100644 index 000000000..da7330fd3 --- /dev/null +++ b/findlib-1/bigarray-compat/index.html @@ -0,0 +1,2 @@ + +bigarray-compat (docs.findlib-1.bigarray-compat)

Package bigarray-compat

Library bigarray-compat

The entry point of this library is the module: Bigarray_compat.

diff --git a/findlib-1/bigstringaf/Bigstringaf/index.html b/findlib-1/bigstringaf/Bigstringaf/index.html new file mode 100644 index 000000000..6355f9cde --- /dev/null +++ b/findlib-1/bigstringaf/Bigstringaf/index.html @@ -0,0 +1,39 @@ + +Bigstringaf (docs.findlib-1.bigstringaf.Bigstringaf)

Module Bigstringaf

Bigstrings, but fast.

The OCaml compiler has a bunch of intrinsics for Bigstrings, but they're not widely-known, sometimes misused, and so programs that use Bigstrings are slower than they have to be. And even if a library got that part right and exposed the intrinsics properly, the compiler doesn't have any fast blits between Bigstrings and other string-like types.

So here they are. Go crazy.

Constructors

val create : int -> t

create n returns a bigstring of length n

val empty : t

empty is the empty bigstring. It has length 0 and you can't really do much with it, but it's a good placeholder that only needs to be allocated once.

val of_string : off:int -> len:int -> string -> t

of_string ~off ~len s returns a bigstring of length len that contains the contents of string from the range [off, len).

val copy : t -> off:int -> len:int -> t

copy t ~off ~len allocates a new bigstring of length len and copies the bytes from t copied into it starting from off.

val sub : t -> off:int -> len:int -> t

sub t ~off ~len does not allocate a bigstring, but instead returns a new view into t starting at off, and with length len.

Note that this does not allocate a new buffer, but instead shares the buffer of t with the newly-returned bigstring.

Memory-safe Operations

val length : t -> int

length t is the length of the bigstring, in bytes.

val substring : t -> off:int -> len:int -> string

substring t ~off ~len returns a string of length len containing the bytes of t starting at off.

val to_string : t -> string

to_string t is equivalent to substring t ~off:0 ~len:(length t)

val get : t -> int -> char

get t i returns the character at offset i in t.

val set : t -> int -> char -> unit

set t i c sets the character at offset i in t to be c

Little-endian Byte Order

The following operations assume a little-endian byte ordering of the bigstring. If the machine-native byte ordering differs, then the get operations will reorder the bytes so that they are in machine-native byte order before returning the result, and the set operations will reorder the bytes so that they are written out in the appropriate order.

Most modern processor architectures are little-endian, so more likely than not, these operations will not do any byte reordering.

val get_int16_le : t -> int -> int

get_int16_le t i returns the two bytes in t starting at offset i, interpreted as an unsigned integer.

val get_int16_sign_extended_le : t -> int -> int

get_int16_sign_extended_le t i returns the two bytes in t starting at offset i, interpreted as a signed integer and performing sign extension to the native word size before returning the result.

val set_int16_le : t -> int -> int -> unit

set_int16_le t i v sets the two bytes in t starting at offset i to the value v.

val get_int32_le : t -> int -> int32

get_int32_le t i returns the four bytes in t starting at offset i.

val set_int32_le : t -> int -> int32 -> unit

set_int32_le t i v sets the four bytes in t starting at offset i to the value v.

val get_int64_le : t -> int -> int64

get_int64_le t i returns the eight bytes in t starting at offset i.

val set_int64_le : t -> int -> int64 -> unit

set_int64_le t i v sets the eight bytes in t starting at offset i to the value v.

Big-endian Byte Order

The following operations assume a big-endian byte ordering of the bigstring. If the machine-native byte ordering differs, then the get operations will reorder the bytes so that they are in machine-native byte order before returning the result, and the set operations will reorder the bytes so that they are written out in the appropriate order.

Network byte order is big-endian, so you may need these operations when dealing with raw frames, for example, in a userland networking stack.

val get_int16_be : t -> int -> int

get_int16_be t i returns the two bytes in t starting at offset i, interpreted as an unsigned integer.

val get_int16_sign_extended_be : t -> int -> int

get_int16_sign_extended_be t i returns the two bytes in t starting at offset i, interpreted as a signed integer and performing sign extension to the native word size before returning the result.

val set_int16_be : t -> int -> int -> unit

set_int16_be t i v sets the two bytes in t starting at offset off to the value v.

val get_int32_be : t -> int -> int32

get_int32_be t i returns the four bytes in t starting at offset i.

val set_int32_be : t -> int -> int32 -> unit

set_int32_be t i v sets the four bytes in t starting at offset i to the value v.

val get_int64_be : t -> int -> int64

get_int64_be t i returns the eight bytes in t starting at offset i.

val set_int64_be : t -> int -> int64 -> unit

set_int64_be t i v sets the eight bytes in t starting at offset i to the value v.

Blits

All the following blit operations do the same thing. They copy a given number of bytes from a source starting at some offset to a destination starting at some other offset. Forgetting for a moment that OCaml is a memory-safe language, these are all equivalent to:

memcpy(dst + dst_off, src + src_off, len);

And in fact, that's how they're implemented. Except that bounds checking is performed before performing the blit.

val blit : t -> src_off:int -> t -> dst_off:int -> len:int -> unit
val blit_from_string : + string -> + src_off:int -> + t -> + dst_off:int -> + len:int -> + unit
val blit_from_bytes : + Bytes.t -> + src_off:int -> + t -> + dst_off:int -> + len:int -> + unit
val blit_to_bytes : + t -> + src_off:int -> + Bytes.t -> + dst_off:int -> + len:int -> + unit

memcmp

Fast comparisons based on memcmp. Similar to the blits, these are implemented as C calls after performing bounds checks.

memcmp(buf1 + off1, buf2 + off2, len);
val memcmp : t -> int -> t -> int -> int -> int
val memcmp_string : t -> int -> string -> int -> int -> int

memchr

Search for a byte using memchr, returning -1 if the byte is not found. Performing bounds checking before the C call.

val memchr : t -> int -> char -> int -> int

Memory-unsafe Operations

The following operations are not memory safe. However, they do compile down to just a couple instructions. Make sure when using them to perform your own bounds checking. Or don't. Just make sure you know what you're doing. You can do it, but only do it if you have to.

val unsafe_get : t -> int -> char

unsafe_get t i is like get except no bounds checking is performed.

val unsafe_set : t -> int -> char -> unit

unsafe_set t i c is like set except no bounds checking is performed.

val unsafe_get_int16_le : t -> int -> int

unsafe_get_int16_le t i is like get_int16_le except no bounds checking is performed.

val unsafe_get_int16_be : t -> int -> int

unsafe_get_int16_be t i is like get_int16_be except no bounds checking is performed.

val unsafe_get_int16_sign_extended_le : t -> int -> int

unsafe_get_int16_sign_extended_le t i is like get_int16_sign_extended_le except no bounds checking is performed.

val unsafe_get_int16_sign_extended_be : t -> int -> int

unsafe_get_int16_sign_extended_be t i is like get_int16_sign_extended_be except no bounds checking is performed.

val unsafe_set_int16_le : t -> int -> int -> unit

unsafe_set_int16_le t i v is like set_int16_le except no bounds checking is performed.

val unsafe_set_int16_be : t -> int -> int -> unit

unsafe_set_int16_be t i v is like set_int16_be except no bounds checking is performed.

val unsafe_get_int32_le : t -> int -> int32

unsafe_get_int32_le t i is like get_int32_le except no bounds checking is performed.

val unsafe_get_int32_be : t -> int -> int32

unsafe_get_int32_be t i is like get_int32_be except no bounds checking is performed.

val unsafe_set_int32_le : t -> int -> int32 -> unit

unsafe_set_int32_le t i v is like set_int32_le except no bounds checking is performed.

val unsafe_set_int32_be : t -> int -> int32 -> unit

unsafe_set_int32_be t i v is like set_int32_be except no bounds checking is performed.

val unsafe_get_int64_le : t -> int -> int64

unsafe_get_int64_le t i is like get_int64_le except no bounds checking is performed.

val unsafe_get_int64_be : t -> int -> int64

unsafe_get_int64_be t i is like get_int64_be except no bounds checking is performed.

val unsafe_set_int64_le : t -> int -> int64 -> unit

unsafe_set_int64_le t i v is like set_int64_le except no bounds checking is performed.

val unsafe_set_int64_be : t -> int -> int64 -> unit

unsafe_set_int64_be t i v is like set_int64_be except no bounds checking is performed.

Blits

All the following blit operations do the same thing. They copy a given number of bytes from a source starting at some offset to a destination starting at some other offset. Forgetting for a moment that OCaml is a memory-safe language, these are all equivalent to:

memcpy(dst + dst_off, src + src_off, len);

And in fact, that's how they're implemented. Except in the case of unsafe_blit which uses a memmove so that overlapping blits behave as expected. But in both cases, there's no bounds checking.

val unsafe_blit : t -> src_off:int -> t -> dst_off:int -> len:int -> unit
val unsafe_blit_from_string : + string -> + src_off:int -> + t -> + dst_off:int -> + len:int -> + unit
val unsafe_blit_from_bytes : + Bytes.t -> + src_off:int -> + t -> + dst_off:int -> + len:int -> + unit
val unsafe_blit_to_bytes : + t -> + src_off:int -> + Bytes.t -> + dst_off:int -> + len:int -> + unit

memcmp

Fast comparisons based on memcmp. Similar to the blits, these are not memory safe and are implemented by the same C call:

memcmp(buf1 + off1, buf2 + off2, len);
val unsafe_memcmp : t -> int -> t -> int -> int -> int
val unsafe_memcmp_string : t -> int -> string -> int -> int -> int

memchr

Search for a byte using memchr, returning -1 if the byte is not found. It does not check bounds before the C call.

val unsafe_memchr : t -> int -> char -> int -> int
diff --git a/findlib-1/bigstringaf/index.html b/findlib-1/bigstringaf/index.html new file mode 100644 index 000000000..cadca8457 --- /dev/null +++ b/findlib-1/bigstringaf/index.html @@ -0,0 +1,2 @@ + +bigstringaf (docs.findlib-1.bigstringaf)

Package bigstringaf

Library bigstringaf

The entry point of this library is the module: Bigstringaf.

diff --git a/findlib-1/ctypes/ComplexL/index.html b/findlib-1/ctypes/ComplexL/index.html new file mode 100644 index 000000000..42a22dd77 --- /dev/null +++ b/findlib-1/ctypes/ComplexL/index.html @@ -0,0 +1,2 @@ + +ComplexL (docs.findlib-1.ctypes.ComplexL)

Module ComplexL

type t

The type of long double complex values

val make : LDouble.t -> LDouble.t -> t

make x y creates the long double complex value x + y * i

val of_complex : Complex.t -> t

create a long double complex from a Complex.t

val to_complex : t -> Complex.t

Convert a long double complex to a Complex.t. The real and imaginary components are converted by calling LDouble.to_float which can produce unspecified results.

val zero : t

0 + i0

val one : t

1 + i0

val i : t

0 + i

val re : t -> LDouble.t

return the real part of the long double complex

val im : t -> LDouble.t

return the imaginary part of the long double complex

val neg : t -> t

Unary negation

val conj : t -> t

Conjugate: given the complex x + i.y, returns x - i.y.

val add : t -> t -> t

Addition

val sub : t -> t -> t

Subtraction

val mul : t -> t -> t

Multiplication

val div : t -> t -> t

Division

val inv : t -> t

Multiplicative inverse (1/z).

val sqrt : t -> t

Square root.

val norm2 : t -> LDouble.t

Norm squared: given x + i.y, returns x^2 + y^2.

val norm : t -> LDouble.t

Norm: given x + i.y, returns sqrt(x^2 + y^2).

val polar : LDouble.t -> LDouble.t -> t

polar norm arg returns the complex having norm norm and argument arg.

val arg : t -> LDouble.t

Argument. The argument of a complex number is the angle in the complex plane between the positive real axis and a line passing through zero and the number.

val exp : t -> t

Exponentiation. exp z returns e to the z power.

val log : t -> t

Natural logarithm (in base e).

val pow : t -> t -> t

Power function. pow z1 z2 returns z1 to the z2 power.

diff --git a/findlib-1/ctypes/Cstubs_internals/index.html b/findlib-1/ctypes/Cstubs_internals/index.html new file mode 100644 index 000000000..a728b3032 --- /dev/null +++ b/findlib-1/ctypes/Cstubs_internals/index.html @@ -0,0 +1,12 @@ + +Cstubs_internals (docs.findlib-1.ctypes.Cstubs_internals)

Module Cstubs_internals

type voidp = Ctypes_ptr.voidp
type ('m, 'a) fatptr = ('m, 'a Ctypes.typ) Ctypes_ptr.Fat.t
type ('m, 'a) fatfunptr = ('m, 'a Ctypes.fn) Ctypes_ptr.Fat.t
val make_structured : + ('a, 's) Ctypes.structured Ctypes.typ -> + managed_buffer -> + ('a, 's) Ctypes.structured
val make_ptr : 'a Ctypes.typ -> voidp -> 'a Ctypes.ptr
val make_fun_ptr : 'a Ctypes.fn -> voidp -> 'a Ctypes_static.static_funptr
type 'a ocaml_type = 'a Ctypes_static.ocaml_type =
  1. | String : string ocaml_type
  2. | Bytes : bytes ocaml_type
  3. | FloatArray : float array ocaml_type
type 'a typ = 'a Ctypes_static.typ =
  1. | Void : unit typ
  2. | Primitive : 'a Ctypes_primitive_types.prim -> 'a typ
  3. | Pointer : 'a typ -> 'a ptr typ
  4. | Funptr : 'a Ctypes.fn -> 'a static_funptr typ
  5. | Struct : 'a Ctypes_static.structure_type -> 'a Ctypes_static.structure typ
  6. | Union : 'a Ctypes_static.union_type -> 'a Ctypes_static.union typ
  7. | Abstract : Ctypes_static.abstract_type -> 'a Ctypes_static.abstract typ
  8. | View : ('a, 'b) view -> 'a typ
  9. | Qualified : Ctypes_static.qualifier * 'a typ -> 'a typ
  10. | Array : 'a typ * int -> 'a Ctypes_static.carray typ
  11. | Bigarray : (_, 'a, _) Ctypes_bigarray.t -> 'a typ
  12. | OCaml : 'a ocaml_type -> 'a ocaml typ
and ('a, 'b) pointer = ('a, 'b) Ctypes_static.pointer =
  1. | CPointer : (Obj.t option, 'a typ) Ctypes_ptr.Fat.t -> ('a, [ `C ]) pointer
  2. | OCamlRef : int * 'a * 'a ocaml_type -> ('a, [ `OCaml ]) pointer
and 'a ptr = ('a, [ `C ]) pointer
and 'a ocaml = ('a, [ `OCaml ]) pointer
and 'a static_funptr = 'a Ctypes_static.static_funptr =
  1. | Static_funptr : (Obj.t option, 'a Ctypes.fn) Ctypes_ptr.Fat.t -> 'a + static_funptr
and ('a, 'b) view = ('a, 'b) Ctypes_static.view = {
  1. read : 'b -> 'a;
  2. write : 'a -> 'b;
  3. format_typ : ((Format.formatter -> unit) -> Format.formatter -> unit) option;
  4. format : (Format.formatter -> 'a -> unit) option;
  5. ty : 'b typ;
}
type 'a fn = 'a Ctypes_static.fn =
  1. | Returns : 'a typ -> 'a fn
  2. | Function : 'a typ * 'b fn -> ('a -> 'b) fn
type 'a prim = 'a Ctypes_primitive_types.prim =
  1. | Char : char prim
  2. | Schar : int prim
  3. | Uchar : Unsigned.uchar prim
  4. | Bool : bool prim
  5. | Short : int prim
  6. | Int : int prim
  7. | Long : Signed.long prim
  8. | Llong : Signed.llong prim
  9. | Ushort : Unsigned.ushort prim
  10. | Sint : Signed.sint prim
  11. | Uint : Unsigned.uint prim
  12. | Ulong : Unsigned.ulong prim
  13. | Ullong : Unsigned.ullong prim
  14. | Size_t : Unsigned.size_t prim
  15. | Int8_t : int prim
  16. | Int16_t : int prim
  17. | Int32_t : int32 prim
  18. | Int64_t : int64 prim
  19. | Uint8_t : Unsigned.uint8 prim
  20. | Uint16_t : Unsigned.uint16 prim
  21. | Uint32_t : Unsigned.uint32 prim
  22. | Uint64_t : Unsigned.uint64 prim
  23. | Camlint : int prim
  24. | Nativeint : nativeint prim
  25. | Float : float prim
  26. | Double : float prim
  27. | LDouble : LDouble.t prim
  28. | Complex32 : Complex.t prim
  29. | Complex64 : Complex.t prim
  30. | Complexld : ComplexL.t prim
val build_enum_type : + string -> + Ctypes_static.arithmetic -> + ?typedef:bool -> + ?unexpected:(int64 -> 'a) -> + ('a * int64) list -> + 'a typ
val use_value : 'a -> unit
diff --git a/findlib-1/ctypes/Ctypes/CArray/index.html b/findlib-1/ctypes/Ctypes/CArray/index.html new file mode 100644 index 000000000..ba894668e --- /dev/null +++ b/findlib-1/ctypes/Ctypes/CArray/index.html @@ -0,0 +1,2 @@ + +CArray (docs.findlib-1.ctypes.Ctypes.CArray)

Module Ctypes.CArray

Operations on C arrays.

type 'a t = 'a carray
val get : 'a t -> int -> 'a

get a n returns the nth element of the zero-indexed array a. The semantics for non-scalar types are non-copying, as for (!@).

If you rebind the CArray module to Array then you can also use the syntax a.(n) instead of Array.get a n.

Raise Invalid_argument "index out of bounds" if n is outside of the range 0 to (CArray.length a - 1).

val set : 'a t -> int -> 'a -> unit

set a n v overwrites the nth element of the zero-indexed array a with v.

If you rebind the CArray module to Array then you can also use the a.(n) <- v syntax instead of Array.set a n v.

Raise Invalid_argument "index out of bounds" if n is outside of the range 0 to (CArray.length a - 1).

val unsafe_get : 'a t -> int -> 'a

unsafe_get a n behaves like get a n except that the check that n between 0 and (CArray.length a - 1) is not performed.

val unsafe_set : 'a t -> int -> 'a -> unit

unsafe_set a n v behaves like set a n v except that the check that n between 0 and (CArray.length a - 1) is not performed.

val of_string : string -> char t

of_string s builds an array of the same length as s plus one, and writes the elements of s to the corresponding elements of the array with the null character '\0' as a last element.

val of_list : 'a typ -> 'a list -> 'a t

of_list t l builds an array of type t of the same length as l, and writes the elements of l to the corresponding elements of the array.

val to_list : 'a t -> 'a list

to_list a builds a list of the same length as a such that each element of the list is the result of reading the corresponding element of a.

val iter : ('a -> unit) -> 'a t -> unit

iter f a is analogous to Array.iter f a: it applies f in turn to all the elements of a.

val iteri : (int -> 'a -> unit) -> 'a t -> unit

iter f a is analogous to Array.iteri f a: it applies f in turn to all the elements of a but the function is applied to the index of the element as first argument, and the element itself as second argument

val map : 'b typ -> ('a -> 'b) -> 'a t -> 'b t

map t f a is analogous to Array.map f a: it creates a new array with element type t whose elements are obtained by applying f to the elements of a.

val mapi : 'b typ -> (int -> 'a -> 'b) -> 'a t -> 'b t

mapi behaves like Array.mapi, except that it also passes the index of each element as the first argument to f and the element itself as the second argument.

val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a

CArray.fold_left (@) x a computes (((x @ a.(0)) @ a.(1)) ...) @ a.(n-1) where n is the length of the array a.

val fold_right : ('b -> 'a -> 'a) -> 'b t -> 'a -> 'a

CArray.fold_right f a x computes a.(0) @ (a.(1) @ ( ... (a.(n-1) @ x) ...)) where n is the length of the array a.

val length : 'a t -> int

Return the number of elements of the given array.

val start : 'a t -> 'a ptr

Return the address of the first element of the given array.

val from_ptr : 'a ptr -> int -> 'a t

from_ptr p n creates an n-length array reference to the memory at address p.

val make : ?finalise:('a t -> unit) -> 'a typ -> ?initial:'a -> int -> 'a t

make t n creates an n-length array of type t. If the optional argument ?initial is supplied, it indicates a value that should be used to initialise every element of the array. The argument ?finalise, if present, will be called just before the memory is freed.

val copy : 'a t -> 'a t

copy a creates a fresh array with the same elements as a.

val sub : 'a t -> pos:int -> length:int -> 'a t

sub a ~pos ~length creates a fresh array of length length containing the elements a.(pos) to a.(pos + length - 1) of a.

Raise Invalid_argument "CArray.sub" if pos and length do not designate a valid subarray of a.

val element_type : 'a t -> 'a typ

Retrieve the element type of an array.

diff --git a/findlib-1/ctypes/Ctypes/Intptr/Infix/index.html b/findlib-1/ctypes/Ctypes/Intptr/Infix/index.html new file mode 100644 index 000000000..2addd7f3a --- /dev/null +++ b/findlib-1/ctypes/Ctypes/Intptr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.Ctypes.Intptr.Infix)

Module Intptr.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/Ctypes/Intptr/index.html b/findlib-1/ctypes/Ctypes/Intptr/index.html new file mode 100644 index 000000000..5453d6c39 --- /dev/null +++ b/findlib-1/ctypes/Ctypes/Intptr/index.html @@ -0,0 +1,2 @@ + +Intptr (docs.findlib-1.ctypes.Ctypes.Intptr)

Module Ctypes.Intptr

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/Ctypes/Ptrdiff/Infix/index.html b/findlib-1/ctypes/Ctypes/Ptrdiff/Infix/index.html new file mode 100644 index 000000000..071f60d6d --- /dev/null +++ b/findlib-1/ctypes/Ctypes/Ptrdiff/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.Ctypes.Ptrdiff.Infix)

Module Ptrdiff.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/Ctypes/Ptrdiff/index.html b/findlib-1/ctypes/Ctypes/Ptrdiff/index.html new file mode 100644 index 000000000..989f4555d --- /dev/null +++ b/findlib-1/ctypes/Ctypes/Ptrdiff/index.html @@ -0,0 +1,2 @@ + +Ptrdiff (docs.findlib-1.ctypes.Ctypes.Ptrdiff)

Module Ctypes.Ptrdiff

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/Ctypes/Root/index.html b/findlib-1/ctypes/Ctypes/Root/index.html new file mode 100644 index 000000000..75e940aba --- /dev/null +++ b/findlib-1/ctypes/Ctypes/Root/index.html @@ -0,0 +1,2 @@ + +Root (docs.findlib-1.ctypes.Ctypes.Root)

Module Ctypes.Root

Registration of OCaml values as roots

val create : 'a -> unit ptr

create v allocates storage for the address of the OCaml value v, registers the storage as a root, and returns its address.

val get : unit ptr -> 'a

get p retrieves the OCaml value whose address is stored at p.

val set : unit ptr -> 'a -> unit

set p v updates the OCaml value stored as a root at p.

val release : unit ptr -> unit

release p unregsiters the root p.

diff --git a/findlib-1/ctypes/Ctypes/Uintptr/Infix/index.html b/findlib-1/ctypes/Ctypes/Uintptr/Infix/index.html new file mode 100644 index 000000000..8fbcad15d --- /dev/null +++ b/findlib-1/ctypes/Ctypes/Uintptr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.Ctypes.Uintptr.Infix)

Module Uintptr.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/Ctypes/Uintptr/index.html b/findlib-1/ctypes/Ctypes/Uintptr/index.html new file mode 100644 index 000000000..ae8fb92b4 --- /dev/null +++ b/findlib-1/ctypes/Ctypes/Uintptr/index.html @@ -0,0 +1,2 @@ + +Uintptr (docs.findlib-1.ctypes.Ctypes.Uintptr)

Module Ctypes.Uintptr

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Unsigned.Infix with type t := t
diff --git a/findlib-1/ctypes/Ctypes/index.html b/findlib-1/ctypes/Ctypes/index.html new file mode 100644 index 000000000..3454c67f8 --- /dev/null +++ b/findlib-1/ctypes/Ctypes/index.html @@ -0,0 +1,118 @@ + +Ctypes (docs.findlib-1.ctypes.Ctypes)

Module Ctypes

The core ctypes module.

The main points of interest are the set of functions for describing C types (see Values representing C types) and the set of functions for accessing C values (see Values representing C values). The Foreign.foreign function uses C type descriptions to bind external C values.

Pointer types
type ('a, 'b) pointer = ('a, 'b) Ctypes_static.pointer

The type of pointer values. A value of type ('a, [`C]) pointer contains a C-compatible pointer, and a value of type ('a, [`OCaml]) pointer contains a pointer to a value that can be moved by OCaml runtime.

C-compatible pointers
type 'a ptr = ('a, [ `C ]) pointer

The type of C-compatible pointer values. A value of type t ptr can be used to read and write values of type t at particular addresses.

type 'a ocaml = 'a Ctypes_static.ocaml

The type of pointer values pointing directly into OCaml values. Pointers of this type should never be captured by external code. In particular, functions accepting 'a ocaml pointers must not invoke any OCaml code.

C array types
type 'a carray = 'a Ctypes_static.carray

The type of C array values. A value of type t carray can be used to read and write array objects in C-managed storage.

Bigarray types
type 'a bigarray_class = 'a Ctypes_static.bigarray_class

The type of Bigarray classes. There are four instances, one for each of the Bigarray submodules.

val genarray : + < element : 'a + ; layout : 'l + ; ba_repr : 'b + ; bigarray : ('a, 'b, 'l) Bigarray_compat.Genarray.t + ; carray : 'a carray + ; dims : int array > + bigarray_class

The class of Bigarray.Genarray.t values

val array1 : + < element : 'a + ; layout : 'l + ; ba_repr : 'b + ; bigarray : ('a, 'b, 'l) Bigarray_compat.Array1.t + ; carray : 'a carray + ; dims : int > + bigarray_class

The class of Bigarray.Array1.t values

val array2 : + < element : 'a + ; layout : 'l + ; ba_repr : 'b + ; bigarray : ('a, 'b, 'l) Bigarray_compat.Array2.t + ; carray : 'a carray carray + ; dims : int * int > + bigarray_class

The class of Bigarray.Array2.t values

val array3 : + < element : 'a + ; layout : 'l + ; ba_repr : 'b + ; bigarray : ('a, 'b, 'l) Bigarray_compat.Array3.t + ; carray : 'a carray carray carray + ; dims : int * int * int > + bigarray_class

The class of Bigarray.Array3.t values

Struct and union types

type ('a, 'kind) structured = ('a, 'kind) Ctypes_static.structured

The base type of values representing C struct and union types. The 'kind parameter is a polymorphic variant type indicating whether the type represents a struct (`Struct) or a union (`Union).

type 'a structure = ('a, [ `Struct ]) structured

The type of values representing C struct types.

type 'a union = ('a, [ `Union ]) structured

The type of values representing C union types.

type ('a, 't) field = ('a, 't) Ctypes_static.field

The type of values representing C struct or union members (called "fields" here). A value of type (a, s) field represents a field of type a in a struct or union of type s.

type 'a abstract = 'a Ctypes_static.abstract

The type of abstract values. The purpose of the abstract type is to represent values whose type varies from platform to platform.

For example, the type pthread_t is a pointer on some platforms, an integer on other platforms, and a struct on a third set of platforms. One way to deal with this kind of situation is to have possibly-platform-specific code which interrogates the C type in some way to help determine an appropriate representation. Another way is to use abstract, leaving the representation opaque.

(Note, however, that although pthread_t is a convenient example, since the type used to implement it varies significantly across platforms, it's not actually a good match for abstract, since values of type pthread_t are passed and returned by value.)

include Ctypes_types.TYPE + with type 'a typ = 'a Ctypes_static.typ + and type ('a, 's) field := ('a, 's) field

Values representing C types

type 'a typ = 'a Ctypes_static.typ

The type of values representing C types. There are two types associated with each typ value: the C type used to store and pass values, and the corresponding OCaml type. The type parameter indicates the OCaml type, so a value of type t typ is used to read and write OCaml values of type t. There are various uses of typ values, including

  • constructing function types for binding native functions using Foreign.foreign
  • constructing pointers for reading and writing locations in C-managed storage using ptr
  • describing the fields of structured types built with structure and union.

The void type

val void : unit typ

Value representing the C void type. Void values appear in OCaml as the unit type, so using void in an argument or result type specification produces a function which accepts or returns unit.

Dereferencing a pointer to void is an error, as in C, and will raise IncompleteType.

Scalar types

The scalar types consist of the Arithmetic types and the Pointer types.

Arithmetic types

The arithmetic types consist of the signed and unsigned integer types (including character types) and the floating types. There are values representing both exact-width integer types (of 8, 16, 32 and 64 bits) and types whose size depend on the platform (signed and unsigned short, int, long, long long).

val char : char typ

Value representing the C type char.

Signed integer types
val schar : int typ

Value representing the C type signed char.

val short : int typ

Value representing the C type (signed) short.

val int : int typ

Value representing the C type (signed) int.

val long : Signed.long typ

Value representing the C type (signed) long.

val llong : Signed.llong typ

Value representing the C type (signed) long long.

val nativeint : nativeint typ

Value representing the C type (signed) int.

val int8_t : int typ

Value representing an 8-bit signed integer C type.

val int16_t : int typ

Value representing a 16-bit signed integer C type.

val int32_t : int32 typ

Value representing a 32-bit signed integer C type.

val int64_t : int64 typ

Value representing a 64-bit signed integer C type.

module Intptr : Signed.S
val intptr_t : Intptr.t typ

Value representing the C type intptr_t.

module Ptrdiff : Signed.S
val ptrdiff_t : Ptrdiff.t typ

Value representing the C type ptrdiff_t.

val camlint : int typ

Value representing an integer type with the same storage requirements as an OCaml int.

Unsigned integer types
val uchar : Unsigned.uchar typ

Value representing the C type unsigned char.

val bool : bool typ

Value representing the C type bool.

val uint8_t : Unsigned.uint8 typ

Value representing an 8-bit unsigned integer C type.

val uint16_t : Unsigned.uint16 typ

Value representing a 16-bit unsigned integer C type.

val uint32_t : Unsigned.uint32 typ

Value representing a 32-bit unsigned integer C type.

val uint64_t : Unsigned.uint64 typ

Value representing a 64-bit unsigned integer C type.

val size_t : Unsigned.size_t typ

Value representing the C type size_t, an alias for one of the unsigned integer types. The actual size and alignment requirements for size_t vary between platforms.

val ushort : Unsigned.ushort typ

Value representing the C type unsigned short.

val sint : Signed.sint typ

Value representing the C type int.

val uint : Unsigned.uint typ

Value representing the C type unsigned int.

val ulong : Unsigned.ulong typ

Value representing the C type unsigned long.

val ullong : Unsigned.ullong typ

Value representing the C type unsigned long long.

val uintptr_t : Uintptr.t typ

Value representing the C type uintptr_t.

Floating types
val float : float typ

Value representing the C single-precision float type.

val double : float typ

Value representing the C type double.

val ldouble : LDouble.t typ

Value representing the C type long double.

Complex types
val complex32 : Complex.t typ

Value representing the C99 single-precision float complex type.

val complex64 : Complex.t typ

Value representing the C99 double-precision double complex type.

val complexld : ComplexL.t typ

Value representing the C99 long-double-precision long double complex type.

Pointer types
C-compatible pointers
val ptr : 'a typ -> 'a Ctypes_static.ptr typ

Construct a pointer type from an existing type (called the reference type).

val ptr_opt : 'a typ -> 'a Ctypes_static.ptr option typ

Construct a pointer type from an existing type (called the reference type). This behaves like ptr, except that null pointers appear in OCaml as None.

val string : string typ

A high-level representation of the string type.

On the C side this behaves like char *; on the OCaml side values read and written using string are simply native OCaml strings.

To avoid problems with the garbage collector, values passed using string are copied into immovable C-managed storage before being passed to C.

The string type representation is suitable for use in function argument types such as the following:

string @-> returning int

where the lifetime of the C-managed storage does not need to extend beyond the duration of the function call. However, it is not suitable for use in struct or union fields

field s "x" string

because it does not provide a way to manage the lifetime of the C-managed storage.

val string_opt : string option typ

A high-level representation of the string type. This behaves like string, except that null pointers appear in OCaml as None.

OCaml pointers
val ocaml_string : string Ctypes_static.ocaml typ

Value representing the directly mapped storage of an OCaml string.

val ocaml_bytes : bytes Ctypes_static.ocaml typ

Value representing the directly mapped storage of an OCaml byte array.

Array types

C array types
val array : int -> 'a typ -> 'a Ctypes_static.carray typ

Construct a sized array type from a length and an existing type (called the element type).

Bigarray types
val bigarray : + < element : 'a + ; layout : Bigarray_compat.c_layout + ; ba_repr : 'b + ; dims : 'dims + ; bigarray : 'bigarray + ; carray : _ > + Ctypes_static.bigarray_class -> + 'dims -> + ('a, 'b) Bigarray_compat.kind -> + 'bigarray typ

Construct a sized C-layout bigarray type representation from a bigarray class, the dimensions, and the Bigarray_compat.kind.

val fortran_bigarray : + < element : 'a + ; layout : Bigarray_compat.fortran_layout + ; ba_repr : 'b + ; dims : 'dims + ; bigarray : 'bigarray + ; carray : _ > + Ctypes_static.bigarray_class -> + 'dims -> + ('a, 'b) Bigarray_compat.kind -> + 'bigarray typ

Construct a sized Fortran-layout bigarray type representation from a bigarray class, the dimensions, and the Bigarray_compat.kind.

val typ_of_bigarray_kind : ('a, 'b) Bigarray_compat.kind -> 'a typ

typ_of_bigarray_kind k is the type corresponding to the Bigarray kind k.

Struct and union types

val structure : string -> 's Ctypes_static.structure typ

Construct a new structure type. The type value returned is incomplete and can be updated using field until it is passed to seal, at which point the set of fields is fixed.

The type ('_s structure typ) of the expression returned by the call structure tag includes a weak type variable, which can be explicitly instantiated to ensure that the OCaml values representing different C structure types have incompatible types. Typical usage is as follows:

type tagname

let tagname : tagname structure typ = structure "tagname"

val union : string -> 's Ctypes_static.union typ

Construct a new union type. This behaves analogously to structure; fields are added with field.

val field : + 't typ -> + string -> + 'a typ -> + ('a, ('s, [< `Struct | `Union ]) Ctypes_static.structured as 't) field

field ty label ty' adds a field of type ty' with label label to the structure or union type ty and returns a field value that can be used to read and write the field in structure or union instances (e.g. using getf and setf).

Attempting to add a field to a union type that has been sealed with seal is an error, and will raise ModifyingSealedType.

val seal : (_, [< `Struct | `Union ]) Ctypes_static.structured typ -> unit

seal t completes the struct or union type t so that no further fields can be added. Struct and union types must be sealed before they can be used in a way that involves their size or alignment; see the documentation for IncompleteType for further details.

View types

val view : + ?format_typ:((Format.formatter -> unit) -> Format.formatter -> unit) -> + ?format:(Format.formatter -> 'b -> unit) -> + read:('a -> 'b) -> + write:('b -> 'a) -> + 'a typ -> + 'b typ

view ~read:r ~write:w t creates a C type representation t' which behaves like t except that values read using t' are subsequently transformed using the function r and values written using t' are first transformed using the function w.

For example, given suitable definitions of string_of_char_ptr and char_ptr_of_string, the type representation

view ~read:string_of_char_ptr ~write:char_ptr_of_string (ptr char)

can be used to pass OCaml strings directly to and from bound C functions, or to read and write string members in structs and arrays. (In fact, the string type representation is defined in exactly this way.)

The optional argument format_typ is used by the Ctypes.format_typ and string_of_typ functions to print the type at the top level and elsewhere. If format_typ is not supplied the printer for t is used instead.

The optional argument format is used by the Ctypes.format and string_of functions to print the values. If format_val is not supplied the printer for t is used instead.

val typedef : 'a typ -> string -> 'a typ

typedef t name creates a C type representation t' which is equivalent to t except its name is printed as name.

This is useful when generating C stubs involving "anonymous" types, for example: typedef struct { int f } typedef_name;

Abstract types

val abstract : + name:string -> + size:int -> + alignment:int -> + 'a Ctypes_static.abstract typ

Create an abstract type specification from the size and alignment requirements for the type.

Injection of concrete types

val lift_typ : 'a Ctypes_static.typ -> 'a typ

lift_typ t turns a concrete type representation into an abstract type representation.

For example, retrieving struct layout from C involves working with an abstract representation of types which do not support operations such as sizeof. The lift_typ function makes it possible to use concrete type representations wherever such abstract type representations are needed.

Function types

Abstract interface to C function type descriptions

type 'a fn = 'a Ctypes_static.fn

The type of values representing C function types. A value of type t fn can be used to bind to C functions and to describe type of OCaml functions passed to C.

val (@->) : 'a typ -> 'b fn -> ('a -> 'b) fn

Construct a function type from a type and an existing function type. This corresponds to prepending a parameter to a C function parameter list. For example,

int @-> ptr void @-> returning float

describes a function type that accepts two arguments -- an integer and a pointer to void -- and returns a float.

val returning : 'a typ -> 'a fn

Give the return type of a C function. Note that returning is intended to be used together with (@->); see the documentation for (@->) for an example.

type 'a static_funptr = 'a Ctypes_static.static_funptr

Function pointer types

The type of values representing C function pointer types.

val static_funptr : 'a fn -> 'a Ctypes_static.static_funptr typ

Construct a function pointer type from an existing function type (called the reference type).

Qualified types

val const : 'a typ -> 'a typ

const t const-qualifies the type t. At present the only effect is that the type is marked 'const' in generated code.

val volatile : 'a typ -> 'a typ

volatile t volatile-qualifies the type t. At present the only effect is that the type is marked 'volatile' in generated code.

Operations on types

val sizeof : 'a typ -> int

sizeof t computes the size in bytes of the type t. The exception IncompleteType is raised if t is incomplete.

val alignment : 'a typ -> int

alignment t computes the alignment requirements of the type t. The exception IncompleteType is raised if t is incomplete.

val format_typ : ?name:string -> Format.formatter -> 'a typ -> unit

Pretty-print a C representation of the type to the specified formatter.

val format_fn : ?name:string -> Format.formatter -> 'a fn -> unit

Pretty-print a C representation of the function type to the specified formatter.

val string_of_typ : ?name:string -> 'a typ -> string

Return a C representation of the type.

val string_of_fn : ?name:string -> 'a fn -> string

Return a C representation of the function type.

Values representing C values

val format : 'a typ -> Format.formatter -> 'a -> unit

Pretty-print a representation of the C value to the specified formatter.

val string_of : 'a typ -> 'a -> string

Return a string representation of the C value.

Pointer values

val null : unit ptr

A null pointer.

val (!@) : 'a ptr -> 'a

!@ p dereferences the pointer p. If the reference type is a scalar type then dereferencing constructs a new value. If the reference type is an aggregate type then dereferencing returns a value that references the memory pointed to by p.

val (<-@) : 'a ptr -> 'a -> unit

p <-@ v writes the value v to the address p.

val (+@) : ('a, 'b) pointer -> int -> ('a, 'b) pointer

If p is a pointer to an array element then p +@ n computes the address of the nth next element.

val (-@) : ('a, 'b) pointer -> int -> ('a, 'b) pointer

If p is a pointer to an array element then p -@ n computes the address of the nth previous element.

val ptr_diff : ('a, 'b) pointer -> ('a, 'b) pointer -> int

ptr_diff p q computes q - p. As in C, both p and q must point into the same array, and the result value is the difference of the subscripts of the two array elements.

val from_voidp : 'a typ -> unit ptr -> 'a ptr

Conversion from void *.

val to_voidp : _ ptr -> unit ptr

Conversion to void *.

val allocate : ?finalise:('a ptr -> unit) -> 'a typ -> 'a -> 'a ptr

allocate t v allocates a fresh value of type t, initialises it with v and returns its address. The argument ?finalise, if present, will be called just before the memory is freed. The value will be automatically freed after no references to the pointer remain within the calling OCaml program.

val allocate_n : ?finalise:('a ptr -> unit) -> 'a typ -> count:int -> 'a ptr

allocate_n t ~count:n allocates a fresh array with element type t and length n, and returns its address. The argument ?finalise, if present, will be called just before the memory is freed. The array will be automatically freed after no references to the pointer remain within the calling OCaml program. The memory is allocated with libc's calloc and is guaranteed to be zero-filled.

val ptr_compare : 'a ptr -> 'a ptr -> int

If p and q are pointers to elements i and j of the same array then ptr_compare p q compares the indexes of the elements. The result is negative if i is less than j, positive if i is greater than j, and zero if i and j are equal.

val is_null : 'a ptr -> bool

is_null p is true when p is a null pointer.

val reference_type : 'a ptr -> 'a typ

Retrieve the reference type of a pointer.

val ptr_of_raw_address : nativeint -> unit ptr

Convert the numeric representation of an address to a pointer

val funptr_of_raw_address : + nativeint -> + (unit -> unit) Ctypes_static.static_funptr

Convert the numeric representation of an address to a function pointer

val raw_address_of_ptr : unit ptr -> nativeint

raw_address_of_ptr p returns the numeric representation of p.

Note that the return value remains valid only as long as the pointed-to object is alive. If p is a managed object (e.g. a value returned by make) then unless the caller retains a reference to p, the object may be collected, invalidating the returned address.

val string_from_ptr : char ptr -> length:int -> string

string_from_ptr p ~length creates a string initialized with the length characters at address p.

Raise Invalid_argument "Ctypes.string_from_ptr" if length is negative.

val ocaml_string_start : string -> string ocaml

ocaml_string_start s allows to pass a pointer to the contents of an OCaml string directly to a C function.

val ocaml_bytes_start : bytes -> bytes ocaml

ocaml_bytes_start s allows to pass a pointer to the contents of an OCaml byte array directly to a C function.

Array values

C array values
module CArray : sig ... end

Operations on C arrays.

Bigarray values
val bigarray_start : + < element : 'a + ; layout : 'l + ; ba_repr : _ + ; bigarray : 'b + ; carray : _ + ; dims : _ > + bigarray_class -> + 'b -> + 'a ptr

Return the address of the first element of the given Bigarray value.

val bigarray_of_ptr : + < element : 'a + ; layout : Bigarray_compat.c_layout + ; ba_repr : 'f + ; bigarray : 'b + ; carray : _ + ; dims : 'i > + bigarray_class -> + 'i -> + ('a, 'f) Bigarray_compat.kind -> + 'a ptr -> + 'b

bigarray_of_ptr c dims k p converts the C pointer p to a C-layout bigarray value. No copy is made; the bigarray references the memory pointed to by p.

val fortran_bigarray_of_ptr : + < element : 'a + ; layout : Bigarray_compat.fortran_layout + ; ba_repr : 'f + ; bigarray : 'b + ; carray : _ + ; dims : 'i > + bigarray_class -> + 'i -> + ('a, 'f) Bigarray_compat.kind -> + 'a ptr -> + 'b

fortran_bigarray_of_ptr c dims k p converts the C pointer p to a Fortran-layout bigarray value. No copy is made; the bigarray references the memory pointed to by p.

val array_of_bigarray : + < element : _ + ; layout : Bigarray_compat.c_layout + ; ba_repr : _ + ; bigarray : 'b + ; carray : 'c + ; dims : _ > + bigarray_class -> + 'b -> + 'c

array_of_bigarray c b converts the bigarray value b to a value of type CArray.t. No copy is made; the result occupies the same memory as b.

Convert a Bigarray value to a C array.

val bigarray_of_array : + < element : 'a + ; layout : Bigarray_compat.c_layout + ; ba_repr : 'f + ; bigarray : 'b + ; carray : 'c carray + ; dims : 'i > + bigarray_class -> + ('a, 'f) Bigarray_compat.kind -> + 'c carray -> + 'b

bigarray_of_array c k a converts the CArray.t value a to a C-layout bigarray value. No copy is made; the result occupies the same memory as a.

Struct and union values

val make : ?finalise:('s -> unit) -> (_, _) structured as 's typ -> 's

Allocate a fresh, uninitialised structure or union value. The argument ?finalise, if present, will be called just before the underlying memory is freed.

val setf : (_, _) structured as 's -> ('a, 's) field -> 'a -> unit

setf s f v overwrites the value of the field f in the structure or union s with v.

val getf : (_, _) structured as 's -> ('a, 's) field -> 'a

getf s f retrieves the value of the field f in the structure or union s. The semantics for non-scalar types are non-copying, as for (!@).

val (@.) : (_, _) structured as 's -> ('a, 's) field -> 'a ptr

s @. f computes the address of the field f in the structure or union value s.

val (|->) : (_, _) structured as 's ptr -> ('a, 's) field -> 'a ptr

p |-> f computes the address of the field f in the structure or union value pointed to by p.

val offsetof : (_, _ structure) field -> int

offsetof f returns the offset, in bytes, of the field f from the beginning of the associated struct type.

val field_type : ('a, _) field -> 'a typ

field_type f returns the type of the field f.

val field_name : (_, _) field -> string

field_name f returns the name of the field f.

val addr : (_, _) structured as 's -> 's ptr

addr s returns the address of the structure or union s.

Coercions

val coerce : 'a typ -> 'b typ -> 'a -> 'b

coerce t1 t2 returns a coercion function between the types represented by t1 and t2. If t1 cannot be coerced to t2, coerce raises Uncoercible.

The following coercions are currently supported:

  • All function and object pointer types are intercoercible.
  • Any type may be coerced to void
  • There is a coercion between a view and another type t (in either direction) if there is a coercion between the representation type underlying the view and t.
  • Coercion is transitive: if t1 is coercible to t2 and t2 is coercible to t3, then t1 is directly coercible to t3.

The set of supported coercions is subject to change. Future versions of ctypes may both add new types of coercion and restrict the existing coercions.

val coerce_fn : 'a fn -> 'b fn -> 'a -> 'b

coerce_fn f1 f2 returns a coercion function between the function types represented by f1 and f2. If f1 cannot be coerced to f2, coerce_fn raises Uncoercible.

A function type f1 may be coerced to another function type f2 if all of the following hold:

  • the C types described by f1 and f2 have the same arity
  • each argument of f2 may be coerced to the corresponding argument of f1
  • the return type of f1 may be coerced to the return type of f2

The set of supported coercions is subject to change. Future versions of ctypes may both add new types of coercion and restrict the existing coercions.

module type FOREIGN = sig ... end
module type TYPE = sig ... end

Foreign types binding interface.

module Root : sig ... end

Exceptions

exception Unsupported of string

An attempt was made to use a feature not currently supported by ctypes. In practice this refers to attempts to use an union, array or abstract type as an argument or return type of a function.

exception ModifyingSealedType of string

An attempt was made to modify a sealed struct or union type description.

exception IncompleteType

An attempt was made to compute the size or alignment of an incomplete type.

The incomplete types are struct and union types that have not been sealed, and the void type.

It is not permitted to compute the size or alignment requirements of an incomplete type, to use it as a struct or union member, to read or write a value of the type through a pointer or to use it as the referenced type in pointer arithmetic. Additionally, incomplete struct and union types cannot be used as argument or return types.

type uncoercible_info
exception Uncoercible of uncoercible_info

An attempt was made to coerce between uncoercible types.

diff --git a/findlib-1/ctypes/Ctypes/module-type-FOREIGN/index.html b/findlib-1/ctypes/Ctypes/module-type-FOREIGN/index.html new file mode 100644 index 000000000..c56ec8aa6 --- /dev/null +++ b/findlib-1/ctypes/Ctypes/module-type-FOREIGN/index.html @@ -0,0 +1,2 @@ + +FOREIGN (docs.findlib-1.ctypes.Ctypes.FOREIGN)

Module type Ctypes.FOREIGN

binding interfaces

Foreign function binding interface.

The Foreign and Cstubs modules provide concrete implementations.

type 'a fn
type 'a return
val (@->) : 'a typ -> 'b fn -> ('a -> 'b) fn
val returning : 'a typ -> 'a return fn
type 'a result
val foreign : string -> ('a -> 'b) fn -> ('a -> 'b) result
val foreign_value : string -> 'a typ -> 'a ptr result
diff --git a/findlib-1/ctypes/Ctypes/module-type-TYPE/Intptr/Infix/index.html b/findlib-1/ctypes/Ctypes/module-type-TYPE/Intptr/Infix/index.html new file mode 100644 index 000000000..1dff66481 --- /dev/null +++ b/findlib-1/ctypes/Ctypes/module-type-TYPE/Intptr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.Ctypes.TYPE.Intptr.Infix)

Module Intptr.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/Ctypes/module-type-TYPE/Intptr/index.html b/findlib-1/ctypes/Ctypes/module-type-TYPE/Intptr/index.html new file mode 100644 index 000000000..95dd69910 --- /dev/null +++ b/findlib-1/ctypes/Ctypes/module-type-TYPE/Intptr/index.html @@ -0,0 +1,2 @@ + +Intptr (docs.findlib-1.ctypes.Ctypes.TYPE.Intptr)

Module TYPE.Intptr

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/Ctypes/module-type-TYPE/Ptrdiff/Infix/index.html b/findlib-1/ctypes/Ctypes/module-type-TYPE/Ptrdiff/Infix/index.html new file mode 100644 index 000000000..4939dfe47 --- /dev/null +++ b/findlib-1/ctypes/Ctypes/module-type-TYPE/Ptrdiff/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.Ctypes.TYPE.Ptrdiff.Infix)

Module Ptrdiff.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/Ctypes/module-type-TYPE/Ptrdiff/index.html b/findlib-1/ctypes/Ctypes/module-type-TYPE/Ptrdiff/index.html new file mode 100644 index 000000000..0bc1c4b7a --- /dev/null +++ b/findlib-1/ctypes/Ctypes/module-type-TYPE/Ptrdiff/index.html @@ -0,0 +1,2 @@ + +Ptrdiff (docs.findlib-1.ctypes.Ctypes.TYPE.Ptrdiff)

Module TYPE.Ptrdiff

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/Ctypes/module-type-TYPE/Uintptr/Infix/index.html b/findlib-1/ctypes/Ctypes/module-type-TYPE/Uintptr/Infix/index.html new file mode 100644 index 000000000..2c2340763 --- /dev/null +++ b/findlib-1/ctypes/Ctypes/module-type-TYPE/Uintptr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.Ctypes.TYPE.Uintptr.Infix)

Module Uintptr.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/Ctypes/module-type-TYPE/Uintptr/index.html b/findlib-1/ctypes/Ctypes/module-type-TYPE/Uintptr/index.html new file mode 100644 index 000000000..d3bc83c59 --- /dev/null +++ b/findlib-1/ctypes/Ctypes/module-type-TYPE/Uintptr/index.html @@ -0,0 +1,2 @@ + +Uintptr (docs.findlib-1.ctypes.Ctypes.TYPE.Uintptr)

Module TYPE.Uintptr

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Unsigned.Infix with type t := t
diff --git a/findlib-1/ctypes/Ctypes/module-type-TYPE/index.html b/findlib-1/ctypes/Ctypes/module-type-TYPE/index.html new file mode 100644 index 000000000..5810fcecd --- /dev/null +++ b/findlib-1/ctypes/Ctypes/module-type-TYPE/index.html @@ -0,0 +1,49 @@ + +TYPE (docs.findlib-1.ctypes.Ctypes.TYPE)

Module type Ctypes.TYPE

Foreign types binding interface.

The Cstubs module builds concrete implementations.

include Ctypes_types.TYPE

Values representing C types

type 'a typ

The type of values representing C types. There are two types associated with each typ value: the C type used to store and pass values, and the corresponding OCaml type. The type parameter indicates the OCaml type, so a value of type t typ is used to read and write OCaml values of type t. There are various uses of typ values, including

  • constructing function types for binding native functions using Foreign.foreign
  • constructing pointers for reading and writing locations in C-managed storage using ptr
  • describing the fields of structured types built with structure and union.

The void type

val void : unit typ

Value representing the C void type. Void values appear in OCaml as the unit type, so using void in an argument or result type specification produces a function which accepts or returns unit.

Dereferencing a pointer to void is an error, as in C, and will raise IncompleteType.

Scalar types

The scalar types consist of the Arithmetic types and the Pointer types.

Arithmetic types

The arithmetic types consist of the signed and unsigned integer types (including character types) and the floating types. There are values representing both exact-width integer types (of 8, 16, 32 and 64 bits) and types whose size depend on the platform (signed and unsigned short, int, long, long long).

val char : char typ

Value representing the C type char.

Signed integer types
val schar : int typ

Value representing the C type signed char.

val short : int typ

Value representing the C type (signed) short.

val int : int typ

Value representing the C type (signed) int.

val long : Signed.long typ

Value representing the C type (signed) long.

val llong : Signed.llong typ

Value representing the C type (signed) long long.

val nativeint : nativeint typ

Value representing the C type (signed) int.

val int8_t : int typ

Value representing an 8-bit signed integer C type.

val int16_t : int typ

Value representing a 16-bit signed integer C type.

val int32_t : int32 typ

Value representing a 32-bit signed integer C type.

val int64_t : int64 typ

Value representing a 64-bit signed integer C type.

module Intptr : Signed.S
val intptr_t : Intptr.t typ

Value representing the C type intptr_t.

module Ptrdiff : Signed.S
val ptrdiff_t : Ptrdiff.t typ

Value representing the C type ptrdiff_t.

val camlint : int typ

Value representing an integer type with the same storage requirements as an OCaml int.

Unsigned integer types
val uchar : Unsigned.uchar typ

Value representing the C type unsigned char.

val bool : bool typ

Value representing the C type bool.

val uint8_t : Unsigned.uint8 typ

Value representing an 8-bit unsigned integer C type.

val uint16_t : Unsigned.uint16 typ

Value representing a 16-bit unsigned integer C type.

val uint32_t : Unsigned.uint32 typ

Value representing a 32-bit unsigned integer C type.

val uint64_t : Unsigned.uint64 typ

Value representing a 64-bit unsigned integer C type.

val size_t : Unsigned.size_t typ

Value representing the C type size_t, an alias for one of the unsigned integer types. The actual size and alignment requirements for size_t vary between platforms.

val ushort : Unsigned.ushort typ

Value representing the C type unsigned short.

val sint : Signed.sint typ

Value representing the C type int.

val uint : Unsigned.uint typ

Value representing the C type unsigned int.

val ulong : Unsigned.ulong typ

Value representing the C type unsigned long.

val ullong : Unsigned.ullong typ

Value representing the C type unsigned long long.

val uintptr_t : Uintptr.t typ

Value representing the C type uintptr_t.

Floating types
val float : float typ

Value representing the C single-precision float type.

val double : float typ

Value representing the C type double.

val ldouble : LDouble.t typ

Value representing the C type long double.

Complex types
val complex32 : Complex.t typ

Value representing the C99 single-precision float complex type.

val complex64 : Complex.t typ

Value representing the C99 double-precision double complex type.

val complexld : ComplexL.t typ

Value representing the C99 long-double-precision long double complex type.

Pointer types
C-compatible pointers
val ptr : 'a typ -> 'a Ctypes_static.ptr typ

Construct a pointer type from an existing type (called the reference type).

val ptr_opt : 'a typ -> 'a Ctypes_static.ptr option typ

Construct a pointer type from an existing type (called the reference type). This behaves like ptr, except that null pointers appear in OCaml as None.

val string : string typ

A high-level representation of the string type.

On the C side this behaves like char *; on the OCaml side values read and written using string are simply native OCaml strings.

To avoid problems with the garbage collector, values passed using string are copied into immovable C-managed storage before being passed to C.

The string type representation is suitable for use in function argument types such as the following:

string @-> returning int

where the lifetime of the C-managed storage does not need to extend beyond the duration of the function call. However, it is not suitable for use in struct or union fields

field s "x" string

because it does not provide a way to manage the lifetime of the C-managed storage.

val string_opt : string option typ

A high-level representation of the string type. This behaves like string, except that null pointers appear in OCaml as None.

OCaml pointers
val ocaml_string : string Ctypes_static.ocaml typ

Value representing the directly mapped storage of an OCaml string.

val ocaml_bytes : bytes Ctypes_static.ocaml typ

Value representing the directly mapped storage of an OCaml byte array.

Array types

C array types
val array : int -> 'a typ -> 'a Ctypes_static.carray typ

Construct a sized array type from a length and an existing type (called the element type).

Bigarray types
val bigarray : + < element : 'a + ; layout : Bigarray_compat.c_layout + ; ba_repr : 'b + ; dims : 'dims + ; bigarray : 'bigarray + ; carray : _ > + Ctypes_static.bigarray_class -> + 'dims -> + ('a, 'b) Bigarray_compat.kind -> + 'bigarray typ

Construct a sized C-layout bigarray type representation from a bigarray class, the dimensions, and the Bigarray_compat.kind.

val fortran_bigarray : + < element : 'a + ; layout : Bigarray_compat.fortran_layout + ; ba_repr : 'b + ; dims : 'dims + ; bigarray : 'bigarray + ; carray : _ > + Ctypes_static.bigarray_class -> + 'dims -> + ('a, 'b) Bigarray_compat.kind -> + 'bigarray typ

Construct a sized Fortran-layout bigarray type representation from a bigarray class, the dimensions, and the Bigarray_compat.kind.

val typ_of_bigarray_kind : ('a, 'b) Bigarray_compat.kind -> 'a typ

typ_of_bigarray_kind k is the type corresponding to the Bigarray kind k.

Struct and union types

type ('a, 't) field
val structure : string -> 's Ctypes_static.structure typ

Construct a new structure type. The type value returned is incomplete and can be updated using field until it is passed to seal, at which point the set of fields is fixed.

The type ('_s structure typ) of the expression returned by the call structure tag includes a weak type variable, which can be explicitly instantiated to ensure that the OCaml values representing different C structure types have incompatible types. Typical usage is as follows:

type tagname

let tagname : tagname structure typ = structure "tagname"

val union : string -> 's Ctypes_static.union typ

Construct a new union type. This behaves analogously to structure; fields are added with field.

val field : + 't typ -> + string -> + 'a typ -> + ('a, ('s, [< `Struct | `Union ]) Ctypes_static.structured as 't) field

field ty label ty' adds a field of type ty' with label label to the structure or union type ty and returns a field value that can be used to read and write the field in structure or union instances (e.g. using getf and setf).

Attempting to add a field to a union type that has been sealed with seal is an error, and will raise ModifyingSealedType.

val seal : (_, [< `Struct | `Union ]) Ctypes_static.structured typ -> unit

seal t completes the struct or union type t so that no further fields can be added. Struct and union types must be sealed before they can be used in a way that involves their size or alignment; see the documentation for IncompleteType for further details.

View types

val view : + ?format_typ:((Format.formatter -> unit) -> Format.formatter -> unit) -> + ?format:(Format.formatter -> 'b -> unit) -> + read:('a -> 'b) -> + write:('b -> 'a) -> + 'a typ -> + 'b typ

view ~read:r ~write:w t creates a C type representation t' which behaves like t except that values read using t' are subsequently transformed using the function r and values written using t' are first transformed using the function w.

For example, given suitable definitions of string_of_char_ptr and char_ptr_of_string, the type representation

view ~read:string_of_char_ptr ~write:char_ptr_of_string (ptr char)

can be used to pass OCaml strings directly to and from bound C functions, or to read and write string members in structs and arrays. (In fact, the string type representation is defined in exactly this way.)

The optional argument format_typ is used by the Ctypes.format_typ and string_of_typ functions to print the type at the top level and elsewhere. If format_typ is not supplied the printer for t is used instead.

The optional argument format is used by the Ctypes.format and string_of functions to print the values. If format_val is not supplied the printer for t is used instead.

val typedef : 'a typ -> string -> 'a typ

typedef t name creates a C type representation t' which is equivalent to t except its name is printed as name.

This is useful when generating C stubs involving "anonymous" types, for example: typedef struct { int f } typedef_name;

Abstract types

val abstract : + name:string -> + size:int -> + alignment:int -> + 'a Ctypes_static.abstract typ

Create an abstract type specification from the size and alignment requirements for the type.

Injection of concrete types

val lift_typ : 'a Ctypes_static.typ -> 'a typ

lift_typ t turns a concrete type representation into an abstract type representation.

For example, retrieving struct layout from C involves working with an abstract representation of types which do not support operations such as sizeof. The lift_typ function makes it possible to use concrete type representations wherever such abstract type representations are needed.

Function types

Abstract interface to C function type descriptions

type 'a fn = 'a Ctypes_static.fn

The type of values representing C function types. A value of type t fn can be used to bind to C functions and to describe type of OCaml functions passed to C.

val (@->) : 'a typ -> 'b fn -> ('a -> 'b) fn

Construct a function type from a type and an existing function type. This corresponds to prepending a parameter to a C function parameter list. For example,

int @-> ptr void @-> returning float

describes a function type that accepts two arguments -- an integer and a pointer to void -- and returns a float.

val returning : 'a typ -> 'a fn

Give the return type of a C function. Note that returning is intended to be used together with (@->); see the documentation for (@->) for an example.

type 'a static_funptr = 'a Ctypes_static.static_funptr

Function pointer types

The type of values representing C function pointer types.

val static_funptr : 'a fn -> 'a Ctypes_static.static_funptr typ

Construct a function pointer type from an existing function type (called the reference type).

val const : 'a typ -> 'a typ
type 'a const
val constant : string -> 'a typ -> 'a const

constant name typ retrieves the value of the compile-time constant name of type typ. It can be used to retrieve enum constants, #defined values and other integer constant expressions.

The type typ must be either an integer type such as bool, char, int, uint8, etc., or a view (or perhaps multiple views) where the underlying type is an integer type.

When the value of the constant cannot be represented in the type there will typically be a diagnostic from either the C compiler or the OCaml compiler. For example, gcc will say

warning: overflow in implicit constant conversion

val enum : + string -> + ?typedef:bool -> + ?unexpected:(int64 -> 'a) -> + ('a * int64 const) list -> + 'a typ

enum name ?unexpected alist builds a type representation for the enum named name. The size and alignment are retrieved so that the resulting type can be used everywhere an integer type can be used: as an array element or struct member, as an argument or return value, etc.

The value alist is an association list of OCaml values and values retrieved by the constant function. For example, to expose the enum

enum letters { A, B, C = 10, D };

you might first retrieve the values of the enumeration constants:

let a = constant "A" int64_t
+and b = constant "B" int64_t
+and c = constant "C" int64_t
+and d = constant "D" int64_t

and then build the enumeration type

let letters = enum "letters" [
+   `A, a;
+   `B, b;
+   `C, c;
+   `D, d;
+] ~unexpected:(fun i -> `E i)

The unexpected function specifies the value to return in the case that some unexpected value is encountered -- for example, if a function with the return type 'enum letters' actually returns the value -1.

The optional flag typedef specifies whether the first argument, name, indicates an tag or an alias. If typedef is false (the default) then name is treated as an enumeration tag:

enum letters { ... }

If typedef is true then name is instead treated as an alias:

typedef enum { ... } letters

diff --git a/findlib-1/ctypes/Ctypes_bigarray/index.html b/findlib-1/ctypes/Ctypes_bigarray/index.html new file mode 100644 index 000000000..d4d1b3b30 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_bigarray/index.html @@ -0,0 +1,25 @@ + +Ctypes_bigarray (docs.findlib-1.ctypes.Ctypes_bigarray)

Module Ctypes_bigarray

Types

type ('a, 'b, 'l) t

The type of bigarray values of particular sizes. A value of type (a, b, l) t can be used to read and write values of type b.

Type constructors

val bigarray : + int array -> + ('a, 'b) Bigarray_compat.kind -> + 'l Bigarray_compat.layout -> + ('a, ('a, 'b, 'l) Bigarray_compat.Genarray.t, 'l) t

Create a t value for the Bigarray.Genarray.t type.

val bigarray1 : + int -> + ('a, 'b) Bigarray_compat.kind -> + 'l Bigarray_compat.layout -> + ('a, ('a, 'b, 'l) Bigarray_compat.Array1.t, 'l) t

Create a t value for the Bigarray.Array1.t type.

val bigarray2 : + int -> + int -> + ('a, 'b) Bigarray_compat.kind -> + 'l Bigarray_compat.layout -> + ('a, ('a, 'b, 'l) Bigarray_compat.Array2.t, 'l) t

Create a t value for the Bigarray.Array2.t type.

val bigarray3 : + int -> + int -> + int -> + ('a, 'b) Bigarray_compat.kind -> + 'l Bigarray_compat.layout -> + ('a, ('a, 'b, 'l) Bigarray_compat.Array3.t, 'l) t

Create a t value for the Bigarray.Array3.t type.

val prim_of_kind : + ('a, _) Bigarray_compat.kind -> + 'a Ctypes_primitive_types.prim

Create a Ctypes_ptr.Types.ctype for a Bigarray.kind.

Type eliminators

val sizeof : (_, _, _) t -> int

Compute the size of a bigarray type.

val alignment : (_, _, _) t -> int

Compute the alignment of a bigarray type.

val element_type : ('a, _, _) t -> 'a Ctypes_primitive_types.prim

Compute the element type of a bigarray type.

val dimensions : (_, _, _) t -> int array

Compute the dimensions of a bigarray type.

val type_expression : + ('a, 'b, 'l) t -> + [> `Appl of string list * 'c list | `Ident of string list ] as 'c

Compute a type expression that denotes a bigarray type.

Values

val unsafe_address : 'a -> Ctypes_ptr.voidp

Return the address of a bigarray value. This function is unsafe because it dissociates the raw address of the C array from the OCaml object that manages the lifetime of the array. If the caller does not hold a reference to the OCaml object then the array might be freed, invalidating the address.

val view : (_, 'a, _) t -> (_ option, _) Ctypes_ptr.Fat.t -> 'a

view b ptr creates a bigarray view onto existing memory.

If ptr references an OCaml object then view will ensure that that object is not collected before the bigarray returned by view.

diff --git a/findlib-1/ctypes/Ctypes_bigarray_stubs/index.html b/findlib-1/ctypes/Ctypes_bigarray_stubs/index.html new file mode 100644 index 000000000..55c6b338c --- /dev/null +++ b/findlib-1/ctypes/Ctypes_bigarray_stubs/index.html @@ -0,0 +1,22 @@ + +Ctypes_bigarray_stubs (docs.findlib-1.ctypes.Ctypes_bigarray_stubs)

Module Ctypes_bigarray_stubs

type _ kind =
  1. | Kind_float32 : float kind
  2. | Kind_float64 : float kind
  3. | Kind_int8_signed : int kind
  4. | Kind_int8_unsigned : int kind
  5. | Kind_int16_signed : int kind
  6. | Kind_int16_unsigned : int kind
  7. | Kind_int32 : int32 kind
  8. | Kind_int64 : int64 kind
  9. | Kind_int : int kind
  10. | Kind_nativeint : nativeint kind
  11. | Kind_complex32 : Complex.t kind
  12. | Kind_complex64 : Complex.t kind
  13. | Kind_char : char kind
val kind : 'a 'b. ('a, 'b) Bigarray_compat.kind -> 'a kind
val address : 'b -> Ctypes_ptr.voidp
val view : + 'a kind -> + dims:int array -> + (_, _) Ctypes_ptr.Fat.t -> + 'l Bigarray_compat.layout -> + ('a, 'b, 'l) Bigarray_compat.Genarray.t
val view1 : + 'a kind -> + dims:int array -> + (_, _) Ctypes_ptr.Fat.t -> + 'l Bigarray_compat.layout -> + ('a, 'b, 'l) Bigarray_compat.Array1.t
val view2 : + 'a kind -> + dims:int array -> + (_, _) Ctypes_ptr.Fat.t -> + 'l Bigarray_compat.layout -> + ('a, 'b, 'l) Bigarray_compat.Array2.t
val view3 : + 'a kind -> + dims:int array -> + (_, _) Ctypes_ptr.Fat.t -> + 'l Bigarray_compat.layout -> + ('a, 'b, 'l) Bigarray_compat.Array3.t
diff --git a/findlib-1/ctypes/Ctypes_coerce/index.html b/findlib-1/ctypes/Ctypes_coerce/index.html new file mode 100644 index 000000000..f7c57ba7e --- /dev/null +++ b/findlib-1/ctypes/Ctypes_coerce/index.html @@ -0,0 +1,2 @@ + +Ctypes_coerce (docs.findlib-1.ctypes.Ctypes_coerce)

Module Ctypes_coerce

type uncoercible_info
exception Uncoercible of uncoercible_info
val coerce : 'a Ctypes_static.typ -> 'b Ctypes_static.typ -> 'a -> 'b
val coerce_fn : 'a Ctypes_static.fn -> 'b Ctypes_static.fn -> 'a -> 'b
diff --git a/findlib-1/ctypes/Ctypes_memory/CArray/index.html b/findlib-1/ctypes/Ctypes_memory/CArray/index.html new file mode 100644 index 000000000..216ed3b43 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_memory/CArray/index.html @@ -0,0 +1,15 @@ + +CArray (docs.findlib-1.ctypes.Ctypes_memory.CArray)

Module Ctypes_memory.CArray

type 'a t = 'a Ctypes_static.carray
val check_bound : 'a Ctypes_static.carray -> int -> unit
val unsafe_get : 'a Ctypes_static.carray -> int -> 'b
val unsafe_set : 'a Ctypes_static.carray -> int -> 'b -> unit
val get : 'a Ctypes_static.carray -> int -> 'b
val set : 'a Ctypes_static.carray -> int -> 'b -> unit
val length : 'a Ctypes_static.carray -> int
val from_ptr : 'a Ctypes_static.ptr -> int -> 'a Ctypes_static.carray
val fill : 'a Ctypes_static.carray -> 'b -> unit
val make : + 'a. ?finalise:('a t -> unit) -> + 'a Ctypes_static.typ -> + ?initial:'a -> + int -> + 'a t
val sub : + 'a Ctypes_static.carray -> + pos:int -> + length:int -> + 'b Ctypes_static.carray
val element_type : 'a Ctypes_static.carray -> 'b Ctypes_static.typ
val of_string : string -> char t
val of_list : 'a Ctypes_static.typ -> 'b list -> 'a t
val to_list : 'a Ctypes_static.carray -> 'b list
val iter : ('a -> 'b) -> 'c Ctypes_static.carray -> unit
val iteri : (int -> 'a -> 'b) -> 'c Ctypes_static.carray -> unit
val map : 'a Ctypes_static.typ -> ('b -> 'c) -> 'd Ctypes_static.carray -> 'a t
val mapi : + 'a Ctypes_static.typ -> + (int -> 'b -> 'c) -> + 'd Ctypes_static.carray -> + 'a t
val fold_left : ('a -> 'b -> 'c) -> 'd -> 'e Ctypes_static.carray -> 'f
val fold_right : ('a -> 'b -> 'c) -> 'd Ctypes_static.carray -> 'e -> 'f
diff --git a/findlib-1/ctypes/Ctypes_memory/Root/index.html b/findlib-1/ctypes/Ctypes_memory/Root/index.html new file mode 100644 index 000000000..dcd080eb3 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_memory/Root/index.html @@ -0,0 +1,2 @@ + +Root (docs.findlib-1.ctypes.Ctypes_memory.Root)

Module Ctypes_memory.Root

module Stubs = Ctypes_roots_stubs
val raw_addr : unit Ctypes_static.ptr -> Raw.t
val create : 'a. 'a -> unit Ctypes_static.ptr
val get : 'a. unit Ctypes_static.ptr -> 'a
val set : 'a. unit Ctypes_static.ptr -> 'a -> unit
val release : unit Ctypes_static.ptr -> unit
diff --git a/findlib-1/ctypes/Ctypes_memory/index.html b/findlib-1/ctypes/Ctypes_memory/index.html new file mode 100644 index 000000000..aadf94d2b --- /dev/null +++ b/findlib-1/ctypes/Ctypes_memory/index.html @@ -0,0 +1,171 @@ + +Ctypes_memory (docs.findlib-1.ctypes.Ctypes_memory)

Module Ctypes_memory

module Stubs = Ctypes_memory_stubs
module Raw = Ctypes_ptr.Raw
module Fat = Ctypes_ptr.Fat
val castp : + 'a Ctypes_static.typ -> + ('b, [ `C ]) Ctypes_static.pointer -> + ('a, [ `C ]) Ctypes_static.pointer
val make_unmanaged : reftyp:'a -> Ctypes_ptr.voidp -> ('b option, 'c) Fat.t
val build : + 'a 'b. 'a Ctypes_static.typ -> + ('c, 'b Ctypes_static.typ) Fat.t -> + 'a
val write : 'a 'b. 'a Ctypes_static.typ -> 'a -> ('c, 'b) Fat.t -> unit
val null : unit Ctypes_static.ptr
val (!@) : 'a. 'a Ctypes_static.ptr -> 'a
val ptr_diff : + 'a 'b. ('a, 'b) Ctypes_static.pointer -> + ('a, 'b) Ctypes_static.pointer -> + int
val (+@) : + 'a 'b. ('a, 'b) Ctypes_static.pointer -> + int -> + ('a, 'b) Ctypes_static.pointer
val (-@) : + ('a, 'b) Ctypes_static.pointer -> + int -> + ('a, 'b) Ctypes_static.pointer
val (<-@) : 'a. 'a Ctypes_static.ptr -> 'a -> unit
val from_voidp : + 'a Ctypes_static.typ -> + ('b, [ `C ]) Ctypes_static.pointer -> + ('a, [ `C ]) Ctypes_static.pointer
val to_voidp : + ('a, [ `C ]) Ctypes_static.pointer -> + (unit, [ `C ]) Ctypes_static.pointer
val allocate_n : + 'a. ?finalise:('a Ctypes_static.ptr -> unit) -> + 'a Ctypes_static.typ -> + count:int -> + 'a Ctypes_static.ptr
val allocate : + 'a. ?finalise:('a Ctypes_static.ptr -> unit) -> + 'a Ctypes_static.typ -> + 'a -> + 'a Ctypes_static.ptr
val ptr_compare : + ('a, [ `C ]) Ctypes_static.pointer -> + ('b, [ `C ]) Ctypes_static.pointer -> + int
val reference_type : ('a, [ `C ]) Ctypes_static.pointer -> 'b Ctypes_static.typ
val ptr_of_raw_address : + Ctypes_ptr.voidp -> + (unit, [ `C ]) Ctypes_static.pointer
val funptr_of_raw_address : + Ctypes_ptr.voidp -> + (unit -> unit) Ctypes_static.static_funptr
val raw_address_of_ptr : ('a, [ `C ]) Ctypes_static.pointer -> Ctypes_ptr.voidp
module CArray : sig ... end
val make : + ?finalise:(('a, 'b) Ctypes_static.structured -> unit) -> + ('c, 'd) Ctypes_static.structured Ctypes_static.typ -> + ('c, 'd) Ctypes_static.structured
val (|->) : + ('a, [ `C ]) Ctypes_static.pointer -> + ('b, 'c) Ctypes_static.field -> + ('d, [ `C ]) Ctypes_static.pointer
val (@.) : + ('a, 'b) Ctypes_static.structured -> + ('c, 'd) Ctypes_static.field -> + ('c, [ `C ]) Ctypes_static.pointer
val setf : + ('a, 'b) Ctypes_static.structured -> + ('c, 'd) Ctypes_static.field -> + 'e -> + unit
val getf : + ('a, 'b) Ctypes_static.structured -> + ('c, 'd) Ctypes_static.field -> + 'e
val _bigarray_start : + ('a, 'b) Bigarray_compat.kind -> + 'c -> + ('d, [ `C ]) Ctypes_static.pointer
val bigarray_kind : + 'a 'b 'c 'd 'f 'l. < ba_repr : 'f + ; bigarray : 'b + ; carray : 'c + ; dims : 'd + ; element : 'a + ; layout : 'l > + Ctypes_static.bigarray_class -> + 'b -> + ('a, 'f) Bigarray.kind
val bigarray_start : + < ba_repr : 'a + ; bigarray : 'b + ; carray : 'c + ; dims : 'd + ; element : 'e + ; layout : 'f > + Ctypes_static.bigarray_class -> + 'g -> + ('h, [ `C ]) Ctypes_static.pointer
val array_of_bigarray : + 'a 'b 'c 'd 'e. < ba_repr : 'e + ; bigarray : 'b + ; carray : 'c + ; dims : 'd + ; element : 'a + ; layout : Bigarray.c_layout > + Ctypes_static.bigarray_class -> + 'b -> + 'c
val bigarray_elements : + 'a 'b 'c 'd 'f 'l. < ba_repr : 'f + ; bigarray : 'b + ; carray : 'c + ; dims : 'd + ; element : 'a + ; layout : 'l > + Ctypes_static.bigarray_class -> + 'd -> + int
val bigarray_of_ptr : + < ba_repr : 'a + ; bigarray : 'b + ; carray : 'c + ; dims : 'd + ; element : 'e + ; layout : Bigarray_compat.c_layout > + Ctypes_static.bigarray_class -> + 'f -> + ('e, 'a) Bigarray_compat.kind -> + ('g, [ `C ]) Ctypes_static.pointer -> + 'h
val fortran_bigarray_of_ptr : + < ba_repr : 'a + ; bigarray : 'b + ; carray : 'c + ; dims : 'd + ; element : 'e + ; layout : Bigarray_compat.fortran_layout > + Ctypes_static.bigarray_class -> + 'f -> + ('e, 'a) Bigarray_compat.kind -> + ('g, [ `C ]) Ctypes_static.pointer -> + 'h
val array_dims : + 'a 'b 'c 'd 'f 'l. < ba_repr : 'f + ; bigarray : 'b + ; carray : 'c Ctypes_static.carray + ; dims : 'd + ; element : 'a + ; layout : 'l > + Ctypes_static.bigarray_class -> + 'c Ctypes_static.carray -> + 'd
val bigarray_of_array : + < ba_repr : 'a + ; bigarray : 'b + ; carray : 'c Ctypes_static.carray + ; dims : 'd + ; element : 'e + ; layout : Bigarray_compat.c_layout > + Ctypes_static.bigarray_class -> + ('e, 'a) Bigarray_compat.kind -> + 'f Ctypes_static.carray -> + 'g
val genarray : + < ba_repr : 'a + ; bigarray : ('b, 'a, 'c) Bigarray_compat.Genarray.t + ; carray : 'b Ctypes_static.carray + ; dims : int array + ; element : 'b + ; layout : 'c > + Ctypes_static.bigarray_class
val array1 : + < ba_repr : 'a + ; bigarray : ('b, 'a, 'c) Bigarray_compat.Array1.t + ; carray : 'b Ctypes_static.carray + ; dims : int + ; element : 'b + ; layout : 'c > + Ctypes_static.bigarray_class
val array2 : + < ba_repr : 'a + ; bigarray : ('b, 'a, 'c) Bigarray_compat.Array2.t + ; carray : 'b Ctypes_static.carray Ctypes_static.carray + ; dims : int * int + ; element : 'b + ; layout : 'c > + Ctypes_static.bigarray_class
val array3 : + < ba_repr : 'a + ; bigarray : ('b, 'a, 'c) Bigarray_compat.Array3.t + ; carray : + 'b Ctypes_static.carray Ctypes_static.carray Ctypes_static.carray + ; dims : int * int * int + ; element : 'b + ; layout : 'c > + Ctypes_static.bigarray_class
val typ_of_bigarray_kind : + ('a, 'b) Bigarray_compat.kind -> + 'c Ctypes_static.typ
val string_from_ptr : + ('a, [ `C ]) Ctypes_static.pointer -> + length:int -> + string
val ocaml_string_start : string -> (string, [ `OCaml ]) Ctypes_static.pointer
val ocaml_bytes_start : bytes -> (bytes, [ `OCaml ]) Ctypes_static.pointer
val ocaml_float_array_start : + float array -> + (float array, [ `OCaml ]) Ctypes_static.pointer
module Root : sig ... end
val is_null : ('a, [ `C ]) Ctypes_static.pointer -> bool
diff --git a/findlib-1/ctypes/Ctypes_memory_stubs/Pointer/index.html b/findlib-1/ctypes/Ctypes_memory_stubs/Pointer/index.html new file mode 100644 index 000000000..1fe273400 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_memory_stubs/Pointer/index.html @@ -0,0 +1,2 @@ + +Pointer (docs.findlib-1.ctypes.Ctypes_memory_stubs.Pointer)

Module Ctypes_memory_stubs.Pointer

val read : (_, _) Ctypes_ptr.Fat.t -> Ctypes_ptr.voidp
val write : (_, _) Ctypes_ptr.Fat.t -> (_, _) Ctypes_ptr.Fat.t -> unit
diff --git a/findlib-1/ctypes/Ctypes_memory_stubs/index.html b/findlib-1/ctypes/Ctypes_memory_stubs/index.html new file mode 100644 index 000000000..eefac9613 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_memory_stubs/index.html @@ -0,0 +1,10 @@ + +Ctypes_memory_stubs (docs.findlib-1.ctypes.Ctypes_memory_stubs)

Module Ctypes_memory_stubs

type managed_buffer
val allocate : int -> int -> managed_buffer
val block_address : managed_buffer -> Ctypes_ptr.voidp
val read : 'a Ctypes_primitive_types.prim -> (_, _) Ctypes_ptr.Fat.t -> 'a
val write : + 'a Ctypes_primitive_types.prim -> + 'a -> + (_, _) Ctypes_ptr.Fat.t -> + unit
module Pointer : sig ... end
val memcpy : + dst:(_, _) Ctypes_ptr.Fat.t -> + src:(_, _) Ctypes_ptr.Fat.t -> + size:int -> + unit
val string_of_array : (_, _) Ctypes_ptr.Fat.t -> len:int -> string
val use_value : 'a -> unit
diff --git a/findlib-1/ctypes/Ctypes_primitive_types/index.html b/findlib-1/ctypes/Ctypes_primitive_types/index.html new file mode 100644 index 000000000..08cb62bd2 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_primitive_types/index.html @@ -0,0 +1,2 @@ + +Ctypes_primitive_types (docs.findlib-1.ctypes.Ctypes_primitive_types)

Module Ctypes_primitive_types

type _ prim =
  1. | Char : char prim
  2. | Schar : int prim
  3. | Uchar : Unsigned.uchar prim
  4. | Bool : bool prim
  5. | Short : int prim
  6. | Int : int prim
  7. | Long : Signed.long prim
  8. | Llong : Signed.llong prim
  9. | Ushort : Unsigned.ushort prim
  10. | Sint : Signed.sint prim
  11. | Uint : Unsigned.uint prim
  12. | Ulong : Unsigned.ulong prim
  13. | Ullong : Unsigned.ullong prim
  14. | Size_t : Unsigned.size_t prim
  15. | Int8_t : int prim
  16. | Int16_t : int prim
  17. | Int32_t : int32 prim
  18. | Int64_t : int64 prim
  19. | Uint8_t : Unsigned.uint8 prim
  20. | Uint16_t : Unsigned.uint16 prim
  21. | Uint32_t : Unsigned.uint32 prim
  22. | Uint64_t : Unsigned.uint64 prim
  23. | Camlint : int prim
  24. | Nativeint : nativeint prim
  25. | Float : float prim
  26. | Double : float prim
  27. | LDouble : LDouble.t prim
  28. | Complex32 : Complex.t prim
  29. | Complex64 : Complex.t prim
  30. | Complexld : ComplexL.t prim
type _ ml_prim =
  1. | ML_char : char ml_prim
  2. | ML_complex : Complex.t ml_prim
  3. | ML_complexld : ComplexL.t ml_prim
  4. | ML_float : float ml_prim
  5. | ML_ldouble : LDouble.t ml_prim
  6. | ML_int : int ml_prim
  7. | ML_int32 : int32 ml_prim
  8. | ML_int64 : int64 ml_prim
  9. | ML_llong : Signed.llong ml_prim
  10. | ML_long : Signed.long ml_prim
  11. | ML_sint : Signed.sint ml_prim
  12. | ML_nativeint : nativeint ml_prim
  13. | ML_size_t : Unsigned.size_t ml_prim
  14. | ML_uchar : Unsigned.uchar ml_prim
  15. | ML_bool : bool ml_prim
  16. | ML_uint : Unsigned.uint ml_prim
  17. | ML_uint16 : Unsigned.uint16 ml_prim
  18. | ML_uint32 : Unsigned.uint32 ml_prim
  19. | ML_uint64 : Unsigned.uint64 ml_prim
  20. | ML_uint8 : Unsigned.uint8 ml_prim
  21. | ML_ullong : Unsigned.ullong ml_prim
  22. | ML_ulong : Unsigned.ulong ml_prim
  23. | ML_ushort : Unsigned.ushort ml_prim
val ml_prim : 'a prim -> 'a ml_prim
diff --git a/findlib-1/ctypes/Ctypes_primitives/index.html b/findlib-1/ctypes/Ctypes_primitives/index.html new file mode 100644 index 000000000..1cb9e0596 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_primitives/index.html @@ -0,0 +1,2 @@ + +Ctypes_primitives (docs.findlib-1.ctypes.Ctypes_primitives)

Module Ctypes_primitives

val sizeof : 'a. 'a Ctypes_primitive_types.prim -> int
val alignment : 'a. 'a Ctypes_primitive_types.prim -> int
val name : 'a. 'a Ctypes_primitive_types.prim -> string
val format_string : 'a. 'a Ctypes_primitive_types.prim -> string option
val pointer_size : int
val pointer_alignment : int
diff --git a/findlib-1/ctypes/Ctypes_ptr/Fat/index.html b/findlib-1/ctypes/Ctypes_ptr/Fat/index.html new file mode 100644 index 000000000..cc02ddf61 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_ptr/Fat/index.html @@ -0,0 +1,2 @@ + +Fat (docs.findlib-1.ctypes.Ctypes_ptr.Fat)

Module Ctypes_ptr.Fat

type (_, _) t

A fat pointer, which holds a reference to the reference type, the C memory location, and an OCaml object.

val make : managed:'m -> reftyp:'typ -> voidp -> ('m, 'typ) t

make ?managed ~reftyp raw builds a fat pointer from the reference type reftyp, the C memory location raw, and (optionally) an OCaml value, managed. The managed argument may be used to manage the lifetime of the C object; a typical use it to attach a finaliser to managed which releases the memory associated with the C object whose address is stored in raw_ptr.

val is_null : (_, _) t -> bool
val reftype : (_, 'typ) t -> 'typ
val managed : ('m, _) t -> 'm
val set_managed : ('m, _) t -> 'm -> unit
val coerce : ('m, _) t -> 'typ -> ('m, 'typ) t
val unsafe_raw_addr : (_, _) t -> voidp

Return the raw pointer address. The function is unsafe in the sense that it dissociates the address from the value which manages the memory, which may trigger associated finalisers, invalidating the address.

val add_bytes : ('m, 'typ) t -> int -> ('m, 'typ) t
val compare : (_, 'typ) t -> (_, 'typ) t -> int
val diff_bytes : (_, 'typ) t -> (_, 'typ) t -> int
diff --git a/findlib-1/ctypes/Ctypes_ptr/Raw/index.html b/findlib-1/ctypes/Ctypes_ptr/Raw/index.html new file mode 100644 index 000000000..57dff2251 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_ptr/Raw/index.html @@ -0,0 +1,3 @@ + +Raw (docs.findlib-1.ctypes.Ctypes_ptr.Raw)

Module Ctypes_ptr.Raw

include module type of struct include Nativeint end
val zero : nativeint

The native integer 0.

val one : nativeint

The native integer 1.

val minus_one : nativeint

The native integer -1.

val neg : nativeint -> nativeint

Unary negation.

val add : nativeint -> nativeint -> nativeint

Addition.

val sub : nativeint -> nativeint -> nativeint

Subtraction.

val mul : nativeint -> nativeint -> nativeint

Multiplication.

val div : nativeint -> nativeint -> nativeint

Integer division. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val unsigned_div : nativeint -> nativeint -> nativeint

Same as div, except that arguments and result are interpreted as unsigned native integers.

  • since 4.08
val rem : nativeint -> nativeint -> nativeint

Integer remainder. If y is not zero, the result of Nativeint.rem x y satisfies the following properties: Nativeint.zero <= Nativeint.rem x y < Nativeint.abs y and x = Nativeint.add (Nativeint.mul (Nativeint.div x y) y) + (Nativeint.rem x y). If y = 0, Nativeint.rem x y raises Division_by_zero.

val unsigned_rem : nativeint -> nativeint -> nativeint

Same as rem, except that arguments and result are interpreted as unsigned native integers.

  • since 4.08
val succ : nativeint -> nativeint

Successor. Nativeint.succ x is Nativeint.add x Nativeint.one.

val pred : nativeint -> nativeint

Predecessor. Nativeint.pred x is Nativeint.sub x Nativeint.one.

val abs : nativeint -> nativeint

abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

val size : int

The size in bits of a native integer. This is equal to 32 on a 32-bit platform and to 64 on a 64-bit platform.

val max_int : nativeint

The greatest representable native integer, either 231 - 1 on a 32-bit platform, or 263 - 1 on a 64-bit platform.

val min_int : nativeint

The smallest representable native integer, either -231 on a 32-bit platform, or -263 on a 64-bit platform.

val logand : nativeint -> nativeint -> nativeint

Bitwise logical and.

val logor : nativeint -> nativeint -> nativeint

Bitwise logical or.

val logxor : nativeint -> nativeint -> nativeint

Bitwise logical exclusive or.

val lognot : nativeint -> nativeint

Bitwise logical negation.

val shift_left : nativeint -> int -> nativeint

Nativeint.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= bitsize, where bitsize is 32 on a 32-bit platform and 64 on a 64-bit platform.

val shift_right : nativeint -> int -> nativeint

Nativeint.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= bitsize.

val shift_right_logical : nativeint -> int -> nativeint

Nativeint.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= bitsize.

val of_int : int -> nativeint

Convert the given integer (type int) to a native integer (type nativeint).

val to_int : nativeint -> int

Convert the given native integer (type nativeint) to an integer (type int). The high-order bit is lost during the conversion.

val unsigned_to_int : nativeint -> int option

Same as to_int, but interprets the argument as an unsigned integer. Returns None if the unsigned value of the argument cannot fit into an int.

  • since 4.08
val of_float : float -> nativeint

Convert the given floating-point number to a native integer, discarding the fractional part (truncate towards 0). If the truncated floating-point number is outside the range [Nativeint.min_int, Nativeint.max_int], no exception is raised, and an unspecified, platform-dependent integer is returned.

val to_float : nativeint -> float

Convert the given native integer to a floating-point number.

val of_int32 : int32 -> nativeint

Convert the given 32-bit integer (type int32) to a native integer.

val to_int32 : nativeint -> int32

Convert the given native integer to a 32-bit integer (type int32). On 64-bit platforms, the 64-bit native integer is taken modulo 232, i.e. the top 32 bits are lost. On 32-bit platforms, the conversion is exact.

val of_string : string -> nativeint

Convert the given string to a native integer. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.

The 0u prefix reads the input as an unsigned integer in the range [0, 2*Nativeint.max_int+1]. If the input exceeds Nativeint.max_int it is converted to the signed integer Int64.min_int + input - Nativeint.max_int - 1.

  • raises Failure

    if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type nativeint.

val of_string_opt : string -> nativeint option

Same as of_string, but return None instead of raising.

  • since 4.05
val to_string : nativeint -> string

Return the string representation of its argument, in decimal.

type t = nativeint

An alias for the type of native integers.

val compare : t -> t -> int

The comparison function for native integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Nativeint to be passed as argument to the functors Set.Make and Map.Make.

val unsigned_compare : t -> t -> int

Same as compare, except that arguments are interpreted as unsigned native integers.

  • since 4.08
val equal : t -> t -> bool

The equal function for native ints.

  • since 4.03
val min : t -> t -> t

Return the smaller of the two arguments.

  • since 4.13
val max : t -> t -> t

Return the greater of the two arguments.

  • since 4.13
val seeded_hash : int -> t -> int

A seeded hash function for native ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : t -> int

An unseeded hash function for native ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.1
val of_nativeint : 'a -> 'b
val to_nativeint : 'a -> 'b
val null : nativeint
diff --git a/findlib-1/ctypes/Ctypes_ptr/index.html b/findlib-1/ctypes/Ctypes_ptr/index.html new file mode 100644 index 000000000..d8ca7f639 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_ptr/index.html @@ -0,0 +1,2 @@ + +Ctypes_ptr (docs.findlib-1.ctypes.Ctypes_ptr)

Module Ctypes_ptr

module Raw : sig ... end
type voidp = Raw.t
module Fat : sig ... end
diff --git a/findlib-1/ctypes/Ctypes_roots_stubs/index.html b/findlib-1/ctypes/Ctypes_roots_stubs/index.html new file mode 100644 index 000000000..b6bcdfc92 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_roots_stubs/index.html @@ -0,0 +1,2 @@ + +Ctypes_roots_stubs (docs.findlib-1.ctypes.Ctypes_roots_stubs)

Module Ctypes_roots_stubs

val root : 'a -> Ctypes_ptr.voidp
val set : Ctypes_ptr.voidp -> 'a -> unit
val get : Ctypes_ptr.voidp -> 'a
val release : Ctypes_ptr.voidp -> unit
diff --git a/findlib-1/ctypes/Ctypes_static/index.html b/findlib-1/ctypes/Ctypes_static/index.html new file mode 100644 index 000000000..0b42b55a1 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_static/index.html @@ -0,0 +1,52 @@ + +Ctypes_static (docs.findlib-1.ctypes.Ctypes_static)

Module Ctypes_static

type abstract_type = {
  1. aname : string;
  2. asize : int;
  3. aalignment : int;
}
type _ ocaml_type =
  1. | String : string ocaml_type
  2. | Bytes : bytes ocaml_type
  3. | FloatArray : float array ocaml_type
type incomplete_size = {
  1. mutable isize : int;
}
type structured_spec = {
  1. size : int;
  2. align : int;
}
type 'a structspec =
  1. | Incomplete of incomplete_size
  2. | Complete of structured_spec
type qualifier =
  1. | Const
  2. | Volatile
type _ typ =
  1. | Void : unit typ
  2. | Primitive : 'a Ctypes_primitive_types.prim -> 'a typ
  3. | Pointer : 'a typ -> 'a ptr typ
  4. | Funptr : 'a fn -> 'a static_funptr typ
  5. | Struct : 'a structure_type -> 'a structure typ
  6. | Union : 'a union_type -> 'a union typ
  7. | Abstract : abstract_type -> 'a abstract typ
  8. | View : ('a, 'b) view -> 'a typ
  9. | Qualified : qualifier * 'a typ -> 'a typ
  10. | Array : 'a typ * int -> 'a carray typ
  11. | Bigarray : (_, 'a, _) Ctypes_bigarray.t -> 'a typ
  12. | OCaml : 'a ocaml_type -> 'a ocaml typ
and 'a carray = {
  1. astart : 'a ptr;
  2. alength : int;
}
and ('a, 'kind) structured = {
  1. structured : ('a, 'kind) structured ptr;
}
and 'a union = ('a, [ `Union ]) structured
and 'a structure = ('a, [ `Struct ]) structured
and 'a abstract = ('a, [ `Abstract ]) structured
and (_, _) pointer =
  1. | CPointer : (Obj.t option, 'a typ) Ctypes_ptr.Fat.t -> ('a, [ `C ]) pointer
  2. | OCamlRef : int * 'a * 'a ocaml_type -> ('a, [ `OCaml ]) pointer
and 'a ptr = ('a, [ `C ]) pointer
and 'a ocaml = ('a, [ `OCaml ]) pointer
and 'a static_funptr =
  1. | Static_funptr : (Obj.t option, 'a fn) Ctypes_ptr.Fat.t -> 'a static_funptr
and ('a, 'b) view = {
  1. read : 'b -> 'a;
  2. write : 'a -> 'b;
  3. format_typ : ((Format.formatter -> unit) -> Format.formatter -> unit) option;
  4. format : (Format.formatter -> 'a -> unit) option;
  5. ty : 'b typ;
}
and ('a, 's) field = {
  1. ftype : 'a typ;
  2. foffset : int;
  3. fname : string;
}
and 'a structure_type = {
  1. tag : string;
  2. mutable spec : 'a structspec;
  3. mutable fields : 'a structure boxed_field list;
}
and 'a union_type = {
  1. utag : string;
  2. mutable uspec : structured_spec option;
  3. mutable ufields : 'a union boxed_field list;
}
and 's boxed_field =
  1. | BoxedField : ('a, 's) field -> 's boxed_field
and _ fn =
  1. | Returns : 'a typ -> 'a fn
  2. | Function : 'a typ * 'b fn -> ('a -> 'b) fn
type _ bigarray_class =
  1. | Genarray : < element : 'a + ; layout : 'l + ; dims : int array + ; ba_repr : 'b + ; bigarray : ('a, 'b, 'l) Bigarray_compat.Genarray.t + ; carray : 'a carray > + bigarray_class
  2. | Array1 : < element : 'a + ; layout : 'l + ; dims : int + ; ba_repr : 'b + ; bigarray : ('a, 'b, 'l) Bigarray_compat.Array1.t + ; carray : 'a carray > + bigarray_class
  3. | Array2 : < element : 'a + ; layout : 'l + ; dims : int * int + ; ba_repr : 'b + ; bigarray : ('a, 'b, 'l) Bigarray_compat.Array2.t + ; carray : 'a carray carray > + bigarray_class
  4. | Array3 : < element : 'a + ; layout : 'l + ; dims : int * int * int + ; ba_repr : 'b + ; bigarray : ('a, 'b, 'l) Bigarray_compat.Array3.t + ; carray : 'a carray carray carray > + bigarray_class
type boxed_typ =
  1. | BoxedType : 'a typ -> boxed_typ
val sizeof : 'a typ -> int
val alignment : 'a typ -> int
val passable : 'a typ -> bool
val ocaml_value : 'a typ -> bool
val has_ocaml_argument : 'a fn -> bool
val void : unit typ
val char : char typ
val schar : int typ
val float : float typ
val double : float typ
val ldouble : LDouble.t typ
val complex32 : Complex.t typ
val complex64 : Complex.t typ
val complexld : ComplexL.t typ
val short : int typ
val int : int typ
val sint : Signed.sint typ
val long : Signed.long typ
val llong : Signed.llong typ
val nativeint : nativeint typ
val int8_t : int typ
val int16_t : int typ
val int32_t : Signed.Int32.t typ
val int64_t : Signed.Int64.t typ
val camlint : int typ
val uchar : Unsigned.uchar typ
val bool : bool typ
val uint8_t : Unsigned.UInt8.t typ
val uint16_t : Unsigned.UInt16.t typ
val uint32_t : Unsigned.UInt32.t typ
val uint64_t : Unsigned.UInt64.t typ
val size_t : Unsigned.size_t typ
val ushort : Unsigned.ushort typ
val uint : Unsigned.uint typ
val ulong : Unsigned.ulong typ
val ullong : Unsigned.ullong typ
val array : int -> 'a typ -> 'a carray typ
val ocaml_string : string ocaml typ
val ocaml_bytes : bytes ocaml typ
val ocaml_float_array : float array ocaml typ
val ptr : 'a typ -> 'a ptr typ
val (@->) : 'a typ -> 'b fn -> ('a -> 'b) fn
val abstract : name:string -> size:int -> alignment:int -> 'a abstract typ
val view : + ?format_typ:((Format.formatter -> unit) -> Format.formatter -> unit) -> + ?format:(Format.formatter -> 'b -> unit) -> + read:('a -> 'b) -> + write:('b -> 'a) -> + 'a typ -> + 'b typ
val typedef : 'a typ -> string -> 'a typ
val bigarray : + < ba_repr : 'c + ; bigarray : 'd + ; carray : 'e + ; dims : 'b + ; layout : Bigarray_compat.c_layout + ; element : 'a > + bigarray_class -> + 'b -> + ('a, 'c) Bigarray_compat.kind -> + 'd typ
val fortran_bigarray : + < ba_repr : 'c + ; bigarray : 'd + ; carray : 'e + ; dims : 'b + ; layout : Bigarray_compat.fortran_layout + ; element : 'a > + bigarray_class -> + 'b -> + ('a, 'c) Bigarray_compat.kind -> + 'd typ
val returning : 'a typ -> 'a fn
val static_funptr : 'a fn -> 'a static_funptr typ
val structure : string -> 'a structure typ
val union : string -> 'a union typ
val offsetof : ('a, 'b) field -> int
val field_type : ('a, 'b) field -> 'a typ
val field_name : ('a, 'b) field -> string
val const : 'a typ -> 'a typ
val volatile : 'a typ -> 'a typ
exception IncompleteType
exception ModifyingSealedType of string
exception Unsupported of string
val unsupported : ('a, unit, string, _) format4 -> 'a
type arithmetic =
  1. | Int8
  2. | Int16
  3. | Int32
  4. | Int64
  5. | Uint8
  6. | Uint16
  7. | Uint32
  8. | Uint64
  9. | Float
  10. | Double
diff --git a/findlib-1/ctypes/Ctypes_std_view_stubs/index.html b/findlib-1/ctypes/Ctypes_std_view_stubs/index.html new file mode 100644 index 000000000..c2cfab66a --- /dev/null +++ b/findlib-1/ctypes/Ctypes_std_view_stubs/index.html @@ -0,0 +1,2 @@ + +Ctypes_std_view_stubs (docs.findlib-1.ctypes.Ctypes_std_view_stubs)

Module Ctypes_std_view_stubs

val string_of_cstring : (_, char Ctypes_static.typ) Ctypes_ptr.Fat.t -> string
val cstring_of_string : string -> Ctypes_memory_stubs.managed_buffer
val uintptr_t_size : unit -> int
val intptr_t_size : unit -> int
val ptrdiff_t_size : unit -> int
diff --git a/findlib-1/ctypes/Ctypes_std_views/Intptr/Infix/index.html b/findlib-1/ctypes/Ctypes_std_views/Intptr/Infix/index.html new file mode 100644 index 000000000..cff6f0d89 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_std_views/Intptr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.Ctypes_std_views.Intptr.Infix)

Module Intptr.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/Ctypes_std_views/Intptr/index.html b/findlib-1/ctypes/Ctypes_std_views/Intptr/index.html new file mode 100644 index 000000000..959ec207d --- /dev/null +++ b/findlib-1/ctypes/Ctypes_std_views/Intptr/index.html @@ -0,0 +1,2 @@ + +Intptr (docs.findlib-1.ctypes.Ctypes_std_views.Intptr)

Module Ctypes_std_views.Intptr

include Signed.S
type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/Ctypes_std_views/Ptrdiff/Infix/index.html b/findlib-1/ctypes/Ctypes_std_views/Ptrdiff/Infix/index.html new file mode 100644 index 000000000..7aa2e77d5 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_std_views/Ptrdiff/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.Ctypes_std_views.Ptrdiff.Infix)

Module Ptrdiff.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/Ctypes_std_views/Ptrdiff/index.html b/findlib-1/ctypes/Ctypes_std_views/Ptrdiff/index.html new file mode 100644 index 000000000..031d5b84d --- /dev/null +++ b/findlib-1/ctypes/Ctypes_std_views/Ptrdiff/index.html @@ -0,0 +1,2 @@ + +Ptrdiff (docs.findlib-1.ctypes.Ctypes_std_views.Ptrdiff)

Module Ctypes_std_views.Ptrdiff

include Signed.S
type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/Ctypes_std_views/Uintptr/Infix/index.html b/findlib-1/ctypes/Ctypes_std_views/Uintptr/Infix/index.html new file mode 100644 index 000000000..b8b469389 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_std_views/Uintptr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.Ctypes_std_views.Uintptr.Infix)

Module Uintptr.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/Ctypes_std_views/Uintptr/index.html b/findlib-1/ctypes/Ctypes_std_views/Uintptr/index.html new file mode 100644 index 000000000..9cd0a8cb1 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_std_views/Uintptr/index.html @@ -0,0 +1,2 @@ + +Uintptr (docs.findlib-1.ctypes.Ctypes_std_views.Uintptr)

Module Ctypes_std_views.Uintptr

include Unsigned.S
type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Unsigned.Infix with type t := t
diff --git a/findlib-1/ctypes/Ctypes_std_views/index.html b/findlib-1/ctypes/Ctypes_std_views/index.html new file mode 100644 index 000000000..1231dc377 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_std_views/index.html @@ -0,0 +1,30 @@ + +Ctypes_std_views (docs.findlib-1.ctypes.Ctypes_std_views)

Module Ctypes_std_views

val string_of_char_ptr : (char, [ `C ]) Ctypes_static.pointer -> string
val char_ptr_of_string : string -> (char, [ `C ]) Ctypes_static.pointer
val string : string Ctypes_static.typ
val read_nullable : + 'a Ctypes_static.typ -> + 'b Ctypes_static.typ -> + 'b Ctypes_static.ptr -> + 'c option
val write_nullable : + 'a Ctypes_static.typ -> + 'b Ctypes_static.typ -> + 'c option -> + 'd Ctypes_static.ptr
val nullable_view : + ?format_typ:((Format.formatter -> unit) -> Format.formatter -> unit) -> + ?format:(Format.formatter -> 'a option -> unit) -> + 'b Ctypes_static.typ -> + 'c Ctypes_static.typ -> + 'a option Ctypes_static.typ
val read_nullable_funptr : + 'a Ctypes_static.typ -> + 'b Ctypes_static.fn -> + 'c Ctypes_static.static_funptr -> + 'd option
val write_nullable_funptr : + 'a Ctypes_static.typ -> + 'b Ctypes_static.fn -> + 'c option -> + 'b Ctypes_static.static_funptr
val nullable_funptr_view : + ?format_typ:((Format.formatter -> unit) -> Format.formatter -> unit) -> + ?format:(Format.formatter -> 'a option -> unit) -> + 'b Ctypes_static.typ -> + 'c Ctypes_static.fn -> + 'a option Ctypes_static.typ
val ptr_opt : + 'a Ctypes_static.typ -> + 'b Ctypes_static.ptr option Ctypes_static.typ
val string_opt : string option Ctypes_static.typ
module type Signed_type = sig ... end
module type Unsigned_type = sig ... end
val signed_typedef : string -> size:int -> (module Signed_type)
val unsigned_typedef : string -> size:int -> (module Unsigned_type)
diff --git a/findlib-1/ctypes/Ctypes_std_views/module-type-Signed_type/Infix/index.html b/findlib-1/ctypes/Ctypes_std_views/module-type-Signed_type/Infix/index.html new file mode 100644 index 000000000..b0ff80c6b --- /dev/null +++ b/findlib-1/ctypes/Ctypes_std_views/module-type-Signed_type/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.Ctypes_std_views.Signed_type.Infix)

Module Signed_type.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/Ctypes_std_views/module-type-Signed_type/index.html b/findlib-1/ctypes/Ctypes_std_views/module-type-Signed_type/index.html new file mode 100644 index 000000000..cdc8fc7a4 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_std_views/module-type-Signed_type/index.html @@ -0,0 +1,2 @@ + +Signed_type (docs.findlib-1.ctypes.Ctypes_std_views.Signed_type)

Module type Ctypes_std_views.Signed_type

include Signed.S
type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/Ctypes_std_views/module-type-Unsigned_type/Infix/index.html b/findlib-1/ctypes/Ctypes_std_views/module-type-Unsigned_type/Infix/index.html new file mode 100644 index 000000000..2d6ea29fc --- /dev/null +++ b/findlib-1/ctypes/Ctypes_std_views/module-type-Unsigned_type/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.Ctypes_std_views.Unsigned_type.Infix)

Module Unsigned_type.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/Ctypes_std_views/module-type-Unsigned_type/index.html b/findlib-1/ctypes/Ctypes_std_views/module-type-Unsigned_type/index.html new file mode 100644 index 000000000..b01c444ba --- /dev/null +++ b/findlib-1/ctypes/Ctypes_std_views/module-type-Unsigned_type/index.html @@ -0,0 +1,2 @@ + +Unsigned_type (docs.findlib-1.ctypes.Ctypes_std_views.Unsigned_type)

Module type Ctypes_std_views.Unsigned_type

include Unsigned.S
type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Unsigned.Infix with type t := t
diff --git a/findlib-1/ctypes/Ctypes_structs/index.html b/findlib-1/ctypes/Ctypes_structs/index.html new file mode 100644 index 000000000..eda6ca8f1 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_structs/index.html @@ -0,0 +1,2 @@ + +Ctypes_structs (docs.findlib-1.ctypes.Ctypes_structs)

Module Ctypes_structs

module type S = sig ... end
diff --git a/findlib-1/ctypes/Ctypes_structs/module-type-S/index.html b/findlib-1/ctypes/Ctypes_structs/module-type-S/index.html new file mode 100644 index 000000000..16f053104 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_structs/module-type-S/index.html @@ -0,0 +1,8 @@ + +S (docs.findlib-1.ctypes.Ctypes_structs.S)

Module type Ctypes_structs.S

type (_, _) field
val field : + 't Ctypes_static.typ -> + string -> + 'a Ctypes_static.typ -> + ('a, ('s, [< `Struct | `Union ]) Ctypes_static.structured as 't) field
val seal : + (_, [< `Struct | `Union ]) Ctypes_static.structured Ctypes_static.typ -> + unit
diff --git a/findlib-1/ctypes/Ctypes_structs_computed/index.html b/findlib-1/ctypes/Ctypes_structs_computed/index.html new file mode 100644 index 000000000..787ef8963 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_structs_computed/index.html @@ -0,0 +1,10 @@ + +Ctypes_structs_computed (docs.findlib-1.ctypes.Ctypes_structs_computed)

Module Ctypes_structs_computed

Structs and unions whose layouts are computed from the sizes and alignment requirements of the constituent field types.

include Ctypes_structs.S + with type ('a, 's) field := ('a, 's) Ctypes_static.field
val field : + 't Ctypes_static.typ -> + string -> + 'a Ctypes_static.typ -> + ('a, ('s, [< `Struct | `Union ]) Ctypes_static.structured as 't) + Ctypes_static.field
val seal : + (_, [< `Struct | `Union ]) Ctypes_static.structured Ctypes_static.typ -> + unit
diff --git a/findlib-1/ctypes/Ctypes_type_printing/index.html b/findlib-1/ctypes/Ctypes_type_printing/index.html new file mode 100644 index 000000000..4bf1c9c0d --- /dev/null +++ b/findlib-1/ctypes/Ctypes_type_printing/index.html @@ -0,0 +1,15 @@ + +Ctypes_type_printing (docs.findlib-1.ctypes.Ctypes_type_printing)

Module Ctypes_type_printing

type format_context = [
  1. | `toplevel
  2. | `array
  3. | `nonarray
]
val format_name : ?name:string -> Format.formatter -> unit
val format_typ' : + 'a Ctypes_static.typ -> + (format_context -> Format.formatter -> unit) -> + format_context -> + Format.formatter -> + unit
val format_typ : + ?name:string -> + Format.formatter -> + 'a Ctypes_static.typ -> + unit
val format_fn' : + 'a Ctypes_static.fn -> + (Format.formatter -> unit) -> + Format.formatter -> + unit
val format_fn : ?name:string -> Format.formatter -> 'a Ctypes_static.fn -> unit
val string_of_typ : ?name:string -> 'a Ctypes_static.typ -> string
val string_of_fn : ?name:string -> 'a Ctypes_static.fn -> string
diff --git a/findlib-1/ctypes/Ctypes_types/index.html b/findlib-1/ctypes/Ctypes_types/index.html new file mode 100644 index 000000000..3e6dca60a --- /dev/null +++ b/findlib-1/ctypes/Ctypes_types/index.html @@ -0,0 +1,2 @@ + +Ctypes_types (docs.findlib-1.ctypes.Ctypes_types)

Module Ctypes_types

module type TYPE = sig ... end

Abstract interface to C object type descriptions

diff --git a/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Intptr/Infix/index.html b/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Intptr/Infix/index.html new file mode 100644 index 000000000..aa371b32b --- /dev/null +++ b/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Intptr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.Ctypes_types.TYPE.Intptr.Infix)

Module Intptr.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Intptr/index.html b/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Intptr/index.html new file mode 100644 index 000000000..c0dafc9a9 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Intptr/index.html @@ -0,0 +1,2 @@ + +Intptr (docs.findlib-1.ctypes.Ctypes_types.TYPE.Intptr)

Module TYPE.Intptr

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Ptrdiff/Infix/index.html b/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Ptrdiff/Infix/index.html new file mode 100644 index 000000000..785281fc7 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Ptrdiff/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.Ctypes_types.TYPE.Ptrdiff.Infix)

Module Ptrdiff.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Ptrdiff/index.html b/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Ptrdiff/index.html new file mode 100644 index 000000000..dfb33eda7 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Ptrdiff/index.html @@ -0,0 +1,2 @@ + +Ptrdiff (docs.findlib-1.ctypes.Ctypes_types.TYPE.Ptrdiff)

Module TYPE.Ptrdiff

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Uintptr/Infix/index.html b/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Uintptr/Infix/index.html new file mode 100644 index 000000000..729b5d44b --- /dev/null +++ b/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Uintptr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.Ctypes_types.TYPE.Uintptr.Infix)

Module Uintptr.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Uintptr/index.html b/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Uintptr/index.html new file mode 100644 index 000000000..ae5e8a7ae --- /dev/null +++ b/findlib-1/ctypes/Ctypes_types/module-type-TYPE/Uintptr/index.html @@ -0,0 +1,2 @@ + +Uintptr (docs.findlib-1.ctypes.Ctypes_types.TYPE.Uintptr)

Module TYPE.Uintptr

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Unsigned.Infix with type t := t
diff --git a/findlib-1/ctypes/Ctypes_types/module-type-TYPE/index.html b/findlib-1/ctypes/Ctypes_types/module-type-TYPE/index.html new file mode 100644 index 000000000..e0da04405 --- /dev/null +++ b/findlib-1/ctypes/Ctypes_types/module-type-TYPE/index.html @@ -0,0 +1,36 @@ + +TYPE (docs.findlib-1.ctypes.Ctypes_types.TYPE)

Module type Ctypes_types.TYPE

Abstract interface to C object type descriptions

Values representing C types

type 'a typ

The type of values representing C types. There are two types associated with each typ value: the C type used to store and pass values, and the corresponding OCaml type. The type parameter indicates the OCaml type, so a value of type t typ is used to read and write OCaml values of type t. There are various uses of typ values, including

  • constructing function types for binding native functions using Foreign.foreign
  • constructing pointers for reading and writing locations in C-managed storage using ptr
  • describing the fields of structured types built with structure and union.

The void type

val void : unit typ

Value representing the C void type. Void values appear in OCaml as the unit type, so using void in an argument or result type specification produces a function which accepts or returns unit.

Dereferencing a pointer to void is an error, as in C, and will raise IncompleteType.

Scalar types

The scalar types consist of the Arithmetic types and the Pointer types.

Arithmetic types

The arithmetic types consist of the signed and unsigned integer types (including character types) and the floating types. There are values representing both exact-width integer types (of 8, 16, 32 and 64 bits) and types whose size depend on the platform (signed and unsigned short, int, long, long long).

val char : char typ

Value representing the C type char.

Signed integer types
val schar : int typ

Value representing the C type signed char.

val short : int typ

Value representing the C type (signed) short.

val int : int typ

Value representing the C type (signed) int.

val long : Signed.long typ

Value representing the C type (signed) long.

val llong : Signed.llong typ

Value representing the C type (signed) long long.

val nativeint : nativeint typ

Value representing the C type (signed) int.

val int8_t : int typ

Value representing an 8-bit signed integer C type.

val int16_t : int typ

Value representing a 16-bit signed integer C type.

val int32_t : int32 typ

Value representing a 32-bit signed integer C type.

val int64_t : int64 typ

Value representing a 64-bit signed integer C type.

module Intptr : Signed.S
val intptr_t : Intptr.t typ

Value representing the C type intptr_t.

module Ptrdiff : Signed.S
val ptrdiff_t : Ptrdiff.t typ

Value representing the C type ptrdiff_t.

val camlint : int typ

Value representing an integer type with the same storage requirements as an OCaml int.

Unsigned integer types
val uchar : Unsigned.uchar typ

Value representing the C type unsigned char.

val bool : bool typ

Value representing the C type bool.

val uint8_t : Unsigned.uint8 typ

Value representing an 8-bit unsigned integer C type.

val uint16_t : Unsigned.uint16 typ

Value representing a 16-bit unsigned integer C type.

val uint32_t : Unsigned.uint32 typ

Value representing a 32-bit unsigned integer C type.

val uint64_t : Unsigned.uint64 typ

Value representing a 64-bit unsigned integer C type.

val size_t : Unsigned.size_t typ

Value representing the C type size_t, an alias for one of the unsigned integer types. The actual size and alignment requirements for size_t vary between platforms.

val ushort : Unsigned.ushort typ

Value representing the C type unsigned short.

val sint : Signed.sint typ

Value representing the C type int.

val uint : Unsigned.uint typ

Value representing the C type unsigned int.

val ulong : Unsigned.ulong typ

Value representing the C type unsigned long.

val ullong : Unsigned.ullong typ

Value representing the C type unsigned long long.

val uintptr_t : Uintptr.t typ

Value representing the C type uintptr_t.

Floating types
val float : float typ

Value representing the C single-precision float type.

val double : float typ

Value representing the C type double.

val ldouble : LDouble.t typ

Value representing the C type long double.

Complex types
val complex32 : Complex.t typ

Value representing the C99 single-precision float complex type.

val complex64 : Complex.t typ

Value representing the C99 double-precision double complex type.

val complexld : ComplexL.t typ

Value representing the C99 long-double-precision long double complex type.

Pointer types
C-compatible pointers
val ptr : 'a typ -> 'a Ctypes_static.ptr typ

Construct a pointer type from an existing type (called the reference type).

val ptr_opt : 'a typ -> 'a Ctypes_static.ptr option typ

Construct a pointer type from an existing type (called the reference type). This behaves like ptr, except that null pointers appear in OCaml as None.

val string : string typ

A high-level representation of the string type.

On the C side this behaves like char *; on the OCaml side values read and written using string are simply native OCaml strings.

To avoid problems with the garbage collector, values passed using string are copied into immovable C-managed storage before being passed to C.

The string type representation is suitable for use in function argument types such as the following:

string @-> returning int

where the lifetime of the C-managed storage does not need to extend beyond the duration of the function call. However, it is not suitable for use in struct or union fields

field s "x" string

because it does not provide a way to manage the lifetime of the C-managed storage.

val string_opt : string option typ

A high-level representation of the string type. This behaves like string, except that null pointers appear in OCaml as None.

OCaml pointers
val ocaml_string : string Ctypes_static.ocaml typ

Value representing the directly mapped storage of an OCaml string.

val ocaml_bytes : bytes Ctypes_static.ocaml typ

Value representing the directly mapped storage of an OCaml byte array.

Array types

C array types
val array : int -> 'a typ -> 'a Ctypes_static.carray typ

Construct a sized array type from a length and an existing type (called the element type).

Bigarray types
val bigarray : + < element : 'a + ; layout : Bigarray_compat.c_layout + ; ba_repr : 'b + ; dims : 'dims + ; bigarray : 'bigarray + ; carray : _ > + Ctypes_static.bigarray_class -> + 'dims -> + ('a, 'b) Bigarray_compat.kind -> + 'bigarray typ

Construct a sized C-layout bigarray type representation from a bigarray class, the dimensions, and the Bigarray_compat.kind.

val fortran_bigarray : + < element : 'a + ; layout : Bigarray_compat.fortran_layout + ; ba_repr : 'b + ; dims : 'dims + ; bigarray : 'bigarray + ; carray : _ > + Ctypes_static.bigarray_class -> + 'dims -> + ('a, 'b) Bigarray_compat.kind -> + 'bigarray typ

Construct a sized Fortran-layout bigarray type representation from a bigarray class, the dimensions, and the Bigarray_compat.kind.

val typ_of_bigarray_kind : ('a, 'b) Bigarray_compat.kind -> 'a typ

typ_of_bigarray_kind k is the type corresponding to the Bigarray kind k.

Struct and union types

type ('a, 't) field
val structure : string -> 's Ctypes_static.structure typ

Construct a new structure type. The type value returned is incomplete and can be updated using field until it is passed to seal, at which point the set of fields is fixed.

The type ('_s structure typ) of the expression returned by the call structure tag includes a weak type variable, which can be explicitly instantiated to ensure that the OCaml values representing different C structure types have incompatible types. Typical usage is as follows:

type tagname

let tagname : tagname structure typ = structure "tagname"

val union : string -> 's Ctypes_static.union typ

Construct a new union type. This behaves analogously to structure; fields are added with field.

val field : + 't typ -> + string -> + 'a typ -> + ('a, ('s, [< `Struct | `Union ]) Ctypes_static.structured as 't) field

field ty label ty' adds a field of type ty' with label label to the structure or union type ty and returns a field value that can be used to read and write the field in structure or union instances (e.g. using getf and setf).

Attempting to add a field to a union type that has been sealed with seal is an error, and will raise ModifyingSealedType.

val seal : (_, [< `Struct | `Union ]) Ctypes_static.structured typ -> unit

seal t completes the struct or union type t so that no further fields can be added. Struct and union types must be sealed before they can be used in a way that involves their size or alignment; see the documentation for IncompleteType for further details.

View types

val view : + ?format_typ:((Format.formatter -> unit) -> Format.formatter -> unit) -> + ?format:(Format.formatter -> 'b -> unit) -> + read:('a -> 'b) -> + write:('b -> 'a) -> + 'a typ -> + 'b typ

view ~read:r ~write:w t creates a C type representation t' which behaves like t except that values read using t' are subsequently transformed using the function r and values written using t' are first transformed using the function w.

For example, given suitable definitions of string_of_char_ptr and char_ptr_of_string, the type representation

view ~read:string_of_char_ptr ~write:char_ptr_of_string (ptr char)

can be used to pass OCaml strings directly to and from bound C functions, or to read and write string members in structs and arrays. (In fact, the string type representation is defined in exactly this way.)

The optional argument format_typ is used by the Ctypes.format_typ and string_of_typ functions to print the type at the top level and elsewhere. If format_typ is not supplied the printer for t is used instead.

The optional argument format is used by the Ctypes.format and string_of functions to print the values. If format_val is not supplied the printer for t is used instead.

val typedef : 'a typ -> string -> 'a typ

typedef t name creates a C type representation t' which is equivalent to t except its name is printed as name.

This is useful when generating C stubs involving "anonymous" types, for example: typedef struct { int f } typedef_name;

Abstract types

val abstract : + name:string -> + size:int -> + alignment:int -> + 'a Ctypes_static.abstract typ

Create an abstract type specification from the size and alignment requirements for the type.

Injection of concrete types

val lift_typ : 'a Ctypes_static.typ -> 'a typ

lift_typ t turns a concrete type representation into an abstract type representation.

For example, retrieving struct layout from C involves working with an abstract representation of types which do not support operations such as sizeof. The lift_typ function makes it possible to use concrete type representations wherever such abstract type representations are needed.

Function types

Abstract interface to C function type descriptions

type 'a fn = 'a Ctypes_static.fn

The type of values representing C function types. A value of type t fn can be used to bind to C functions and to describe type of OCaml functions passed to C.

val (@->) : 'a typ -> 'b fn -> ('a -> 'b) fn

Construct a function type from a type and an existing function type. This corresponds to prepending a parameter to a C function parameter list. For example,

int @-> ptr void @-> returning float

describes a function type that accepts two arguments -- an integer and a pointer to void -- and returns a float.

val returning : 'a typ -> 'a fn

Give the return type of a C function. Note that returning is intended to be used together with (@->); see the documentation for (@->) for an example.

type 'a static_funptr = 'a Ctypes_static.static_funptr

Function pointer types

The type of values representing C function pointer types.

val static_funptr : 'a fn -> 'a Ctypes_static.static_funptr typ

Construct a function pointer type from an existing function type (called the reference type).

val const : 'a typ -> 'a typ
diff --git a/findlib-1/ctypes/Ctypes_value_printing/index.html b/findlib-1/ctypes/Ctypes_value_printing/index.html new file mode 100644 index 000000000..63f4b160f --- /dev/null +++ b/findlib-1/ctypes/Ctypes_value_printing/index.html @@ -0,0 +1,13 @@ + +Ctypes_value_printing (docs.findlib-1.ctypes.Ctypes_value_printing)

Module Ctypes_value_printing

val format : 'a. 'a Ctypes_static.typ -> Format.formatter -> 'a -> unit
val format_structured : + 'a 'b. Format.formatter -> + ('a, 'b) Ctypes_static.structured -> + unit
val format_array : 'a. Format.formatter -> 'a Ctypes_static.carray -> unit
val format_ocaml : 'a. Format.formatter -> 'a Ctypes_static.ocaml -> unit
val format_fields : + 'a 'b. string -> + ('a, 'b) Ctypes_static.structured Ctypes_static.boxed_field list -> + Format.formatter -> + ('a, 'b) Ctypes_static.structured -> + unit
val format_ptr : 'a. Format.formatter -> 'a Ctypes_static.ptr -> unit
val format_funptr : + 'a. Format.formatter -> + 'a Ctypes_static.static_funptr -> + unit
val string_of : 'a Ctypes_static.typ -> 'b -> string
diff --git a/findlib-1/ctypes/Ctypes_value_printing_stubs/index.html b/findlib-1/ctypes/Ctypes_value_printing_stubs/index.html new file mode 100644 index 000000000..6f7b5901b --- /dev/null +++ b/findlib-1/ctypes/Ctypes_value_printing_stubs/index.html @@ -0,0 +1,2 @@ + +Ctypes_value_printing_stubs (docs.findlib-1.ctypes.Ctypes_value_printing_stubs)

Module Ctypes_value_printing_stubs

val string_of_prim : 'a Ctypes_primitive_types.prim -> 'a -> string
val string_of_pointer : (_, _) Ctypes_ptr.Fat.t -> string
diff --git a/findlib-1/ctypes/LDouble/index.html b/findlib-1/ctypes/LDouble/index.html new file mode 100644 index 000000000..a5a5dcf71 --- /dev/null +++ b/findlib-1/ctypes/LDouble/index.html @@ -0,0 +1,2 @@ + +LDouble (docs.findlib-1.ctypes.LDouble)

Module LDouble

type t

The type of long doubles.

val to_float : t -> float

Convert a long double to a float. The result is unspecified if the argument is either too large or too small to be represented as a float.

val of_float : float -> t

Create a long double from a float

val to_int : t -> int

Convert a long double to an int. The result is unspecified if the argument is NAN or falls outside the range of representable integers.

val of_int : int -> t

Create a long double from an int

val to_string : ?width:int -> ?prec:int -> t -> string

Convert a long double to a string.

width specifies the minimum number of digits to format the string with. A negative value left aligns. The default is 0.

prec specifies the number of digits after the decimal point. The default is 6.

val of_string : string -> t

Create a long double from a string

val add : t -> t -> t

Addition

val sub : t -> t -> t

Subtraction

val mul : t -> t -> t

Multiplication

val div : t -> t -> t

Division

val neg : t -> t

Negation

val pow : t -> t -> t

Exponentiation

val sqrt : t -> t

Square root

val exp : t -> t

Exponential

val log : t -> t

Natural logarithm

val log10 : t -> t

Base 10 logarithm

val expm1 : t -> t

expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

val log1p : t -> t

log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

val cos : t -> t

Cosine. Argument is in radians.

val sin : t -> t

Sine. Argument is in radians.

val tan : t -> t

Tangent. Argument is in radians.

val acos : t -> t

Arc cosine

val asin : t -> t

Arc sine

val atan : t -> t

Arc tangent

val atan2 : t -> t -> t

atan2 y x returns the arc tangent of y /. x.

val hypot : t -> t -> t
val cosh : t -> t

Hyperbolic cosine

val sinh : t -> t

Hyperbolic sine

val tanh : t -> t

Hyperbolic tangent

val acosh : t -> t

Inverse hyperbolic cosine

val asinh : t -> t

Inverse hyperbolic sine

val atanh : t -> t

Inverse hyperbolic tangent

val ceil : t -> t

Round above to an integer value.

val floor : t -> t

Round below to an integer value.

val abs : t -> t

abs f returns absolute value of f

val rem : t -> t -> t

rem x y is the remainder of dividing x by y

val copysign : t -> t -> t

copysign x y returns a float whose absolute value is that of x and whose sign is that of y.

val frexp : t -> t * int

frexp f returns the pair of the significant and the exponent of f.

val ldexp : t -> int -> t

ldexp x n returns x *. 2 ** n.

val modf : t -> t * t

return (fractional,integer) parts of number.

Known fatal bug on mingw32; see https://sourceforge.net/p/mingw-w64/bugs/478

val classify : t -> fpclass

Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

val min_float : t

The smallest positive, non-zero, non-denormalized value

val max_float : t

The largest positive finite value

val epsilon : t

The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

val nan : t

A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'.

val infinity : t

Positive infinity

val neg_infinity : t

Negative infinity

val zero : t

0.0

val one : t

1.0

val byte_sizes : int * int

size, in bytes, used for storing long doubles, and the actual number of bytes used by the value. (unused bytes may contain undefined values)

val mant_dig : int

size of mantissa

diff --git a/findlib-1/ctypes/PosixTypes/Dev/Infix/index.html b/findlib-1/ctypes/PosixTypes/Dev/Infix/index.html new file mode 100644 index 000000000..7ffc505c3 --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/Dev/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.PosixTypes.Dev.Infix)

Module Dev.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/PosixTypes/Dev/index.html b/findlib-1/ctypes/PosixTypes/Dev/index.html new file mode 100644 index 000000000..ccd757316 --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/Dev/index.html @@ -0,0 +1,2 @@ + +Dev (docs.findlib-1.ctypes.PosixTypes.Dev)

Module PosixTypes.Dev

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Unsigned.Infix with type t := t
diff --git a/findlib-1/ctypes/PosixTypes/Ino/Infix/index.html b/findlib-1/ctypes/PosixTypes/Ino/Infix/index.html new file mode 100644 index 000000000..f3042cff8 --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/Ino/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.PosixTypes.Ino.Infix)

Module Ino.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/PosixTypes/Ino/index.html b/findlib-1/ctypes/PosixTypes/Ino/index.html new file mode 100644 index 000000000..35595be66 --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/Ino/index.html @@ -0,0 +1,2 @@ + +Ino (docs.findlib-1.ctypes.PosixTypes.Ino)

Module PosixTypes.Ino

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Unsigned.Infix with type t := t
diff --git a/findlib-1/ctypes/PosixTypes/Mode/Infix/index.html b/findlib-1/ctypes/PosixTypes/Mode/Infix/index.html new file mode 100644 index 000000000..c0dff30e7 --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/Mode/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.PosixTypes.Mode.Infix)

Module Mode.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/PosixTypes/Mode/index.html b/findlib-1/ctypes/PosixTypes/Mode/index.html new file mode 100644 index 000000000..1b07e8ea6 --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/Mode/index.html @@ -0,0 +1,2 @@ + +Mode (docs.findlib-1.ctypes.PosixTypes.Mode)

Module PosixTypes.Mode

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Unsigned.Infix with type t := t
diff --git a/findlib-1/ctypes/PosixTypes/Nlink/Infix/index.html b/findlib-1/ctypes/PosixTypes/Nlink/Infix/index.html new file mode 100644 index 000000000..9334f0546 --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/Nlink/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.PosixTypes.Nlink.Infix)

Module Nlink.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/PosixTypes/Nlink/index.html b/findlib-1/ctypes/PosixTypes/Nlink/index.html new file mode 100644 index 000000000..26b7e9dc9 --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/Nlink/index.html @@ -0,0 +1,2 @@ + +Nlink (docs.findlib-1.ctypes.PosixTypes.Nlink)

Module PosixTypes.Nlink

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Unsigned.Infix with type t := t
diff --git a/findlib-1/ctypes/PosixTypes/Off/Infix/index.html b/findlib-1/ctypes/PosixTypes/Off/Infix/index.html new file mode 100644 index 000000000..f15cd3d92 --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/Off/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.PosixTypes.Off.Infix)

Module Off.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/PosixTypes/Off/index.html b/findlib-1/ctypes/PosixTypes/Off/index.html new file mode 100644 index 000000000..fd1371cca --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/Off/index.html @@ -0,0 +1,2 @@ + +Off (docs.findlib-1.ctypes.PosixTypes.Off)

Module PosixTypes.Off

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/PosixTypes/Pid/Infix/index.html b/findlib-1/ctypes/PosixTypes/Pid/Infix/index.html new file mode 100644 index 000000000..5979d61ea --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/Pid/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.PosixTypes.Pid.Infix)

Module Pid.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/PosixTypes/Pid/index.html b/findlib-1/ctypes/PosixTypes/Pid/index.html new file mode 100644 index 000000000..1edf103c2 --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/Pid/index.html @@ -0,0 +1,2 @@ + +Pid (docs.findlib-1.ctypes.PosixTypes.Pid)

Module PosixTypes.Pid

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/PosixTypes/Ssize/Infix/index.html b/findlib-1/ctypes/PosixTypes/Ssize/Infix/index.html new file mode 100644 index 000000000..89a308267 --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/Ssize/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.PosixTypes.Ssize.Infix)

Module Ssize.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/PosixTypes/Ssize/index.html b/findlib-1/ctypes/PosixTypes/Ssize/index.html new file mode 100644 index 000000000..c4b24f60f --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/Ssize/index.html @@ -0,0 +1,2 @@ + +Ssize (docs.findlib-1.ctypes.PosixTypes.Ssize)

Module PosixTypes.Ssize

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/PosixTypes/Time/Infix/index.html b/findlib-1/ctypes/PosixTypes/Time/Infix/index.html new file mode 100644 index 000000000..2f244afc1 --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/Time/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.PosixTypes.Time.Infix)

Module Time.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/PosixTypes/Time/index.html b/findlib-1/ctypes/PosixTypes/Time/index.html new file mode 100644 index 000000000..898329931 --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/Time/index.html @@ -0,0 +1,2 @@ + +Time (docs.findlib-1.ctypes.PosixTypes.Time)

Module PosixTypes.Time

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Unsigned.Infix with type t := t
diff --git a/findlib-1/ctypes/PosixTypes/index.html b/findlib-1/ctypes/PosixTypes/index.html new file mode 100644 index 000000000..c9789058c --- /dev/null +++ b/findlib-1/ctypes/PosixTypes/index.html @@ -0,0 +1,2 @@ + +PosixTypes (docs.findlib-1.ctypes.PosixTypes)

Module PosixTypes

Some POSIX types.

POSIX arithmetic types

module Dev : Unsigned.S
module Ino : Unsigned.S
module Mode : Unsigned.S
module Off : Signed.S
module Pid : Signed.S
module Ssize : Signed.S
module Time : Unsigned.S
type clock_t
type dev_t = Dev.t
type ino_t = Ino.t
type mode_t = Mode.t
type off_t = Off.t
type pid_t = Pid.t
type size_t = Unsigned.size_t
type ssize_t = Ssize.t
type time_t = Time.t
type useconds_t

Values representing POSIX arithmetic types

val clock_t : clock_t Ctypes.typ
val dev_t : dev_t Ctypes.typ
val ino_t : ino_t Ctypes.typ
val mode_t : mode_t Ctypes.typ
val off_t : off_t Ctypes.typ
val pid_t : pid_t Ctypes.typ
val size_t : size_t Ctypes.typ
val ssize_t : ssize_t Ctypes.typ
val time_t : time_t Ctypes.typ
val useconds_t : useconds_t Ctypes.typ

POSIX non-arithmetic types

type sigset_t

Values representing POSIX non-arithmetic types

val sigset_t : sigset_t Ctypes.typ
diff --git a/findlib-1/ctypes/index.html b/findlib-1/ctypes/index.html new file mode 100644 index 000000000..012eb9585 --- /dev/null +++ b/findlib-1/ctypes/index.html @@ -0,0 +1,2 @@ + +ctypes (docs.findlib-1.ctypes)

Package ctypes

Sub-indexes

Library ctypes

This library exposes the following toplevel modules:

Library ctypes.stubs

This library exposes the following toplevel modules:

diff --git a/findlib-1/ctypes/stubs/Cstubs/Types/index.html b/findlib-1/ctypes/stubs/Cstubs/Types/index.html new file mode 100644 index 000000000..2c6e4a250 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs/Types/index.html @@ -0,0 +1,2 @@ + +Types (docs.findlib-1.ctypes.stubs.Cstubs.Types)

Module Cstubs.Types

module type TYPE = Ctypes.TYPE
module type BINDINGS = functor (F : TYPE) -> sig ... end
val write_c : Format.formatter -> (module BINDINGS) -> unit
diff --git a/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Intptr/Infix/index.html b/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Intptr/Infix/index.html new file mode 100644 index 000000000..703bd048d --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Intptr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.stubs.Cstubs.Types.BINDINGS.F.Intptr.Infix)

Module Intptr.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Intptr/index.html b/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Intptr/index.html new file mode 100644 index 000000000..25b1b6950 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Intptr/index.html @@ -0,0 +1,2 @@ + +Intptr (docs.findlib-1.ctypes.stubs.Cstubs.Types.BINDINGS.F.Intptr)

Module F.Intptr

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Ptrdiff/Infix/index.html b/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Ptrdiff/Infix/index.html new file mode 100644 index 000000000..17284b935 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Ptrdiff/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.stubs.Cstubs.Types.BINDINGS.F.Ptrdiff.Infix)

Module Ptrdiff.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Ptrdiff/index.html b/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Ptrdiff/index.html new file mode 100644 index 000000000..fcfe8a611 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Ptrdiff/index.html @@ -0,0 +1,2 @@ + +Ptrdiff (docs.findlib-1.ctypes.stubs.Cstubs.Types.BINDINGS.F.Ptrdiff)

Module F.Ptrdiff

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Uintptr/Infix/index.html b/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Uintptr/Infix/index.html new file mode 100644 index 000000000..78607fab3 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Uintptr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.stubs.Cstubs.Types.BINDINGS.F.Uintptr.Infix)

Module Uintptr.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Uintptr/index.html b/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Uintptr/index.html new file mode 100644 index 000000000..c7c249108 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/Uintptr/index.html @@ -0,0 +1,2 @@ + +Uintptr (docs.findlib-1.ctypes.stubs.Cstubs.Types.BINDINGS.F.Uintptr)

Module F.Uintptr

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Unsigned.Infix with type t := t
diff --git a/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/index.html b/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/index.html new file mode 100644 index 000000000..7757527eb --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/argument-1-F/index.html @@ -0,0 +1,49 @@ + +F (docs.findlib-1.ctypes.stubs.Cstubs.Types.BINDINGS.F)

Parameter BINDINGS.F

include Ctypes_types.TYPE

Values representing C types

type 'a typ

The type of values representing C types. There are two types associated with each typ value: the C type used to store and pass values, and the corresponding OCaml type. The type parameter indicates the OCaml type, so a value of type t typ is used to read and write OCaml values of type t. There are various uses of typ values, including

  • constructing function types for binding native functions using Foreign.foreign
  • constructing pointers for reading and writing locations in C-managed storage using ptr
  • describing the fields of structured types built with structure and union.

The void type

val void : unit typ

Value representing the C void type. Void values appear in OCaml as the unit type, so using void in an argument or result type specification produces a function which accepts or returns unit.

Dereferencing a pointer to void is an error, as in C, and will raise IncompleteType.

Scalar types

The scalar types consist of the Arithmetic types and the Pointer types.

Arithmetic types

The arithmetic types consist of the signed and unsigned integer types (including character types) and the floating types. There are values representing both exact-width integer types (of 8, 16, 32 and 64 bits) and types whose size depend on the platform (signed and unsigned short, int, long, long long).

val char : char typ

Value representing the C type char.

Signed integer types
val schar : int typ

Value representing the C type signed char.

val short : int typ

Value representing the C type (signed) short.

val int : int typ

Value representing the C type (signed) int.

val long : Signed.long typ

Value representing the C type (signed) long.

val llong : Signed.llong typ

Value representing the C type (signed) long long.

val nativeint : nativeint typ

Value representing the C type (signed) int.

val int8_t : int typ

Value representing an 8-bit signed integer C type.

val int16_t : int typ

Value representing a 16-bit signed integer C type.

val int32_t : int32 typ

Value representing a 32-bit signed integer C type.

val int64_t : int64 typ

Value representing a 64-bit signed integer C type.

module Intptr : Signed.S
val intptr_t : Intptr.t typ

Value representing the C type intptr_t.

module Ptrdiff : Signed.S
val ptrdiff_t : Ptrdiff.t typ

Value representing the C type ptrdiff_t.

val camlint : int typ

Value representing an integer type with the same storage requirements as an OCaml int.

Unsigned integer types
val uchar : Unsigned.uchar typ

Value representing the C type unsigned char.

val bool : bool typ

Value representing the C type bool.

val uint8_t : Unsigned.uint8 typ

Value representing an 8-bit unsigned integer C type.

val uint16_t : Unsigned.uint16 typ

Value representing a 16-bit unsigned integer C type.

val uint32_t : Unsigned.uint32 typ

Value representing a 32-bit unsigned integer C type.

val uint64_t : Unsigned.uint64 typ

Value representing a 64-bit unsigned integer C type.

val size_t : Unsigned.size_t typ

Value representing the C type size_t, an alias for one of the unsigned integer types. The actual size and alignment requirements for size_t vary between platforms.

val ushort : Unsigned.ushort typ

Value representing the C type unsigned short.

val sint : Signed.sint typ

Value representing the C type int.

val uint : Unsigned.uint typ

Value representing the C type unsigned int.

val ulong : Unsigned.ulong typ

Value representing the C type unsigned long.

val ullong : Unsigned.ullong typ

Value representing the C type unsigned long long.

val uintptr_t : Uintptr.t typ

Value representing the C type uintptr_t.

Floating types
val float : float typ

Value representing the C single-precision float type.

val double : float typ

Value representing the C type double.

val ldouble : LDouble.t typ

Value representing the C type long double.

Complex types
val complex32 : Complex.t typ

Value representing the C99 single-precision float complex type.

val complex64 : Complex.t typ

Value representing the C99 double-precision double complex type.

val complexld : ComplexL.t typ

Value representing the C99 long-double-precision long double complex type.

Pointer types
C-compatible pointers
val ptr : 'a typ -> 'a Ctypes_static.ptr typ

Construct a pointer type from an existing type (called the reference type).

val ptr_opt : 'a typ -> 'a Ctypes_static.ptr option typ

Construct a pointer type from an existing type (called the reference type). This behaves like ptr, except that null pointers appear in OCaml as None.

val string : string typ

A high-level representation of the string type.

On the C side this behaves like char *; on the OCaml side values read and written using string are simply native OCaml strings.

To avoid problems with the garbage collector, values passed using string are copied into immovable C-managed storage before being passed to C.

The string type representation is suitable for use in function argument types such as the following:

string @-> returning int

where the lifetime of the C-managed storage does not need to extend beyond the duration of the function call. However, it is not suitable for use in struct or union fields

field s "x" string

because it does not provide a way to manage the lifetime of the C-managed storage.

val string_opt : string option typ

A high-level representation of the string type. This behaves like string, except that null pointers appear in OCaml as None.

OCaml pointers
val ocaml_string : string Ctypes_static.ocaml typ

Value representing the directly mapped storage of an OCaml string.

val ocaml_bytes : bytes Ctypes_static.ocaml typ

Value representing the directly mapped storage of an OCaml byte array.

Array types

C array types
val array : int -> 'a typ -> 'a Ctypes_static.carray typ

Construct a sized array type from a length and an existing type (called the element type).

Bigarray types
val bigarray : + < element : 'a + ; layout : Bigarray_compat.c_layout + ; ba_repr : 'b + ; dims : 'dims + ; bigarray : 'bigarray + ; carray : _ > + Ctypes_static.bigarray_class -> + 'dims -> + ('a, 'b) Bigarray_compat.kind -> + 'bigarray typ

Construct a sized C-layout bigarray type representation from a bigarray class, the dimensions, and the Bigarray_compat.kind.

val fortran_bigarray : + < element : 'a + ; layout : Bigarray_compat.fortran_layout + ; ba_repr : 'b + ; dims : 'dims + ; bigarray : 'bigarray + ; carray : _ > + Ctypes_static.bigarray_class -> + 'dims -> + ('a, 'b) Bigarray_compat.kind -> + 'bigarray typ

Construct a sized Fortran-layout bigarray type representation from a bigarray class, the dimensions, and the Bigarray_compat.kind.

val typ_of_bigarray_kind : ('a, 'b) Bigarray_compat.kind -> 'a typ

typ_of_bigarray_kind k is the type corresponding to the Bigarray kind k.

Struct and union types

type ('a, 't) field
val structure : string -> 's Ctypes_static.structure typ

Construct a new structure type. The type value returned is incomplete and can be updated using field until it is passed to seal, at which point the set of fields is fixed.

The type ('_s structure typ) of the expression returned by the call structure tag includes a weak type variable, which can be explicitly instantiated to ensure that the OCaml values representing different C structure types have incompatible types. Typical usage is as follows:

type tagname

let tagname : tagname structure typ = structure "tagname"

val union : string -> 's Ctypes_static.union typ

Construct a new union type. This behaves analogously to structure; fields are added with field.

val field : + 't typ -> + string -> + 'a typ -> + ('a, ('s, [< `Struct | `Union ]) Ctypes_static.structured as 't) field

field ty label ty' adds a field of type ty' with label label to the structure or union type ty and returns a field value that can be used to read and write the field in structure or union instances (e.g. using getf and setf).

Attempting to add a field to a union type that has been sealed with seal is an error, and will raise ModifyingSealedType.

val seal : (_, [< `Struct | `Union ]) Ctypes_static.structured typ -> unit

seal t completes the struct or union type t so that no further fields can be added. Struct and union types must be sealed before they can be used in a way that involves their size or alignment; see the documentation for IncompleteType for further details.

View types

val view : + ?format_typ:((Format.formatter -> unit) -> Format.formatter -> unit) -> + ?format:(Format.formatter -> 'b -> unit) -> + read:('a -> 'b) -> + write:('b -> 'a) -> + 'a typ -> + 'b typ

view ~read:r ~write:w t creates a C type representation t' which behaves like t except that values read using t' are subsequently transformed using the function r and values written using t' are first transformed using the function w.

For example, given suitable definitions of string_of_char_ptr and char_ptr_of_string, the type representation

view ~read:string_of_char_ptr ~write:char_ptr_of_string (ptr char)

can be used to pass OCaml strings directly to and from bound C functions, or to read and write string members in structs and arrays. (In fact, the string type representation is defined in exactly this way.)

The optional argument format_typ is used by the Ctypes.format_typ and string_of_typ functions to print the type at the top level and elsewhere. If format_typ is not supplied the printer for t is used instead.

The optional argument format is used by the Ctypes.format and string_of functions to print the values. If format_val is not supplied the printer for t is used instead.

val typedef : 'a typ -> string -> 'a typ

typedef t name creates a C type representation t' which is equivalent to t except its name is printed as name.

This is useful when generating C stubs involving "anonymous" types, for example: typedef struct { int f } typedef_name;

Abstract types

val abstract : + name:string -> + size:int -> + alignment:int -> + 'a Ctypes_static.abstract typ

Create an abstract type specification from the size and alignment requirements for the type.

Injection of concrete types

val lift_typ : 'a Ctypes_static.typ -> 'a typ

lift_typ t turns a concrete type representation into an abstract type representation.

For example, retrieving struct layout from C involves working with an abstract representation of types which do not support operations such as sizeof. The lift_typ function makes it possible to use concrete type representations wherever such abstract type representations are needed.

Function types

Abstract interface to C function type descriptions

type 'a fn = 'a Ctypes_static.fn

The type of values representing C function types. A value of type t fn can be used to bind to C functions and to describe type of OCaml functions passed to C.

val (@->) : 'a typ -> 'b fn -> ('a -> 'b) fn

Construct a function type from a type and an existing function type. This corresponds to prepending a parameter to a C function parameter list. For example,

int @-> ptr void @-> returning float

describes a function type that accepts two arguments -- an integer and a pointer to void -- and returns a float.

val returning : 'a typ -> 'a fn

Give the return type of a C function. Note that returning is intended to be used together with (@->); see the documentation for (@->) for an example.

type 'a static_funptr = 'a Ctypes_static.static_funptr

Function pointer types

The type of values representing C function pointer types.

val static_funptr : 'a fn -> 'a Ctypes_static.static_funptr typ

Construct a function pointer type from an existing function type (called the reference type).

val const : 'a typ -> 'a typ
type 'a const
val constant : string -> 'a typ -> 'a const

constant name typ retrieves the value of the compile-time constant name of type typ. It can be used to retrieve enum constants, #defined values and other integer constant expressions.

The type typ must be either an integer type such as bool, char, int, uint8, etc., or a view (or perhaps multiple views) where the underlying type is an integer type.

When the value of the constant cannot be represented in the type there will typically be a diagnostic from either the C compiler or the OCaml compiler. For example, gcc will say

warning: overflow in implicit constant conversion

val enum : + string -> + ?typedef:bool -> + ?unexpected:(int64 -> 'a) -> + ('a * int64 const) list -> + 'a typ

enum name ?unexpected alist builds a type representation for the enum named name. The size and alignment are retrieved so that the resulting type can be used everywhere an integer type can be used: as an array element or struct member, as an argument or return value, etc.

The value alist is an association list of OCaml values and values retrieved by the constant function. For example, to expose the enum

enum letters { A, B, C = 10, D };

you might first retrieve the values of the enumeration constants:

let a = constant "A" int64_t
+and b = constant "B" int64_t
+and c = constant "C" int64_t
+and d = constant "D" int64_t

and then build the enumeration type

let letters = enum "letters" [
+   `A, a;
+   `B, b;
+   `C, c;
+   `D, d;
+] ~unexpected:(fun i -> `E i)

The unexpected function specifies the value to return in the case that some unexpected value is encountered -- for example, if a function with the return type 'enum letters' actually returns the value -1.

The optional flag typedef specifies whether the first argument, name, indicates an tag or an alias. If typedef is false (the default) then name is treated as an enumeration tag:

enum letters { ... }

If typedef is true then name is instead treated as an alias:

typedef enum { ... } letters

diff --git a/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/index.html b/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/index.html new file mode 100644 index 000000000..67e1e92f6 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs/Types/module-type-BINDINGS/index.html @@ -0,0 +1,2 @@ + +BINDINGS (docs.findlib-1.ctypes.stubs.Cstubs.Types.BINDINGS)

Module type Types.BINDINGS

Parameters

module F : TYPE

Signature

diff --git a/findlib-1/ctypes/stubs/Cstubs/index.html b/findlib-1/ctypes/stubs/Cstubs/index.html new file mode 100644 index 000000000..86773d236 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs/index.html @@ -0,0 +1,16 @@ + +Cstubs (docs.findlib-1.ctypes.stubs.Cstubs)

Module Cstubs

Operations for generating C bindings stubs.

module Types : sig ... end
module type FOREIGN = Ctypes.FOREIGN
module type BINDINGS = + functor (F : FOREIGN with type 'a result = unit) -> + sig ... end
type errno_policy

Values of the errno_policy type specify the errno support provided by the generated code. See ignore_errno for the available option.

val ignore_errno : errno_policy

Generate code with no special support for errno. This is the default.

val return_errno : errno_policy

Generate code that returns errno in addition to the return value of each function.

Passing return_errno as the errno argument to Cstubs.write_c and Cstubs.write_ml changes the return type of bound functions from a single value to a pair of values. For example, the binding specification

let realpath = foreign "realpath" (string @-> string @-> returning string)

generates a value of the following type by default:

val realpath : string -> string -> string

but when using return_errno the generated type is as follows:

val realpath : string -> string -> string * int

and when using both return_errno and lwt_jobs the generated type is as follows:

val realpath : string -> string -> (string * int) Lwt.t

type concurrency_policy

Values of the concurrency_policy type specify the concurrency support provided by the generated code. See sequential and lwt_jobs for the available options.

val sequential : concurrency_policy

Generate code with no special support for concurrency. This is the default.

val unlocked : concurrency_policy

Generate code that releases the runtime lock during C calls.

val lwt_preemptive : concurrency_policy

Generate code which runs C function calls with the Lwt_preemptive module:

http://ocsigen.org/lwt/2.5.1/api/Lwt_preemptive

Passing lwt_preemptive as the concurrency argument to Cstubs.write_c and Cstubs.write_ml changes the return type of bound functions to include the Lwt.t constructor. For example, the binding specification

let unlink = foreign "unlink" (string @-> returning int)

generates a value of the following type by default:

val unlink : string -> int

but when using lwt_preemptive the generated type is as follows:

val unlink : string -> int Lwt.t

Additionally, the OCaml runtime lock is released during calls to functions bound with lwt_preemptive.

val lwt_jobs : concurrency_policy

Generate code which implements C function calls as Lwt jobs:

http://ocsigen.org/lwt/2.5.1/api/Lwt_unix#TYPEjob

Passing lwt_jobs as the concurrency argument to Cstubs.write_c and Cstubs.write_ml changes the return type of bound functions to include the Lwt.t constructor. For example, the binding specification

let unlink = foreign "unlink" (string @-> returning int)

generates a value of the following type by default:

val unlink : string -> int

but when using lwt_jobs the generated type is as follows:

val unlink : string -> int Lwt.t

val write_c : + ?concurrency:concurrency_policy -> + ?errno:errno_policy -> + Format.formatter -> + prefix:string -> + (module BINDINGS) -> + unit

write_c fmt ~prefix bindings generates C stubs for the functions bound with foreign in bindings. The stubs are intended to be used in conjunction with the ML code generated by write_ml.

The optional argument concurrency specifies the concurrency support provided by the generated code. The default is sequential.

The generated code uses definitions exposed in the header file ctypes_cstubs_internals.h.

val write_ml : + ?concurrency:concurrency_policy -> + ?errno:errno_policy -> + Format.formatter -> + prefix:string -> + (module BINDINGS) -> + unit

write_ml fmt ~prefix bindings generates ML bindings for the functions bound with foreign in bindings. The generated code conforms to the FOREIGN interface.

The optional argument concurrency specifies the concurrency support provided by the generated code. The default is sequential.

The generated code uses definitions exposed in the module Cstubs_internals.

diff --git a/findlib-1/ctypes/stubs/Cstubs/module-type-BINDINGS/argument-1-F/index.html b/findlib-1/ctypes/stubs/Cstubs/module-type-BINDINGS/argument-1-F/index.html new file mode 100644 index 000000000..2c956bd9f --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs/module-type-BINDINGS/argument-1-F/index.html @@ -0,0 +1,2 @@ + +F (docs.findlib-1.ctypes.stubs.Cstubs.BINDINGS.F)

Parameter BINDINGS.F

type 'a fn
type 'a return
val (@->) : 'a Ctypes.typ -> 'b fn -> ('a -> 'b) fn
val returning : 'a Ctypes.typ -> 'a return fn
type 'a result = unit
val foreign : string -> ('a -> 'b) fn -> ('a -> 'b) result
val foreign_value : string -> 'a Ctypes.typ -> 'a Ctypes.ptr result
diff --git a/findlib-1/ctypes/stubs/Cstubs/module-type-BINDINGS/index.html b/findlib-1/ctypes/stubs/Cstubs/module-type-BINDINGS/index.html new file mode 100644 index 000000000..e72879421 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs/module-type-BINDINGS/index.html @@ -0,0 +1,2 @@ + +BINDINGS (docs.findlib-1.ctypes.stubs.Cstubs.BINDINGS)

Module type Cstubs.BINDINGS

Parameters

module F : FOREIGN with type 'a result = unit

Signature

diff --git a/findlib-1/ctypes/stubs/Cstubs_analysis/index.html b/findlib-1/ctypes/stubs/Cstubs_analysis/index.html new file mode 100644 index 000000000..62c32f3c9 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_analysis/index.html @@ -0,0 +1,2 @@ + +Cstubs_analysis (docs.findlib-1.ctypes.stubs.Cstubs_analysis)

Module Cstubs_analysis

val float : 'a Ctypes_static.fn -> bool
val may_allocate : 'a Ctypes_static.fn -> bool
diff --git a/findlib-1/ctypes/stubs/Cstubs_c_language/Type_C/index.html b/findlib-1/ctypes/stubs/Cstubs_c_language/Type_C/index.html new file mode 100644 index 000000000..cde1a8968 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_c_language/Type_C/index.html @@ -0,0 +1,6 @@ + +Type_C (docs.findlib-1.ctypes.stubs.Cstubs_c_language.Type_C)

Module Cstubs_c_language.Type_C

val cexp : cexp -> ty
val camlop : camlop -> ty
val ceff : ceff -> ty
val reference_ceff : ceff -> ty
val field_ceff : ceff -> fieldname -> ty
val lookup_field : + 's 'a. string -> + 'a Ctypes_static.typ -> + 's Ctypes_static.boxed_field list -> + ty
val ccomp : ccomp -> ty
diff --git a/findlib-1/ctypes/stubs/Cstubs_c_language/Unchecked_function_types/index.html b/findlib-1/ctypes/stubs/Cstubs_c_language/Unchecked_function_types/index.html new file mode 100644 index 000000000..d08e281c8 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_c_language/Unchecked_function_types/index.html @@ -0,0 +1,5 @@ + +Unchecked_function_types (docs.findlib-1.ctypes.stubs.Cstubs_c_language.Unchecked_function_types)

Module Cstubs_c_language.Unchecked_function_types

val (@->) : + 'a Ctypes_static.typ -> + 'b Ctypes_static.fn -> + ('a -> 'b) Ctypes_static.fn
val returning : 'a Ctypes_static.typ -> 'a Ctypes_static.fn
diff --git a/findlib-1/ctypes/stubs/Cstubs_c_language/index.html b/findlib-1/ctypes/stubs/Cstubs_c_language/index.html new file mode 100644 index 000000000..539bbe37e --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_c_language/index.html @@ -0,0 +1,2 @@ + +Cstubs_c_language (docs.findlib-1.ctypes.stubs.Cstubs_c_language)

Module Cstubs_c_language

val fresh_var : ?prefix:string -> unit -> string
type ty =
  1. | Ty : _ Ctypes_static.typ -> ty
type tfn =
  1. | Fn : _ Ctypes_static.fn -> tfn
type fieldname = string
type cfunction = {
  1. fname : string;
  2. allocates : bool;
  3. reads_ocaml_heap : bool;
  4. fn : tfn;
}
type cglobal = {
  1. name : string;
  2. typ : ty;
  3. references_ocaml_heap : bool;
}
type clocal = [
  1. | `Local of string * ty
]
type cvar = [
  1. | clocal
  2. | `Global of cglobal
]
type storage_class = [
  1. | `Static
  2. | `Extern
]
type cconst = [
  1. | `Int of Signed.sint
]
type cexp = [
  1. | cconst
  2. | clocal
  3. | `Cast of ty * cexp
  4. | `Addr of cvar
]
type clvalue = [
  1. | cvar
  2. | `Index of clvalue * cexp
  3. | `Field of clvalue * fieldname
  4. | `PointerField of clvalue * fieldname
]
type camlop = [
  1. | `CAMLparam0
  2. | `CAMLlocalN of cexp * cexp
  3. | `CAMLdrop
]
type ceff = [
  1. | cexp
  2. | camlop
  3. | `Global of cglobal
  4. | `App of cfunction * cexp list
  5. | `Index of ceff * cexp
  6. | `Deref of cexp
  7. | `DerefField of cexp * fieldname
]
type cbind = clocal * ceff
type ccomp = [
  1. | ceff
  2. | `CAMLparam of string list * ccomp
  3. | `LetConst of clocal * cconst * ccomp
  4. | `LetAssign of clvalue * ceff * ccomp
  5. | `CAMLreturnT of ty * cexp
  6. | `Return of ty * cexp
  7. | `Let of cbind * ccomp
]
type cfundec = [
  1. | `Fundec of string * (string * ty) list * ty
]
type cfundef = [
  1. | `Function of cfundec * ccomp * storage_class
]
val return_type : 'a. 'a Ctypes_static.fn -> ty
val args : 'a. 'a Ctypes_static.fn -> (string * ty) list
module Type_C : sig ... end
val reader : string -> 'a Ctypes_static.fn -> cfunction
val conser : string -> 'a Ctypes_static.fn -> cfunction
val immediater : string -> 'a Ctypes_static.fn -> cfunction
module Unchecked_function_types : sig ... end
val prim_prj : 'a. 'a Ctypes_primitive_types.prim -> cfunction
val prim_inj : 'a. 'a Ctypes_primitive_types.prim -> cfunction
diff --git a/findlib-1/ctypes/stubs/Cstubs_emit_c/index.html b/findlib-1/ctypes/stubs/Cstubs_emit_c/index.html new file mode 100644 index 000000000..ec623d689 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_emit_c/index.html @@ -0,0 +1,18 @@ + +Cstubs_emit_c (docs.findlib-1.ctypes.stubs.Cstubs_emit_c)

Module Cstubs_emit_c

val format_seq : + string -> + (Format.formatter -> 'a -> unit) -> + string -> + string -> + Format.formatter -> + 'b list -> + unit
val format_ty : Format.formatter -> Cstubs_c_language.ty -> unit
val cvar_name : + [< `Global of Cstubs_c_language.cglobal | `Local of string * 'a ] -> + string
val cvar : + Format.formatter -> + [< `Global of Cstubs_c_language.cglobal | `Local of string * 'a ] -> + unit
val cconst : Format.formatter -> [< `Int of Signed.SInt.t ] -> unit
val camlxParam : Format.formatter -> string list -> unit
val camlParam : Format.formatter -> string list -> unit
val cast_unnecessary : Cstubs_c_language.ty -> Cstubs_c_language.cexp -> bool
val format_parameter_list : + (string * Cstubs_c_language.ty) list -> + (Format.formatter -> unit) -> + Format.formatter -> + unit
val storage_class : Format.formatter -> [< `Extern | `Static ] -> unit
diff --git a/findlib-1/ctypes/stubs/Cstubs_errors/index.html b/findlib-1/ctypes/stubs/Cstubs_errors/index.html new file mode 100644 index 000000000..5a8908e78 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_errors/index.html @@ -0,0 +1,2 @@ + +Cstubs_errors (docs.findlib-1.ctypes.stubs.Cstubs_errors)

Module Cstubs_errors

exception Cstubs_internal_error of string
val internal_error : ('a, unit, string, 'b) format4 -> 'a
diff --git a/findlib-1/ctypes/stubs/Cstubs_generate_c/index.html b/findlib-1/ctypes/stubs/Cstubs_generate_c/index.html new file mode 100644 index 000000000..02248a719 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_generate_c/index.html @@ -0,0 +1,23 @@ + +Cstubs_generate_c (docs.findlib-1.ctypes.stubs.Cstubs_generate_c)

Module Cstubs_generate_c

val fn : + concurrency:[ `Sequential | `Lwt_jobs | `Lwt_preemptive | `Unlocked ] -> + errno:[ `Ignore_errno | `Return_errno ] -> + cname:string -> + stub_name:string -> + Format.formatter -> + 'a Ctypes.fn -> + unit
val value : + cname:string -> + stub_name:string -> + Format.formatter -> + 'a Ctypes.typ -> + unit
val inverse_fn : + stub_name:string -> + runtime_lock:bool -> + Format.formatter -> + 'a Ctypes.fn -> + unit
val inverse_fn_decl : + stub_name:string -> + Format.formatter -> + 'a Ctypes.fn -> + unit
diff --git a/findlib-1/ctypes/stubs/Cstubs_generate_ml/index.html b/findlib-1/ctypes/stubs/Cstubs_generate_ml/index.html new file mode 100644 index 000000000..1e2ab9125 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_generate_ml/index.html @@ -0,0 +1,33 @@ + +Cstubs_generate_ml (docs.findlib-1.ctypes.stubs.Cstubs_generate_ml)

Module Cstubs_generate_ml

val extern : + concurrency:[ `Sequential | `Lwt_jobs | `Lwt_preemptive | `Unlocked ] -> + errno:[ `Ignore_errno | `Return_errno ] -> + stub_name:string -> + external_name:string -> + Format.formatter -> + ('a -> 'b) Ctypes.fn -> + unit
val case : + concurrency:[ `Sequential | `Lwt_jobs | `Lwt_preemptive | `Unlocked ] -> + errno:[ `Ignore_errno | `Return_errno ] -> + stub_name:string -> + external_name:string -> + Format.formatter -> + ('a -> 'b) Ctypes.fn -> + unit
val val_case : + stub_name:string -> + external_name:string -> + Format.formatter -> + 'a Ctypes.typ -> + unit
val constructor_decl : + concurrency:[ `Sequential | `Lwt_jobs | `Lwt_preemptive | `Unlocked ] -> + errno:[ `Ignore_errno | `Return_errno ] -> + string -> + 'a Ctypes.fn -> + Format.formatter -> + unit
val inverse_case : + register_name:string -> + constructor:string -> + string -> + Format.formatter -> + ('a -> 'b) Ctypes.fn -> + unit
diff --git a/findlib-1/ctypes/stubs/Cstubs_inverted/index.html b/findlib-1/ctypes/stubs/Cstubs_inverted/index.html new file mode 100644 index 000000000..9852971d6 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_inverted/index.html @@ -0,0 +1,6 @@ + +Cstubs_inverted (docs.findlib-1.ctypes.stubs.Cstubs_inverted)

Module Cstubs_inverted

Operations for exposing OCaml code as C libraries.

module type INTERNAL = sig ... end
module type BINDINGS = functor (F : INTERNAL) -> sig ... end
val write_c : Format.formatter -> prefix:string -> (module BINDINGS) -> unit

write_c fmt ~prefix bindings generates C stubs for the functions bound with internal in bindings. The stubs are intended to be used in conjunction with the ML code generated by write_ml.

The generated code uses definitions exposed in the header file cstubs_internals.h.

val write_c_header : + Format.formatter -> + prefix:string -> + (module BINDINGS) -> + unit

write_c_header fmt ~prefix bindings generates a C header file for the functions bound with internal in bindings. The stubs are intended to be used in conjunction with the C code generated by write_c.

val write_ml : Format.formatter -> prefix:string -> (module BINDINGS) -> unit

write_ml fmt ~prefix bindings generates ML bindings for the functions bound with internal in bindings. The generated code conforms to the INTERNAL interface.

The generated code uses definitions exposed in the module Cstubs_internals.

diff --git a/findlib-1/ctypes/stubs/Cstubs_inverted/module-type-BINDINGS/argument-1-F/index.html b/findlib-1/ctypes/stubs/Cstubs_inverted/module-type-BINDINGS/argument-1-F/index.html new file mode 100644 index 000000000..eb30eddb4 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_inverted/module-type-BINDINGS/argument-1-F/index.html @@ -0,0 +1,7 @@ + +F (docs.findlib-1.ctypes.stubs.Cstubs_inverted.BINDINGS.F)

Parameter BINDINGS.F

val enum : (string * int64) list -> 'a Ctypes.typ -> unit
val structure : _ Ctypes.structure Ctypes.typ -> unit
val union : _ Ctypes.union Ctypes.typ -> unit
val typedef : _ Ctypes.typ -> string -> unit
val internal : + ?runtime_lock:bool -> + string -> + ('a -> 'b) Ctypes.fn -> + ('a -> 'b) -> + unit
diff --git a/findlib-1/ctypes/stubs/Cstubs_inverted/module-type-BINDINGS/index.html b/findlib-1/ctypes/stubs/Cstubs_inverted/module-type-BINDINGS/index.html new file mode 100644 index 000000000..f98ec91fa --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_inverted/module-type-BINDINGS/index.html @@ -0,0 +1,2 @@ + +BINDINGS (docs.findlib-1.ctypes.stubs.Cstubs_inverted.BINDINGS)

Module type Cstubs_inverted.BINDINGS

Parameters

module F : INTERNAL

Signature

diff --git a/findlib-1/ctypes/stubs/Cstubs_inverted/module-type-INTERNAL/index.html b/findlib-1/ctypes/stubs/Cstubs_inverted/module-type-INTERNAL/index.html new file mode 100644 index 000000000..42f57797f --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_inverted/module-type-INTERNAL/index.html @@ -0,0 +1,7 @@ + +INTERNAL (docs.findlib-1.ctypes.stubs.Cstubs_inverted.INTERNAL)

Module type Cstubs_inverted.INTERNAL

val enum : (string * int64) list -> 'a Ctypes.typ -> unit
val structure : _ Ctypes.structure Ctypes.typ -> unit
val union : _ Ctypes.union Ctypes.typ -> unit
val typedef : _ Ctypes.typ -> string -> unit
val internal : + ?runtime_lock:bool -> + string -> + ('a -> 'b) Ctypes.fn -> + ('a -> 'b) -> + unit
diff --git a/findlib-1/ctypes/stubs/Cstubs_public_name/index.html b/findlib-1/ctypes/stubs/Cstubs_public_name/index.html new file mode 100644 index 000000000..097a0293d --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_public_name/index.html @@ -0,0 +1,7 @@ + +Cstubs_public_name (docs.findlib-1.ctypes.stubs.Cstubs_public_name)

Module Cstubs_public_name

val constructor_ident_of_prim : + 'a Ctypes_primitive_types.prim -> + Ctypes_path.path
val constructor_cident_of_prim : + ?module_name:string -> + 'a Ctypes_primitive_types.prim -> + Ctypes_path.path
diff --git a/findlib-1/ctypes/stubs/Cstubs_structs/index.html b/findlib-1/ctypes/stubs/Cstubs_structs/index.html new file mode 100644 index 000000000..556a72548 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_structs/index.html @@ -0,0 +1,2 @@ + +Cstubs_structs (docs.findlib-1.ctypes.stubs.Cstubs_structs)

Module Cstubs_structs

module type TYPE = sig ... end
module type BINDINGS = functor (F : TYPE) -> sig ... end
val write_c : Format.formatter -> (module BINDINGS) -> unit
diff --git a/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Intptr/Infix/index.html b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Intptr/Infix/index.html new file mode 100644 index 000000000..3f3f28b99 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Intptr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.stubs.Cstubs_structs.BINDINGS.F.Intptr.Infix)

Module Intptr.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Intptr/index.html b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Intptr/index.html new file mode 100644 index 000000000..bf584d374 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Intptr/index.html @@ -0,0 +1,2 @@ + +Intptr (docs.findlib-1.ctypes.stubs.Cstubs_structs.BINDINGS.F.Intptr)

Module F.Intptr

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Ptrdiff/Infix/index.html b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Ptrdiff/Infix/index.html new file mode 100644 index 000000000..76b0e6635 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Ptrdiff/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.stubs.Cstubs_structs.BINDINGS.F.Ptrdiff.Infix)

Module Ptrdiff.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Ptrdiff/index.html b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Ptrdiff/index.html new file mode 100644 index 000000000..d3c2e03be --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Ptrdiff/index.html @@ -0,0 +1,2 @@ + +Ptrdiff (docs.findlib-1.ctypes.stubs.Cstubs_structs.BINDINGS.F.Ptrdiff)

Module F.Ptrdiff

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Uintptr/Infix/index.html b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Uintptr/Infix/index.html new file mode 100644 index 000000000..afd9265a5 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Uintptr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.stubs.Cstubs_structs.BINDINGS.F.Uintptr.Infix)

Module Uintptr.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Uintptr/index.html b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Uintptr/index.html new file mode 100644 index 000000000..f6886a567 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/Uintptr/index.html @@ -0,0 +1,2 @@ + +Uintptr (docs.findlib-1.ctypes.stubs.Cstubs_structs.BINDINGS.F.Uintptr)

Module F.Uintptr

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Unsigned.Infix with type t := t
diff --git a/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/index.html b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/index.html new file mode 100644 index 000000000..6a6599d81 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/argument-1-F/index.html @@ -0,0 +1,41 @@ + +F (docs.findlib-1.ctypes.stubs.Cstubs_structs.BINDINGS.F)

Parameter BINDINGS.F

include Ctypes_types.TYPE

Values representing C types

type 'a typ

The type of values representing C types. There are two types associated with each typ value: the C type used to store and pass values, and the corresponding OCaml type. The type parameter indicates the OCaml type, so a value of type t typ is used to read and write OCaml values of type t. There are various uses of typ values, including

  • constructing function types for binding native functions using Foreign.foreign
  • constructing pointers for reading and writing locations in C-managed storage using ptr
  • describing the fields of structured types built with structure and union.

The void type

val void : unit typ

Value representing the C void type. Void values appear in OCaml as the unit type, so using void in an argument or result type specification produces a function which accepts or returns unit.

Dereferencing a pointer to void is an error, as in C, and will raise IncompleteType.

Scalar types

The scalar types consist of the Arithmetic types and the Pointer types.

Arithmetic types

The arithmetic types consist of the signed and unsigned integer types (including character types) and the floating types. There are values representing both exact-width integer types (of 8, 16, 32 and 64 bits) and types whose size depend on the platform (signed and unsigned short, int, long, long long).

val char : char typ

Value representing the C type char.

Signed integer types
val schar : int typ

Value representing the C type signed char.

val short : int typ

Value representing the C type (signed) short.

val int : int typ

Value representing the C type (signed) int.

val long : Signed.long typ

Value representing the C type (signed) long.

val llong : Signed.llong typ

Value representing the C type (signed) long long.

val nativeint : nativeint typ

Value representing the C type (signed) int.

val int8_t : int typ

Value representing an 8-bit signed integer C type.

val int16_t : int typ

Value representing a 16-bit signed integer C type.

val int32_t : int32 typ

Value representing a 32-bit signed integer C type.

val int64_t : int64 typ

Value representing a 64-bit signed integer C type.

module Intptr : Signed.S
val intptr_t : Intptr.t typ

Value representing the C type intptr_t.

module Ptrdiff : Signed.S
val ptrdiff_t : Ptrdiff.t typ

Value representing the C type ptrdiff_t.

val camlint : int typ

Value representing an integer type with the same storage requirements as an OCaml int.

Unsigned integer types
val uchar : Unsigned.uchar typ

Value representing the C type unsigned char.

val bool : bool typ

Value representing the C type bool.

val uint8_t : Unsigned.uint8 typ

Value representing an 8-bit unsigned integer C type.

val uint16_t : Unsigned.uint16 typ

Value representing a 16-bit unsigned integer C type.

val uint32_t : Unsigned.uint32 typ

Value representing a 32-bit unsigned integer C type.

val uint64_t : Unsigned.uint64 typ

Value representing a 64-bit unsigned integer C type.

val size_t : Unsigned.size_t typ

Value representing the C type size_t, an alias for one of the unsigned integer types. The actual size and alignment requirements for size_t vary between platforms.

val ushort : Unsigned.ushort typ

Value representing the C type unsigned short.

val sint : Signed.sint typ

Value representing the C type int.

val uint : Unsigned.uint typ

Value representing the C type unsigned int.

val ulong : Unsigned.ulong typ

Value representing the C type unsigned long.

val ullong : Unsigned.ullong typ

Value representing the C type unsigned long long.

val uintptr_t : Uintptr.t typ

Value representing the C type uintptr_t.

Floating types
val float : float typ

Value representing the C single-precision float type.

val double : float typ

Value representing the C type double.

val ldouble : LDouble.t typ

Value representing the C type long double.

Complex types
val complex32 : Complex.t typ

Value representing the C99 single-precision float complex type.

val complex64 : Complex.t typ

Value representing the C99 double-precision double complex type.

val complexld : ComplexL.t typ

Value representing the C99 long-double-precision long double complex type.

Pointer types
C-compatible pointers
val ptr : 'a typ -> 'a Ctypes_static.ptr typ

Construct a pointer type from an existing type (called the reference type).

val ptr_opt : 'a typ -> 'a Ctypes_static.ptr option typ

Construct a pointer type from an existing type (called the reference type). This behaves like ptr, except that null pointers appear in OCaml as None.

val string : string typ

A high-level representation of the string type.

On the C side this behaves like char *; on the OCaml side values read and written using string are simply native OCaml strings.

To avoid problems with the garbage collector, values passed using string are copied into immovable C-managed storage before being passed to C.

The string type representation is suitable for use in function argument types such as the following:

string @-> returning int

where the lifetime of the C-managed storage does not need to extend beyond the duration of the function call. However, it is not suitable for use in struct or union fields

field s "x" string

because it does not provide a way to manage the lifetime of the C-managed storage.

val string_opt : string option typ

A high-level representation of the string type. This behaves like string, except that null pointers appear in OCaml as None.

OCaml pointers
val ocaml_string : string Ctypes_static.ocaml typ

Value representing the directly mapped storage of an OCaml string.

val ocaml_bytes : bytes Ctypes_static.ocaml typ

Value representing the directly mapped storage of an OCaml byte array.

Array types

C array types
val array : int -> 'a typ -> 'a Ctypes_static.carray typ

Construct a sized array type from a length and an existing type (called the element type).

Bigarray types
val bigarray : + < element : 'a + ; layout : Bigarray_compat.c_layout + ; ba_repr : 'b + ; dims : 'dims + ; bigarray : 'bigarray + ; carray : _ > + Ctypes_static.bigarray_class -> + 'dims -> + ('a, 'b) Bigarray_compat.kind -> + 'bigarray typ

Construct a sized C-layout bigarray type representation from a bigarray class, the dimensions, and the Bigarray_compat.kind.

val fortran_bigarray : + < element : 'a + ; layout : Bigarray_compat.fortran_layout + ; ba_repr : 'b + ; dims : 'dims + ; bigarray : 'bigarray + ; carray : _ > + Ctypes_static.bigarray_class -> + 'dims -> + ('a, 'b) Bigarray_compat.kind -> + 'bigarray typ

Construct a sized Fortran-layout bigarray type representation from a bigarray class, the dimensions, and the Bigarray_compat.kind.

val typ_of_bigarray_kind : ('a, 'b) Bigarray_compat.kind -> 'a typ

typ_of_bigarray_kind k is the type corresponding to the Bigarray kind k.

Struct and union types

type ('a, 't) field
val structure : string -> 's Ctypes_static.structure typ

Construct a new structure type. The type value returned is incomplete and can be updated using field until it is passed to seal, at which point the set of fields is fixed.

The type ('_s structure typ) of the expression returned by the call structure tag includes a weak type variable, which can be explicitly instantiated to ensure that the OCaml values representing different C structure types have incompatible types. Typical usage is as follows:

type tagname

let tagname : tagname structure typ = structure "tagname"

val union : string -> 's Ctypes_static.union typ

Construct a new union type. This behaves analogously to structure; fields are added with field.

val field : + 't typ -> + string -> + 'a typ -> + ('a, ('s, [< `Struct | `Union ]) Ctypes_static.structured as 't) field

field ty label ty' adds a field of type ty' with label label to the structure or union type ty and returns a field value that can be used to read and write the field in structure or union instances (e.g. using getf and setf).

Attempting to add a field to a union type that has been sealed with seal is an error, and will raise ModifyingSealedType.

val seal : (_, [< `Struct | `Union ]) Ctypes_static.structured typ -> unit

seal t completes the struct or union type t so that no further fields can be added. Struct and union types must be sealed before they can be used in a way that involves their size or alignment; see the documentation for IncompleteType for further details.

View types

val view : + ?format_typ:((Format.formatter -> unit) -> Format.formatter -> unit) -> + ?format:(Format.formatter -> 'b -> unit) -> + read:('a -> 'b) -> + write:('b -> 'a) -> + 'a typ -> + 'b typ

view ~read:r ~write:w t creates a C type representation t' which behaves like t except that values read using t' are subsequently transformed using the function r and values written using t' are first transformed using the function w.

For example, given suitable definitions of string_of_char_ptr and char_ptr_of_string, the type representation

view ~read:string_of_char_ptr ~write:char_ptr_of_string (ptr char)

can be used to pass OCaml strings directly to and from bound C functions, or to read and write string members in structs and arrays. (In fact, the string type representation is defined in exactly this way.)

The optional argument format_typ is used by the Ctypes.format_typ and string_of_typ functions to print the type at the top level and elsewhere. If format_typ is not supplied the printer for t is used instead.

The optional argument format is used by the Ctypes.format and string_of functions to print the values. If format_val is not supplied the printer for t is used instead.

val typedef : 'a typ -> string -> 'a typ

typedef t name creates a C type representation t' which is equivalent to t except its name is printed as name.

This is useful when generating C stubs involving "anonymous" types, for example: typedef struct { int f } typedef_name;

Abstract types

val abstract : + name:string -> + size:int -> + alignment:int -> + 'a Ctypes_static.abstract typ

Create an abstract type specification from the size and alignment requirements for the type.

Injection of concrete types

val lift_typ : 'a Ctypes_static.typ -> 'a typ

lift_typ t turns a concrete type representation into an abstract type representation.

For example, retrieving struct layout from C involves working with an abstract representation of types which do not support operations such as sizeof. The lift_typ function makes it possible to use concrete type representations wherever such abstract type representations are needed.

Function types

Abstract interface to C function type descriptions

type 'a fn = 'a Ctypes_static.fn

The type of values representing C function types. A value of type t fn can be used to bind to C functions and to describe type of OCaml functions passed to C.

val (@->) : 'a typ -> 'b fn -> ('a -> 'b) fn

Construct a function type from a type and an existing function type. This corresponds to prepending a parameter to a C function parameter list. For example,

int @-> ptr void @-> returning float

describes a function type that accepts two arguments -- an integer and a pointer to void -- and returns a float.

val returning : 'a typ -> 'a fn

Give the return type of a C function. Note that returning is intended to be used together with (@->); see the documentation for (@->) for an example.

type 'a static_funptr = 'a Ctypes_static.static_funptr

Function pointer types

The type of values representing C function pointer types.

val static_funptr : 'a fn -> 'a Ctypes_static.static_funptr typ

Construct a function pointer type from an existing function type (called the reference type).

val const : 'a typ -> 'a typ
type 'a const
val constant : string -> 'a typ -> 'a const
val enum : + string -> + ?typedef:bool -> + ?unexpected:(int64 -> 'a) -> + ('a * int64 const) list -> + 'a typ
diff --git a/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/index.html b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/index.html new file mode 100644 index 000000000..4bfe29e1d --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-BINDINGS/index.html @@ -0,0 +1,2 @@ + +BINDINGS (docs.findlib-1.ctypes.stubs.Cstubs_structs.BINDINGS)

Module type Cstubs_structs.BINDINGS

Parameters

module F : TYPE

Signature

diff --git a/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Intptr/Infix/index.html b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Intptr/Infix/index.html new file mode 100644 index 000000000..2ba06ff7a --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Intptr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.stubs.Cstubs_structs.TYPE.Intptr.Infix)

Module Intptr.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Intptr/index.html b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Intptr/index.html new file mode 100644 index 000000000..f0f9a56cb --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Intptr/index.html @@ -0,0 +1,2 @@ + +Intptr (docs.findlib-1.ctypes.stubs.Cstubs_structs.TYPE.Intptr)

Module TYPE.Intptr

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Ptrdiff/Infix/index.html b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Ptrdiff/Infix/index.html new file mode 100644 index 000000000..c7af9ce42 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Ptrdiff/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.stubs.Cstubs_structs.TYPE.Ptrdiff.Infix)

Module Ptrdiff.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Ptrdiff/index.html b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Ptrdiff/index.html new file mode 100644 index 000000000..f903e5ca6 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Ptrdiff/index.html @@ -0,0 +1,2 @@ + +Ptrdiff (docs.findlib-1.ctypes.stubs.Cstubs_structs.TYPE.Ptrdiff)

Module TYPE.Ptrdiff

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Uintptr/Infix/index.html b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Uintptr/Infix/index.html new file mode 100644 index 000000000..36c15e626 --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Uintptr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.ctypes.stubs.Cstubs_structs.TYPE.Uintptr.Infix)

Module Uintptr.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Uintptr/index.html b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Uintptr/index.html new file mode 100644 index 000000000..8bfb4080a --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/Uintptr/index.html @@ -0,0 +1,2 @@ + +Uintptr (docs.findlib-1.ctypes.stubs.Cstubs_structs.TYPE.Uintptr)

Module TYPE.Uintptr

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Unsigned.Infix with type t := t
diff --git a/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/index.html b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/index.html new file mode 100644 index 000000000..721d3945c --- /dev/null +++ b/findlib-1/ctypes/stubs/Cstubs_structs/module-type-TYPE/index.html @@ -0,0 +1,41 @@ + +TYPE (docs.findlib-1.ctypes.stubs.Cstubs_structs.TYPE)

Module type Cstubs_structs.TYPE

include Ctypes_types.TYPE

Values representing C types

type 'a typ

The type of values representing C types. There are two types associated with each typ value: the C type used to store and pass values, and the corresponding OCaml type. The type parameter indicates the OCaml type, so a value of type t typ is used to read and write OCaml values of type t. There are various uses of typ values, including

  • constructing function types for binding native functions using Foreign.foreign
  • constructing pointers for reading and writing locations in C-managed storage using ptr
  • describing the fields of structured types built with structure and union.

The void type

val void : unit typ

Value representing the C void type. Void values appear in OCaml as the unit type, so using void in an argument or result type specification produces a function which accepts or returns unit.

Dereferencing a pointer to void is an error, as in C, and will raise IncompleteType.

Scalar types

The scalar types consist of the Arithmetic types and the Pointer types.

Arithmetic types

The arithmetic types consist of the signed and unsigned integer types (including character types) and the floating types. There are values representing both exact-width integer types (of 8, 16, 32 and 64 bits) and types whose size depend on the platform (signed and unsigned short, int, long, long long).

val char : char typ

Value representing the C type char.

Signed integer types
val schar : int typ

Value representing the C type signed char.

val short : int typ

Value representing the C type (signed) short.

val int : int typ

Value representing the C type (signed) int.

val long : Signed.long typ

Value representing the C type (signed) long.

val llong : Signed.llong typ

Value representing the C type (signed) long long.

val nativeint : nativeint typ

Value representing the C type (signed) int.

val int8_t : int typ

Value representing an 8-bit signed integer C type.

val int16_t : int typ

Value representing a 16-bit signed integer C type.

val int32_t : int32 typ

Value representing a 32-bit signed integer C type.

val int64_t : int64 typ

Value representing a 64-bit signed integer C type.

module Intptr : Signed.S
val intptr_t : Intptr.t typ

Value representing the C type intptr_t.

module Ptrdiff : Signed.S
val ptrdiff_t : Ptrdiff.t typ

Value representing the C type ptrdiff_t.

val camlint : int typ

Value representing an integer type with the same storage requirements as an OCaml int.

Unsigned integer types
val uchar : Unsigned.uchar typ

Value representing the C type unsigned char.

val bool : bool typ

Value representing the C type bool.

val uint8_t : Unsigned.uint8 typ

Value representing an 8-bit unsigned integer C type.

val uint16_t : Unsigned.uint16 typ

Value representing a 16-bit unsigned integer C type.

val uint32_t : Unsigned.uint32 typ

Value representing a 32-bit unsigned integer C type.

val uint64_t : Unsigned.uint64 typ

Value representing a 64-bit unsigned integer C type.

val size_t : Unsigned.size_t typ

Value representing the C type size_t, an alias for one of the unsigned integer types. The actual size and alignment requirements for size_t vary between platforms.

val ushort : Unsigned.ushort typ

Value representing the C type unsigned short.

val sint : Signed.sint typ

Value representing the C type int.

val uint : Unsigned.uint typ

Value representing the C type unsigned int.

val ulong : Unsigned.ulong typ

Value representing the C type unsigned long.

val ullong : Unsigned.ullong typ

Value representing the C type unsigned long long.

val uintptr_t : Uintptr.t typ

Value representing the C type uintptr_t.

Floating types
val float : float typ

Value representing the C single-precision float type.

val double : float typ

Value representing the C type double.

val ldouble : LDouble.t typ

Value representing the C type long double.

Complex types
val complex32 : Complex.t typ

Value representing the C99 single-precision float complex type.

val complex64 : Complex.t typ

Value representing the C99 double-precision double complex type.

val complexld : ComplexL.t typ

Value representing the C99 long-double-precision long double complex type.

Pointer types
C-compatible pointers
val ptr : 'a typ -> 'a Ctypes_static.ptr typ

Construct a pointer type from an existing type (called the reference type).

val ptr_opt : 'a typ -> 'a Ctypes_static.ptr option typ

Construct a pointer type from an existing type (called the reference type). This behaves like ptr, except that null pointers appear in OCaml as None.

val string : string typ

A high-level representation of the string type.

On the C side this behaves like char *; on the OCaml side values read and written using string are simply native OCaml strings.

To avoid problems with the garbage collector, values passed using string are copied into immovable C-managed storage before being passed to C.

The string type representation is suitable for use in function argument types such as the following:

string @-> returning int

where the lifetime of the C-managed storage does not need to extend beyond the duration of the function call. However, it is not suitable for use in struct or union fields

field s "x" string

because it does not provide a way to manage the lifetime of the C-managed storage.

val string_opt : string option typ

A high-level representation of the string type. This behaves like string, except that null pointers appear in OCaml as None.

OCaml pointers
val ocaml_string : string Ctypes_static.ocaml typ

Value representing the directly mapped storage of an OCaml string.

val ocaml_bytes : bytes Ctypes_static.ocaml typ

Value representing the directly mapped storage of an OCaml byte array.

Array types

C array types
val array : int -> 'a typ -> 'a Ctypes_static.carray typ

Construct a sized array type from a length and an existing type (called the element type).

Bigarray types
val bigarray : + < element : 'a + ; layout : Bigarray_compat.c_layout + ; ba_repr : 'b + ; dims : 'dims + ; bigarray : 'bigarray + ; carray : _ > + Ctypes_static.bigarray_class -> + 'dims -> + ('a, 'b) Bigarray_compat.kind -> + 'bigarray typ

Construct a sized C-layout bigarray type representation from a bigarray class, the dimensions, and the Bigarray_compat.kind.

val fortran_bigarray : + < element : 'a + ; layout : Bigarray_compat.fortran_layout + ; ba_repr : 'b + ; dims : 'dims + ; bigarray : 'bigarray + ; carray : _ > + Ctypes_static.bigarray_class -> + 'dims -> + ('a, 'b) Bigarray_compat.kind -> + 'bigarray typ

Construct a sized Fortran-layout bigarray type representation from a bigarray class, the dimensions, and the Bigarray_compat.kind.

val typ_of_bigarray_kind : ('a, 'b) Bigarray_compat.kind -> 'a typ

typ_of_bigarray_kind k is the type corresponding to the Bigarray kind k.

Struct and union types

type ('a, 't) field
val structure : string -> 's Ctypes_static.structure typ

Construct a new structure type. The type value returned is incomplete and can be updated using field until it is passed to seal, at which point the set of fields is fixed.

The type ('_s structure typ) of the expression returned by the call structure tag includes a weak type variable, which can be explicitly instantiated to ensure that the OCaml values representing different C structure types have incompatible types. Typical usage is as follows:

type tagname

let tagname : tagname structure typ = structure "tagname"

val union : string -> 's Ctypes_static.union typ

Construct a new union type. This behaves analogously to structure; fields are added with field.

val field : + 't typ -> + string -> + 'a typ -> + ('a, ('s, [< `Struct | `Union ]) Ctypes_static.structured as 't) field

field ty label ty' adds a field of type ty' with label label to the structure or union type ty and returns a field value that can be used to read and write the field in structure or union instances (e.g. using getf and setf).

Attempting to add a field to a union type that has been sealed with seal is an error, and will raise ModifyingSealedType.

val seal : (_, [< `Struct | `Union ]) Ctypes_static.structured typ -> unit

seal t completes the struct or union type t so that no further fields can be added. Struct and union types must be sealed before they can be used in a way that involves their size or alignment; see the documentation for IncompleteType for further details.

View types

val view : + ?format_typ:((Format.formatter -> unit) -> Format.formatter -> unit) -> + ?format:(Format.formatter -> 'b -> unit) -> + read:('a -> 'b) -> + write:('b -> 'a) -> + 'a typ -> + 'b typ

view ~read:r ~write:w t creates a C type representation t' which behaves like t except that values read using t' are subsequently transformed using the function r and values written using t' are first transformed using the function w.

For example, given suitable definitions of string_of_char_ptr and char_ptr_of_string, the type representation

view ~read:string_of_char_ptr ~write:char_ptr_of_string (ptr char)

can be used to pass OCaml strings directly to and from bound C functions, or to read and write string members in structs and arrays. (In fact, the string type representation is defined in exactly this way.)

The optional argument format_typ is used by the Ctypes.format_typ and string_of_typ functions to print the type at the top level and elsewhere. If format_typ is not supplied the printer for t is used instead.

The optional argument format is used by the Ctypes.format and string_of functions to print the values. If format_val is not supplied the printer for t is used instead.

val typedef : 'a typ -> string -> 'a typ

typedef t name creates a C type representation t' which is equivalent to t except its name is printed as name.

This is useful when generating C stubs involving "anonymous" types, for example: typedef struct { int f } typedef_name;

Abstract types

val abstract : + name:string -> + size:int -> + alignment:int -> + 'a Ctypes_static.abstract typ

Create an abstract type specification from the size and alignment requirements for the type.

Injection of concrete types

val lift_typ : 'a Ctypes_static.typ -> 'a typ

lift_typ t turns a concrete type representation into an abstract type representation.

For example, retrieving struct layout from C involves working with an abstract representation of types which do not support operations such as sizeof. The lift_typ function makes it possible to use concrete type representations wherever such abstract type representations are needed.

Function types

Abstract interface to C function type descriptions

type 'a fn = 'a Ctypes_static.fn

The type of values representing C function types. A value of type t fn can be used to bind to C functions and to describe type of OCaml functions passed to C.

val (@->) : 'a typ -> 'b fn -> ('a -> 'b) fn

Construct a function type from a type and an existing function type. This corresponds to prepending a parameter to a C function parameter list. For example,

int @-> ptr void @-> returning float

describes a function type that accepts two arguments -- an integer and a pointer to void -- and returns a float.

val returning : 'a typ -> 'a fn

Give the return type of a C function. Note that returning is intended to be used together with (@->); see the documentation for (@->) for an example.

type 'a static_funptr = 'a Ctypes_static.static_funptr

Function pointer types

The type of values representing C function pointer types.

val static_funptr : 'a fn -> 'a Ctypes_static.static_funptr typ

Construct a function pointer type from an existing function type (called the reference type).

val const : 'a typ -> 'a typ
type 'a const
val constant : string -> 'a typ -> 'a const
val enum : + string -> + ?typedef:bool -> + ?unexpected:(int64 -> 'a) -> + ('a * int64 const) list -> + 'a typ
diff --git a/findlib-1/ctypes/stubs/Ctypes_path/index.html b/findlib-1/ctypes/stubs/Ctypes_path/index.html new file mode 100644 index 000000000..090141938 --- /dev/null +++ b/findlib-1/ctypes/stubs/Ctypes_path/index.html @@ -0,0 +1,2 @@ + +Ctypes_path (docs.findlib-1.ctypes.stubs.Ctypes_path)

Module Ctypes_path

type path
val path_of_string : string -> path
val format_path : Format.formatter -> path -> unit
diff --git a/findlib-1/ctypes/stubs/index.html b/findlib-1/ctypes/stubs/index.html new file mode 100644 index 000000000..7ea40cb6d --- /dev/null +++ b/findlib-1/ctypes/stubs/index.html @@ -0,0 +1,2 @@ + +stubs (docs.findlib-1.ctypes.stubs)

Package ctypes.stubs

Library ctypes.stubs

This library exposes the following toplevel modules:

diff --git a/findlib-1/index.html b/findlib-1/index.html new file mode 100644 index 000000000..894c454f4 --- /dev/null +++ b/findlib-1/index.html @@ -0,0 +1,2 @@ + +findlib-1 (docs.findlib-1)

Opam index

Packages installed in /home/runner/work/server-reason-react/server-reason-react/_opam/lib

Sub-indexes

diff --git a/findlib-1/integers/Signed/Int/Infix/index.html b/findlib-1/integers/Signed/Int/Infix/index.html new file mode 100644 index 000000000..028ae383f --- /dev/null +++ b/findlib-1/integers/Signed/Int/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Signed.Int.Infix)

Module Int.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Signed/Int/index.html b/findlib-1/integers/Signed/Int/index.html new file mode 100644 index 000000000..b3056f5df --- /dev/null +++ b/findlib-1/integers/Signed/Int/index.html @@ -0,0 +1,2 @@ + +Int (docs.findlib-1.integers.Signed.Int)

Module Signed.Int

Signed integer type and operations.

type t = int
module Infix : Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/integers/Signed/Int32/Infix/index.html b/findlib-1/integers/Signed/Int32/Infix/index.html new file mode 100644 index 000000000..b5aab49ef --- /dev/null +++ b/findlib-1/integers/Signed/Int32/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Signed.Int32.Infix)

Module Int32.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Signed/Int32/index.html b/findlib-1/integers/Signed/Int32/index.html new file mode 100644 index 000000000..9eacded00 --- /dev/null +++ b/findlib-1/integers/Signed/Int32/index.html @@ -0,0 +1,2 @@ + +Int32 (docs.findlib-1.integers.Signed.Int32)

Module Signed.Int32

Signed 32-bit integer type and operations.

type t = int32
module Infix : Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/integers/Signed/Int64/Infix/index.html b/findlib-1/integers/Signed/Int64/Infix/index.html new file mode 100644 index 000000000..a468d9afa --- /dev/null +++ b/findlib-1/integers/Signed/Int64/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Signed.Int64.Infix)

Module Int64.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Signed/Int64/index.html b/findlib-1/integers/Signed/Int64/index.html new file mode 100644 index 000000000..01d7cf7d0 --- /dev/null +++ b/findlib-1/integers/Signed/Int64/index.html @@ -0,0 +1,2 @@ + +Int64 (docs.findlib-1.integers.Signed.Int64)

Module Signed.Int64

Signed 64-bit integer type and operations.

type t = int64
module Infix : Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/integers/Signed/LLong/Infix/index.html b/findlib-1/integers/Signed/LLong/Infix/index.html new file mode 100644 index 000000000..6273861ae --- /dev/null +++ b/findlib-1/integers/Signed/LLong/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Signed.LLong.Infix)

Module LLong.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Signed/LLong/index.html b/findlib-1/integers/Signed/LLong/index.html new file mode 100644 index 000000000..3cbc3eb21 --- /dev/null +++ b/findlib-1/integers/Signed/LLong/index.html @@ -0,0 +1,2 @@ + +LLong (docs.findlib-1.integers.Signed.LLong)

Module Signed.LLong

The signed long long integer type and operations.

type t
module Infix : Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/integers/Signed/Long/Infix/index.html b/findlib-1/integers/Signed/Long/Infix/index.html new file mode 100644 index 000000000..5b5a3340f --- /dev/null +++ b/findlib-1/integers/Signed/Long/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Signed.Long.Infix)

Module Long.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Signed/Long/index.html b/findlib-1/integers/Signed/Long/index.html new file mode 100644 index 000000000..257657cdd --- /dev/null +++ b/findlib-1/integers/Signed/Long/index.html @@ -0,0 +1,2 @@ + +Long (docs.findlib-1.integers.Signed.Long)

Module Signed.Long

The signed long integer type and operations.

type t
module Infix : Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/integers/Signed/SInt/Infix/index.html b/findlib-1/integers/Signed/SInt/Infix/index.html new file mode 100644 index 000000000..c9424ab65 --- /dev/null +++ b/findlib-1/integers/Signed/SInt/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Signed.SInt.Infix)

Module SInt.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Signed/SInt/index.html b/findlib-1/integers/Signed/SInt/index.html new file mode 100644 index 000000000..074d3b5f5 --- /dev/null +++ b/findlib-1/integers/Signed/SInt/index.html @@ -0,0 +1,2 @@ + +SInt (docs.findlib-1.integers.Signed.SInt)

Module Signed.SInt

C's signed integer type and operations.

type t
module Infix : Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/integers/Signed/index.html b/findlib-1/integers/Signed/index.html new file mode 100644 index 000000000..fab93893e --- /dev/null +++ b/findlib-1/integers/Signed/index.html @@ -0,0 +1,2 @@ + +Signed (docs.findlib-1.integers.Signed)

Module Signed

Types and operations for signed integers.

module type Infix = sig ... end
module type S = sig ... end

Signed integer operations

module Int : S with type t = int

Signed integer type and operations.

module Int32 : S with type t = int32

Signed 32-bit integer type and operations.

module Int64 : S with type t = int64

Signed 64-bit integer type and operations.

module SInt : S

C's signed integer type and operations.

module Long : S

The signed long integer type and operations.

module LLong : S

The signed long long integer type and operations.

type sint = SInt.t

C's signed integer type.

type long = Long.t

The signed long integer type.

type llong = LLong.t

The signed long long integer type.

val of_byte_size : int -> (module S)

of_byte_size b is a module of type S that implements a signed type with b bytes.

Raise Invalid_argument if no suitable type is available.

diff --git a/findlib-1/integers/Signed/module-type-Infix/index.html b/findlib-1/integers/Signed/module-type-Infix/index.html new file mode 100644 index 000000000..f835c4dd4 --- /dev/null +++ b/findlib-1/integers/Signed/module-type-Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Signed.Infix)

Module type Signed.Infix

type t
include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Signed/module-type-S/Infix/index.html b/findlib-1/integers/Signed/module-type-S/Infix/index.html new file mode 100644 index 000000000..c4553e883 --- /dev/null +++ b/findlib-1/integers/Signed/module-type-S/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Signed.S.Infix)

Module S.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Signed/module-type-S/index.html b/findlib-1/integers/Signed/module-type-S/index.html new file mode 100644 index 000000000..a79979409 --- /dev/null +++ b/findlib-1/integers/Signed/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (docs.findlib-1.integers.Signed.S)

Module type Signed.S

Signed integer operations

type t
module Infix : Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/integers/Unsigned/Size_t/Infix/index.html b/findlib-1/integers/Unsigned/Size_t/Infix/index.html new file mode 100644 index 000000000..708c51e01 --- /dev/null +++ b/findlib-1/integers/Unsigned/Size_t/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Unsigned.Size_t.Infix)

Module Size_t.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Unsigned/Size_t/index.html b/findlib-1/integers/Unsigned/Size_t/index.html new file mode 100644 index 000000000..8dd431d1f --- /dev/null +++ b/findlib-1/integers/Unsigned/Size_t/index.html @@ -0,0 +1,2 @@ + +Size_t (docs.findlib-1.integers.Unsigned.Size_t)

Module Unsigned.Size_t

The size_t unsigned integer type and operations.

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Infix with type t := t
diff --git a/findlib-1/integers/Unsigned/UChar/Infix/index.html b/findlib-1/integers/Unsigned/UChar/Infix/index.html new file mode 100644 index 000000000..a87ddffdb --- /dev/null +++ b/findlib-1/integers/Unsigned/UChar/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Unsigned.UChar.Infix)

Module UChar.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Unsigned/UChar/index.html b/findlib-1/integers/Unsigned/UChar/index.html new file mode 100644 index 000000000..0a45aacde --- /dev/null +++ b/findlib-1/integers/Unsigned/UChar/index.html @@ -0,0 +1,2 @@ + +UChar (docs.findlib-1.integers.Unsigned.UChar)

Module Unsigned.UChar

Unsigned char type and operations.

type t = private int
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Infix with type t := t
diff --git a/findlib-1/integers/Unsigned/UInt/Infix/index.html b/findlib-1/integers/Unsigned/UInt/Infix/index.html new file mode 100644 index 000000000..65d9c767a --- /dev/null +++ b/findlib-1/integers/Unsigned/UInt/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Unsigned.UInt.Infix)

Module UInt.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Unsigned/UInt/index.html b/findlib-1/integers/Unsigned/UInt/index.html new file mode 100644 index 000000000..bf227954b --- /dev/null +++ b/findlib-1/integers/Unsigned/UInt/index.html @@ -0,0 +1,2 @@ + +UInt (docs.findlib-1.integers.Unsigned.UInt)

Module Unsigned.UInt

The unsigned int type and operations.

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Infix with type t := t
diff --git a/findlib-1/integers/Unsigned/UInt16/Infix/index.html b/findlib-1/integers/Unsigned/UInt16/Infix/index.html new file mode 100644 index 000000000..47c24754d --- /dev/null +++ b/findlib-1/integers/Unsigned/UInt16/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Unsigned.UInt16.Infix)

Module UInt16.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Unsigned/UInt16/index.html b/findlib-1/integers/Unsigned/UInt16/index.html new file mode 100644 index 000000000..b96cf39fe --- /dev/null +++ b/findlib-1/integers/Unsigned/UInt16/index.html @@ -0,0 +1,2 @@ + +UInt16 (docs.findlib-1.integers.Unsigned.UInt16)

Module Unsigned.UInt16

Unsigned 16-bit integer type and operations.

type t = private int
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Infix with type t := t
diff --git a/findlib-1/integers/Unsigned/UInt32/Infix/index.html b/findlib-1/integers/Unsigned/UInt32/Infix/index.html new file mode 100644 index 000000000..2aa51e613 --- /dev/null +++ b/findlib-1/integers/Unsigned/UInt32/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Unsigned.UInt32.Infix)

Module UInt32.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Unsigned/UInt32/index.html b/findlib-1/integers/Unsigned/UInt32/index.html new file mode 100644 index 000000000..6a008c7c3 --- /dev/null +++ b/findlib-1/integers/Unsigned/UInt32/index.html @@ -0,0 +1,2 @@ + +UInt32 (docs.findlib-1.integers.Unsigned.UInt32)

Module Unsigned.UInt32

Unsigned 32-bit integer type and operations.

include S
type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Infix with type t := t
val of_int32 : int32 -> t

Convert the given 32-bit signed integer to an unsigned 32-bit integer.

If the signed integer fits within the unsigned range (in other words, if the signed integer is positive) then the numerical values represented by the signed and unsigned integers are the same.

Whether the signed integer fits or not, the function of_int32 is always the inverse of the function to_int32. In other words, to_int32 (of_int32 x) = x holds for all x : int32.

val to_int32 : t -> int32

Convert the given 32-bit unsigned integer to a signed 32-bit integer.

If the unsigned integer fits within the signed range (in other words, if the unsigned integer is less than Int32.max_int) then the numerical values represented by unsigned and signed integers are the same.

Whether the unsigned integer fits or not, the function to_int32 is always the inverse of the function of_int32. In other words, of_int32 (to_int32 x) = x holds for all x : t.

diff --git a/findlib-1/integers/Unsigned/UInt64/Infix/index.html b/findlib-1/integers/Unsigned/UInt64/Infix/index.html new file mode 100644 index 000000000..87d67cb14 --- /dev/null +++ b/findlib-1/integers/Unsigned/UInt64/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Unsigned.UInt64.Infix)

Module UInt64.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Unsigned/UInt64/index.html b/findlib-1/integers/Unsigned/UInt64/index.html new file mode 100644 index 000000000..3d6d384ed --- /dev/null +++ b/findlib-1/integers/Unsigned/UInt64/index.html @@ -0,0 +1,2 @@ + +UInt64 (docs.findlib-1.integers.Unsigned.UInt64)

Module Unsigned.UInt64

Unsigned 64-bit integer type and operations.

include S
type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Infix with type t := t
val of_int64 : int64 -> t

Convert the given 64-bit signed integer to an unsigned 64-bit integer.

If the signed integer fits within the unsigned range (in other words, if the signed integer is positive) then the numerical values represented by the signed and unsigned integers are the same.

Whether the signed integer fits or not, the function of_int64 is always the inverse of the function to_int64. In other words, to_int64 (of_int64 x) = x holds for all x : int64.

val to_int64 : t -> int64

Convert the given 64-bit unsigned integer to a signed 64-bit integer.

If the unsigned integer fits within the signed range (in other words, if the unsigned integer is less than Int64.max_int) then the numerical values represented by unsigned and signed integers are the same.

Whether the unsigned integer fits or not, the function to_int64 is always the inverse of the function of_int64. In other words, of_int64 (to_int64 x) = x holds for all x : t.

val of_uint32 : UInt32.t -> t

Convert the given 32-bit unsigned integer to a 64-bit unsigned integer.

val to_uint32 : t -> UInt32.t

Convert the given 64-bit unsigned integer to a 32-bit unsigned integer. The 64-bit unsigned integer is taken modulo 232, i.e. the top 32 bits are lost during the conversion.

diff --git a/findlib-1/integers/Unsigned/UInt8/Infix/index.html b/findlib-1/integers/Unsigned/UInt8/Infix/index.html new file mode 100644 index 000000000..7ea9f5f52 --- /dev/null +++ b/findlib-1/integers/Unsigned/UInt8/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Unsigned.UInt8.Infix)

Module UInt8.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Unsigned/UInt8/index.html b/findlib-1/integers/Unsigned/UInt8/index.html new file mode 100644 index 000000000..1a2de7d6c --- /dev/null +++ b/findlib-1/integers/Unsigned/UInt8/index.html @@ -0,0 +1,2 @@ + +UInt8 (docs.findlib-1.integers.Unsigned.UInt8)

Module Unsigned.UInt8

Unsigned 8-bit integer type and operations.

type t = private int
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Infix with type t := t
diff --git a/findlib-1/integers/Unsigned/ULLong/Infix/index.html b/findlib-1/integers/Unsigned/ULLong/Infix/index.html new file mode 100644 index 000000000..8d81d05d8 --- /dev/null +++ b/findlib-1/integers/Unsigned/ULLong/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Unsigned.ULLong.Infix)

Module ULLong.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Unsigned/ULLong/index.html b/findlib-1/integers/Unsigned/ULLong/index.html new file mode 100644 index 000000000..2675100f9 --- /dev/null +++ b/findlib-1/integers/Unsigned/ULLong/index.html @@ -0,0 +1,2 @@ + +ULLong (docs.findlib-1.integers.Unsigned.ULLong)

Module Unsigned.ULLong

The unsigned long long integer type and operations.

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Infix with type t := t
diff --git a/findlib-1/integers/Unsigned/ULong/Infix/index.html b/findlib-1/integers/Unsigned/ULong/Infix/index.html new file mode 100644 index 000000000..4f80245a3 --- /dev/null +++ b/findlib-1/integers/Unsigned/ULong/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Unsigned.ULong.Infix)

Module ULong.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Unsigned/ULong/index.html b/findlib-1/integers/Unsigned/ULong/index.html new file mode 100644 index 000000000..c296cf489 --- /dev/null +++ b/findlib-1/integers/Unsigned/ULong/index.html @@ -0,0 +1,2 @@ + +ULong (docs.findlib-1.integers.Unsigned.ULong)

Module Unsigned.ULong

The unsigned long integer type and operations.

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Infix with type t := t
diff --git a/findlib-1/integers/Unsigned/UShort/Infix/index.html b/findlib-1/integers/Unsigned/UShort/Infix/index.html new file mode 100644 index 000000000..c2b58699b --- /dev/null +++ b/findlib-1/integers/Unsigned/UShort/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Unsigned.UShort.Infix)

Module UShort.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Unsigned/UShort/index.html b/findlib-1/integers/Unsigned/UShort/index.html new file mode 100644 index 000000000..84838fea6 --- /dev/null +++ b/findlib-1/integers/Unsigned/UShort/index.html @@ -0,0 +1,2 @@ + +UShort (docs.findlib-1.integers.Unsigned.UShort)

Module Unsigned.UShort

The unsigned short integer type and operations.

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Infix with type t := t
diff --git a/findlib-1/integers/Unsigned/index.html b/findlib-1/integers/Unsigned/index.html new file mode 100644 index 000000000..16d4037ac --- /dev/null +++ b/findlib-1/integers/Unsigned/index.html @@ -0,0 +1,2 @@ + +Unsigned (docs.findlib-1.integers.Unsigned)

Module Unsigned

Types and operations for unsigned integers.

module type Infix = sig ... end

Infix names for the unsigned integer operations.

module type S = sig ... end

Unsigned integer operations.

module UChar : S with type t = private int

Unsigned char type and operations.

module UInt8 : S with type t = private int

Unsigned 8-bit integer type and operations.

module UInt16 : S with type t = private int

Unsigned 16-bit integer type and operations.

module UInt32 : sig ... end

Unsigned 32-bit integer type and operations.

module UInt64 : sig ... end

Unsigned 64-bit integer type and operations.

module Size_t : S

The size_t unsigned integer type and operations.

module UShort : S

The unsigned short integer type and operations.

module UInt : S

The unsigned int type and operations.

module ULong : S

The unsigned long integer type and operations.

module ULLong : S

The unsigned long long integer type and operations.

type uchar = UChar.t

The unsigned char type.

type uint8 = UInt8.t

Unsigned 8-bit integer type.

type uint16 = UInt16.t

Unsigned 16-bit integer type.

type uint32 = UInt32.t

Unsigned 32-bit integer type.

type uint64 = UInt64.t

Unsigned 64-bit integer type.

type size_t = Size_t.t

The size_t unsigned integer type.

type ushort = UShort.t

The unsigned short unsigned integer type.

type uint = UInt.t

The unsigned int type.

type ulong = ULong.t

The unsigned long integer type.

type ullong = ULLong.t

The unsigned long long integer type.

val of_byte_size : int -> (module S)

of_byte_size b is a module of type S that implements an unsigned type with b bytes.

Raise Invalid_argument if no suitable type is available.

diff --git a/findlib-1/integers/Unsigned/module-type-Infix/index.html b/findlib-1/integers/Unsigned/module-type-Infix/index.html new file mode 100644 index 000000000..1cfebdbb3 --- /dev/null +++ b/findlib-1/integers/Unsigned/module-type-Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Unsigned.Infix)

Module type Unsigned.Infix

Infix names for the unsigned integer operations.

type t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Unsigned/module-type-S/Infix/index.html b/findlib-1/integers/Unsigned/module-type-S/Infix/index.html new file mode 100644 index 000000000..f831aa204 --- /dev/null +++ b/findlib-1/integers/Unsigned/module-type-S/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.integers.Unsigned.S.Infix)

Module S.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/integers/Unsigned/module-type-S/index.html b/findlib-1/integers/Unsigned/module-type-S/index.html new file mode 100644 index 000000000..80390c3a0 --- /dev/null +++ b/findlib-1/integers/Unsigned/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (docs.findlib-1.integers.Unsigned.S)

Module type Unsigned.S

Unsigned integer operations.

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Infix with type t := t
diff --git a/findlib-1/integers/index.html b/findlib-1/integers/index.html new file mode 100644 index 000000000..de3e4973f --- /dev/null +++ b/findlib-1/integers/index.html @@ -0,0 +1,2 @@ + +integers (docs.findlib-1.integers)

Package integers

Library integers

This library exposes the following toplevel modules:

diff --git a/findlib-1/lwt/Lwt/Exception_filter/index.html b/findlib-1/lwt/Lwt/Exception_filter/index.html new file mode 100644 index 000000000..ae75b8675 --- /dev/null +++ b/findlib-1/lwt/Lwt/Exception_filter/index.html @@ -0,0 +1,2 @@ + +Exception_filter (docs.findlib-1.lwt.Lwt.Exception_filter)

Module Lwt.Exception_filter

type t

An Exception_filter.t is a value which indicates to Lwt what exceptions to catch and what exceptions to let bubble up all the way out of the main loop immediately.

val handle_all : t

handle_all is the default filter. With it the all the exceptions (including Out_of_memory and Stack_overflow) can be handled: caught and transformed into rejected promises.

val handle_all_except_runtime : t

handle_all_except_runtime is a filter which lets the OCaml runtime exceptions (Out_of_memory and Stack_overflow) go through all the Lwt abstractions and bubble all the way out of the call to Lwt_main.run.

Note that if you set this handler, then the runtime exceptions leave the Lwt internal state inconsistent. For this reason, you will not be able to call Lwt_main.run again after such an exception has escaped Lwt_main.run.

val set : t -> unit

set sets the given exception filter globally. You should call this function at most once during the start of your program, before the first call to Lwt_main.run.

diff --git a/findlib-1/lwt/Lwt/Infix/Let_syntax/Open_on_rhs/index.html b/findlib-1/lwt/Lwt/Infix/Let_syntax/Open_on_rhs/index.html new file mode 100644 index 000000000..bd44c714f --- /dev/null +++ b/findlib-1/lwt/Lwt/Infix/Let_syntax/Open_on_rhs/index.html @@ -0,0 +1,2 @@ + +Open_on_rhs (docs.findlib-1.lwt.Lwt.Infix.Let_syntax.Open_on_rhs)

Module Let_syntax.Open_on_rhs

diff --git a/findlib-1/lwt/Lwt/Infix/Let_syntax/index.html b/findlib-1/lwt/Lwt/Infix/Let_syntax/index.html new file mode 100644 index 000000000..ad22a149b --- /dev/null +++ b/findlib-1/lwt/Lwt/Infix/Let_syntax/index.html @@ -0,0 +1,2 @@ + +Let_syntax (docs.findlib-1.lwt.Lwt.Infix.Let_syntax)

Module Infix.Let_syntax

This module provides support for ppx_let.

val return : 'a -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t

See Lwt.map.

val bind : 'a t -> f:('a -> 'b t) -> 'b t
val both : 'a t -> 'b t -> ('a * 'b) t
module Open_on_rhs : sig ... end
diff --git a/findlib-1/lwt/Lwt/Infix/index.html b/findlib-1/lwt/Lwt/Infix/index.html new file mode 100644 index 000000000..20497e0f6 --- /dev/null +++ b/findlib-1/lwt/Lwt/Infix/index.html @@ -0,0 +1,14 @@ + +Infix (docs.findlib-1.lwt.Lwt.Infix)

Module Lwt.Infix

This module provides several infix operators for making programming with Lwt more convenient.

To use it, open Lwt.Infix.

Of the operators declared in this module, only >|= is recommended for new code. The only other commonly-used operator is >>=.

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t

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.

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

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 *)
val (<&>) : unit t -> unit t -> unit t

p1 <&> p2 is the same as Lwt.join [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.join syntax, so using this operator is not recommended.

val (<?>) : 'a t -> 'a t -> 'a t

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.

val (=<<) : ('a -> 'b t) -> 'a t -> 'b t

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.

val (=|<) : ('a -> 'b) -> 'a t -> 'b t

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 ... end

This module provides support for ppx_let.

diff --git a/findlib-1/lwt/Lwt/Let_syntax/Let_syntax/Open_on_rhs/index.html b/findlib-1/lwt/Lwt/Let_syntax/Let_syntax/Open_on_rhs/index.html new file mode 100644 index 000000000..5e40b77a0 --- /dev/null +++ b/findlib-1/lwt/Lwt/Let_syntax/Let_syntax/Open_on_rhs/index.html @@ -0,0 +1,2 @@ + +Open_on_rhs (docs.findlib-1.lwt.Lwt.Let_syntax.Let_syntax.Open_on_rhs)

Module Let_syntax.Open_on_rhs

diff --git a/findlib-1/lwt/Lwt/Let_syntax/Let_syntax/index.html b/findlib-1/lwt/Lwt/Let_syntax/Let_syntax/index.html new file mode 100644 index 000000000..1cb0a3a29 --- /dev/null +++ b/findlib-1/lwt/Lwt/Let_syntax/Let_syntax/index.html @@ -0,0 +1,2 @@ + +Let_syntax (docs.findlib-1.lwt.Lwt.Let_syntax.Let_syntax)

Module Let_syntax.Let_syntax

val return : 'a -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t

See Lwt.map.

val bind : 'a t -> f:('a -> 'b t) -> 'b t
val both : 'a t -> 'b t -> ('a * 'b) t
module Open_on_rhs : sig ... end
diff --git a/findlib-1/lwt/Lwt/Let_syntax/index.html b/findlib-1/lwt/Lwt/Let_syntax/index.html new file mode 100644 index 000000000..d3815e815 --- /dev/null +++ b/findlib-1/lwt/Lwt/Let_syntax/index.html @@ -0,0 +1,2 @@ + +Let_syntax (docs.findlib-1.lwt.Lwt.Let_syntax)

Module Lwt.Let_syntax

module Let_syntax : sig ... end
diff --git a/findlib-1/lwt/Lwt/Syntax/index.html b/findlib-1/lwt/Lwt/Syntax/index.html new file mode 100644 index 000000000..c08fae5b7 --- /dev/null +++ b/findlib-1/lwt/Lwt/Syntax/index.html @@ -0,0 +1,2 @@ + +Syntax (docs.findlib-1.lwt.Lwt.Syntax)

Module Lwt.Syntax

Let syntax

Monadic syntax

val let* : 'a t -> ('a -> 'b t) -> 'b t

Syntax for bind.

val and* : 'a t -> 'b t -> ('a * 'b) t

Syntax for both.

Applicative syntax

val let+ : 'a t -> ('a -> 'b) -> 'b t

Syntax for map.

val and+ : 'a t -> 'b t -> ('a * 'b) t

Syntax for both.

diff --git a/findlib-1/lwt/Lwt/index.html b/findlib-1/lwt/Lwt/index.html new file mode 100644 index 000000000..a3c103e32 --- /dev/null +++ b/findlib-1/lwt/Lwt/index.html @@ -0,0 +1,356 @@ + +Lwt (docs.findlib-1.lwt.Lwt)

Module Lwt

Asynchronous programming with promises.

A promise is a placeholder for a single value which might take a long time to compute. Speaking roughly, a promise is a ref that can be filled in later. To make that precise, here is how promises differ from refs:

So, promises are optional, write-once references, and when they don't yet have a value, they store a list of callbacks that are waiting for the value.

The waiting callbacks make promises a natural data type for asynchronous programming. For example, you can ask Lwt to read a file. Lwt immediately returns you only a promise for the data.

You can neglect this promise for a while. You can do some other computation, request more I/O, etc. At some point, you might decide to attach a callback to the read promise, maybe several callbacks.

In the meantime, the read operation is running in the background. Once it finishes, Lwt resolves the read promise by putting the data into it. Lwt then runs the callbacks you attached.

One of those might take the data, and ask Lwt to write it to STDOUT. Lwt gives you a promise for that, too, and the process repeats.

Lwt has a small amount of syntactic sugar to make this look as natural as possible:

let () =
+  Lwt_main.run begin
+    let%lwt data = Lwt_io.(read_line stdin) in
+    let%lwt () = Lwt_io.printl data in
+    Lwt.return ()
+  end
+
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix echo.ml && ./a.out *)

This is all explained in the next sections:

After that is the reference proper, which goes into painful levels of detail on every single type and value in this module, Lwt. Please be safe, and read only what you need from it :)

Happy asynchronous programming!

Quick start

All of Lwt is variations on:

Tutorial

Let's read from STDIN. The first version is written using ordinary values from the OCaml standard library. This makes the program block until the user enters a line:

let () =
+  let line : string = read_line () in
+  print_endline "Now unblocked!";
+  ignore line
+
+(* ocamlfind opt -linkpkg code.ml && ./a.out *)

If we use a promise instead, execution continues immediately:

let () =
+  let line_promise : string Lwt.t =
+    Lwt_io.(read_line stdin) in
+  print_endline "Execution just continues...";
+  ignore line_promise
+
+(* ocamlfind opt -linkpkg -thread -package lwt.unix code.ml && ./a.out *)

Indeed, this program is a little too asynchronous – it exits right away! Let's force it to wait for line_promise at the end by calling Lwt_main.run:

let () =
+  let line_promise : string Lwt.t =
+    Lwt_io.(read_line stdin) in
+  print_endline "Execution just continues...";
+
+  let line : string =
+    Lwt_main.run line_promise in
+  ignore line
+
+(* ocamlfind opt -linkpkg -thread -package lwt.unix code.ml && ./a.out *)

Lwt_main.run should only be called once, on one promise, at the top level of your program. Most of the time, waiting for promises is done using let%lwt. That is the recommended syntactic sugar for Lwt.bind, and is pronounced “bind”:

let () =
+  let p : unit Lwt.t =
+    let%lwt line_1 = Lwt_io.(read_line stdin) in
+    let%lwt line_2 = Lwt_io.(read_line stdin) in
+    Lwt_io.printf "%s and %s\n" line_1 line_2
+  in
+
+  Lwt_main.run p
+
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

The way that works is everything in scope after the “in” in “let%lwt x = ... in ...” goes into a callback, and “x” is that callback's argument. So, we could have been very explicit, and written the code like this:

let () =
+  let p : unit Lwt.t =
+    let line_1_promise : string Lwt.t = Lwt_io.(read_line stdin) in
+    Lwt.bind line_1_promise (fun (line_1 : string) ->
+
+      let line_2_promise : string Lwt.t = Lwt_io.(read_line stdin) in
+      Lwt.bind line_2_promise (fun (line_2 : string) ->
+
+        Lwt_io.printf "%s and %s\n" line_1 line_2))
+  in
+
+  Lwt_main.run p
+
+(* ocamlfind opt -linkpkg -thread -package lwt.unix code.ml && ./a.out *)

But, as you can see, this is verbose, and the indentation gets a bit crazy. So, we will always use let%lwt.

The code above reads two lines in sequence, because we ask Lwt to wait for line_1, before calling the second Lwt_io.read_line in the callback, to start the second I/O.

We could also run I/O concurrently. All we have to do is not start the second I/O in a callback of the first. Because it doesn't make sense to read two lines from STDIN concurrently, let's start two waits instead:

let () =
+  Lwt_main.run begin
+    let three_seconds : unit Lwt.t = Lwt_unix.sleep 3. in
+    let five_seconds : unit Lwt.t = Lwt_unix.sleep 5. in
+    let%lwt () = three_seconds in
+    let%lwt () = Lwt_io.printl "3 seconds passed" in
+    let%lwt () = five_seconds in
+    Lwt_io.printl "Only 2 more seconds passed"
+  end
+
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

This program takes about five seconds to run. We are still new to let%lwt, so let's desugar it:

let () =
+  Lwt_main.run begin
+    let three_seconds : unit Lwt.t = Lwt_unix.sleep 3. in
+    let five_seconds : unit Lwt.t = Lwt_unix.sleep 5. in
+
+    (* Both waits have already been started at this point! *)
+
+    Lwt.bind three_seconds (fun () ->
+      (* This is 3 seconds later. *)
+      Lwt.bind (Lwt_io.printl "3 seconds passed") (fun () ->
+        Lwt.bind five_seconds (fun () ->
+          (* Only 2 seconds were left in the 5-second wait, so
+              this callback runs 2 seconds after the first callback. *)
+          Lwt_io.printl "Only 2 more seconds passed")))
+  end
+
+(* ocamlfind opt -linkpkg -thread -package lwt.unix code.ml && ./a.out *)

And that's it! Concurrency in Lwt is simply a matter of whether you start an operation in the callback of another one or not. As a convenience, Lwt provides a few helpers for common concurrency patterns.

Execution model

It's important to understand that promises are a pure-OCaml data type. They don't do any fancy scheduling or I/O. They are just lists of callbacks (if pending), or containers for one value (if resolved).

The interesting function is Lwt_main.run. It's a wrapper around select(2), epoll(7), kqueue(2), or whatever asynchronous I/O API your system provides. On browsers, the work of Lwt_main.run is done by the surrounding JavaScript engine, so you don't call Lwt_main.run from inside your program. But the execution model is still the same, and the description below applies!

To avoid writing out “underlying asynchronous I/O API,” we'll assume, in this section, that the API is select(2). That's just for the sake of abbreviation. It doesn't actually matter, for most purposes, what the underlying I/O API is.

Let's use the program from the tutorial that reads two lines as an example. Here it is, again, in its desugared form:

let () =
+  let p : unit Lwt.t =
+    let line_1_promise : string Lwt.t = Lwt_io.(read_line stdin) in
+    Lwt.bind line_1_promise (fun (line_1 : string) ->
+
+      let line_2_promise : string Lwt.t = Lwt_io.(read_line stdin) in
+      Lwt.bind line_2_promise (fun (line_2 : string) ->
+
+        Lwt_io.printf "%s and %s\n" line_1 line_2))
+  in
+
+  Lwt_main.run p
+
+(* ocamlfind opt -linkpkg -thread -package lwt.unix code.ml && ./a.out *)

Lwt_main.run is your program's main I/O loop. You pass it a single promise, and it:

  1. Uses select(2) to put your process to sleep until the next I/O completes.
  2. That next I/O happens to be the one that reads line_1. Lwt_main.run knows that I/O is supposed to resolve line_1_promise, so it puts line_1 into the promise and resolves it.
  3. Resolving is an ordinary OCaml operation. It causes all the callbacks of line_1_promise to run, one after another. Each callback is also ordinary OCaml code. In our case, there is only one callback, but in general, there might be several, and they might also resolve additional promises. So, promise resolution triggers a “cascade” of callbacks. Eventually, however, we should run out of callbacks, and control will return to Lwt_main.run.
  4. In our example, our one callback registers a second I/O with Lwt_main.run – the one that will read line_2. There are no callbacks left to run after that, so control returns to Lwt_main.run.
  5. Lwt_main.run goes back to sleep again by calling select(2), now waiting for the second I/O that we just registered. The loop repeats itself from step 1.

This has two major implications, one good and one bad. Let's start with the bad one.

(1) If one of your callbacks enters an infinite loop, calls an Lwt-unfriendly blocking I/O, or just runs for a really long time, it won't return control to Lwt_main.run anytime soon. That means Lwt_main.run won't get a chance to resolve any other Lwt I/O promises, even if the underlying I/O operations complete.

In case your callback is just using the CPU for a really long time, you can insert a few calls to Lwt.pause into it, and resume your computation in callbacks of pause. This is basically the same as Lwt_unix.sleep 0. – it's a promise that will be resolved by Lwt_main.run after any other I/O resolutions that are already in its queue.

(2) The good implication is that all your callbacks run in a single thread. This means that in most situations, you don't have to worry about locks, synchronization, etc. Anything that is in the same callback is guaranteed to run without interruption. Lwt programs are often much easier to write and refactor, than equivalent programs written with threads – but both are concurrent!

Guide to the rest of Lwt

This module Lwt is the pure-OCaml definition of promises and callback-calling. It has a few extras on top of what's described above:

The next layer above module Lwt is the pure-OCaml Lwt “core” library, which provides some promise-friendly patterns, like streams and mvars. This consists of the modules Lwt_list, Lwt_stream, Lwt_result, Lwt_mutex, Lwt_condition, Lwt_mvar, Lwt_pool, and Lwt_switch.

Above that is the Lwt Unix binding, where I/O begins. This includes the module Lwt_main, including the all-important Lwt_main.run. The rest of the Unix binding consists of functions, each one of which...

The functions are grouped into modules:

Warning! Introductory material ends and detailed reference begins!

Fundamentals

Promises

type +'a t

Promises for values of type 'a.

A promise is a memory cell that is always in one of three states:

  • fulfilled, and containing one value of type 'a,
  • rejected, and containing one exception, or
  • pending, in which case it may become fulfilled or rejected later.

A resolved promise is one that is either fulfilled or rejected, i.e. not pending. Once a promise is resolved, its content cannot change. So, promises are write-once references. The only possible state changes are (1) from pending to fulfilled and (2) from pending to rejected.

Promises are typically “read” by attaching callbacks to them. The most basic functions for that are Lwt.bind, which attaches a callback that is called when a promise becomes fulfilled, and Lwt.catch, for rejection.

Promise variables of this type, 'a Lwt.t, are actually read-only in Lwt. Separate resolvers of type 'a Lwt.u are used to write to them. Promises and their resolvers are created together by calling Lwt.wait. There is one exception to this: most promises can be canceled by calling Lwt.cancel, without going through a resolver.

type -'a u

Resolvers for promises of type 'a Lwt.t.

Each resolver can be thought of as the write end of one promise. It can be passed to Lwt.wakeup_later, Lwt.wakeup_later_exn, or Lwt.wakeup_later_result to resolve that promise.

val wait : unit -> 'a t * 'a u

Creates a new pending promise, paired with its resolver.

It is rare to use this function directly. Many helpers in Lwt, and Lwt-aware libraries, call it internally, and return only the promise. You then chain the promises together using Lwt.bind.

However, it is important to understand Lwt.wait as the fundamental promise “constructor.” All other functions that evaluate to a promise can be, or are, eventually implemented in terms of it.

Resolving

val wakeup_later : 'a u -> 'a -> unit

Lwt.wakeup_later r v fulfills, with value v, the pending promise associated with resolver r. This triggers callbacks attached to the promise.

If the promise is not pending, Lwt.wakeup_later raises Stdlib.Invalid_argument, unless the promise is canceled. If the promise is canceled, Lwt.wakeup_later has no effect.

If your program has multiple threads, it is important to make sure that Lwt.wakeup_later (and any similar function) is only called from the main thread. Lwt.wakeup_later can trigger callbacks attached to promises by the program, and these assume they are running in the main thread. If you need to communicate from a worker thread to the main thread running Lwt, see Lwt_preemptive or Lwt_unix.send_notification.

val wakeup_later_exn : _ u -> exn -> unit

Lwt.wakeup_later_exn r exn is like Lwt.wakeup_later, except, if the associated promise is pending, it is rejected with exn.

val return : 'a -> 'a t

Lwt.return v creates a new promise that is already fulfilled with value v.

This is needed to satisfy the type system in some cases. For example, in a match expression where one case evaluates to a promise, the other cases have to evaluate to promises as well:

match need_input with
+| true -> Lwt_io.(read_line stdin)   (* Has type string Lwt.t... *)
+| false -> Lwt.return ""             (* ...so wrap empty string in a promise. *)

Another typical usage is in let%lwt. The expression after the “in” has to evaluate to a promise. So, if you compute an ordinary value instead, you have to wrap it:

let%lwt line = Lwt_io.(read_line stdin) in
+Lwt.return (line ^ ".")
val fail : exn -> _ t

Lwt.fail exn is like Lwt.return, except the new promise that is already rejected with exn.

Whenever possible, it is recommended to use raise exn instead, as raise captures a backtrace, while Lwt.fail does not. If you call raise exn in a callback that is expected by Lwt to return a promise, Lwt will automatically wrap exn in a rejected promise, but the backtrace will have been recorded by the OCaml runtime.

For example, bind's second argument is a callback which returns a promise. And so it is recommended to use raise in the body of that callback. This applies to the aliases of bind as well: ( >>= ) and ( let* ).

Use Lwt.fail only when you specifically want to create a rejected promise, to pass to another function, or store in a data structure.

Callbacks

val bind : 'a t -> ('a -> 'b t) -> 'b t

Lwt.bind p_1 f makes it so that f will run when p_1 is fulfilled.

When p_1 is fulfilled with value v_1, the callback f is called with that same value v_1. Eventually, after perhaps starting some I/O or other computation, f returns promise p_2.

Lwt.bind itself returns immediately. It only attaches the callback f to p_1 – it does not wait for p_2. What Lwt.bind returns is yet a third promise, p_3. Roughly speaking, fulfillment of p_3 represents both p_1 and p_2 becoming fulfilled, one after the other.

A minimal example of this is an echo program:

let () =
+  let p_3 =
+    Lwt.bind
+      Lwt_io.(read_line stdin)
+      (fun line -> Lwt_io.printl line)
+  in
+  Lwt_main.run p_3
+
+(* ocamlfind opt -linkpkg -thread -package lwt.unix code.ml && ./a.out *)

Rejection of p_1 and p_2, and raising an exception in f, are all forwarded to rejection of p_3.

Precise behavior

Lwt.bind returns a promise p_3 immediately. p_3 starts out pending, and is resolved as follows:

  • The first condition to wait for is that p_1 becomes resolved. It does not matter whether p_1 is already resolved when Lwt.bind is called, or becomes resolved later – the rest of the behavior is the same.
  • If and when p_1 becomes resolved, it will, by definition, be either fulfilled or rejected.
  • If p_1 is rejected, p_3 is rejected with the same exception.
  • If p_1 is fulfilled, with value v, f is applied to v.
  • f may finish by returning the promise p_2, or raising an exception.
  • If f raises an exception, p_3 is rejected with that exception.
  • Finally, the remaining case is when f returns p_2. From that point on, p_3 is effectively made into a reference to p_2. This means they have the same state, undergo the same state changes, and performing any operation on one is equivalent to performing it on the other.

Syntactic sugar

Lwt.bind is almost never written directly, because sequences of Lwt.bind result in growing indentation and many parentheses:

let () =
+  Lwt_main.run begin
+    Lwt.bind Lwt_io.(read_line stdin) (fun line ->
+      Lwt.bind (Lwt_unix.sleep 1.) (fun () ->
+        Lwt_io.printf "One second ago, you entered %s\n" line))
+  end
+
+(* ocamlfind opt -linkpkg -thread -package lwt.unix code.ml && ./a.out *)

The recommended way to write Lwt.bind is using the let%lwt syntactic sugar:

let () =
+  Lwt_main.run begin
+    let%lwt line = Lwt_io.(read_line stdin) in
+    let%lwt () = Lwt_unix.sleep 1. in
+    Lwt_io.printf "One second ago, you entered %s\n" line
+  end
+
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

This uses the Lwt PPX (preprocessor). Note that we had to add package lwt_ppx to the command line for building this program. We will do that throughout this manual.

Another way to write Lwt.bind, that you may encounter while reading code, is with the >>= operator:

open Lwt.Infix
+
+let () =
+  Lwt_main.run begin
+    Lwt_io.(read_line stdin) >>= fun line ->
+    Lwt_unix.sleep 1. >>= fun () ->
+    Lwt_io.printf "One second ago, you entered %s\n" line
+  end
+
+(* ocamlfind opt -linkpkg -thread -package lwt.unix code.ml && ./a.out *)

The >>= operator comes from the module Lwt.Infix, which is why we opened it at the beginning of the program.

See also Lwt.map.

Rejection

val reraise : exn -> 'a

reraise e raises the exception e. Unlike raise e, reraise e preserves the existing exception backtrace and even adds a "Re-raised at" entry with the call location.

This function is intended to be used in the exception handlers of Lwt.catch and Lwt.try_bind.

It is also used in the code produced by Lwt_ppx.

val catch : (unit -> 'a t) -> (exn -> 'a t) -> 'a t

Lwt.catch f h applies f (), which returns a promise, and then makes it so that h (“handler”) will run when that promise is rejected.

let () =
+  Lwt_main.run begin
+    Lwt.catch
+      (fun () -> raise Exit)
+      (function
+      | Exit -> Lwt_io.printl "Got Stdlib.Exit"
+      | exn -> Lwt.reraise exn)
+  end
+
+(* ocamlfind opt -linkpkg -thread -package lwt.unix code.ml && ./a.out *)

Despite the above code, the recommended way to write Lwt.catch is using the try%lwt syntactic sugar from the PPX. Here is an equivalent example:

let () =
+  Lwt_main.run begin
+    try%lwt raise Exit
+    with Exit -> Lwt_io.printl "Got Stdlb.Exit"
+  end
+
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

A particular advantage of the PPX syntax is that it is not necessary to artificially insert a catch-all exn -> reraise exn case. Like in the core language's try expression, the catch-all case is implied in try%lwt.

Lwt.catch is a counterpart to Lwt.bindLwt.bind is for fulfillment, and Lwt.catch is for rejection.

As with Lwt.bind, three promises are involved:

  • p_1, the promise returned from applying f ().
  • p_2, the promise returned from applying h exn.
  • p_3, the promise returned by Lwt.catch itself.

The remainder is (1) a precise description of how p_3 is resolved, and (2) a warning about accidentally using ordinary try for exception handling in asynchronous code.

(1) Lwt.catch first applies f (). It then returns p_3 immediately. p_3 starts out pending. It is resolved as follows:

  • If f () returned a promise p_1, and p_1 becomes fulfilled, p_3 is fulfilled with the same value.
  • p_1 can instead become rejected. There is one other possibility: f () itself raised an exception, instead of returning a promise. The behavior of Lwt.catch is the same whether f () raised an exception, or returned a promise that is later rejected with an exception. Let's call the exception exn.
  • h exn is applied.
  • h exn may return a promise, or might itself raise an exception. The first case is the interesting one, but the exception case is simple, so we cover the exception case first.
  • If h exn raises another exception exn', p_3 is rejected with exn'.
  • If h exn instead returns the promise p_2, p_3 is effectively made into a reference to p_2. This means p_3 and p_2 have the same state, undergo the same state changes, and performing any operation one is equivalent to performing it on the other.
val finalize : (unit -> 'a t) -> (unit -> unit t) -> 'a t

Lwt.finalize f c applies f (), which returns a promise, and then makes it so c (“cleanup”) will run when that promise is resolved.

In other words, c runs no matter whether promise f () is fulfilled or rejected. As the names suggest, Lwt.finalize corresponds to the finally construct found in many programming languages, and c is typically used for cleaning up resources:

let () =
+  Lwt_main.run begin
+    let%lwt file = Lwt_io.(open_file ~mode:Input "code.ml") in
+    Lwt.finalize
+      (fun () ->
+        let%lwt content = Lwt_io.read file in
+        Lwt_io.print content)
+      (fun () ->
+        Lwt_io.close file)
+  end
+
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

As with Lwt.bind and Lwt.catch, there is a syntactic sugar for Lwt.finalize, though it is not as often used:

let () =
+  Lwt_main.run begin
+    let%lwt file = Lwt_io.(open_file ~mode:Input "code.ml") in
+    begin
+      let%lwt content = Lwt_io.read file in
+      Lwt_io.print content
+    end
+    [%lwt.finally
+      Lwt_io.close file]
+  end
+
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

Also as with Lwt.bind and Lwt.catch, three promises are involved:

  • p_1, the promise returned from applying f ().
  • p_2, the promise returned from applying c ().
  • p_3, the promise returned by Lwt.finalize itself.

p_3 is returned immediately. It starts out pending, and is resolved as follows:

  • f () is applied. If it finishes, it will either return a promise p_1, or raise an exception.
  • If f () raises an exception, p_1 is created artificially as a promise rejected with that exception. So, no matter how f () finishes, there is a promise p_1 representing the outcome.
  • After p_1 is resolved (fulfilled or rejected), c () is applied. This is meant to be the cleanup code.
  • If c () finishes, it will also either return a promise, p_2, or raise an exception.
  • If c () raises an exception, p_2 is created artificially as a promise rejected with that exception. Again, no matter how c () finishes, there is a promise p_2 representing the outcome of cleanup.
  • If p_2 is fulfilled, p_3 is resolved the same way p_1 had been resolved. In other words, p_1 is forwarded to p_3 when cleanup is successful.
  • If p_2 is rejected, p_3 is rejected with the same exception. In other words, p_2 is forwarded to p_3 when cleanup is unsuccessful. Note this means that if both the protected code and the cleanup fail, the cleanup exception has precedence.
val try_bind : (unit -> 'a t) -> ('a -> 'b t) -> (exn -> 'b t) -> 'b t

Lwt.try_bind f g h applies f (), and then makes it so that:

Lwt.try_bind is a generalized Lwt.finalize. The difference is that Lwt.try_bind runs different callbacks depending on how f () is resolved. This has two main implications:

  • The cleanup functions g and h each “know” whether f () was fulfilled or rejected.
  • The cleanup functions g and h are passed the value f () was fulfilled with, and, respectively, the exception f () was rejected with.

As with Lwt.catch, it is recommended to use reraise in the catch-all case of the exception handler:

let () =
+  Lwt_main.run begin
+    Lwt.try_bind
+      (fun () -> raise Exit)
+      (fun () -> Lwt_io.printl "Got Success")
+      (function
+      | Exit -> Lwt_io.printl "Got Stdlib.Exit"
+      | exn -> Lwt.reraise exn)
+  end
+
+(* ocamlfind opt -linkpkg -thread -package lwt.unix code.ml && ./a.out *)

The rest is a detailed description of the promises involved.

As with Lwt.finalize and the several preceding functions, three promises are involved.

  • p_1 is the promise returned from applying f ().
  • p_2 is the promise returned from applying h or g, depending on which one is chosen.
  • p_3 is the promise returned by Lwt.try_bind itself.

Lwt.try_bind returns p_3 immediately. p_3 starts out pending, and is resolved as follows:

  • f () is applied. If it finishes, it either returns p_1, or raises an exception.
  • If f () raises an exception, p_1 is created artificially as a promise rejected with that exception. So, no matter how f () finishes, there is a promise p_1 representing the outcome.
  • If p_1 is fulfilled, g is applied to the value p_1 is fulfilled with.
  • If p_1 is rejected, h is applied to the exception p_1 is rejected with.
  • So, in either case, a callback is applied. The rest of the procedure is the same no matter which callback was chosen, so we will refer to it as “the callback.”
  • If the callback finishes, it either returns p_2, or raises an exception.
  • If the callback raises an exception, p_3 is rejected with that exception.
  • If the callback returns p_2, p_3 is effectively made into an reference to p_2. They have the same state, including any state changes, and performing any operation on one is equivalent to performing it on the other.
val dont_wait : (unit -> unit t) -> (exn -> unit) -> unit

Lwt.dont_wait f handler applies f (), which returns a promise, and then makes it so that if the promise is rejected, the exception is passed to handler.

In addition, if f () raises an exception, it is also passed to handler.

As the name implies, dont_wait (fun () -> <e>) handler is a way to evaluate the expression <e> (which typically has asynchronous side-effects) without waiting for the resolution of the promise <e> evaluates to.

dont_wait is meant as an alternative to async with a local, explicit, predictable exception handler.

Note that dont_wait f h causes f () to be evaluated immediately. Consequently, the non-yielding/non-pausing prefix of the body of f is evaluated immediately.

val async : (unit -> unit t) -> unit

Lwt.async f applies f (), which returns a promise, and then makes it so that if the promise is rejected, the exception is passed to !Lwt.async_exception_hook.

In addition, if f () raises an exception, it is also passed to !Lwt.async_exception_hook.

!Lwt.async_exception_hook typically prints an error message and terminates the program. If you need a similar behaviour with a different exception handler, you can use Lwt.dont_wait.

Lwt.async is misleadingly named. Itself, it has nothing to do with asynchronous execution. It's actually a safety function for making Lwt programs more debuggable.

For example, take this program, which prints messages in a loop, while waiting for one line of user input:

let () =
+  let rec show_nag () : _ Lwt.t =
+    let%lwt () = Lwt_io.printl "Please enter a line" in
+    let%lwt () = Lwt_unix.sleep 1. in
+    show_nag ()
+  in
+  ignore (show_nag ());     (* Bad – see note for (1)! *)
+
+  Lwt_main.run begin
+    let%lwt line = Lwt_io.(read_line stdin) in
+    Lwt_io.printl line
+  end
+
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

If one of the I/O operations in show_nag were to fail, the promise representing the whole loop would get rejected. However, since we are ignoring that promise at (1), we never find out about the rejection. If this failure and resulting rejection represents a bug in the program, we have a harder time finding out about the bug.

A safer version differs only in using Lwt.async instead of Stdlib.ignore:

let () =
+  let rec show_nag () : _ Lwt.t =
+    let%lwt () = Lwt_io.printl "Please enter a line" in
+    let%lwt () = Lwt_unix.sleep 1. in
+    show_nag ()
+  in
+  Lwt.async (fun () -> show_nag ());
+
+  Lwt_main.run begin
+    let%lwt line = Lwt_io.(read_line stdin) in
+    Lwt_io.printl line
+  end
+
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

In this version, if I/O in show_nag fails with an exception, the exception is printed by Lwt.async, and then the program exits.

The general rule for when to use Lwt.async is:

  • Promises which are not passed to Lwt.bind, Lwt.catch, Lwt.join, etc., are top-level promises.
  • One top-level promise is passed to Lwt_main.run, as can be seen in most examples in this manual.
  • Every other top-level promise should be wrapped in Lwt.async.
val async_exception_hook : (exn -> unit) ref

Reference to a function, to be called on an "unhandled" exception.

This reference is used by Lwt.async, Lwt.on_cancel, Lwt.on_success, Lwt.on_failure, Lwt.on_termination, Lwt.on_any, Lwt_react.of_stream, and the deprecated Lwt.ignore_result.

The initial, default implementation prints the exception, then terminates the process with non-zero exit status, as if the exception had reached the top level of the program:

let () = Lwt.async (fun () -> raise Exit)
+
+(* ocamlfind opt -linkpkg -package lwt code.ml && ./a.out *)

produces in the output:

Fatal error: exception Stdlib.Exit

If you are writing an application, you are welcome to reassign the reference, and replace the function with something more appropriate for your needs.

If you are writing a library, you should leave this reference alone. Its behavior should be determined by the application.

Concurrency

Multiple wait

val both : 'a t -> 'b t -> ('a * 'b) t

Lwt.both p_1 p_2 returns a promise that is pending until both promises p_1 and p_2 become resolved.

let () =
+  let p_1 =
+    let%lwt () = Lwt_unix.sleep 3. in
+    Lwt_io.printl "Three seconds elapsed"
+  in
+
+  let p_2 =
+    let%lwt () = Lwt_unix.sleep 5. in
+    Lwt_io.printl "Five seconds elapsed"
+  in
+
+  let p_3 = Lwt.both p_1 p_2 in
+  Lwt_main.run p_3
+
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

If both p_1 and p_2 become fulfilled, Lwt.both p_1 p_2 is also fulfilled, with the pair of their final values. Otherwise, if at least one of the two promises becomes rejected, Lwt.both p_1 p_2 is rejected with the same exception as one such promise, chosen arbitrarily. Note that this occurs only after both promises are resolved, not immediately when the first promise is rejected.

  • since 4.2.0
val join : unit t list -> unit t

Lwt.join ps returns a promise that is pending until all promises in the list ps become resolved.

let () =
+  let p_1 =
+    let%lwt () = Lwt_unix.sleep 3. in
+    Lwt_io.printl "Three seconds elapsed"
+  in
+
+  let p_2 =
+    let%lwt () = Lwt_unix.sleep 5. in
+    Lwt_io.printl "Five seconds elapsed"
+  in
+
+  let p_3 = Lwt.join [p_1; p_2] in
+  Lwt_main.run p_3
+
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

If all of the promises in ps become fulfilled, Lwt.join ps is also fulfilled. Otherwise, if at least one promise in ps becomes rejected, Lwt.join ps is rejected with the same exception as one such promise, chosen arbitrarily. Note that this occurs only after all the promises are resolved, not immediately when the first promise is rejected.

val all : 'a t list -> 'a list t

Lwt.all ps is like Lwt.join ps: it waits for all promises in the list ps to become resolved.

It then resolves the returned promise with the list of all resulting values.

Note that if any of the promises in ps is rejected, the returned promise is also rejected. This means that none of the values will be available, even if some of the promises in ps were already resolved when one of them is rejected. For more fine-grained handling of rejection, structure the program with Lwt_stream or Lwt_list, handle rejections explicitly, or use Lwt.join and collect values manually.

  • since 5.1.0

Racing

val pick : 'a t list -> 'a t

Lwt.pick ps returns a promise that is pending until one promise in the list ps becomes resolved.

When at least one promise in ps is resolved, Lwt.pick tries to cancel all other promises that are still pending, using Lwt.cancel.

let () =
+  let echo =
+    let%lwt line = Lwt_io.(read_line stdin) in
+    Lwt_io.printl line
+  in
+
+  let timeout = Lwt_unix.sleep 5. in
+
+  Lwt_main.run (Lwt.pick [echo; timeout])
+
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

If the first promise in ps to become resolved is fulfilled, the result promise p is also fulfilled, with the same value. Likewise, if the first promise in ps to become resolved is rejected, p is rejected with the same exception.

If ps has no promises (if it is the empty list), Lwt.pick ps raises Stdlib.Invalid_argument _.

It's possible for multiple promises in ps to become resolved simultaneously. This happens most often when some promises ps are already resolved at the time Lwt.pick is called.

In that case, if at least one of the promises is rejected, the result promise p is rejected with the same exception as one such promise, chosen arbitrarily. If all promises are fulfilled, p is fulfilled with the value of one of the promises, also chosen arbitrarily.

The remaining functions in this section are variations on Lwt.pick.

val choose : 'a t list -> 'a t

Lwt.choose ps is the same as Lwt.pick ps, except that it does not try to cancel pending promises in ps.

val npick : 'a t list -> 'a list t

Lwt.npick ps is similar to Lwt.pick ps, the difference being that when multiple promises in ps are fulfilled simultaneously (and none are rejected), the result promise is fulfilled with the list of values the promises were fulfilled with.

When at least one promise is rejected, Lwt.npick still rejects the result promise with the same exception.

val nchoose : 'a t list -> 'a list t

Lwt.nchoose ps is the same as Lwt.npick ps, except that it does not try to cancel pending promises in ps.

val nchoose_split : 'a t list -> ('a list * 'a t list) t

Lwt.nchoose_split ps is the same as Lwt.nchoose ps, except that when multiple promises in ps are fulfilled simultaneously (and none are rejected), the result promise is fulfilled with both the list of values of the fulfilled promises, and the list of promises that are still pending.

Cancellation

Note: cancelation has proved difficult to understand, explain, and maintain, so use of these functions is discouraged in new code. See ocsigen/lwt#283.

exception Canceled

Canceled promises are those rejected with this exception, Lwt.Canceled. See Lwt.cancel.

val task : unit -> 'a t * 'a u

Lwt.task is the same as Lwt.wait, except the resulting promise p is cancelable.

This is significant, because it means promises created by Lwt.task can be resolved (specifically, rejected) by canceling them directly, in addition to being resolved through their paired resolvers.

In contrast, promises returned by Lwt.wait can only be resolved through their resolvers.

val cancel : _ t -> unit

Lwt.cancel p attempts to cancel the pending promise p, without needing access to its resolver.

It is recommended to avoid Lwt.cancel, and handle cancelation by tracking the needed extra state explicitly within your library or application.

A canceled promise is one that has been rejected with exception Lwt.Canceled.

There are straightforward ways to make promises canceled. One could create a promise that starts out canceled, with Lwt.fail Lwt.Canceled. It's also possible to make a promise canceled through its resolver, by calling Lwt.wakeup_later_exn r Lwt.Canceled.

This function, Lwt.cancel, provides another method, which can cancel pending promises without going through their resolvers – it acts directly on promises.

Like any other promise rejection, the canceled state of a promise is propagated “forwards” by Lwt.bind, Lwt.join, etc., as described in the documentation of those functions.

Cancellation is a separate phase, triggered only by Lwt.cancel, that searches backwards, strating from p, for promises to reject with Lwt.Canceled. Once those promises are found, they are canceled, and then ordinary, forwards rejection propagation takes over.

All of this will be made precise, but first let's have an example:

let () =
+  let p =
+    let%lwt () = Lwt_unix.sleep 5. in
+    Lwt_io.printl "Slept five seconds"
+  in
+
+  Lwt.cancel p;
+
+  Lwt_main.run p
+
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

At the time Lwt.cancel is called, p “depends” on the sleep promise (the printl is not yet called, so its promise hasn't been created).

So, Lwt.cancel recursively tries to cancel the sleep promise. That is an example of the backwards search. The sleep promise is a pending promise that doesn't depend on anything, so backwards search stops at it. The state of the sleep promise is set to rejected with Lwt.Canceled.

Lwt.bind then propagates the rejection forwards to p, so p also becomes canceled.

Eventually, this rejection reaches Lwt_main.run, which raises the Lwt.Canceled as an ordinary exception. The sleep does not complete, and the printl is never started.

Promises, like the sleep promise above, that can be rejected by Lwt.cancel are cancelable. Most promises in Lwt are either cancelable, or depend on cancelable promises. The functions Lwt.wait and Lwt.no_cancel create promises that are not cancelable.

The rest is a detailed description of how the Lwt.cancel backwards search works.

  • If p is already resolved, Lwt.cancel does nothing.
  • If p was created by Lwt.wait or Lwt.no_cancel, Lwt.cancel does nothing.
  • If p was created by Lwt.task or Lwt.protected, Lwt.cancel rejects it with Lwt.Canceled. This rejection then propagates normally through any Lwt calls that depend on p. Most I/O promises are internally created by calling Lwt.task.
  • Suppose p_3 was returned by Lwt.bind, Lwt.map, Lwt.catch, Lwt.finalize, or Lwt.try_bind. Then, see those functions for the naming of the other promises involved. If p_3 is pending, then either p_1 is pending, or p_2 is pending. Lwt.cancel p_3 then tries recursively to cancel whichever of these two is still pending. If that succeeds, p_3 may be canceled later by the normal propagation of rejection.
  • Suppose p was returned by Lwt.join, Lwt.pick, or similar function, which was applied to the promise list ps. Lwt.cancel then recursively tries to cancel each promise in ps. If one of those cancellations succeeds, p may be canceled later by the normal propagation of rejection.
val on_cancel : _ t -> (unit -> unit) -> unit

Lwt.on_cancel p f makes it so that f will run when p becomes canceled.

Callbacks scheduled with on_cancel are guaranteed to run before any other callbacks that are triggered by rejection, such as those added by Lwt.catch.

Note that this does not interact directly with the cancellation mechanism, the backwards search described in Lwt.cancel. For example, manually rejecting a promise with Lwt.Canceled is sufficient to trigger f.

f should not raise exceptions. If it does, they are passed to !Lwt.async_exception_hook, which terminates the process by default.

val protected : 'a t -> 'a t

Lwt.protected p creates a cancelable promise p'. The original state of p' is the same as the state of p at the time of the call.

The state of p' can change in one of two ways: a. if p changes state (i.e., is resolved), then p' eventually changes state to match p's, and b. during cancellation, if the backwards search described in Lwt.cancel reaches p' then it changes state to rejected Canceled and the search stops.

As a consequence of the b. case, Lwt.cancel (protected p) does not cancel p.

The promise p can still be canceled either directly (through Lwt.cancel p) or being reached by the backwards cancellation search via another path. Lwt.protected only prevents cancellation of p through p'.

val no_cancel : 'a t -> 'a t

Lwt.no_cancel p creates a non-cancelable promise p'. The original state of p' is the same as p at the time of the call.

If the state of p changes, then the state of p' eventually changes too to match p's.

Note that even though p' is non-cancelable, it can still become canceled if p is canceled. Lwt.no_cancel only prevents cancellation of p and p' through p'.

val wrap_in_cancelable : 'a t -> 'a t

Lwt.wrap_in_cancelable p creates a cancelable promise p'. The original state of p' is the same as p.

The state of p' can change in one of two ways: a. if p changes state (i.e., is resolved), then p' eventually changes state to match p's, and b. during cancellation, if the backwards search described in Lwt.cancel reaches p' then it changes state to rejected Canceled and the search continues to p.

Cancellation tweaks

The primitives protected, no_cancel, and wrap_in_cancelable give you some level of control over the cancellation mechanism of Lwt. Note that promises passed as arguments to either of these three functions are unchanged. The functions return new promises with a specific cancellation behaviour.

The three behaviour of all three functions are summarised in the following table.

+----------------------------+--------------------+--------------------+
+|     setup - action         | cancel p           | cancel p'          |
++----------------------------+--------------------+--------------------+
+| p is cancelable            | p is canceled      | p is not canceled  |
+| p' = protected p           | p'  is canceled    | p' is canceled     |
++----------------------------+--------------------+--------------------+
+| p is not cancelable        | p is not canceled  | p is not canceled  |
+| p' = protected p           | p' is not canceled | p' is canceled     |
++----------------------------+--------------------+--------------------+
+| p is cancelable            | p is canceled      | p is not canceled  |
+| p' = no_cancel p           | p' is canceled     | p' is not canceled |
++----------------------------+--------------------+--------------------+
+| p is not cancelable        | p is not canceled  | p is not canceled  |
+| p' = no_cancel p           | p' is not canceled | p' is not canceled |
++----------------------------+--------------------+--------------------+
+| p is cancelable            | p is canceled      | p is canceled      |
+| p' = wrap_in_cancelable p  | p' is canceled     | p' is canceled     |
++----------------------------+--------------------+--------------------+
+| p is not cancelable        | p is not canceled  | p is not canceled  |
+| p' = wrap_in_cancelable p  | p' is not canceled | p' is canceled     |
++----------------------------+--------------------+--------------------+

Convenience

Callback helpers

val map : ('a -> 'b) -> 'a t -> 'b t

Lwt.map f p_1 is similar to Lwt.bind p_1 f, but f is not expected to return a promise.

This function is more convenient than Lwt.bind when f inherently does not return a promise. An example is Stdlib.int_of_string:

let read_int : unit -> int Lwt.t = fun () ->
+  Lwt.map
+    int_of_string
+    Lwt_io.(read_line stdin)
+
+let () =
+  Lwt_main.run begin
+    let%lwt number = read_int () in
+    Lwt_io.printf "%i\n" number
+  end
+
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

By comparison, the Lwt.bind version is more awkward:

let read_int : unit -> int Lwt.t = fun () ->
+  Lwt.bind
+    Lwt_io.(read_line stdin)
+    (fun line -> Lwt.return (int_of_string line))

As with Lwt.bind, sequences of calls to Lwt.map result in excessive indentation and parentheses. The recommended syntactic sugar for avoiding this is the >|= operator, which comes from module Lwt.Infix:

open Lwt.Infix
+
+let read_int : unit -> int Lwt.t = fun () ->
+  Lwt_io.(read_line stdin) >|= int_of_string

The detailed operation follows. For consistency with the promises in Lwt.bind, the two promises involved are named p_1 and p_3:

  • p_1 is the promise passed to Lwt.map.
  • p_3 is the promise returned by Lwt.map.

Lwt.map returns a promise p_3. p_3 starts out pending. It is resolved as follows:

  • p_1 may be, or become, resolved. In that case, by definition, it will become fulfilled or rejected. Fulfillment is the interesting case, but the behavior on rejection is simpler, so we focus on rejection first.
  • When p_1 becomes rejected, p_3 is rejected with the same exception.
  • When p_1 instead becomes fulfilled, call the value it is fulfilled with v.
  • f v is applied. If this finishes, it may either return another value, or raise an exception.
  • If f v returns another value v', p_3 is fulfilled with v'.
  • If f v raises exception exn, p_3 is rejected with exn.
val on_success : 'a t -> ('a -> unit) -> unit

Lwt.on_success p f makes it so that f will run when p is fulfilled.

It is similar to Lwt.bind, except no new promises are created. f is a plain, arbitrary function attached to p, to perform some side effect.

If f raises an exception, it is passed to !Lwt.async_exception_hook. By default, this will terminate the process.

val on_failure : _ t -> (exn -> unit) -> unit

Lwt.on_failure p f makes it so that f will run when p is rejected.

It is similar to Lwt.catch, except no new promises are created.

If f raises an exception, it is passed to !Lwt.async_exception_hook. By default, this will terminate the process.

val on_termination : _ t -> (unit -> unit) -> unit

Lwt.on_termination p f makes it so that f will run when p is resolved – that is, fulfilled or rejected.

It is similar to Lwt.finalize, except no new promises are created.

If f raises an exception, it is passed to !Lwt.async_exception_hook. By default, this will terminate the process.

val on_any : 'a t -> ('a -> unit) -> (exn -> unit) -> unit

Lwt.on_any p f g makes it so that:

It is similar to Lwt.try_bind, except no new promises are created.

If f or g raise an exception, the exception is passed to !Lwt.async_exception_hook. By default, this will terminate the process.

Infix operators

module Infix : sig ... end

This module provides several infix operators for making programming with Lwt more convenient.

module Let_syntax : sig ... end
module Syntax : sig ... end

Pre-allocated promises

val return_unit : unit t

Lwt.return_unit is defined as Lwt.return (), but this definition is evaluated only once, during initialization of module Lwt, at the beginning of your program.

This means the promise is allocated only once. By contrast, each time Lwt.return () is evaluated, it allocates a new promise.

It is recommended to use Lwt.return_unit only where you know the allocations caused by an instance of Lwt.return () are a performance bottleneck. Generally, the cost of I/O tends to dominate the cost of Lwt.return () anyway.

In future Lwt, we hope to perform this optimization, of using a single, pre-allocated promise, automatically, wherever Lwt.return () is written.

val return_none : _ option t

Lwt.return_none is like Lwt.return_unit, but for Lwt.return None.

val return_nil : _ list t

Lwt.return_nil is like Lwt.return_unit, but for Lwt.return [].

val return_true : bool t

Lwt.return_true is like Lwt.return_unit, but for Lwt.return true.

val return_false : bool t

Lwt.return_false is like Lwt.return_unit, but for Lwt.return false.

Trivial promises

val return_some : 'a -> 'a option t

Counterpart to Lwt.return_none. However, unlike Lwt.return_none, this function performs no optimization. This is because it takes an argument, so it cannot be evaluated at initialization time, at which time the argument is not yet available.

val return_ok : 'a -> ('a, _) result t

Like Lwt.return_some, this function performs no optimization.

  • since Lwt 2.6.0
val return_error : 'e -> (_, 'e) result t

Like Lwt.return_some, this function performs no optimization.

  • since Lwt 2.6.0
val fail_with : string -> _ t

Lwt.fail_with s is an abbreviation for

Lwt.fail (Stdlib.Failure s)

In most cases, it is better to use failwith s from the standard library. See Lwt.fail for an explanation.

val fail_invalid_arg : string -> _ t

Lwt.invalid_arg s is an abbreviation for

Lwt.fail (Stdlib.Invalid_argument s)

In most cases, it is better to use invalid_arg s from the standard library. See Lwt.fail for an explanation.

Result type

A resolved promise of type 'a Lwt.t is either fulfilled with a value of type 'a, or rejected with an exception.

This corresponds to the cases of a ('a, exn)Stdlib.result: fulfilled corresponds to Ok of 'a, and rejected corresponds to Error of exn.

For Lwt programming with result where the Error constructor can carry arbitrary error types, see module Lwt_result.

val of_result : ('a, exn) result -> 'a t

Lwt.of_result r converts an r to a resolved promise.

  • If r is Ok v, Lwt.of_result r is Lwt.return v, i.e. a promise fulfilled with v.
  • If r is Error exn, Lwt.of_result r is Lwt.fail exn, i.e. a promise rejected with exn.
val wakeup_later_result : 'a u -> ('a, exn) result -> unit

Lwt.wakeup_later_result r result resolves the pending promise p associated to resolver r, according to result:

  • If result is Ok v, p is fulfilled with v.
  • If result is Error exn, p is rejected with exn.

If p is not pending, Lwt.wakeup_later_result raises Stdlib.Invalid_argument _, except if p is canceled. If p is canceled, Lwt.wakeup_later_result has no effect.

State query

type 'a state =
  1. | Return of 'a
  2. | Fail of exn
  3. | Sleep
val state : 'a t -> 'a state

Lwt.state p evaluates to the current state of promise p:

  • If p is fulfilled with value v, the result is Lwt.Return v.
  • If p is rejected with exception exn, the result is Lwt.Fail exn.
  • If p is pending, the result is Lwt.Sleep.

The constructor names are historical holdovers.

Deprecated

Implicit callback arguments

Using this mechanism is discouraged, because it is non-syntactic, and because it manipulates hidden state in module Lwt. It is recommended instead to pass additional values explicitly in tuples, or maintain explicit associative maps for them.

type 'a key

Keys into the implicit callback argument map, for implicit arguments of type 'a option.

The keys are abstract, but they are basically integers that are all distinct from each other.

See Lwt.with_value.

val new_key : unit -> 'a key

Creates a fresh implicit callback argument key.

The key is distinct from any other key created by the current process. The value None of type 'a option is immediately associated with the key.

See Lwt.with_value.

val get : 'a key -> 'a option

Retrieves the value currently associated with the given implicit callback argument key.

See Lwt.with_value.

val with_value : 'a key -> 'a option -> (unit -> 'b) -> 'b

Lwt.with_value k v f sets k to v in Lwt's internal implicit callback argument map, then runs f (), then restores the previous value associated with k.

Lwt maintains a single, global map, that can be used to “pass” extra arguments to callbacks:

let () =
+  let k : string Lwt.key = Lwt.new_key () in
+
+  let say_hello () =
+    match Lwt.get k with
+    | None -> assert false
+    | Some s -> Lwt_io.printl s
+  in
+
+  Lwt_main.run begin
+    Lwt.with_value k (Some "Hello world!") begin fun () ->
+      Lwt.bind
+        (Lwt_unix.sleep 1.)
+        (fun () -> say_hello ())
+    end
+  end
+
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

Note that the string Hello world! was passed to say_hello through the key k. Meanwhile, the only explicit argument of the callback say_hello is ().

The way this works is functions like Lwt.bind take a snapshot of the implicit argument map. Later, right before the callback is run, the map is restored to that snapshot. In other words, the map has the same state inside the callback as it did at the time the callback was registered.

To be more precise:

  • Lwt.with_value associates Some "Hello world!" with k, and runs the function passed to it.
  • This function contains the Lwt.bind.
  • OCaml's eager evaluation means the arguments are evaluated first. In particular, the Lwt_unix.sleep 1. promise is created.
  • Lwt.bind then attaches the callback in its second argument, the one which calls say_hello, to that sleep promise.
  • Lwt.bind also takes a snapshot of the current state of the implicit argument map, and pairs the callback with that snapshot.
  • The callback will not run for another second or so, when the sleep promise will be resolved.
  • Instead, Lwt.bind returns its result promise p_3. This causes Lwt.with_value to also return p_3, first restoring k to be associated with None.
  • Lwt_main.run gets the pending p_3, and blocks the whole process, with k associated with None.
  • One second later, the sleep I/O completes, resolving the sleep promise.
  • This triggers the say_hello callback. Right before the callback is called, the implicit argument map is restored to its snapshot, so k is associated with Some "Hello world!".
  • After the callback completes, Lwt again restores k to be associated with None.

The Lwt functions that take snapshots of the implicit callback argument map are exactly those which attach callbacks to promises: Lwt.bind and its variants >>= and let%lwt, Lwt.map and its variant >|=, Lwt.catch and its variant try%lwt, Lwt.finalize and its variant %lwt.finally, Lwt.try_bind, Lwt.on_success, Lwt.on_failure, Lwt.on_termination, and Lwt.on_any.

Lwt.with_value should only be called in the main thread, i.e. do not call it inside Lwt_preemptive.detach.

Immediate resolving

val wakeup : 'a u -> 'a -> unit

Lwt.wakeup r v is like Lwt.wakeup_later r v, except it guarantees that callbacks associated with r will be called immediately, deeper on the current stack.

In contrast, Lwt.wakeup_later may call callbacks immediately, or may queue them for execution on a shallower stack – though still before the next time Lwt blocks the process on I/O.

Using this function is discouraged, because calling it in a loop can exhaust the stack. The loop might be difficult to detect or predict, due to combined mutually-recursive calls between multiple modules and libraries.

Also, trying to use this function to guarantee the timing of callback calls for synchronization purposes is discouraged. This synchronization effect is obscure to readers. It is better to use explicit promises, or Lwt_mutex, Lwt_condition, and/or Lwt_mvar.

val wakeup_exn : _ u -> exn -> unit

Lwt.wakeup_exn r exn is like Lwt.wakeup_later_exn r exn, but has the same problems as Lwt.wakeup.

val wakeup_result : 'a u -> ('a, exn) result -> unit

Lwt.wakeup_result r result is like Lwt.wakeup_later_result r result, but has the same problems as Lwt.wakeup.

Linked lists of promises

val add_task_r : 'a u Lwt_sequence.t -> 'a t

Lwt.add_task_r sequence is equivalent to

let p, r = Lwt.task () in
+let node = Lwt_sequence.add_r r sequence in
+Lwt.on_cancel p (fun () -> Lwt_sequence.remove node);
+p
  • deprecated

    Use of this function is discouraged for two reasons:

    • Lwt_sequence should not be used outside Lwt.
    • This function only exists because it performs a minor internal optimization, which may be removed.
val add_task_l : 'a u Lwt_sequence.t -> 'a t

Like Lwt.add_task_r, but the equivalent code calls Lwt_sequence.add_l instead.

  • deprecated

    See add_task_r.

Yielding

val pause : unit -> unit t

Lwt.pause () creates a pending promise that is fulfilled after Lwt finishes calling all currently ready callbacks, i.e. it is fulfilled on the next “tick.”

Putting the rest of your computation into a callback of Lwt.pause () creates a “yield” that gives other callbacks a chance to run first.

For example, to break up a long-running computation, allowing I/O to be handled between chunks:

let () =
+  let rec handle_io () =
+    let%lwt () = Lwt_io.printl "Handling I/O" in
+    let%lwt () = Lwt_unix.sleep 0.1 in
+    handle_io ()
+  in
+
+  let rec compute n =
+    if n = 0 then
+      Lwt.return ()
+    else
+      let%lwt () =
+        if n mod 1_000_000 = 0 then
+          Lwt.pause ()
+        else
+          Lwt.return ()
+      in
+      compute (n - 1)
+  in
+
+  Lwt.async handle_io;
+  Lwt_main.run (compute 100_000_000)
+
+(* ocamlfind opt -linkpkg -thread -package lwt_ppx,lwt.unix code.ml && ./a.out *)

If you replace the call to Lwt.pause by Lwt.return in the program above, "Handling I/O" is printed only once. With Lwt.pause, it is printed several times, depending on the speed of your machine.

An alternative way to handle long-running computations is to detach them to preemptive threads using Lwt_preemptive.

Function lifters

val wrap : (unit -> 'a) -> 'a t

Lwt.wrap f applies f (). If f () returns a value v, Lwt.wrap returns Lwt.return v. If f () raises an exception exn, Lwt.wrap returns Lwt.fail exn.

val wrap1 : ('a -> 'b) -> 'a -> 'b t
val wrap2 : ('a -> 'b -> 'c) -> 'a -> 'b -> 'c t
val wrap3 : ('a -> 'b -> 'c -> 'd) -> 'a -> 'b -> 'c -> 'd t
val wrap4 : ('a -> 'b -> 'c -> 'd -> 'e) -> 'a -> 'b -> 'c -> 'd -> 'e t
val wrap5 : + ('a -> 'b -> 'c -> 'd -> 'e -> 'f) -> + 'a -> + 'b -> + 'c -> + 'd -> + 'e -> + 'f t
val wrap6 : + ('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g) -> + 'a -> + 'b -> + 'c -> + 'd -> + 'e -> + 'f -> + 'g t
val wrap7 : + ('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g -> 'h) -> + 'a -> + 'b -> + 'c -> + 'd -> + 'e -> + 'f -> + 'g -> + 'h t

As a “prototype,” Lwt_wrap1 f creates a promise-valued function g:

let g v =
+  try
+    let v' = f v in
+    Lwt.return v'
+  with exn ->
+    Lwt.fail exn

The remainder of the functions work analogously – they just work on f with larger numbers of arguments.

Note that there is an important difference to Lwt.wrap. These functions don't run f, nor create the final promise, immediately. In contrast, Lwt.wrap runs its argument f eagerly.

To get a suspended function instead of the eager execution of Lwt.wrap, use Lwt.wrap1.

Unscoped infix operators

Use the operators in module Lwt.Infix instead. Using these instances of the operators directly requires opening module Lwt, which brings an excessive number of other names into scope.

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val (<?>) : 'a t -> 'a t -> 'a t
val (<&>) : unit t -> unit t -> unit t
val (=<<) : ('a -> 'b t) -> 'a t -> 'b t
val (=|<) : ('a -> 'b) -> 'a t -> 'b t

Miscellaneous

val is_sleeping : _ t -> bool

Lwt.is_sleeping p is equivalent to Lwt.state p = Lwt.Sleep.

val ignore_result : _ t -> unit

An obsolete variant of Lwt.async.

Lwt.ignore_result p behaves as follows:

  • If p is already fulfilled, Lwt.ignore_result p does nothing.
  • If p is already rejected with exn, Lwt.ignore_result p raises exn immediately.
  • If p is pending, Lwt.ignore_result p does nothing, but if p becomes rejected later, the exception is passed to !Lwt.async_exception_hook.

Use of this function is discouraged for two reasons:

  • The behavior is different depending on whether p is rejected now or later.
  • The name is misleading, and has led to users thinking this function is analogous to Stdlib.ignore, i.e. that it waits for p to become resolved, completing any associated side effects along the way. In fact, the function that does that is ordinary Lwt.bind.
Runtime exception filters

Depending on the kind of programs that you write, you may need to treat exceptions thrown by the OCaml runtime (namely Out_of_memory and Stack_overflow) differently than all the other exceptions. This is because (a) these exceptions are not reproducible (in that they are thrown at different points of your program depending on the machine that your program runs on) and (b) recovering from these errors may be impossible.

The helpers below allow you to change the way that Lwt handles the two OCaml runtime exceptions Out_of_memory and Stack_overflow.

module Exception_filter : sig ... end
diff --git a/findlib-1/lwt/Lwt_condition/index.html b/findlib-1/lwt/Lwt_condition/index.html new file mode 100644 index 000000000..180bc6e66 --- /dev/null +++ b/findlib-1/lwt/Lwt_condition/index.html @@ -0,0 +1,2 @@ + +Lwt_condition (docs.findlib-1.lwt.Lwt_condition)

Module Lwt_condition

Conditions

Condition variables to synchronize between threads.

type 'a t

Condition variable type. The type parameter denotes the type of value propagated from notifier to waiter.

val create : unit -> 'a t

create () creates a new condition variable.

val wait : ?mutex:Lwt_mutex.t -> 'a t -> 'a Lwt.t

wait mutex condvar will cause the current thread to block, awaiting notification for a condition variable, condvar. If provided, the mutex must have been previously locked (within the scope of Lwt_mutex.with_lock, for example) and is temporarily unlocked until the condition is notified. Upon notification, mutex is re-locked before wait returns and the thread's activity is resumed. When the awaited condition is notified, the value parameter passed to signal is returned.

val signal : 'a t -> 'a -> unit

signal condvar value notifies that a condition is ready. A single waiting thread will be awoken and will receive the notification value which will be returned from wait. Note that condition notification is not "sticky", i.e. if there is no waiter when signal is called, the notification will be missed and the value discarded.

val broadcast : 'a t -> 'a -> unit

broadcast condvar value notifies all waiting threads. Each will be awoken in turn and will receive the same notification value.

val broadcast_exn : 'a t -> exn -> unit

broadcast_exn condvar exn fails all waiting threads with exception exn.

  • since 2.6.0
diff --git a/findlib-1/lwt/Lwt_list/index.html b/findlib-1/lwt/Lwt_list/index.html new file mode 100644 index 000000000..dda348c3b --- /dev/null +++ b/findlib-1/lwt/Lwt_list/index.html @@ -0,0 +1,2 @@ + +Lwt_list (docs.findlib-1.lwt.Lwt_list)

Module Lwt_list

List helpers

Note: this module use the same naming convention as Lwt_stream.

List iterators

val iter_s : ('a -> unit Lwt.t) -> 'a list -> unit Lwt.t
val iter_p : ('a -> unit Lwt.t) -> 'a list -> unit Lwt.t
val iteri_s : (int -> 'a -> unit Lwt.t) -> 'a list -> unit Lwt.t
val iteri_p : (int -> 'a -> unit Lwt.t) -> 'a list -> unit Lwt.t
val map_s : ('a -> 'b Lwt.t) -> 'a list -> 'b list Lwt.t
val map_p : ('a -> 'b Lwt.t) -> 'a list -> 'b list Lwt.t
val mapi_s : (int -> 'a -> 'b Lwt.t) -> 'a list -> 'b list Lwt.t
val mapi_p : (int -> 'a -> 'b Lwt.t) -> 'a list -> 'b list Lwt.t
val rev_map_s : ('a -> 'b Lwt.t) -> 'a list -> 'b list Lwt.t
val rev_map_p : ('a -> 'b Lwt.t) -> 'a list -> 'b list Lwt.t
val fold_left_s : ('a -> 'b -> 'a Lwt.t) -> 'a -> 'b list -> 'a Lwt.t
val fold_right_s : ('a -> 'b -> 'b Lwt.t) -> 'a list -> 'b -> 'b Lwt.t

List scanning

val for_all_s : ('a -> bool Lwt.t) -> 'a list -> bool Lwt.t
val for_all_p : ('a -> bool Lwt.t) -> 'a list -> bool Lwt.t
val exists_s : ('a -> bool Lwt.t) -> 'a list -> bool Lwt.t
val exists_p : ('a -> bool Lwt.t) -> 'a list -> bool Lwt.t

List searching

val find_s : ('a -> bool Lwt.t) -> 'a list -> 'a Lwt.t
val filter_s : ('a -> bool Lwt.t) -> 'a list -> 'a list Lwt.t
val filter_p : ('a -> bool Lwt.t) -> 'a list -> 'a list Lwt.t
val filter_map_s : ('a -> 'b option Lwt.t) -> 'a list -> 'b list Lwt.t
val filter_map_p : ('a -> 'b option Lwt.t) -> 'a list -> 'b list Lwt.t
val partition_s : ('a -> bool Lwt.t) -> 'a list -> ('a list * 'a list) Lwt.t
val partition_p : ('a -> bool Lwt.t) -> 'a list -> ('a list * 'a list) Lwt.t
diff --git a/findlib-1/lwt/Lwt_mutex/index.html b/findlib-1/lwt/Lwt_mutex/index.html new file mode 100644 index 000000000..754b53888 --- /dev/null +++ b/findlib-1/lwt/Lwt_mutex/index.html @@ -0,0 +1,2 @@ + +Lwt_mutex (docs.findlib-1.lwt.Lwt_mutex)

Module Lwt_mutex

Cooperative locks for mutual exclusion

type t

Type of Lwt mutexes

val create : unit -> t

create () creates a new mutex, which is initially unlocked

val lock : t -> unit Lwt.t

lock mutex lockcs the mutex, that is:

  • if the mutex is unlocked, then it is marked as locked and lock returns immediately
  • if it is locked, then lock waits for all threads waiting on the mutex to terminate, then it resumes when the last one unlocks the mutex

Note: threads are woken up in the same order they try to lock the mutex

val unlock : t -> unit

unlock mutex unlock the mutex if no threads is waiting on it. Otherwise it will eventually removes the first one and resumes it.

val is_locked : t -> bool

locked mutex returns whether mutex is currently locked

val is_empty : t -> bool

is_empty mutex returns true if they are no thread waiting on the mutex, and false otherwise

val with_lock : t -> (unit -> 'a Lwt.t) -> 'a Lwt.t

with_lock lock f is used to lock a mutex within a block scope. The function f () is called with the mutex locked, and its result is returned from the call to with_lock. If an exception is raised from f, the mutex is also unlocked before the scope of with_lock is exited.

diff --git a/findlib-1/lwt/Lwt_mvar/index.html b/findlib-1/lwt/Lwt_mvar/index.html new file mode 100644 index 000000000..1c36f794c --- /dev/null +++ b/findlib-1/lwt/Lwt_mvar/index.html @@ -0,0 +1,2 @@ + +Lwt_mvar (docs.findlib-1.lwt.Lwt_mvar)

Module Lwt_mvar

Mailbox variables

“Mailbox” variables implement a synchronising variable, used for communication between concurrent threads.

type 'a t

The type of a mailbox variable. Mailbox variables are used to communicate values between threads in a synchronous way. The type parameter specifies the type of the value propagated from put to take.

val create : 'a -> 'a t

create v creates a new mailbox variable containing value v.

val create_empty : unit -> 'a t

create () creates a new empty mailbox variable.

val put : 'a t -> 'a -> unit Lwt.t

put mvar value puts a value into a mailbox variable. This value will remain in the mailbox until take is called to remove it. If the mailbox is not empty, the current thread will block until it is emptied.

val take : 'a t -> 'a Lwt.t

take mvar will take any currently available value from the mailbox variable. If no value is currently available, the current thread will block, awaiting a value to be put by another thread.

val take_available : 'a t -> 'a option

take_available mvar immediately takes the value from mvar without blocking, returning None if the mailbox is empty.

  • since 3.2.0
val is_empty : 'a t -> bool

is_empty mvar indicates if put mvar can be called without blocking.

  • since 3.2.0
diff --git a/findlib-1/lwt/Lwt_pool/index.html b/findlib-1/lwt/Lwt_pool/index.html new file mode 100644 index 000000000..ae07c8ca6 --- /dev/null +++ b/findlib-1/lwt/Lwt_pool/index.html @@ -0,0 +1,22 @@ + +Lwt_pool (docs.findlib-1.lwt.Lwt_pool)

Module Lwt_pool

External resource pools.

This module provides an abstraction for managing collections of resources. One example use case is for managing a pool of database connections, where instead of establishing a new connection each time you need one (which is expensive), you can keep a pool of opened connections and reuse ones that are free.

It also provides the capability of:

The following example illustrates how it is used with an imaginary Db module:

let uri = "postgresql://localhost:5432"
+
+(* Create a database connection pool with max size of 10. *)
+let pool =
+  Lwt_pool.create 10
+    ~dispose:(fun connection -> Db.close connection |> Lwt.return)
+    (fun () -> Db.connect uri |> Lwt.return)
+
+(* Use the pool in queries. *)
+let create_user name =
+  Lwt_pool.use pool (fun connection ->
+      connection
+      |> Db.insert "users" [("name", name)]
+      |> Lwt.return
+    )

Note that this is not intended to keep a pool of system threads. If you want to have such pool, consider using Lwt_preemptive.

type 'a t

A pool containing elements of type 'a.

val create : + int -> + ?validate:('a -> bool Lwt.t) -> + ?check:('a -> (bool -> unit) -> unit) -> + ?dispose:('a -> unit Lwt.t) -> + (unit -> 'a Lwt.t) -> + 'a t

create n ?check ?validate ?dispose f creates a new pool with at most n elements. f is used to create a new pool element. Elements are created on demand and re-used until disposed of.

  • parameter validate

    is called each time a pool element is accessed by use, before the element is provided to use's callback. If validate element resolves to true the element is considered valid and is passed to the callback for use as-is. If validate element resolves to false the tested pool element is passed to dispose then dropped, with a new one is created to take element's place in the pool. validate is available since Lwt 3.2.0.

  • parameter check

    is called after the resolution of use's callback when the resolution is a failed promise. check element is_ok must call is_ok exactly once with true if element is still valid and false otherwise. If check calls is_ok false then dispose will be run on element and the element will not be returned to the pool.

  • parameter dispose

    is used as described above and by clear to dispose of all elements in a pool. dispose is not guaranteed to be called on the elements in a pool when the pool is garbage collected. clear should be used if the elements of the pool need to be explicitly disposed of.

val use : 'a t -> ('a -> 'b Lwt.t) -> 'b Lwt.t

use p f requests one free element of the pool p and gives it to the function f. The element is put back into the pool after the promise created by f completes.

In the case that p is exhausted and the maximum number of elements is reached, use will wait until one becomes free.

val clear : 'a t -> unit Lwt.t

clear p will clear all elements in p, calling the dispose function associated with p on each of the cleared elements. Any elements from p which are currently in use will be disposed of once they are released.

The next call to use p after clear p guarantees a freshly created pool element.

Disposals are performed sequentially in an undefined order.

  • since 3.2.0
val wait_queue_length : _ t -> int

wait_queue_length p returns the number of use requests currently waiting for an element of the pool p to become available.

  • since 3.2.0
diff --git a/findlib-1/lwt/Lwt_pqueue/Make/argument-1-Ord/index.html b/findlib-1/lwt/Lwt_pqueue/Make/argument-1-Ord/index.html new file mode 100644 index 000000000..2b3c80612 --- /dev/null +++ b/findlib-1/lwt/Lwt_pqueue/Make/argument-1-Ord/index.html @@ -0,0 +1,2 @@ + +Ord (docs.findlib-1.lwt.Lwt_pqueue.Make.Ord)

Parameter Make.Ord

type t
val compare : t -> t -> int
diff --git a/findlib-1/lwt/Lwt_pqueue/Make/index.html b/findlib-1/lwt/Lwt_pqueue/Make/index.html new file mode 100644 index 000000000..ccd03094d --- /dev/null +++ b/findlib-1/lwt/Lwt_pqueue/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.findlib-1.lwt.Lwt_pqueue.Make)

Module Lwt_pqueue.Make

Generates priority queue types from ordered types.

Parameters

module Ord : OrderedType

Signature

type elt = Ord.t

Type of elements contained in the priority queue.

type t

Type of priority queues.

val empty : t

The empty priority queue. Contains no elements.

val is_empty : t -> bool

is_empty q evaluates to true iff q is empty.

val add : elt -> t -> t

add e q evaluates to a new priority queue, which contains all the elements of q, and the additional element e.

val union : t -> t -> t

union q q' evaluates to a new priority queue, which contains all the elements of both q and q'.

val find_min : t -> elt

find_min q evaluates to the minimum element of q if it is not empty, and raises Not_found otherwise.

val lookup_min : t -> elt option

lookup_min q evaluates to Some e, where e is the minimum element of q, if q is not empty, and evaluates to None otherwise.

val remove_min : t -> t

remove_min q evaluates to a new priority queue, which contains all the elements of q except for its minimum element. Raises Not_found if q is empty.

val size : t -> int

size q evaluates to the number of elements in q.

diff --git a/findlib-1/lwt/Lwt_pqueue/index.html b/findlib-1/lwt/Lwt_pqueue/index.html new file mode 100644 index 000000000..c0209ac36 --- /dev/null +++ b/findlib-1/lwt/Lwt_pqueue/index.html @@ -0,0 +1,2 @@ + +Lwt_pqueue (docs.findlib-1.lwt.Lwt_pqueue)

Module Lwt_pqueue

Functional priority queues (deprecated).

A priority queue maintains, in the abstract sense, a set of elements in order, and supports fast lookup and removal of the first (“minimum”) element. This is used in Lwt for organizing threads that are waiting for timeouts.

The priority queues in this module preserve “duplicates”: elements that compare equal in their order.

module type OrderedType = sig ... end

Signature pairing an element type with an ordering function.

module type S = sig ... end

Signature of priority queues.

module Make (Ord : OrderedType) : S with type elt = Ord.t

Generates priority queue types from ordered types.

diff --git a/findlib-1/lwt/Lwt_pqueue/module-type-OrderedType/index.html b/findlib-1/lwt/Lwt_pqueue/module-type-OrderedType/index.html new file mode 100644 index 000000000..733ba005b --- /dev/null +++ b/findlib-1/lwt/Lwt_pqueue/module-type-OrderedType/index.html @@ -0,0 +1,2 @@ + +OrderedType (docs.findlib-1.lwt.Lwt_pqueue.OrderedType)

Module type Lwt_pqueue.OrderedType

Signature pairing an element type with an ordering function.

type t
val compare : t -> t -> int
diff --git a/findlib-1/lwt/Lwt_pqueue/module-type-S/index.html b/findlib-1/lwt/Lwt_pqueue/module-type-S/index.html new file mode 100644 index 000000000..65709602f --- /dev/null +++ b/findlib-1/lwt/Lwt_pqueue/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (docs.findlib-1.lwt.Lwt_pqueue.S)

Module type Lwt_pqueue.S

Signature of priority queues.

type elt

Type of elements contained in the priority queue.

type t

Type of priority queues.

val empty : t

The empty priority queue. Contains no elements.

val is_empty : t -> bool

is_empty q evaluates to true iff q is empty.

val add : elt -> t -> t

add e q evaluates to a new priority queue, which contains all the elements of q, and the additional element e.

val union : t -> t -> t

union q q' evaluates to a new priority queue, which contains all the elements of both q and q'.

val find_min : t -> elt

find_min q evaluates to the minimum element of q if it is not empty, and raises Not_found otherwise.

val lookup_min : t -> elt option

lookup_min q evaluates to Some e, where e is the minimum element of q, if q is not empty, and evaluates to None otherwise.

val remove_min : t -> t

remove_min q evaluates to a new priority queue, which contains all the elements of q except for its minimum element. Raises Not_found if q is empty.

val size : t -> int

size q evaluates to the number of elements in q.

diff --git a/findlib-1/lwt/Lwt_result/Infix/index.html b/findlib-1/lwt/Lwt_result/Infix/index.html new file mode 100644 index 000000000..fb7c3fd41 --- /dev/null +++ b/findlib-1/lwt/Lwt_result/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.lwt.Lwt_result.Infix)

Module Lwt_result.Infix

val (>|=) : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
val (>>=) : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
diff --git a/findlib-1/lwt/Lwt_result/Let_syntax/Let_syntax/Open_on_rhs/index.html b/findlib-1/lwt/Lwt_result/Let_syntax/Let_syntax/Open_on_rhs/index.html new file mode 100644 index 000000000..236ab98ed --- /dev/null +++ b/findlib-1/lwt/Lwt_result/Let_syntax/Let_syntax/Open_on_rhs/index.html @@ -0,0 +1,2 @@ + +Open_on_rhs (docs.findlib-1.lwt.Lwt_result.Let_syntax.Let_syntax.Open_on_rhs)

Module Let_syntax.Open_on_rhs

diff --git a/findlib-1/lwt/Lwt_result/Let_syntax/Let_syntax/index.html b/findlib-1/lwt/Lwt_result/Let_syntax/Let_syntax/index.html new file mode 100644 index 000000000..bec956660 --- /dev/null +++ b/findlib-1/lwt/Lwt_result/Let_syntax/Let_syntax/index.html @@ -0,0 +1,2 @@ + +Let_syntax (docs.findlib-1.lwt.Lwt_result.Let_syntax.Let_syntax)

Module Let_syntax.Let_syntax

val return : 'a -> ('a, _) t
val map : ('a, 'e) t -> f:('a -> 'b) -> ('b, 'e) t
val bind : ('a, 'e) t -> f:('a -> ('b, 'e) t) -> ('b, 'e) t
val both : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
module Open_on_rhs : sig ... end
diff --git a/findlib-1/lwt/Lwt_result/Let_syntax/index.html b/findlib-1/lwt/Lwt_result/Let_syntax/index.html new file mode 100644 index 000000000..fcf91f8da --- /dev/null +++ b/findlib-1/lwt/Lwt_result/Let_syntax/index.html @@ -0,0 +1,2 @@ + +Let_syntax (docs.findlib-1.lwt.Lwt_result.Let_syntax)

Module Lwt_result.Let_syntax

module Let_syntax : sig ... end
diff --git a/findlib-1/lwt/Lwt_result/Syntax/index.html b/findlib-1/lwt/Lwt_result/Syntax/index.html new file mode 100644 index 000000000..20c6ec92f --- /dev/null +++ b/findlib-1/lwt/Lwt_result/Syntax/index.html @@ -0,0 +1,2 @@ + +Syntax (docs.findlib-1.lwt.Lwt_result.Syntax)

Module Lwt_result.Syntax

Let syntax

Monadic syntax

val let* : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t

Syntax for bind.

val and* : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t

Syntax for both.

Applicative syntax

val let+ : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t

Syntax for map.

val and+ : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t

Syntax for both.

diff --git a/findlib-1/lwt/Lwt_result/index.html b/findlib-1/lwt/Lwt_result/index.html new file mode 100644 index 000000000..292682ee0 --- /dev/null +++ b/findlib-1/lwt/Lwt_result/index.html @@ -0,0 +1,2 @@ + +Lwt_result (docs.findlib-1.lwt.Lwt_result)

Module Lwt_result

Explicit error handling

This module provides helpers for values of type ('a, 'b) result Lwt.t. The module is experimental and may change in the future.

type (+'a, +'b) t = ('a, 'b) result Lwt.t
val return : 'a -> ('a, _) t
val fail : 'b -> (_, 'b) t
val lift : ('a, 'b) result -> ('a, 'b) t
val ok : 'a Lwt.t -> ('a, _) t
val error : 'b Lwt.t -> (_, 'b) t
  • since 5.6.0
val catch : (unit -> 'a Lwt.t) -> ('a, exn) t

catch x behaves like return y if x () evaluates to y, and like fail e if x () raises e

val get_exn : ('a, exn) t -> 'a Lwt.t

get_exn is the opposite of catch: it unwraps the result type, returning the value in case of success, calls Lwt.fail in case of error.

val map : ('a -> 'b) -> ('a, 'e) t -> ('b, 'e) t
val map_error : ('e1 -> 'e2) -> ('a, 'e1) t -> ('a, 'e2) t
  • since 5.6.0
val bind : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
val bind_error : ('a, 'e1) t -> ('e1 -> ('a, 'e2) t) -> ('a, 'e2) t
  • since 5.6.0
val bind_lwt : ('a, 'e) t -> ('a -> 'b Lwt.t) -> ('b, 'e) t
val bind_lwt_error : ('a, 'e1) t -> ('e1 -> 'e2 Lwt.t) -> ('a, 'e2) t
  • since 5.6.0
val bind_result : ('a, 'e) t -> ('a -> ('b, 'e) result) -> ('b, 'e) t
val both : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t

Lwt.both p_1 p_2 returns a promise that is pending until both promises p_1 and p_2 become resolved. If only p_1 is Error e, the promise is resolved with Error e, If only p_2 is Error e, the promise is resolved with Error e, If both p_1 and p_2 resolve with Error _, the promise is resolved with the error that occurred first.

val iter : ('a -> unit Lwt.t) -> ('a, 'e) t -> unit Lwt.t

iter f r is f v if r is a promise resolved with Ok v, and Lwt.return_unit otherwise.

  • since Lwt 5.6.0
val iter_error : ('e -> unit Lwt.t) -> ('a, 'e) t -> unit Lwt.t

iter_error f r is f v if r is a promise resolved with Error v, and Lwt.return_unit otherwise.

  • since Lwt 5.6.0
module Infix : sig ... end
module Let_syntax : sig ... end
module Syntax : sig ... end
include module type of Infix
val (>|=) : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
val (>>=) : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t

Deprecated

val map_err : ('e1 -> 'e2) -> ('a, 'e1) t -> ('a, 'e2) t
  • deprecated

    Alias to map_error since 5.6.0.

val bind_lwt_err : ('a, 'e1) t -> ('e1 -> 'e2 Lwt.t) -> ('a, 'e2) t
  • deprecated

    Alias to bind_lwt_error since 5.6.0.

diff --git a/findlib-1/lwt/Lwt_seq/index.html b/findlib-1/lwt/Lwt_seq/index.html new file mode 100644 index 000000000..fb6d92cfb --- /dev/null +++ b/findlib-1/lwt/Lwt_seq/index.html @@ -0,0 +1,2 @@ + +Lwt_seq (docs.findlib-1.lwt.Lwt_seq)

Module Lwt_seq

type 'a t = unit -> 'a node Lwt.t

The type of delayed lists containing elements of type 'a. Note that the concrete list node 'a node is delayed under a closure, not a lazy block, which means it might be recomputed every time we access it.

and +'a node =
  1. | Nil
  2. | Cons of 'a * 'a t
    (*

    A fully-evaluated list node, either empty or containing an element and a delayed tail.

    *)
val empty : 'a t

The empty sequence, containing no elements.

val return : 'a -> 'a t

The singleton sequence containing only the given element.

val return_lwt : 'a Lwt.t -> 'a t

The singleton sequence containing only the given promised element.

val cons : 'a -> 'a t -> 'a t

cons x xs is the sequence containing the element x followed by the sequence xs

val cons_lwt : 'a Lwt.t -> 'a t -> 'a t

cons x xs is the sequence containing the element promised by x followed by the sequence xs

val append : 'a t -> 'a t -> 'a t

append xs ys is the sequence xs followed by the sequence ys

val map : ('a -> 'b) -> 'a t -> 'b t

map f seq returns a new sequence whose elements are the elements of seq, transformed by f. This transformation is lazy, it only applies when the result is traversed.

val map_s : ('a -> 'b Lwt.t) -> 'a t -> 'b t

map_s f seq is like map f seq but f is a function that returns a promise.

Note that there is no concurrency between the promises from the underlying sequence seq and the promises from applying the function f. In other words, the next promise-element of the underlying sequence (seq) is only created when the current promise-element of the returned sequence (as mapped by f) has resolved. This scheduling is true for all the _s functions of this module.

val filter : ('a -> bool) -> 'a t -> 'a t

Remove from the sequence the elements that do not satisfy the given predicate. This transformation is lazy, it only applies when the result is traversed.

val filter_s : ('a -> bool Lwt.t) -> 'a t -> 'a t

filter_s is like filter but the predicate returns a promise.

See map_s for additional details about scheduling.

val filter_map : ('a -> 'b option) -> 'a t -> 'b t

Apply the function to every element; if f x = None then x is dropped; if f x = Some y then y is returned. This transformation is lazy, it only applies when the result is traversed.

val filter_map_s : ('a -> 'b option Lwt.t) -> 'a t -> 'b t

filter_map_s is like filter but the predicate returns a promise.

See map_s for additional details about scheduling.

val flat_map : ('a -> 'b t) -> 'a t -> 'b t

Map each element to a subsequence, then return each element of this sub-sequence in turn. This transformation is lazy, it only applies when the result is traversed.

val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a Lwt.t

Traverse the sequence from left to right, combining each element with the accumulator using the given function. The traversal happens immediately and will not terminate (i.e., the promise will not resolve) on infinite sequences.

val fold_left_s : ('a -> 'b -> 'a Lwt.t) -> 'a -> 'b t -> 'a Lwt.t

fold_left_s is like fold_left but the function returns a promise.

See map_s for additional details about scheduling.

val iter : ('a -> unit) -> 'a t -> unit Lwt.t

Iterate on the sequence, calling the (imperative) function on every element.

The sequence's next node is evaluated only once the function has finished processing the current element. More formally: the promise for the n+1th node of the sequence is created only once the promise returned by f on the nth element of the sequence has resolved.

The traversal happens immediately and will not terminate (i.e., the promise will not resolve) on infinite sequences.

val iter_s : ('a -> unit Lwt.t) -> 'a t -> unit Lwt.t

iter_s is like iter but the function returns a promise.

See map_s for additional details about scheduling.

val iter_p : ('a -> unit Lwt.t) -> 'a t -> unit Lwt.t

Iterate on the sequence, calling the (imperative) function on every element.

The sequence's next node is evaluated as soon as the previous node is resolved.

The traversal happens immediately and will not terminate (i.e., the promise will not resolve) on infinite sequences.

val iter_n : ?max_concurrency:int -> ('a -> unit Lwt.t) -> 'a t -> unit Lwt.t

iter_n ~max_concurrency f s

Iterates on the sequence s, calling the (imperative) function f on every element.

The sum total of unresolved promises returned by f never exceeds max_concurrency. Node suspensions are evaluated only when there is capacity for f-promises to be evaluated. Consequently, there might be significantly fewer than max_concurrency promises being evaluated concurrently; especially if the node suspensions take longer to evaluate than the f-promises.

The traversal happens immediately and will not terminate (i.e., the promise will not resolve) on infinite sequences.

  • parameter max_concurrency

    defaults to 1.

val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t

Build a sequence from a step function and an initial value. unfold f u returns empty if the promise f u resolves to None, or fun () -> Lwt.return (Cons (x, unfold f y)) if the promise f u resolves to Some (x, y).

val unfold_lwt : ('b -> ('a * 'b) option Lwt.t) -> 'b -> 'a t

unfold_lwt is like unfold but the step function returns a promise.

val to_list : 'a t -> 'a list Lwt.t

Convert a sequence to a list, preserving order. The traversal happens immediately and will not terminate (i.e., the promise will not resolve) on infinite sequences.

val of_list : 'a list -> 'a t

Convert a list to a sequence, preserving order.

val of_seq : 'a Seq.t -> 'a t

Convert from 'a Stdlib.Seq.t to 'a Lwt_seq.t. This transformation is lazy, it only applies when the result is traversed.

val of_seq_lwt : 'a Lwt.t Seq.t -> 'a t

Convert from 'a Lwt.t Stdlib.Seq.t to 'a Lwt_seq.t. This transformation is lazy, it only applies when the result is traversed.

diff --git a/findlib-1/lwt/Lwt_sequence/index.html b/findlib-1/lwt/Lwt_sequence/index.html new file mode 100644 index 000000000..7d0defcf2 --- /dev/null +++ b/findlib-1/lwt/Lwt_sequence/index.html @@ -0,0 +1,2 @@ + +Lwt_sequence (docs.findlib-1.lwt.Lwt_sequence)

Module Lwt_sequence

Mutable sequence of elements (deprecated)

A sequence is an object holding a list of elements which support the following operations:

type 'a t

Type of a sequence holding values of type 'a

type 'a node

Type of a node holding one value of type 'a in a sequence

Operation on nodes

val get : 'a node -> 'a

Returns the contents of a node

val set : 'a node -> 'a -> unit

Change the contents of a node

val remove : 'a node -> unit

Removes a node from the sequence it is part of. It does nothing if the node has already been removed.

Operations on sequence

val create : unit -> 'a t

create () creates a new empty sequence

val clear : 'a t -> unit

Removes all nodes from the given sequence. The nodes are not actually mutated to note their removal. Only the sequence's pointers are updated.

val is_empty : 'a t -> bool

Returns true iff the given sequence is empty

val length : 'a t -> int

Returns the number of elements in the given sequence. This is a O(n) operation where n is the number of elements in the sequence.

val add_l : 'a -> 'a t -> 'a node

add_l x s adds x to the left of the sequence s

val add_r : 'a -> 'a t -> 'a node

add_r x s adds x to the right of the sequence s

exception Empty

Exception raised by take_l and take_r and when the sequence is empty

val take_l : 'a t -> 'a

take_l x s remove and returns the leftmost element of s

  • raises Empty

    if the sequence is empty

val take_r : 'a t -> 'a

take_r x s remove and returns the rightmost element of s

  • raises Empty

    if the sequence is empty

val take_opt_l : 'a t -> 'a option

take_opt_l x s remove and returns Some x where x is the leftmost element of s or None if s is empty

val take_opt_r : 'a t -> 'a option

take_opt_r x s remove and returns Some x where x is the rightmost element of s or None if s is empty

val transfer_l : 'a t -> 'a t -> unit

transfer_l s1 s2 removes all elements of s1 and add them at the left of s2. This operation runs in constant time and space.

val transfer_r : 'a t -> 'a t -> unit

transfer_r s1 s2 removes all elements of s1 and add them at the right of s2. This operation runs in constant time and space.

Sequence iterators

Note: it is OK to remove a node while traversing a sequence

val iter_l : ('a -> unit) -> 'a t -> unit

iter_l f s applies f on all elements of s starting from the left

val iter_r : ('a -> unit) -> 'a t -> unit

iter_r f s applies f on all elements of s starting from the right

val iter_node_l : ('a node -> unit) -> 'a t -> unit

iter_node_l f s applies f on all nodes of s starting from the left

val iter_node_r : ('a node -> unit) -> 'a t -> unit

iter_node_r f s applies f on all nodes of s starting from the right

val fold_l : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b

fold_l f s is:

fold_l f s x = f en (... (f e2 (f e1 x)))

where e1, e2, ..., en are the elements of s

val fold_r : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b

fold_r f s is:

fold_r f s x = f e1 (f e2 (... (f en x)))

where e1, e2, ..., en are the elements of s

val find_node_opt_l : ('a -> bool) -> 'a t -> 'a node option

find_node_opt_l f s returns Some x, where x is the first node of s starting from the left that satisfies f or None if none exists.

val find_node_opt_r : ('a -> bool) -> 'a t -> 'a node option

find_node_opt_r f s returns Some x, where x is the first node of s starting from the right that satisfies f or None if none exists.

val find_node_l : ('a -> bool) -> 'a t -> 'a node

find_node_l f s returns the first node of s starting from the left that satisfies f or raises Not_found if none exists.

val find_node_r : ('a -> bool) -> 'a t -> 'a node

find_node_r f s returns the first node of s starting from the right that satisfies f or raises Not_found if none exists.

diff --git a/findlib-1/lwt/Lwt_stream/class-type-bounded_push/index.html b/findlib-1/lwt/Lwt_stream/class-type-bounded_push/index.html new file mode 100644 index 000000000..3a0074352 --- /dev/null +++ b/findlib-1/lwt/Lwt_stream/class-type-bounded_push/index.html @@ -0,0 +1,2 @@ + +bounded_push (docs.findlib-1.lwt.Lwt_stream.bounded_push)

Class type Lwt_stream.bounded_push

Type of sources for bounded push-streams.

method size : int

Size of the stream.

method resize : int -> unit

Change the size of the stream queue. Note that the new size can smaller than the current stream queue size.

It raises Stdlib.Invalid_argument if size < 0.

method push : 'a -> unit Lwt.t

Pushes a new element to the stream. If the stream is full then it will block until one element is consumed. If another thread is already blocked on push, it raises Lwt_stream.Full.

method close : unit

Closes the stream. Any thread currently blocked on Lwt_stream.bounded_push.push fails with Lwt_stream.Closed.

method count : int

Number of elements in the stream queue.

method blocked : bool

Is a thread is blocked on Lwt_stream.bounded_push.push ?

method closed : bool

Is the stream closed ?

method set_reference : 'a. 'a -> unit

Set the reference to an external source.

diff --git a/findlib-1/lwt/Lwt_stream/index.html b/findlib-1/lwt/Lwt_stream/index.html new file mode 100644 index 000000000..55fa9e9db --- /dev/null +++ b/findlib-1/lwt/Lwt_stream/index.html @@ -0,0 +1,21 @@ + +Lwt_stream (docs.findlib-1.lwt.Lwt_stream)

Module Lwt_stream

Data streams

type 'a t

A stream holding values of type 'a.

Naming convention: in this module, all functions applying a function to each element of a stream are suffixed by:

  • _s when the function returns a thread and calls are serialised
  • _p when the function returns a thread and calls are parallelised

Construction

val from : (unit -> 'a option Lwt.t) -> 'a t

from f creates a stream from the given input function. f is called each time more input is needed, and the stream ends when f returns None.

If f, or the thread produced by f, raises an exception, that exception is forwarded to the consumer of the stream (for example, a caller of get). Note that this does not end the stream. A subsequent attempt to read from the stream will cause another call to f, which may succeed with a value.

val from_direct : (unit -> 'a option) -> 'a t

from_direct f does the same as from but with a function that does not return a thread. It is preferred that this function be used rather than wrapping f into a function which returns a thread.

The behavior when f raises an exception is the same as for from, except that f does not produce a thread.

exception Closed

Exception raised by the push function of a push-stream when pushing an element after the end of stream (= None) has been pushed.

val create : unit -> 'a t * ('a option -> unit)

create () returns a new stream and a push function.

To notify the stream's consumer of errors, either use a separate communication channel, or use a Stdlib.result stream. There is no way to push an exception into a push-stream.

val create_with_reference : unit -> 'a t * ('a option -> unit) * ('b -> unit)

create_with_reference () returns a new stream and a push function. The last function allows a reference to be set to an external source. This prevents the external source from being garbage collected.

For example, to convert a reactive event to a stream:

let stream, push, set_ref = Lwt_stream.create_with_reference () in
+set_ref (map_event push event)
exception Full

Exception raised by the push function of a bounded push-stream when the stream queue is full and a thread is already waiting to push an element.

class type 'a bounded_push = object ... end

Type of sources for bounded push-streams.

val create_bounded : int -> 'a t * 'a bounded_push

create_bounded size returns a new stream and a bounded push source. The stream can hold a maximum of size elements. When this limit is reached, pushing a new element will block until one is consumed.

Note that you cannot clone or parse (with parse) a bounded stream. These functions will raise Invalid_argument if you try to do so.

It raises Invalid_argument if size < 0.

val return : 'a -> 'a t

return a creates a stream containing the value a and being immediately closed stream (in the sense of is_closed).

  • since 5.5.0
val return_lwt : 'a Lwt.t -> 'a t

return_lwt l creates a stream returning the value that l resolves to. The value is pushed into the stream immediately after the promise becomes resolved and the stream is then immediately closed (in the sense of is_closed).

If, instead, l becomes rejected, then the stream is closed without any elements in it. Attempting to fetch elements from it will raise Empty.

  • since 5.5.0
val of_seq : 'a Seq.t -> 'a t

of_seq s creates a stream returning all elements of s. The elements are evaluated from s and pushed onto the stream as the stream is consumed.

  • since 4.2.0
val of_lwt_seq : 'a Lwt_seq.t -> 'a t

of_lwt_seq s creates a stream returning all elements of s. The elements are evaluated from s and pushed onto the stream as the stream is consumed.

  • since 5.5.0
val of_list : 'a list -> 'a t

of_list l creates a stream returning all elements of l. The elements are pushed into the stream immediately, resulting in a closed stream (in the sense of is_closed).

val of_array : 'a array -> 'a t

of_array a creates a stream returning all elements of a. The elements are pushed into the stream immediately, resulting in a closed stream (in the sense of is_closed).

val of_string : string -> char t

of_string str creates a stream returning all characters of str. The characters are pushed into the stream immediately, resulting in a closed stream (in the sense of is_closed).

val clone : 'a t -> 'a t

clone st clone the given stream. Operations on each stream will not affect the other.

For example:

# let st1 = Lwt_stream.of_list [1; 2; 3];;
+val st1 : int Lwt_stream.t = <abstr>
+# let st2 = Lwt_stream.clone st1;;
+val st2 : int Lwt_stream.t = <abstr>
+# lwt x = Lwt_stream.next st1;;
+val x : int = 1
+# lwt y = Lwt_stream.next st2;;
+val y : int = 1

It raises Invalid_argument if st is a bounded push-stream.

Destruction

val to_list : 'a t -> 'a list Lwt.t

Returns the list of elements of the given stream

val to_string : char t -> string Lwt.t

Returns the word composed of all characters of the given stream

Data retrieval

exception Empty

Exception raised when trying to retrieve data from an empty stream.

val peek : 'a t -> 'a option Lwt.t

peek st returns the first element of the stream, if any, without removing it.

val npeek : int -> 'a t -> 'a list Lwt.t

npeek n st returns at most the first n elements of st, without removing them.

val get : 'a t -> 'a option Lwt.t

get st removes and returns the first element of the stream, if any.

val nget : int -> 'a t -> 'a list Lwt.t

nget n st removes and returns at most the first n elements of st.

val get_while : ('a -> bool) -> 'a t -> 'a list Lwt.t
val get_while_s : ('a -> bool Lwt.t) -> 'a t -> 'a list Lwt.t

get_while f st returns the longest prefix of st where all elements satisfy f.

val next : 'a t -> 'a Lwt.t

next st removes and returns the next element of the stream or fails with Empty, if the stream is empty.

val last_new : 'a t -> 'a Lwt.t

last_new st returns the last element that can be obtained without sleeping, or wait for one if none is available.

It fails with Empty if the stream has no more elements.

val junk : 'a t -> unit Lwt.t

junk st removes the first element of st.

val njunk : int -> 'a t -> unit Lwt.t

njunk n st removes at most the first n elements of the stream.

val junk_while : ('a -> bool) -> 'a t -> unit Lwt.t
val junk_while_s : ('a -> bool Lwt.t) -> 'a t -> unit Lwt.t

junk_while f st removes all elements at the beginning of the streams which satisfy f.

val junk_old : 'a t -> unit Lwt.t

junk_old st removes all elements that are ready to be read without yielding from st.

val get_available : 'a t -> 'a list

get_available st returns all available elements of l without blocking.

val get_available_up_to : int -> 'a t -> 'a list

get_available_up_to n st returns up to n elements of l without blocking.

val is_empty : 'a t -> bool Lwt.t

is_empty st returns whether the given stream is empty.

val is_closed : 'a t -> bool

is_closed st returns whether the given stream has been closed. A closed stream is not necessarily empty. It may still contain unread elements. If is_closed s = true, then all subsequent reads until the end of the stream are guaranteed not to block.

  • since 2.6.0
val closed : 'a t -> unit Lwt.t

closed st returns a thread that will sleep until the stream has been closed.

  • since 2.6.0

Stream transversal

Note: all the following functions are destructive.

For example:

# let st1 = Lwt_stream.of_list [1; 2; 3];;
+val st1 : int Lwt_stream.t = <abstr>
+# let st2 = Lwt_stream.map string_of_int st1;;
+val st2 : string Lwt_stream.t = <abstr>
+# lwt x = Lwt_stream.next st1;;
+val x : int = 1
+# lwt y = Lwt_stream.next st2;;
+val y : string = "2"
val choose : 'a t list -> 'a t

choose l creates an stream from a list of streams. The resulting stream will return elements returned by any stream of l in an unspecified order.

val map : ('a -> 'b) -> 'a t -> 'b t
val map_s : ('a -> 'b Lwt.t) -> 'a t -> 'b t

map f st maps the value returned by st with f

val filter : ('a -> bool) -> 'a t -> 'a t
val filter_s : ('a -> bool Lwt.t) -> 'a t -> 'a t

filter f st keeps only values, x, such that f x is true

val filter_map : ('a -> 'b option) -> 'a t -> 'b t
val filter_map_s : ('a -> 'b option Lwt.t) -> 'a t -> 'b t

filter_map f st filter and map st at the same time

val map_list : ('a -> 'b list) -> 'a t -> 'b t
val map_list_s : ('a -> 'b list Lwt.t) -> 'a t -> 'b t

map_list f st applies f on each element of st and flattens the lists returned

val fold : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b Lwt.t
val fold_s : ('a -> 'b -> 'b Lwt.t) -> 'a t -> 'b -> 'b Lwt.t

fold f s x fold_like function for streams.

val iter : ('a -> unit) -> 'a t -> unit Lwt.t
val iter_p : ('a -> unit Lwt.t) -> 'a t -> unit Lwt.t
val iter_s : ('a -> unit Lwt.t) -> 'a t -> unit Lwt.t

iter f s iterates over all elements of the stream.

val iter_n : ?max_concurrency:int -> ('a -> unit Lwt.t) -> 'a t -> unit Lwt.t

iter_n ?max_concurrency f s iterates over all elements of the stream s. Iteration is performed concurrently with up to max_threads concurrent instances of f.

Iteration is not guaranteed to be in order as this function will attempt to always process max_concurrency elements from s at once.

  • parameter max_concurrency

    defaults to 1.

  • since 3.3.0
val find : ('a -> bool) -> 'a t -> 'a option Lwt.t
val find_s : ('a -> bool Lwt.t) -> 'a t -> 'a option Lwt.t

find f s find an element in a stream.

val find_map : ('a -> 'b option) -> 'a t -> 'b option Lwt.t
val find_map_s : ('a -> 'b option Lwt.t) -> 'a t -> 'b option Lwt.t

find_map f s find and map at the same time.

val combine : 'a t -> 'b t -> ('a * 'b) t

combine s1 s2 combines two streams. The stream will end when either stream ends.

val append : 'a t -> 'a t -> 'a t

append s1 s2 returns a stream which returns all elements of s1, then all elements of s2

val concat : 'a t t -> 'a t

concat st returns the concatenation of all streams of st.

val flatten : 'a list t -> 'a t

flatten st = map_list (fun l -> l) st

val wrap_exn : 'a t -> ('a, exn) result t

wrap_exn s is a stream s' such that each time s yields a value v, s' yields Result.Ok v, and when the source of s raises an exception e, s' yields Result.Error e.

Note that push-streams (as returned by create) never raise exceptions.

If the stream source keeps raising the same exception e each time the stream is read, s' is unbounded. Reading it will produce Result.Error e indefinitely.

  • since 2.7.0

Parsing

val parse : 'a t -> ('a t -> 'b Lwt.t) -> 'b Lwt.t

parse st f parses st with f. If f raise an exception, st is restored to its previous state.

It raises Invalid_argument if st is a bounded push-stream.

Misc

val hexdump : char t -> string t

hexdump byte_stream returns a stream which is the same as the output of hexdump -C.

Basically, here is a simple implementation of hexdump -C:

let () = Lwt_main.run begin
+    Lwt_io.write_lines
+      Lwt_io.stdout
+      (Lwt_stream.hexdump (Lwt_io.read_lines Lwt_io.stdin))
+  end
diff --git a/findlib-1/lwt/Lwt_switch/index.html b/findlib-1/lwt/Lwt_switch/index.html new file mode 100644 index 000000000..b23202e5e --- /dev/null +++ b/findlib-1/lwt/Lwt_switch/index.html @@ -0,0 +1,16 @@ + +Lwt_switch (docs.findlib-1.lwt.Lwt_switch)

Module Lwt_switch

Lwt switches

Switch has two goals:

For example, consider the following interface:

type id
+
+val free : id -> unit Lwt.t
+
+val f : unit -> id Lwt.t
+val g : unit -> id Lwt.t
+val h : unit -> id Lwt.t

Now you want to call f, g and h in parallel. You can simply do:

lwt idf = f () and idg = g () and idh = h () in
+...

However, one may want to handle possible failures of f (), g () and h (), and disable all allocated resources if one of these three threads fails. This may be hard since you have to remember which one failed and which one returned correctly.

Now if we change the interface a little bit:

val f : ?switch : Lwt_switch.t -> unit -> id Lwt.t
+val g : ?switch : Lwt_switch.t -> unit -> id Lwt.t
+val h : ?switch : Lwt_switch.t -> unit -> id Lwt.t

the code becomes:

Lwt_switch.with_switch (fun switch ->
+  lwt idf = f ~switch ()
+  and idg = g ~switch ()
+  and idh = h ~switch () in
+  ...
+)
type t

Type of switches.

val create : unit -> t

create () creates a new switch.

val with_switch : (t -> 'a Lwt.t) -> 'a Lwt.t

with_switch fn is fn switch, where switch is a fresh switch that is turned off when the callback thread finishes (whether it succeeds or fails).

  • since 2.6.0
val is_on : t -> bool

is_on switch returns true if the switch is currently on, and false otherwise.

val turn_off : t -> unit Lwt.t

turn_off switch turns off the switch. It calls all registered hooks, waits for all of them to terminate, then returns. If one of the hooks failed, it will fail with the exception raised by the hook. If the switch is already off, it does nothing.

exception Off

Exception raised when trying to add a hook to a switch that is already off.

val check : t option -> unit

check switch does nothing if switch is None or contains an switch that is currently on, and raises Off otherwise.

val add_hook : t option -> (unit -> unit Lwt.t) -> unit

add_hook switch f registers f so it will be called when turn_off is invoked. It does nothing if switch is None. If switch contains an switch that is already off then Off is raised.

val add_hook_or_exec : t option -> (unit -> unit Lwt.t) -> unit Lwt.t

add_hook_or_exec switch f is the same as add_hook except that if the switch is already off, f is called immediately.

diff --git a/findlib-1/lwt/index.html b/findlib-1/lwt/index.html new file mode 100644 index 000000000..2dde90a47 --- /dev/null +++ b/findlib-1/lwt/index.html @@ -0,0 +1,2 @@ + +lwt (docs.findlib-1.lwt)

Package lwt

Library lwt

This library exposes the following toplevel modules:

diff --git a/findlib-1/melange-fetch/Fetch/AbortController/index.html b/findlib-1/melange-fetch/Fetch/AbortController/index.html new file mode 100644 index 000000000..1a24b16a9 --- /dev/null +++ b/findlib-1/melange-fetch/Fetch/AbortController/index.html @@ -0,0 +1,2 @@ + +AbortController (docs.findlib-1.melange-fetch.Fetch.AbortController)

Module Fetch.AbortController

val signal : t -> signal
val abort : t -> unit
val make : unit -> t
diff --git a/findlib-1/melange-fetch/Fetch/Body/index.html b/findlib-1/melange-fetch/Fetch/Body/index.html new file mode 100644 index 000000000..873736299 --- /dev/null +++ b/findlib-1/melange-fetch/Fetch/Body/index.html @@ -0,0 +1,2 @@ + +Body (docs.findlib-1.melange-fetch.Fetch.Body)

Module Fetch.Body

type t = body
val body : t -> readableStream
val bodyUsed : t -> bool
val arrayBuffer : t -> arrayBuffer Js.Promise.t
val blob : t -> blob Js.Promise.t
val formData : t -> formData Js.Promise.t
val json : t -> Js.Json.t Js.Promise.t
val text : t -> string Js.Promise.t
diff --git a/findlib-1/melange-fetch/Fetch/BodyInit/index.html b/findlib-1/melange-fetch/Fetch/BodyInit/index.html new file mode 100644 index 000000000..c32180f4d --- /dev/null +++ b/findlib-1/melange-fetch/Fetch/BodyInit/index.html @@ -0,0 +1,2 @@ + +BodyInit (docs.findlib-1.melange-fetch.Fetch.BodyInit)

Module Fetch.BodyInit

type t = bodyInit
val make : string -> t
val makeWithBlob : blob -> t
val makeWithBufferSource : bufferSource -> t
val makeWithFormData : formData -> t
val makeWithUrlSearchParams : urlSearchParams -> t
diff --git a/findlib-1/melange-fetch/Fetch/FormData/EntryValue/index.html b/findlib-1/melange-fetch/Fetch/FormData/EntryValue/index.html new file mode 100644 index 000000000..cb2f01555 --- /dev/null +++ b/findlib-1/melange-fetch/Fetch/FormData/EntryValue/index.html @@ -0,0 +1,2 @@ + +EntryValue (docs.findlib-1.melange-fetch.Fetch.FormData.EntryValue)

Module FormData.EntryValue

type t

This represents a FormDataEntryValue.

val classify : t -> [> `String of string | `File of file ]

classify entryValue safely casts the entryValue to its correct runtime type.

diff --git a/findlib-1/melange-fetch/Fetch/FormData/Iterator/Next/index.html b/findlib-1/melange-fetch/Fetch/FormData/Iterator/Next/index.html new file mode 100644 index 000000000..ebc501f7f --- /dev/null +++ b/findlib-1/melange-fetch/Fetch/FormData/Iterator/Next/index.html @@ -0,0 +1,2 @@ + +Next (docs.findlib-1.melange-fetch.Fetch.FormData.Iterator.Next)

Module Iterator.Next

type 'a t
val done_ : _ t -> bool option
val value : 'a t -> 'a option
diff --git a/findlib-1/melange-fetch/Fetch/FormData/Iterator/index.html b/findlib-1/melange-fetch/Fetch/FormData/Iterator/index.html new file mode 100644 index 000000000..d75587f47 --- /dev/null +++ b/findlib-1/melange-fetch/Fetch/FormData/Iterator/index.html @@ -0,0 +1,2 @@ + +Iterator (docs.findlib-1.melange-fetch.Fetch.FormData.Iterator)

Module FormData.Iterator

We need to bind to JavaScript Iterators for FormData functionality. But ideally this binding should be moved into BuckleScript itself.

@see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols

module Next : sig ... end
type 'a t
val forEach : f:('a -> unit) Js.Fn.arity1 -> 'a t -> unit

forEach ~f iterator runs f on each item returned by the iterator. This is not defined by the platform but a convenience function.

val next : 'a t -> 'a Next.t
diff --git a/findlib-1/melange-fetch/Fetch/FormData/index.html b/findlib-1/melange-fetch/Fetch/FormData/index.html new file mode 100644 index 000000000..42066c34a --- /dev/null +++ b/findlib-1/melange-fetch/Fetch/FormData/index.html @@ -0,0 +1,2 @@ + +FormData (docs.findlib-1.melange-fetch.Fetch.FormData)

Module Fetch.FormData

module EntryValue : sig ... end
module Iterator : sig ... end

We need to bind to JavaScript Iterators for FormData functionality. But ideally this binding should be moved into BuckleScript itself.

type t = formData
val make : unit -> t
val append : string -> string -> t -> unit
val delete : string -> t -> unit
val get : string -> t -> EntryValue.t option
val getAll : string -> t -> EntryValue.t array
val set : string -> string -> t -> unit
val has : string -> t -> bool
val keys : t -> string Iterator.t
val values : t -> EntryValue.t Iterator.t
val appendObject : string -> < .. > Js.t -> ?filename:string -> t -> unit

This is for React Native compatibility purposes

val appendBlob : string -> blob -> ?filename:string -> t -> unit
val appendFile : string -> file -> ?filename:string -> t -> unit
val setObject : string -> < .. > Js.t -> ?filename:string -> t -> unit

This is for React Native compatibility purposes

val setBlob : string -> blob -> ?filename:string -> t -> unit
val setFile : string -> file -> ?filename:string -> t -> unit
val entries : t -> (string * EntryValue.t) Iterator.t
diff --git a/findlib-1/melange-fetch/Fetch/Headers/index.html b/findlib-1/melange-fetch/Fetch/Headers/index.html new file mode 100644 index 000000000..c33682bb8 --- /dev/null +++ b/findlib-1/melange-fetch/Fetch/Headers/index.html @@ -0,0 +1,2 @@ + +Headers (docs.findlib-1.melange-fetch.Fetch.Headers)

Module Fetch.Headers

type t = headers
val make : t
val makeWithInit : headersInit -> t
val append : string -> string -> t -> unit
val delete : string -> t -> unit
val get : string -> t -> string option
val has : string -> t -> bool
val set : string -> string -> t -> unit
diff --git a/findlib-1/melange-fetch/Fetch/HeadersInit/index.html b/findlib-1/melange-fetch/Fetch/HeadersInit/index.html new file mode 100644 index 000000000..684623a2d --- /dev/null +++ b/findlib-1/melange-fetch/Fetch/HeadersInit/index.html @@ -0,0 +1,2 @@ + +HeadersInit (docs.findlib-1.melange-fetch.Fetch.HeadersInit)

Module Fetch.HeadersInit

type t = headersInit
val make : < .. > Js.t -> t
val makeWithDict : string Js.Dict.t -> t
val makeWithArray : (string * string) array -> t
diff --git a/findlib-1/melange-fetch/Fetch/Request/index.html b/findlib-1/melange-fetch/Fetch/Request/index.html new file mode 100644 index 000000000..46f2f4ee7 --- /dev/null +++ b/findlib-1/melange-fetch/Fetch/Request/index.html @@ -0,0 +1,2 @@ + +Request (docs.findlib-1.melange-fetch.Fetch.Request)

Module Fetch.Request

type t = request
val make : string -> t
val makeWithInit : string -> requestInit -> t
val makeWithRequest : t -> t
val makeWithRequestInit : t -> requestInit -> t
val method_ : t -> requestMethod
val url : t -> string
val headers : t -> headers
val type_ : t -> requestType
val destination : t -> requestDestination
val referrer : t -> string
val referrerPolicy : t -> referrerPolicy
val mode : t -> requestMode
val credentials : t -> requestCredentials
val cache : t -> requestCache
val redirect : t -> requestRedirect
val integrity : t -> string
val keepalive : t -> bool
val signal : t -> signal
val body : t -> readableStream
val bodyUsed : t -> bool
val arrayBuffer : t -> arrayBuffer Js.Promise.t
val blob : t -> blob Js.Promise.t
val formData : t -> formData Js.Promise.t
val json : t -> Js.Json.t Js.Promise.t
val text : t -> string Js.Promise.t
diff --git a/findlib-1/melange-fetch/Fetch/RequestInit/index.html b/findlib-1/melange-fetch/Fetch/RequestInit/index.html new file mode 100644 index 000000000..a47c84a70 --- /dev/null +++ b/findlib-1/melange-fetch/Fetch/RequestInit/index.html @@ -0,0 +1,16 @@ + +RequestInit (docs.findlib-1.melange-fetch.Fetch.RequestInit)

Module Fetch.RequestInit

type t = requestInit
val make : + ?method_:requestMethod -> + ?headers:headersInit -> + ?body:bodyInit -> + ?referrer:string -> + ?referrerPolicy:referrerPolicy -> + ?mode:requestMode -> + ?credentials:requestCredentials -> + ?cache:requestCache -> + ?redirect:requestRedirect -> + ?integrity:string -> + ?keepalive:bool -> + ?signal:signal -> + unit -> + t
diff --git a/findlib-1/melange-fetch/Fetch/Response/index.html b/findlib-1/melange-fetch/Fetch/Response/index.html new file mode 100644 index 000000000..365d5e713 --- /dev/null +++ b/findlib-1/melange-fetch/Fetch/Response/index.html @@ -0,0 +1,2 @@ + +Response (docs.findlib-1.melange-fetch.Fetch.Response)

Module Fetch.Response

type t = response
val error : unit -> t
val redirect : string -> t
val redirectWithStatus : string -> int -> t
val headers : t -> headers
val ok : t -> bool
val redirected : t -> bool
val status : t -> int
val statusText : t -> string
val type_ : t -> string
val url : t -> string
val clone : t -> t
val body : t -> readableStream
val bodyUsed : t -> bool
val arrayBuffer : t -> arrayBuffer Js.Promise.t
val blob : t -> blob Js.Promise.t
val formData : t -> formData Js.Promise.t
val json : t -> Js.Json.t Js.Promise.t
val text : t -> string Js.Promise.t
diff --git a/findlib-1/melange-fetch/Fetch/index.html b/findlib-1/melange-fetch/Fetch/index.html new file mode 100644 index 000000000..c64182266 --- /dev/null +++ b/findlib-1/melange-fetch/Fetch/index.html @@ -0,0 +1,2 @@ + +Fetch (docs.findlib-1.melange-fetch.Fetch)

Module Fetch

type body
type bodyInit
type headers
type headersInit
type response
type request
type requestInit
type arrayBuffer
type bufferSource
type formData
type readableStream
type urlSearchParams
type abortController
type signal

File API

type blob
type file
type requestMethod =
  1. | Get
  2. | Head
  3. | Post
  4. | Put
  5. | Delete
  6. | Connect
  7. | Options
  8. | Trace
  9. | Patch
  10. | Other of string
module AbortController : sig ... end
type referrerPolicy =
  1. | None
  2. | NoReferrer
  3. | NoReferrerWhenDowngrade
  4. | SameOrigin
  5. | Origin
  6. | StrictOrigin
  7. | OriginWhenCrossOrigin
  8. | StrictOriginWhenCrossOrigin
  9. | UnsafeUrl
type requestType =
  1. | None
  2. | Audio
  3. | Font
  4. | Image
  5. | Script
  6. | Style
  7. | Track
  8. | Video
type requestDestination =
  1. | None
  2. | Document
  3. | Embed
  4. | Font
  5. | Image
  6. | Manifest
  7. | Media
  8. | Object
  9. | Report
  10. | Script
  11. | ServiceWorker
  12. | SharedWorker
  13. | Style
  14. | Worker
  15. | Xslt
type requestMode =
  1. | Navigate
  2. | SameOrigin
  3. | NoCORS
  4. | CORS
type requestCredentials =
  1. | Omit
  2. | SameOrigin
  3. | Include
type requestCache =
  1. | Default
  2. | NoStore
  3. | Reload
  4. | NoCache
  5. | ForceCache
  6. | OnlyIfCached
type requestRedirect =
  1. | Follow
  2. | Error
  3. | Manual
module HeadersInit : sig ... end
module Headers : sig ... end
module BodyInit : sig ... end
module Body : sig ... end
module RequestInit : sig ... end
module Request : sig ... end
module Response : sig ... end
module FormData : sig ... end
val fetch : string -> response Js.Promise.t
val fetchWithInit : string -> requestInit -> response Js.Promise.t
val fetchWithRequest : request -> response Js.Promise.t
val fetchWithRequestInit : request -> requestInit -> response Js.Promise.t
diff --git a/findlib-1/melange-fetch/index.html b/findlib-1/melange-fetch/index.html new file mode 100644 index 000000000..1d6f1fed5 --- /dev/null +++ b/findlib-1/melange-fetch/index.html @@ -0,0 +1,2 @@ + +melange-fetch (docs.findlib-1.melange-fetch)

Package melange-fetch

Library melange-fetch

The entry point of this library is the module: Fetch.

diff --git a/findlib-1/melange-webapi/Webapi/Base64/index.html b/findlib-1/melange-webapi/Webapi/Base64/index.html new file mode 100644 index 000000000..7df070ec2 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Base64/index.html @@ -0,0 +1,2 @@ + +Base64 (docs.findlib-1.melange-webapi.Webapi.Base64)

Module Webapi.Base64

val btoa : string -> string
val atob : string -> string
diff --git a/findlib-1/melange-webapi/Webapi/Blob/Impl/argument-1-T/index.html b/findlib-1/melange-webapi/Webapi/Blob/Impl/argument-1-T/index.html new file mode 100644 index 000000000..3d8d30da0 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Blob/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.melange-webapi.Webapi.Blob.Impl.T)

Parameter Impl.T

type t
diff --git a/findlib-1/melange-webapi/Webapi/Blob/Impl/index.html b/findlib-1/melange-webapi/Webapi/Blob/Impl/index.html new file mode 100644 index 000000000..73567da5c --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Blob/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.findlib-1.melange-webapi.Webapi.Blob.Impl)

Module Blob.Impl

Parameters

module T : sig ... end

Signature

val arrayBuffer : T.t -> Js.Typed_array.ArrayBuffer.t Js.Promise.t
val size : T.t -> float
val slice : ?start:int -> ?end_:int -> ?contentType:string -> T.t -> T.t
val stream : T.t -> Fetch.readableStream
  • since 0.19.0
val text : T.t -> string Js.Promise.t
val type_ : T.t -> string
val _type : T.t -> string

Deprecated, use type_ instead.

  • deprecated Use [type_] instead
diff --git a/findlib-1/melange-webapi/Webapi/Blob/index.html b/findlib-1/melange-webapi/Webapi/Blob/index.html new file mode 100644 index 000000000..0eb15d744 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Blob/index.html @@ -0,0 +1,2 @@ + +Blob (docs.findlib-1.melange-webapi.Webapi.Blob)

Module Webapi.Blob

module Impl (T : sig ... end) : sig ... end
type t = Fetch.blob
include sig ... end
val arrayBuffer : t -> Js.Typed_array.ArrayBuffer.t Js.Promise.t
val size : t -> float
val slice : ?start:int -> ?end_:int -> ?contentType:string -> t -> t
val stream : t -> Fetch.readableStream
  • since 0.19.0
val text : t -> string Js.Promise.t
val type_ : t -> string
val _type : t -> string

Deprecated, use type_ instead.

  • deprecated Use [type_] instead
diff --git a/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/Composite/index.html b/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/Composite/index.html new file mode 100644 index 000000000..7a91f697e --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/Composite/index.html @@ -0,0 +1,2 @@ + +Composite (docs.findlib-1.melange-webapi.Webapi.Canvas.Canvas2d.Composite)

Module Canvas2d.Composite

type t = private string
val sourceOver : t
val sourceIn : t
val sourceOut : t
val sourceAtop : t
val destinationOver : t
val destinationIn : t
val destinationOut : t
val destinationAtop : t
val lighter : t
val copy : t
val xor : t
diff --git a/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/LineCap/index.html b/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/LineCap/index.html new file mode 100644 index 000000000..e940522ba --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/LineCap/index.html @@ -0,0 +1,2 @@ + +LineCap (docs.findlib-1.melange-webapi.Webapi.Canvas.Canvas2d.LineCap)

Module Canvas2d.LineCap

type t = private string
val butt : t
val round : t
val square : t
diff --git a/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/LineJoin/index.html b/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/LineJoin/index.html new file mode 100644 index 000000000..5c976bb1d --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/LineJoin/index.html @@ -0,0 +1,2 @@ + +LineJoin (docs.findlib-1.melange-webapi.Webapi.Canvas.Canvas2d.LineJoin)

Module Canvas2d.LineJoin

type t = private string
val round : t
val bevel : t
val miter : t
diff --git a/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/index.html b/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/index.html new file mode 100644 index 000000000..9a978c134 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/index.html @@ -0,0 +1,92 @@ + +Canvas2d (docs.findlib-1.melange-webapi.Webapi.Canvas.Canvas2d)

Module Canvas.Canvas2d

type t
type gradient
type pattern
type measureText
module type CompositeType = sig ... end
module type LineCapType = sig ... end
module type LineJoinType = sig ... end
type 'a image =
  1. | Number : float image
  2. | ImageData : Webapi__Dom__Image.t image
type _ style =
  1. | String : string style
  2. | Gradient : gradient style
  3. | Pattern : pattern style
val save : t -> unit
val restore : t -> unit
val scale : x:float -> y:float -> t -> unit
val rotate : float -> t -> unit
val translate : x:float -> y:float -> t -> unit
val transform : + m11:float -> + m12:float -> + m21:float -> + m22:float -> + dx:float -> + dy:float -> + t -> + unit
val setTransform : + m11:float -> + m12:float -> + m21:float -> + m22:float -> + dx:float -> + dy:float -> + t -> + unit
val globalAlpha : t -> float -> unit
val globalCompositeOperation : t -> Composite.t -> unit
val lineWidth : t -> float -> unit
val lineCap : t -> LineCap.t -> unit
val lineJoin : t -> LineJoin.t -> unit
val miterLimit : t -> float -> unit
val setStrokeStyle : t -> 'a style -> 'a0 -> unit
val setFillStyle : t -> 'a style -> 'a0 -> unit
val reifyStyle : 'a -> 'a0 style * 'a1
val fillStyle : t -> 'a style * 'a
val strokeStyle : t -> 'a style * 'a
val shadowOffsetX : t -> float -> unit
val shadowOffsetY : t -> float -> unit
val shadowBlur : t -> float -> unit
val shadowColor : t -> string -> unit
val createLinearGradient : + x0:float -> + y0:float -> + x1:float -> + y1:float -> + t -> + gradient
val createRadialGradient : + x0:float -> + y0:float -> + x1:float -> + y1:float -> + r0:float -> + r1:float -> + t -> + gradient
val addColorStop : float -> string -> gradient -> unit
val createPattern : + t -> + Dom.element -> + [ `repeat | `repeatX | `repeatY | `noRepeat ] -> + pattern
val beginPath : t -> unit
val closePath : t -> unit
val fill : t -> unit
val stroke : t -> unit
val clip : t -> unit
val moveTo : x:float -> y:float -> t -> unit
val lineTo : x:float -> y:float -> t -> unit
val quadraticCurveTo : + cp1x:float -> + cp1y:float -> + x:float -> + y:float -> + t -> + unit
val bezierCurveTo : + cp1x:float -> + cp1y:float -> + cp2x:float -> + cp2y:float -> + x:float -> + y:float -> + t -> + unit
val arcTo : + x1:float -> + y1:float -> + x2:float -> + y2:float -> + r:float -> + t -> + unit
val arc : + x:float -> + y:float -> + r:float -> + startAngle:float -> + endAngle:float -> + anticw:bool -> + t -> + unit
val rect : x:float -> y:float -> w:float -> h:float -> t -> unit
val isPointInPath : x:float -> y:float -> t -> bool
val font : t -> string -> unit
val textAlign : t -> string -> unit
val textBaseline : t -> string -> unit
val fillText : string -> x:float -> y:float -> ?maxWidth:float -> t -> unit
val strokeText : string -> x:float -> y:float -> ?maxWidth:float -> t -> unit
val measureText : string -> t -> measureText
val width : measureText -> float
val fillRect : x:float -> y:float -> w:float -> h:float -> t -> unit
val strokeRect : x:float -> y:float -> w:float -> h:float -> t -> unit
val clearRect : x:float -> y:float -> w:float -> h:float -> t -> unit
val createImageDataCoords : + t -> + width:float -> + height:float -> + Webapi__Dom__Image.t
val createImageDataFromImage : + t -> + Webapi__Dom__Image.t -> + Webapi__Dom__Image.t
val getImageData : + t -> + sx:float -> + sy:float -> + sw:float -> + sh:float -> + Webapi__Dom__Image.t
val putImageData : + t -> + imageData:Webapi__Dom__Image.t -> + dx:float -> + dy:float -> + unit
val putImageDataWithDirtyRect : + t -> + imageData:Webapi__Dom__Image.t -> + dx:float -> + dy:float -> + dirtyX:float -> + dirtyY:float -> + dirtyWidth:float -> + dirtyHeight:float -> + unit
diff --git a/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/module-type-CompositeType/index.html b/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/module-type-CompositeType/index.html new file mode 100644 index 000000000..719e8d5a4 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/module-type-CompositeType/index.html @@ -0,0 +1,2 @@ + +CompositeType (docs.findlib-1.melange-webapi.Webapi.Canvas.Canvas2d.CompositeType)

Module type Canvas2d.CompositeType

type t = private string
val sourceOver : t
val sourceIn : t
val sourceOut : t
val sourceAtop : t
val destinationOver : t
val destinationIn : t
val destinationOut : t
val destinationAtop : t
val lighter : t
val copy : t
val xor : t
diff --git a/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/module-type-LineCapType/index.html b/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/module-type-LineCapType/index.html new file mode 100644 index 000000000..a286e99c8 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/module-type-LineCapType/index.html @@ -0,0 +1,2 @@ + +LineCapType (docs.findlib-1.melange-webapi.Webapi.Canvas.Canvas2d.LineCapType)

Module type Canvas2d.LineCapType

type t = private string
val butt : t
val round : t
val square : t
diff --git a/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/module-type-LineJoinType/index.html b/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/module-type-LineJoinType/index.html new file mode 100644 index 000000000..115ca9b42 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Canvas/Canvas2d/module-type-LineJoinType/index.html @@ -0,0 +1,2 @@ + +LineJoinType (docs.findlib-1.melange-webapi.Webapi.Canvas.Canvas2d.LineJoinType)

Module type Canvas2d.LineJoinType

type t = private string
val round : t
val bevel : t
val miter : t
diff --git a/findlib-1/melange-webapi/Webapi/Canvas/CanvasElement/index.html b/findlib-1/melange-webapi/Webapi/Canvas/CanvasElement/index.html new file mode 100644 index 000000000..721bc017c --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Canvas/CanvasElement/index.html @@ -0,0 +1,2 @@ + +CanvasElement (docs.findlib-1.melange-webapi.Webapi.Canvas.CanvasElement)

Module Canvas.CanvasElement

val getContext2d : Dom.element -> Canvas2d.t
val getContextWebGl : Dom.element -> WebGl.glT
val height : Dom.element -> int
val setHeight : Dom.element -> int -> unit
val width : Dom.element -> int
val setWidth : Dom.element -> int -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Canvas/WebGl/index.html b/findlib-1/melange-webapi/Webapi/Canvas/WebGl/index.html new file mode 100644 index 000000000..bd604bdbe --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Canvas/WebGl/index.html @@ -0,0 +1,15 @@ + +WebGl (docs.findlib-1.melange-webapi.Webapi.Canvas.WebGl)

Module Canvas.WebGl

type glT
type programT
type shaderT
type bufferT
val _DEPTH_BUFFER_BIT : int
val _STENCIL_BUFFER_BIT : int
val _COLOR_BUFFER_BIT : int
val _POINTS : int
val _LINES : int
val _LINE_LOOP : int
val _LINE_STRIP : int
val _TRIANGLES : int
val _TRIANGLE_STRIP : int
val _TRIANGLE_FAN : int
val _CULL_FACE : int
val _BLEND : int
val _DITHER : int
val _STENCIL_TEST : int
val _DEPTH_TEST : int
val _SCISSOR_TEST : int
val _POLYGON_OFFSET_FILL : int
val _SAMPLE_ALPHA_TO_COVERAGE : int
val _SAMPLE_COVERAGE : int
val _ZERO : int
val _ONE : int
val _SRC_COLOR : int
val _ONE_MINUS_SRC_COLOR : int
val _SRC_ALPHA : int
val _ONE_MINUS_SRC_ALPHA : int
val _DST_ALPHA : int
val _ONE_MINUS_DST_ALPHA : int
val _BYTE : int
val _UNSIGNED_BYTE : int
val _SHORT : int
val _UNSIGNED_SHORT : int
val _INT : int
val _UNSIGNED_INT : int
val _FLOAT : int
val _FRONT : int
val _BACK : int
val _FRONT_AND_BACK : int
val _FRAGMENT_SHADER : int
val _VERTEX_SHADER : int
val _ARRAY_BUFFER : int
val _ELEMENT_ARRAY_BUFFER : int
val _ARRAY_BUFFER_BINDING : int
val _ELEMENT_ARRAY_BUFFER_BINDING : int
val _STREAM_DRAW : int
val _STATIC_DRAW : int
val _DYNAMIC_DRAW : int
val clear : glT -> int -> unit
val clearColor : glT -> float -> float -> float -> float -> unit
val enable : glT -> int -> unit
val disable : glT -> int -> unit
val blendFunc : glT -> int -> int -> unit
val cullFace : glT -> int -> unit
val createBuffer : glT -> bufferT
val deleteBuffer : glT -> bufferT -> unit
val bindBuffer : glT -> int -> bufferT -> unit
val bufferData : glT -> int -> Js.Typed_array.Uint16Array.t -> int -> unit
val bufferFloatData : + glT -> + int -> + Js.Typed_array.Float32Array.t -> + int -> + unit
val createProgram : glT -> programT
val linkProgram : glT -> programT -> unit
val useProgram : glT -> programT -> unit
val getProgramInfoLog : glT -> programT -> string
val bindAttribLocation : glT -> programT -> int -> string -> unit
val createShader : glT -> int -> shaderT
val shaderSource : glT -> shaderT -> string -> unit
val compileShader : glT -> shaderT -> unit
val attachShader : glT -> programT -> shaderT -> unit
val getShaderInfoLog : glT -> shaderT -> string
val drawElements : glT -> int -> int -> int -> int -> unit
val enableVertexAttribArray : glT -> int -> unit
val vertexAttribPointer : + glT -> + int -> + int -> + int -> + bool -> + int -> + int -> + unit
val getAttribLocation : glT -> programT -> string -> int
val drawArrays : glT -> int -> int -> int -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Canvas/index.html b/findlib-1/melange-webapi/Webapi/Canvas/index.html new file mode 100644 index 000000000..83b667784 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Canvas/index.html @@ -0,0 +1,2 @@ + +Canvas (docs.findlib-1.melange-webapi.Webapi.Canvas)

Module Webapi.Canvas

module Canvas2d : sig ... end
module WebGl : sig ... end
module CanvasElement : sig ... end
diff --git a/findlib-1/melange-webapi/Webapi/Dom/AnimationEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/AnimationEvent/index.html new file mode 100644 index 000000000..fd030ca7d --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/AnimationEvent/index.html @@ -0,0 +1,2 @@ + +AnimationEvent (docs.findlib-1.melange-webapi.Webapi.Dom.AnimationEvent)

Module Dom.AnimationEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val animationName : t -> string
val elapsedTime : t -> float
val pseudoElement : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Attr/index.html b/findlib-1/melange-webapi/Webapi/Dom/Attr/index.html new file mode 100644 index 000000000..b170f4e0d --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Attr/index.html @@ -0,0 +1,512 @@ + +Attr (docs.findlib-1.melange-webapi.Webapi.Dom.Attr)

Module Dom.Attr

type t = Dom.attr
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val namespaceURI : t -> string
val prefix : t -> string
val localName : t -> string
val name : t -> string
val value : t -> string
val ownerElement : t -> Dom.element option
val specified : t -> bool
diff --git a/findlib-1/melange-webapi/Webapi/Dom/BeforeUnloadEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/BeforeUnloadEvent/index.html new file mode 100644 index 000000000..90d1f9256 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/BeforeUnloadEvent/index.html @@ -0,0 +1,2 @@ + +BeforeUnloadEvent (docs.findlib-1.melange-webapi.Webapi.Dom.BeforeUnloadEvent)

Module Dom.BeforeUnloadEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val returnValue : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/CdataSection/index.html b/findlib-1/melange-webapi/Webapi/Dom/CdataSection/index.html new file mode 100644 index 000000000..e0fa0dd94 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/CdataSection/index.html @@ -0,0 +1,512 @@ + +CdataSection (docs.findlib-1.melange-webapi.Webapi.Dom.CdataSection)

Module Dom.CdataSection

include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val data : t -> string
val length : t -> int
val substringData : offset:int -> count:int -> t -> string
val appendData : string -> t -> unit
val insertData : offset:int -> string -> t -> unit
val deleteData : offset:int -> count:int -> t -> unit
val replaceData : offset:int -> count:int -> string -> t -> unit
include sig ... end
val previousElementSibling : t -> Dom.element option
val nextElementSibling : t -> Dom.element option
include sig ... end
val remove : t -> unit
include sig ... end
val assignedSlot : t -> Dom.htmlSlotElement option
diff --git a/findlib-1/melange-webapi/Webapi/Dom/CharacterData/Impl/argument-1-T/index.html b/findlib-1/melange-webapi/Webapi/Dom/CharacterData/Impl/argument-1-T/index.html new file mode 100644 index 000000000..4d52c7a31 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/CharacterData/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.melange-webapi.Webapi.Dom.CharacterData.Impl.T)

Parameter Impl.T

type t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/CharacterData/Impl/index.html b/findlib-1/melange-webapi/Webapi/Dom/CharacterData/Impl/index.html new file mode 100644 index 000000000..ab6702628 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/CharacterData/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.findlib-1.melange-webapi.Webapi.Dom.CharacterData.Impl)

Module CharacterData.Impl

Parameters

module T : sig ... end

Signature

val data : T.t -> string
val length : T.t -> int
val substringData : offset:int -> count:int -> T.t -> string
val appendData : string -> T.t -> unit
val insertData : offset:int -> string -> T.t -> unit
val deleteData : offset:int -> count:int -> T.t -> unit
val replaceData : offset:int -> count:int -> string -> T.t -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/CharacterData/index.html b/findlib-1/melange-webapi/Webapi/Dom/CharacterData/index.html new file mode 100644 index 000000000..5c701014a --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/CharacterData/index.html @@ -0,0 +1,512 @@ + +CharacterData (docs.findlib-1.melange-webapi.Webapi.Dom.CharacterData)

Module Dom.CharacterData

module Impl (T : sig ... end) : sig ... end
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val previousElementSibling : t -> Dom.element option
val nextElementSibling : t -> Dom.element option
include sig ... end
val remove : t -> unit
include sig ... end
val data : t -> string
val length : t -> int
val substringData : offset:int -> count:int -> t -> string
val appendData : string -> t -> unit
val insertData : offset:int -> string -> t -> unit
val deleteData : offset:int -> count:int -> t -> unit
val replaceData : offset:int -> count:int -> string -> t -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/ClipboardEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/ClipboardEvent/index.html new file mode 100644 index 000000000..9ff0471e0 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/ClipboardEvent/index.html @@ -0,0 +1,2 @@ + +ClipboardEvent (docs.findlib-1.melange-webapi.Webapi.Dom.ClipboardEvent)

Module Dom.ClipboardEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val clipboardData : t -> Dom.dataTransfer
diff --git a/findlib-1/melange-webapi/Webapi/Dom/CloseEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/CloseEvent/index.html new file mode 100644 index 000000000..916478b82 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/CloseEvent/index.html @@ -0,0 +1,2 @@ + +CloseEvent (docs.findlib-1.melange-webapi.Webapi.Dom.CloseEvent)

Module Dom.CloseEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val wasClean : t -> bool
val code : t -> int
val reason : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Comment/index.html b/findlib-1/melange-webapi/Webapi/Dom/Comment/index.html new file mode 100644 index 000000000..b83c2a4a1 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Comment/index.html @@ -0,0 +1,512 @@ + +Comment (docs.findlib-1.melange-webapi.Webapi.Dom.Comment)

Module Dom.Comment

type t = Dom.comment
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val data : t -> string
val length : t -> int
val substringData : offset:int -> count:int -> t -> string
val appendData : string -> t -> unit
val insertData : offset:int -> string -> t -> unit
val deleteData : offset:int -> count:int -> t -> unit
val replaceData : offset:int -> count:int -> string -> t -> unit
include sig ... end
val previousElementSibling : t -> Dom.element option
val nextElementSibling : t -> Dom.element option
include sig ... end
val remove : t -> unit
include sig ... end
val assignedSlot : t -> Dom.htmlSlotElement option
diff --git a/findlib-1/melange-webapi/Webapi/Dom/CompositionEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/CompositionEvent/index.html new file mode 100644 index 000000000..9ff2021d4 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/CompositionEvent/index.html @@ -0,0 +1,2 @@ + +CompositionEvent (docs.findlib-1.melange-webapi.Webapi.Dom.CompositionEvent)

Module Dom.CompositionEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
include sig ... end
val detail : t -> int
val view : t -> Dom.window
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val data : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/CssStyleDeclaration/index.html b/findlib-1/melange-webapi/Webapi/Dom/CssStyleDeclaration/index.html new file mode 100644 index 000000000..a7f963c92 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/CssStyleDeclaration/index.html @@ -0,0 +1,2 @@ + +CssStyleDeclaration (docs.findlib-1.melange-webapi.Webapi.Dom.CssStyleDeclaration)

Module Dom.CssStyleDeclaration

type cssRule
val cssText : t -> string
val setCssText : t -> string -> unit
val length : t -> int
val parentRule : t -> cssRule
val getPropertyPriority : string -> t -> string
val getPropertyValue : string -> t -> string
val item : int -> t -> string
val removeProperty : string -> t -> string
val setProperty : string -> string -> string -> t -> unit
val azimuth : t -> string
val background : t -> string
val backgroundAttachment : t -> string
val backgroundColor : t -> string
val backgroundImage : t -> string
val backgroundPosition : t -> string
val backgroundRepeat : t -> string
val border : t -> string
val borderCollapse : t -> string
val borderColor : t -> string
val borderSpacing : t -> string
val borderStyle : t -> string
val borderTop : t -> string
val borderRight : t -> string
val borderBottom : t -> string
val borderLeft : t -> string
val borderTopColor : t -> string
val borderRightColor : t -> string
val borderBottomColor : t -> string
val borderLeftColor : t -> string
val borderTopStyle : t -> string
val borderRightStyle : t -> string
val borderBottomStyle : t -> string
val borderLeftStyle : t -> string
val borderTopWidth : t -> string
val borderRightWidth : t -> string
val borderBottomWidth : t -> string
val borderLeftWidth : t -> string
val borderWidth : t -> string
val bottom : t -> string
val captionSide : t -> string
val clear : t -> string
val clip : t -> string
val color : t -> string
val content : t -> string
val counterIncrement : t -> string
val counterReset : t -> string
val cue : t -> string
val cueAfter : t -> string
val cueBefore : t -> string
val cursor : t -> string
val direction : t -> string
val display : t -> string
val elevation : t -> string
val emptyCells : t -> string
val cssFloat : t -> string
val font : t -> string
val fontFamily : t -> string
val fontSize : t -> string
val fontSizeAdjust : t -> string
val fontStretch : t -> string
val fontStyle : t -> string
val fontVariant : t -> string
val fontWeight : t -> string
val height : t -> string
val left : t -> string
val letterSpacing : t -> string
val lineHeight : t -> string
val listStyle : t -> string
val listStyleImage : t -> string
val listStylePosition : t -> string
val listStyleType : t -> string
val margin : t -> string
val marginTop : t -> string
val marginRight : t -> string
val marginBottom : t -> string
val marginLeft : t -> string
val markerOffset : t -> string
val marks : t -> string
val maxHeight : t -> string
val maxWidth : t -> string
val minHeight : t -> string
val minWidth : t -> string
val orphans : t -> string
val outline : t -> string
val outlineColor : t -> string
val outlineStyle : t -> string
val outlineWidth : t -> string
val overflow : t -> string
val padding : t -> string
val paddingTop : t -> string
val paddingRight : t -> string
val paddingBottom : t -> string
val paddingLeft : t -> string
val page : t -> string
val pageBreakAfter : t -> string
val pageBreakBefore : t -> string
val pageBreakInside : t -> string
val pause : t -> string
val pauseAfter : t -> string
val pauseBefore : t -> string
val pitch : t -> string
val pitchRange : t -> string
val playDuring : t -> string
val position : t -> string
val quotes : t -> string
val richness : t -> string
val right : t -> string
val size : t -> string
val speak : t -> string
val speakHeader : t -> string
val speakNumeral : t -> string
val speakPunctuation : t -> string
val speechRate : t -> string
val stress : t -> string
val tableLayout : t -> string
val textAlign : t -> string
val textDecoration : t -> string
val textIndent : t -> string
val textShadow : t -> string
val textTransform : t -> string
val top : t -> string
val unicodeBidi : t -> string
val verticalAlign : t -> string
val visibility : t -> string
val voiceFamily : t -> string
val volume : t -> string
val whiteSpace : t -> string
val widows : t -> string
val width : t -> string
val wordSpacing : t -> string
val zIndex : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/CustomEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/CustomEvent/index.html new file mode 100644 index 000000000..02039a0c8 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/CustomEvent/index.html @@ -0,0 +1,2 @@ + +CustomEvent (docs.findlib-1.melange-webapi.Webapi.Dom.CustomEvent)

Module Dom.CustomEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Document/Impl/argument-1-T/index.html b/findlib-1/melange-webapi/Webapi/Dom/Document/Impl/argument-1-T/index.html new file mode 100644 index 000000000..01b83a3a5 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Document/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.melange-webapi.Webapi.Dom.Document.Impl.T)

Parameter Impl.T

type t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Document/Impl/index.html b/findlib-1/melange-webapi/Webapi/Dom/Document/Impl/index.html new file mode 100644 index 000000000..2dd0c40fa --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Document/Impl/index.html @@ -0,0 +1,30 @@ + +Impl (docs.findlib-1.melange-webapi.Webapi.Dom.Document.Impl)

Module Document.Impl

Parameters

module T : sig ... end

Signature

val asDocument : T.t -> Dom.document
val asHtmlDocument : T.t -> Dom.htmlDocument option
  • deprecated Will fail if no doctype is defined, consider using unsafeAsHtmlDocument instead
val unsafeAsHtmlDocument : T.t -> Dom.htmlDocument
val ofNode : Dom.node -> T.t option
val characterSet : T.t -> string
val compatMode : T.t -> Webapi__Dom__Types.compatMode
val doctype : T.t -> Dom.documentType
val documentElement : T.t -> Dom.element
val documentURI : T.t -> string
val hidden : T.t -> bool
val implementation : T.t -> Dom.domImplementation
val lastStyleSheetSet : T.t -> string
val pointerLockElement : T.t -> Dom.element option
val preferredStyleSheetSet : T.t -> string
val scrollingElement : T.t -> Dom.element option
val selectedStyleSheetSet : T.t -> string
val setSelectedStyleSheetSet : T.t -> string -> unit
val styleSheets : T.t -> Dom.cssStyleSheet array
val styleSheetSets : T.t -> string array
val visibilityState : T.t -> Webapi__Dom__Types.visibilityState
val adoptNode : 'a Dom.element_like -> T.t -> 'a Dom.element_like
val createAttribute : string -> T.t -> Dom.attr
val createAttributeNS : string -> string -> T.t -> Dom.attr
val createComment : string -> T.t -> Dom.comment
val createDocumentFragment : T.t -> Dom.documentFragment
val createElement : string -> T.t -> Dom.element
val createElementWithOptions : string -> < .. > Js.t -> T.t -> Dom.element
val createElementNS : string -> string -> T.t -> Dom.element
val createElementNSWithOptions : + string -> + string -> + < .. > Js.t -> + T.t -> + Dom.element
val createEvent : string -> T.t -> Dom.event
val createNodeIterator : 'a Dom.node_like -> T.t -> Dom.nodeIterator
val createNodeIteratorWithWhatToShow : + 'a Dom.node_like -> + Webapi__Dom__Types.WhatToShow.t -> + T.t -> + Dom.nodeIterator
val createNodeIteratorWithWhatToShowFilter : + 'a Dom.node_like -> + Webapi__Dom__Types.WhatToShow.t -> + Dom.nodeFilter -> + T.t -> + Dom.nodeIterator
val createRange : T.t -> Dom.range
val createTextNode : string -> T.t -> Dom.text
val createTreeWalker : 'a Dom.element_like -> T.t -> Dom.treeWalker
val createTreeWalkerWithWhatToShow : + 'a Dom.element_like -> + Webapi__Dom__Types.WhatToShow.t -> + T.t -> + Dom.treeWalker
val createTreeWalkerWithWhatToShowFilter : + 'a Dom.element_like -> + Webapi__Dom__Types.WhatToShow.t -> + Dom.nodeFilter -> + T.t -> + Dom.treeWalker
val elementFromPoint : int -> int -> T.t -> Dom.element
val elementsFromPoint : int -> int -> T.t -> Dom.element array
val enableStyleSheetsForSet : string -> T.t -> unit
val exitPointerLock : T.t -> unit
val getAnimations : T.t -> Dom.animation array
val getElementsByClassName : string -> T.t -> Dom.htmlCollection
val getElementsByTagName : string -> T.t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> T.t -> Dom.htmlCollection
val importNode : 'a Dom.element_like -> T.t -> 'a Dom.element_like
val importNodeDeep : 'a Dom.element_like -> T.t -> 'a Dom.element_like
val registerElement : string -> unit -> T.t -> Dom.element
val registerElementWithOptions : + string -> + < .. > Js.t -> + unit -> + T.t -> + Dom.element

XPath stuff

diff --git a/findlib-1/melange-webapi/Webapi/Dom/Document/index.html b/findlib-1/melange-webapi/Webapi/Dom/Document/index.html new file mode 100644 index 000000000..2aba0b030 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Document/index.html @@ -0,0 +1,540 @@ + +Document (docs.findlib-1.melange-webapi.Webapi.Dom.Document)

Module Dom.Document

module Impl (T : sig ... end) : sig ... end
type t = Dom.document
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val getElementById : string -> t -> Dom.element option
include sig ... end
include sig ... end
val children : t -> Dom.htmlCollection
val firstElementChild : t -> Dom.element option
val lastElementChild : t -> Dom.element option
val childElementCount : t -> int
val querySelector : string -> t -> Dom.element option
val querySelectorAll : string -> t -> Dom.nodeList
include sig ... end
val asDocument : t -> Dom.document
val asHtmlDocument : t -> Dom.htmlDocument option
val unsafeAsHtmlDocument : t -> Dom.htmlDocument
val ofNode : Dom.node -> t option
val characterSet : t -> string
val compatMode : t -> Webapi__Dom__Types.compatMode
val doctype : t -> Dom.documentType
val documentElement : t -> Dom.element
val documentURI : t -> string
val hidden : t -> bool
val implementation : t -> Dom.domImplementation
val lastStyleSheetSet : t -> string
val pointerLockElement : t -> Dom.element option
val preferredStyleSheetSet : t -> string
val scrollingElement : t -> Dom.element option
val selectedStyleSheetSet : t -> string
val setSelectedStyleSheetSet : t -> string -> unit
val styleSheets : t -> Dom.cssStyleSheet array
val styleSheetSets : t -> string array
val visibilityState : t -> Webapi__Dom__Types.visibilityState
val adoptNode : 'a Dom.element_like -> t -> 'a Dom.element_like
val createAttribute : string -> t -> Dom.attr
val createAttributeNS : string -> string -> t -> Dom.attr
val createComment : string -> t -> Dom.comment
val createDocumentFragment : t -> Dom.documentFragment
val createElement : string -> t -> Dom.element
val createElementWithOptions : string -> < .. > Js.t -> t -> Dom.element
val createElementNS : string -> string -> t -> Dom.element
val createElementNSWithOptions : + string -> + string -> + < .. > Js.t -> + t -> + Dom.element
val createEvent : string -> t -> Dom.event
val createNodeIterator : 'a Dom.node_like -> t -> Dom.nodeIterator
val createNodeIteratorWithWhatToShow : + 'a Dom.node_like -> + Webapi__Dom__Types.WhatToShow.t -> + t -> + Dom.nodeIterator
val createNodeIteratorWithWhatToShowFilter : + 'a Dom.node_like -> + Webapi__Dom__Types.WhatToShow.t -> + Dom.nodeFilter -> + t -> + Dom.nodeIterator
val createRange : t -> Dom.range
val createTextNode : string -> t -> Dom.text
val createTreeWalker : 'a Dom.element_like -> t -> Dom.treeWalker
val createTreeWalkerWithWhatToShow : + 'a Dom.element_like -> + Webapi__Dom__Types.WhatToShow.t -> + t -> + Dom.treeWalker
val createTreeWalkerWithWhatToShowFilter : + 'a Dom.element_like -> + Webapi__Dom__Types.WhatToShow.t -> + Dom.nodeFilter -> + t -> + Dom.treeWalker
val elementFromPoint : int -> int -> t -> Dom.element
val elementsFromPoint : int -> int -> t -> Dom.element array
val enableStyleSheetsForSet : string -> t -> unit
val exitPointerLock : t -> unit
val getAnimations : t -> Dom.animation array
val getElementsByClassName : string -> t -> Dom.htmlCollection
val getElementsByTagName : string -> t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> t -> Dom.htmlCollection
val importNode : 'a Dom.element_like -> t -> 'a Dom.element_like
val importNodeDeep : 'a Dom.element_like -> t -> 'a Dom.element_like
val registerElement : string -> unit -> t -> Dom.element
val registerElementWithOptions : + string -> + < .. > Js.t -> + unit -> + t -> + Dom.element
diff --git a/findlib-1/melange-webapi/Webapi/Dom/DocumentFragment/index.html b/findlib-1/melange-webapi/Webapi/Dom/DocumentFragment/index.html new file mode 100644 index 000000000..ad397db7f --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/DocumentFragment/index.html @@ -0,0 +1,512 @@ + +DocumentFragment (docs.findlib-1.melange-webapi.Webapi.Dom.DocumentFragment)

Module Dom.DocumentFragment

include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val getElementById : string -> t -> Dom.element option
include sig ... end
val children : t -> Dom.htmlCollection
val firstElementChild : t -> Dom.element option
val lastElementChild : t -> Dom.element option
val childElementCount : t -> int
val querySelector : string -> t -> Dom.element option
val querySelectorAll : string -> t -> Dom.nodeList
diff --git a/findlib-1/melange-webapi/Webapi/Dom/DocumentType/index.html b/findlib-1/melange-webapi/Webapi/Dom/DocumentType/index.html new file mode 100644 index 000000000..c766cbd09 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/DocumentType/index.html @@ -0,0 +1,512 @@ + +DocumentType (docs.findlib-1.melange-webapi.Webapi.Dom.DocumentType)

Module Dom.DocumentType

include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val remove : t -> unit
val name : t -> string
val publicId : t -> string
val systemId : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/DomImplementation/index.html b/findlib-1/melange-webapi/Webapi/Dom/DomImplementation/index.html new file mode 100644 index 000000000..94a2bf19a --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/DomImplementation/index.html @@ -0,0 +1,12 @@ + +DomImplementation (docs.findlib-1.melange-webapi.Webapi.Dom.DomImplementation)

Module Dom.DomImplementation

val createDocumentType : + qualifiedName:string -> + publicId:string -> + systemId:string -> + t -> + Dom.documentType
val createDocument : + ?namespace:string -> + qualifiedName:string -> + ?docType:Dom.documentType -> + t -> + Dom.xmlDocument
val createHTMLDocument : t -> Dom.htmlDocument
val createHTMLDocumentWithTitle : string -> t -> Dom.htmlDocument
val hasFeature : t -> bool
diff --git a/findlib-1/melange-webapi/Webapi/Dom/DomRect/index.html b/findlib-1/melange-webapi/Webapi/Dom/DomRect/index.html new file mode 100644 index 000000000..30ee4eb52 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/DomRect/index.html @@ -0,0 +1,2 @@ + +DomRect (docs.findlib-1.melange-webapi.Webapi.Dom.DomRect)

Module Dom.DomRect

type t = Dom.domRect
val make : x:float -> y:float -> width:float -> height:float -> t
val top : t -> float
val bottom : t -> float
val left : t -> float
val right : t -> float
val height : t -> float
val width : t -> float
val x : t -> float
val y : t -> float
diff --git a/findlib-1/melange-webapi/Webapi/Dom/DomStringMap/index.html b/findlib-1/melange-webapi/Webapi/Dom/DomStringMap/index.html new file mode 100644 index 000000000..448a2c472 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/DomStringMap/index.html @@ -0,0 +1,2 @@ + +DomStringMap (docs.findlib-1.melange-webapi.Webapi.Dom.DomStringMap)

Module Dom.DomStringMap

type key = string
val get : key -> t -> string option
val set : key -> string -> t -> unit
val unsafeDeleteKey : key -> t -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/DomTokenList/index.html b/findlib-1/melange-webapi/Webapi/Dom/DomTokenList/index.html new file mode 100644 index 000000000..8277a6b90 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/DomTokenList/index.html @@ -0,0 +1,2 @@ + +DomTokenList (docs.findlib-1.melange-webapi.Webapi.Dom.DomTokenList)

Module Dom.DomTokenList

val length : t -> int
val item : int -> t -> string option
val add : string -> t -> unit
val addMany : string array -> t -> unit
val contains : string -> t -> bool
val forEach : (string -> int -> unit) -> t -> unit
val remove : string -> t -> unit
val removeMany : string array -> t -> unit
val replace : string -> string -> t -> unit
val supports : string -> t -> bool
val toggle : string -> t -> bool
val toggleForced : string -> t -> bool
val toString : t -> string
val value : t -> string
val setValue : t -> string -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/DragEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/DragEvent/index.html new file mode 100644 index 000000000..88a74d245 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/DragEvent/index.html @@ -0,0 +1,2 @@ + +DragEvent (docs.findlib-1.melange-webapi.Webapi.Dom.DragEvent)

Module Dom.DragEvent

type t = Dom.dragEvent
include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
include sig ... end
val detail : t -> int
val view : t -> Dom.window
include sig ... end
val altKey : t -> bool
val button : t -> int
val buttons : t -> int
val clientX : t -> int
val clientY : t -> int
val ctrlKey : t -> bool
val metaKey : t -> bool
val movementX : t -> int
val movementY : t -> int
val offsetX : t -> int
val offsetY : t -> int
val pageX : t -> int
val pageY : t -> int
val region : t -> string option
val relatedTarget : t -> Dom.eventTarget option
val screenX : t -> int
val screenY : t -> int
val shiftKey : t -> bool
val x : t -> int
val y : t -> int
val getModifierState : Webapi__Dom__Types.modifierKey -> t -> bool
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val dataTransfer : t -> Dom.dataTransfer
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Element/Impl/argument-1-T/index.html b/findlib-1/melange-webapi/Webapi/Dom/Element/Impl/argument-1-T/index.html new file mode 100644 index 000000000..26138c7d2 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Element/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.melange-webapi.Webapi.Dom.Element.Impl.T)

Parameter Impl.T

type t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Element/Impl/index.html b/findlib-1/melange-webapi/Webapi/Dom/Element/Impl/index.html new file mode 100644 index 000000000..96133b1fa --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Element/Impl/index.html @@ -0,0 +1,23 @@ + +Impl (docs.findlib-1.melange-webapi.Webapi.Dom.Element.Impl)

Module Element.Impl

Parameters

module T : sig ... end

Signature

val asHtmlElement : T.t -> Dom.htmlElement option
  • deprecated asHtmlElement uses a weak heuristic, consider using unsafeAsHtmlElement instead
val unsafeAsHtmlElement : T.t -> Dom.htmlElement
val ofNode : Dom.node -> T.t option
val attributes : T.t -> Dom.namedNodeMap
val classList : T.t -> Dom.domTokenList
val className : T.t -> string
val setClassName : T.t -> string -> unit
val clientHeight : T.t -> int
val clientLeft : T.t -> int
val clientTop : T.t -> int
val clientWidth : T.t -> int
val id : T.t -> string
val setId : T.t -> string -> unit
val innerHTML : T.t -> string
val setInnerHTML : T.t -> string -> unit
val localName : T.t -> string
val namespaceURI : T.t -> string option
val outerHTML : T.t -> string
val setOuterHTML : T.t -> string -> unit
val prefix : T.t -> string option
val scrollHeight : T.t -> int
val scrollLeft : T.t -> float
val setScrollLeft : T.t -> float -> unit
val scrollTop : T.t -> float
val setScrollTop : T.t -> float -> unit
val scrollWidth : T.t -> int
val shadowRoot : T.t -> Dom.element
val slot : T.t -> string
val setSlot : T.t -> string -> unit
val tagName : T.t -> string
val attachShadow : < mode : string > Js.t -> T.t -> Dom.shadowRoot
val attachShadowOpen : T.t -> Dom.shadowRoot
val attachShadowClosed : T.t -> Dom.shadowRoot
val animate : < .. > Js.t -> < .. > Js.t -> T.t -> Dom.animation
val closest : string -> T.t -> Dom.element option
val createShadowRoot : T.t -> Dom.shadowRoot
val getAttribute : string -> T.t -> string option
val getAttributeNS : string -> string -> T.t -> string option
val getBoundingClientRect : T.t -> Dom.domRect
val getClientRects : T.t -> Dom.domRect array
val getElementsByClassName : string -> T.t -> Dom.htmlCollection
val getElementsByTagName : string -> T.t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> T.t -> Dom.htmlCollection
val hasAttribute : string -> T.t -> bool
val hasAttributeNS : string -> string -> T.t -> bool
val hasAttributes : T.t -> bool
val insertAdjacentElement : + Webapi__Dom__Types.insertPosition -> + 'a Dom.element_like -> + T.t -> + unit
val insertAdjacentHTML : + Webapi__Dom__Types.insertPosition -> + string -> + T.t -> + unit
val insertAdjacentText : + Webapi__Dom__Types.insertPosition -> + string -> + T.t -> + unit
val matches : string -> T.t -> bool
val releasePointerCapture : Dom.eventPointerId -> T.t -> unit
val removeAttribute : string -> T.t -> unit
val removeAttributeNS : string -> string -> T.t -> unit
val requestFullscreen : T.t -> unit
val requestPointerLock : T.t -> unit
val scrollIntoView : T.t -> unit
val scrollIntoViewNoAlignToTop : T.t -> unit
val scrollIntoViewWithOptions : + < behavior : string ; block : string > Js.t -> + T.t -> + unit
val scrollBy : float -> float -> T.t -> unit
val scrollByWithOptions : + < top : float ; left : float ; behavior : string > Js.t -> + T.t -> + unit
val scrollTo : float -> float -> T.t -> unit
val scrollToWithOptions : + < top : float ; left : float ; behavior : string > Js.t -> + T.t -> + unit
val setAttribute : string -> string -> T.t -> unit
val setAttributeNS : string -> string -> string -> T.t -> unit
val setPointerCapture : Dom.eventPointerId -> T.t -> unit
val setOnClick : T.t -> (Dom.mouseEvent -> unit) -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Element/index.html b/findlib-1/melange-webapi/Webapi/Dom/Element/index.html new file mode 100644 index 000000000..8e48d1c16 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Element/index.html @@ -0,0 +1,547 @@ + +Element (docs.findlib-1.melange-webapi.Webapi.Dom.Element)

Module Dom.Element

module Impl (T : sig ... end) : sig ... end
type t = Dom.element
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val addSelectionChangeEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addSelectionChangeEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectionChangeEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val removeSelectionChangeEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeSelectionChangeEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectionChangeEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
include sig ... end
val children : t -> Dom.htmlCollection
val firstElementChild : t -> Dom.element option
val lastElementChild : t -> Dom.element option
val childElementCount : t -> int
val querySelector : string -> t -> Dom.element option
val querySelectorAll : string -> t -> Dom.nodeList
include sig ... end
val previousElementSibling : t -> Dom.element option
val nextElementSibling : t -> Dom.element option
include sig ... end
val remove : t -> unit
include sig ... end
val assignedSlot : t -> Dom.htmlSlotElement option
include sig ... end
val asHtmlElement : t -> Dom.htmlElement option
val unsafeAsHtmlElement : t -> Dom.htmlElement
val ofNode : Dom.node -> t option
val attributes : t -> Dom.namedNodeMap
val classList : t -> Dom.domTokenList
val className : t -> string
val setClassName : t -> string -> unit
val clientHeight : t -> int
val clientLeft : t -> int
val clientTop : t -> int
val clientWidth : t -> int
val id : t -> string
val setId : t -> string -> unit
val innerHTML : t -> string
val setInnerHTML : t -> string -> unit
val localName : t -> string
val namespaceURI : t -> string option
val outerHTML : t -> string
val setOuterHTML : t -> string -> unit
val prefix : t -> string option
val scrollHeight : t -> int
val scrollLeft : t -> float
val setScrollLeft : t -> float -> unit
val scrollTop : t -> float
val setScrollTop : t -> float -> unit
val scrollWidth : t -> int
val shadowRoot : t -> Dom.element
val slot : t -> string
val setSlot : t -> string -> unit
val tagName : t -> string
val attachShadow : < mode : string > Js.t -> t -> Dom.shadowRoot
val attachShadowOpen : t -> Dom.shadowRoot
val attachShadowClosed : t -> Dom.shadowRoot
val animate : < .. > Js.t -> < .. > Js.t -> t -> Dom.animation
val closest : string -> t -> Dom.element option
val createShadowRoot : t -> Dom.shadowRoot
val getAttribute : string -> t -> string option
val getAttributeNS : string -> string -> t -> string option
val getBoundingClientRect : t -> Dom.domRect
val getClientRects : t -> Dom.domRect array
val getElementsByClassName : string -> t -> Dom.htmlCollection
val getElementsByTagName : string -> t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> t -> Dom.htmlCollection
val hasAttribute : string -> t -> bool
val hasAttributeNS : string -> string -> t -> bool
val hasAttributes : t -> bool
val insertAdjacentElement : + Webapi__Dom__Types.insertPosition -> + 'a Dom.element_like -> + t -> + unit
val insertAdjacentHTML : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val insertAdjacentText : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val matches : string -> t -> bool
val releasePointerCapture : Dom.eventPointerId -> t -> unit
val removeAttribute : string -> t -> unit
val removeAttributeNS : string -> string -> t -> unit
val requestFullscreen : t -> unit
val requestPointerLock : t -> unit
val scrollIntoView : t -> unit
val scrollIntoViewNoAlignToTop : t -> unit
val scrollIntoViewWithOptions : + < behavior : string ; block : string > Js.t -> + t -> + unit
val scrollBy : float -> float -> t -> unit
val scrollByWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val scrollTo : float -> float -> t -> unit
val scrollToWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val setAttribute : string -> string -> t -> unit
val setAttributeNS : string -> string -> string -> t -> unit
val setPointerCapture : Dom.eventPointerId -> t -> unit
val setOnClick : t -> (Dom.mouseEvent -> unit) -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/ErrorEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/ErrorEvent/index.html new file mode 100644 index 000000000..f4dc33eef --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/ErrorEvent/index.html @@ -0,0 +1,2 @@ + +ErrorEvent (docs.findlib-1.melange-webapi.Webapi.Dom.ErrorEvent)

Module Dom.ErrorEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val message : t -> string
val filename : t -> string
val lineno : t -> int
val colno : t -> int
val error : t -> < .. > Js.t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Event/Impl/argument-1-T/index.html b/findlib-1/melange-webapi/Webapi/Dom/Event/Impl/argument-1-T/index.html new file mode 100644 index 000000000..765660b8c --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Event/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.melange-webapi.Webapi.Dom.Event.Impl.T)

Parameter Impl.T

type t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Event/Impl/index.html b/findlib-1/melange-webapi/Webapi/Dom/Event/Impl/index.html new file mode 100644 index 000000000..a6badae04 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Event/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.findlib-1.melange-webapi.Webapi.Dom.Event.Impl)

Module Event.Impl

Parameters

module T : sig ... end

Signature

val bubbles : T.t -> bool
val cancelable : T.t -> bool
val composed : T.t -> bool
val currentTarget : T.t -> Dom.eventTarget
val defaultPrevented : T.t -> bool
val eventPhase : T.t -> Webapi__Dom__Types.EventPhase.t
val target : T.t -> Dom.eventTarget
val timeStamp : T.t -> float
val type_ : T.t -> string
val isTrusted : T.t -> bool
val preventDefault : T.t -> unit
val stopImmediatePropagation : T.t -> unit
val stopPropagation : T.t -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Event/index.html b/findlib-1/melange-webapi/Webapi/Dom/Event/index.html new file mode 100644 index 000000000..3437f4ef9 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Event/index.html @@ -0,0 +1,2 @@ + +Event (docs.findlib-1.melange-webapi.Webapi.Dom.Event)

Module Dom.Event

module Impl (T : sig ... end) : sig ... end
type t = Dom.event
include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/EventPhase/index.html b/findlib-1/melange-webapi/Webapi/Dom/EventPhase/index.html new file mode 100644 index 000000000..ee401ca23 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/EventPhase/index.html @@ -0,0 +1,2 @@ + +EventPhase (docs.findlib-1.melange-webapi.Webapi.Dom.EventPhase)

Module Dom.EventPhase

type t =
  1. | None
  2. | CapturingPhase
  3. | AtTarget
  4. | BubblingPhase
  5. | Unknown
val decode : int -> t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/EventTarget/Impl/argument-1-T/index.html b/findlib-1/melange-webapi/Webapi/Dom/EventTarget/Impl/argument-1-T/index.html new file mode 100644 index 000000000..13709b499 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/EventTarget/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.melange-webapi.Webapi.Dom.EventTarget.Impl.T)

Parameter Impl.T

type t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/EventTarget/Impl/index.html b/findlib-1/melange-webapi/Webapi/Dom/EventTarget/Impl/index.html new file mode 100644 index 000000000..eb82f8fa0 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/EventTarget/Impl/index.html @@ -0,0 +1,568 @@ + +Impl (docs.findlib-1.melange-webapi.Webapi.Dom.EventTarget.Impl)

Module EventTarget.Impl

Parameters

module T : sig ... end

Signature

val asEventTarget : T.t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> T.t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> T.t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> T.t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeEventListenerUseCapture : + string -> + (Dom.event -> unit) -> + T.t -> + unit
val dispatchEvent : 'a Dom.event_like -> T.t -> bool
val addLoadEventListener : (Dom.event -> unit) -> T.t -> unit

* non-standard event-specific functions

val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> T.t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> T.t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> T.t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val addAbortEventListener : (Dom.event -> unit) -> T.t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> T.t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val addErrorEventListener : (Dom.event -> unit) -> T.t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> T.t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val addSelectEventListener : (Dom.event -> unit) -> T.t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> T.t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> T.t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> T.t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> T.t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> T.t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> T.t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> T.t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> T.t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeFocusEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + T.t -> + unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> T.t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> T.t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> T.t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + T.t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> T.t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + T.t -> + unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> T.t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + T.t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> T.t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> T.t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> T.t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeWheelEventListenerUseCapture : + (Dom.wheelEvent -> unit) -> + T.t -> + unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> T.t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + T.t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> T.t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + T.t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> T.t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> T.t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> T.t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + T.t -> + unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> T.t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + T.t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> T.t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + T.t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> T.t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + T.t -> + unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> T.t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + T.t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> T.t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + T.t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> T.t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + T.t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> T.t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDragEndEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> T.t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> T.t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + T.t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> T.t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + T.t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> T.t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + T.t -> + unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> T.t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + T.t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> T.t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + T.t -> + unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> T.t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + T.t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> T.t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + T.t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> T.t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + T.t -> + unit
val addAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> T.t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val removeAnimationEndEventListener : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val addAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + T.t -> + unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/EventTarget/index.html b/findlib-1/melange-webapi/Webapi/Dom/EventTarget/index.html new file mode 100644 index 000000000..464e81131 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/EventTarget/index.html @@ -0,0 +1,813 @@ + +EventTarget (docs.findlib-1.melange-webapi.Webapi.Dom.EventTarget)

Module Dom.EventTarget

module Impl (T : sig ... end) : sig ... end
include sig ... end
val asEventTarget : Dom.eventTarget -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> Dom.eventTarget -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addEventListenerUseCapture : + string -> + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val removeEventListener : + string -> + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeEventListenerUseCapture : + string -> + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val dispatchEvent : 'a Dom.event_like -> Dom.eventTarget -> bool
val addLoadEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit

* non-standard event-specific functions

val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addLoadEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val removeLoadEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeLoadEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val addUnloadEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addUnloadEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val removeUnloadEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeUnloadEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val addAbortEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addAbortEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val removeAbortEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeAbortEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val addErrorEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addErrorEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val removeErrorEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeErrorEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val addSelectEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addSelectEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val removeSelectEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeSelectEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> Dom.eventTarget -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addBlurEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val removeBlurEventListener : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeBlurEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> Dom.eventTarget -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addFocusEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val removeFocusEventListener : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeFocusEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val addFocusInEventListener : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val removeFocusInEventListener : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val addFocusOutEventListener : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val removeFocusOutEventListener : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> Dom.eventTarget -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeClickEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addDblClickEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDblClickEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseDownEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseDownEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseEnterEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseEnterEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseMoveEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseMoveEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseOutEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseOutEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseOverEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseOverEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseUpEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseUpEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> Dom.eventTarget -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addWheelEventListenerUseCapture : + (Dom.wheelEvent -> unit) -> + Dom.eventTarget -> + unit
val removeWheelEventListener : + (Dom.wheelEvent -> unit) -> + Dom.eventTarget -> + unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeWheelEventListenerUseCapture : + (Dom.wheelEvent -> unit) -> + Dom.eventTarget -> + unit
val addBeforeInputEventListener : + (Dom.inputEvent -> unit) -> + Dom.eventTarget -> + unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + Dom.eventTarget -> + unit
val removeBeforeInputEventListener : + (Dom.inputEvent -> unit) -> + Dom.eventTarget -> + unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + Dom.eventTarget -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> Dom.eventTarget -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + Dom.eventTarget -> + unit
val removeInputEventListener : + (Dom.inputEvent -> unit) -> + Dom.eventTarget -> + unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + Dom.eventTarget -> + unit
val addKeyDownEventListener : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val removeKeyDownEventListener : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val addKeyUpEventListener : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val removeKeyUpEventListener : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val addKeyPressEventListener : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val removeKeyPressEventListener : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> Dom.eventTarget -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDragEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDragEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragEndEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDragEndEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragEndEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDragEndEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragEnterEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragEnterEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragExitEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragExitEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragLeaveEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragLeaveEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragOverEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragOverEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragStartEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragStartEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> Dom.eventTarget -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDropEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDropEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDropEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addTouchCancelEventListener : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val removeTouchCancelEventListener : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val addTouchEndEventListener : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val removeTouchEndEventListener : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val addTouchMoveEventListener : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val removeTouchMoveEventListener : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val addTouchStartEventListener : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val removeTouchStartEventListener : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val addAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val addAnimationEndEventListener : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val removeAnimationEndEventListener : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val addAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val unsafeAsDocument : Dom.eventTarget -> Dom.document
val unsafeAsElement : Dom.eventTarget -> Dom.element
val unsafeAsWindow : Dom.eventTarget -> Dom.window
diff --git a/findlib-1/melange-webapi/Webapi/Dom/FocusEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/FocusEvent/index.html new file mode 100644 index 000000000..a6de50218 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/FocusEvent/index.html @@ -0,0 +1,2 @@ + +FocusEvent (docs.findlib-1.melange-webapi.Webapi.Dom.FocusEvent)

Module Dom.FocusEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
include sig ... end
val detail : t -> int
val view : t -> Dom.window
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val relatedTarget : t -> Dom.eventTarget option
diff --git a/findlib-1/melange-webapi/Webapi/Dom/History/index.html b/findlib-1/melange-webapi/Webapi/Dom/History/index.html new file mode 100644 index 000000000..6c6f69f30 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/History/index.html @@ -0,0 +1,2 @@ + +History (docs.findlib-1.melange-webapi.Webapi.Dom.History)

Module Dom.History

type t = Dom.history
type state
val length : t -> int
val scrollRestoration : t -> bool
val setScrollRestoration : t -> bool -> unit
val state : t -> state
val back : t -> unit
val forward : t -> unit
val go : int -> t -> unit
val pushState : state -> string -> string -> t -> unit
val replaceState : state -> string -> string -> t -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlCollection/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlCollection/index.html new file mode 100644 index 000000000..33c16cd2c --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlCollection/index.html @@ -0,0 +1,2 @@ + +HtmlCollection (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlCollection)

Module Dom.HtmlCollection

val toArray : t -> Dom.element array
val length : t -> int
val item : int -> t -> Dom.element option
val namedItem : string -> t -> Dom.element option
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlDocument/Impl/argument-1-T/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlDocument/Impl/argument-1-T/index.html new file mode 100644 index 000000000..c3d12554e --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlDocument/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlDocument.Impl.T)

Parameter Impl.T

type t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlDocument/Impl/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlDocument/Impl/index.html new file mode 100644 index 000000000..0aac55175 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlDocument/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlDocument.Impl)

Module HtmlDocument.Impl

Parameters

module T : sig ... end

Signature

type t_htmlDocument = T.t
val activeElement : t_htmlDocument -> Dom.element option
val body : t_htmlDocument -> Dom.element option
val setBody : t_htmlDocument -> Dom.element -> unit
val setCookie : t_htmlDocument -> string -> unit
val defaultView : t_htmlDocument -> Dom.window option
val designMode : t_htmlDocument -> Webapi__Dom__Types.designMode
val setDesignMode : t_htmlDocument -> Webapi__Dom__Types.designMode -> unit
val dir : t_htmlDocument -> Webapi__Dom__Types.dir
val setDir : t_htmlDocument -> Webapi__Dom__Types.dir -> unit
val domain : t_htmlDocument -> string option
val setDomain : t_htmlDocument -> string -> unit
val lastModified : t_htmlDocument -> string
val location : t_htmlDocument -> Dom.location
val setLocation : t_htmlDocument -> string -> unit
val readyState : t_htmlDocument -> Webapi__Dom__Types.readyState
val referrer : t_htmlDocument -> string
val title : t_htmlDocument -> string
val setTitle : t_htmlDocument -> string -> unit
val url : t_htmlDocument -> string
val close : t_htmlDocument -> unit
val execCommand : string -> bool -> string option -> t_htmlDocument -> bool
val getElementsByName : string -> t_htmlDocument -> Dom.nodeList
val getSelection : t_htmlDocument -> Dom.selection
val hasFocus : t_htmlDocument -> bool
val open_ : t_htmlDocument -> unit
val queryCommandEnabled : string -> t_htmlDocument -> bool
val queryCommandIndeterm : string -> t_htmlDocument -> bool
val queryCommandSupported : string -> t_htmlDocument -> bool
val queryCommandValue : string -> t_htmlDocument -> string
val write : string -> t_htmlDocument -> unit
val writeln : string -> t_htmlDocument -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlDocument/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlDocument/index.html new file mode 100644 index 000000000..8ae94ebb1 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlDocument/index.html @@ -0,0 +1,554 @@ + +HtmlDocument (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlDocument)

Module Dom.HtmlDocument

module Impl (T : sig ... end) : sig ... end
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val addSelectionChangeEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addSelectionChangeEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectionChangeEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val removeSelectionChangeEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeSelectionChangeEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectionChangeEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
include sig ... end
val asDocument : t -> Dom.document
val asHtmlDocument : t -> Dom.htmlDocument option
val unsafeAsHtmlDocument : t -> Dom.htmlDocument
val ofNode : Dom.node -> t option
val characterSet : t -> string
val compatMode : t -> Webapi__Dom__Types.compatMode
val doctype : t -> Dom.documentType
val documentElement : t -> Dom.element
val documentURI : t -> string
val hidden : t -> bool
val implementation : t -> Dom.domImplementation
val lastStyleSheetSet : t -> string
val pointerLockElement : t -> Dom.element option
val preferredStyleSheetSet : t -> string
val scrollingElement : t -> Dom.element option
val selectedStyleSheetSet : t -> string
val setSelectedStyleSheetSet : t -> string -> unit
val styleSheets : t -> Dom.cssStyleSheet array
val styleSheetSets : t -> string array
val visibilityState : t -> Webapi__Dom__Types.visibilityState
val adoptNode : 'a Dom.element_like -> t -> 'a Dom.element_like
val createAttribute : string -> t -> Dom.attr
val createAttributeNS : string -> string -> t -> Dom.attr
val createComment : string -> t -> Dom.comment
val createDocumentFragment : t -> Dom.documentFragment
val createElement : string -> t -> Dom.element
val createElementWithOptions : string -> < .. > Js.t -> t -> Dom.element
val createElementNS : string -> string -> t -> Dom.element
val createElementNSWithOptions : + string -> + string -> + < .. > Js.t -> + t -> + Dom.element
val createEvent : string -> t -> Dom.event
val createNodeIterator : 'a Dom.node_like -> t -> Dom.nodeIterator
val createNodeIteratorWithWhatToShow : + 'a Dom.node_like -> + Webapi__Dom__Types.WhatToShow.t -> + t -> + Dom.nodeIterator
val createNodeIteratorWithWhatToShowFilter : + 'a Dom.node_like -> + Webapi__Dom__Types.WhatToShow.t -> + Dom.nodeFilter -> + t -> + Dom.nodeIterator
val createRange : t -> Dom.range
val createTextNode : string -> t -> Dom.text
val createTreeWalker : 'a Dom.element_like -> t -> Dom.treeWalker
val createTreeWalkerWithWhatToShow : + 'a Dom.element_like -> + Webapi__Dom__Types.WhatToShow.t -> + t -> + Dom.treeWalker
val createTreeWalkerWithWhatToShowFilter : + 'a Dom.element_like -> + Webapi__Dom__Types.WhatToShow.t -> + Dom.nodeFilter -> + t -> + Dom.treeWalker
val elementFromPoint : int -> int -> t -> Dom.element
val elementsFromPoint : int -> int -> t -> Dom.element array
val enableStyleSheetsForSet : string -> t -> unit
val exitPointerLock : t -> unit
val getAnimations : t -> Dom.animation array
val getElementsByClassName : string -> t -> Dom.htmlCollection
val getElementsByTagName : string -> t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> t -> Dom.htmlCollection
val importNode : 'a Dom.element_like -> t -> 'a Dom.element_like
val importNodeDeep : 'a Dom.element_like -> t -> 'a Dom.element_like
val registerElement : string -> unit -> t -> Dom.element
val registerElementWithOptions : + string -> + < .. > Js.t -> + unit -> + t -> + Dom.element
include sig ... end
type t_htmlDocument = t
val activeElement : t_htmlDocument -> Dom.element option
val body : t_htmlDocument -> Dom.element option
val setBody : t_htmlDocument -> Dom.element -> unit
val setCookie : t_htmlDocument -> string -> unit
val defaultView : t_htmlDocument -> Dom.window option
val designMode : t_htmlDocument -> Webapi__Dom__Types.designMode
val setDesignMode : t_htmlDocument -> Webapi__Dom__Types.designMode -> unit
val dir : t_htmlDocument -> Webapi__Dom__Types.dir
val setDir : t_htmlDocument -> Webapi__Dom__Types.dir -> unit
val domain : t_htmlDocument -> string option
val setDomain : t_htmlDocument -> string -> unit
val lastModified : t_htmlDocument -> string
val location : t_htmlDocument -> Dom.location
val setLocation : t_htmlDocument -> string -> unit
val readyState : t_htmlDocument -> Webapi__Dom__Types.readyState
val referrer : t_htmlDocument -> string
val title : t_htmlDocument -> string
val setTitle : t_htmlDocument -> string -> unit
val url : t_htmlDocument -> string
val close : t_htmlDocument -> unit
val execCommand : string -> bool -> string option -> t_htmlDocument -> bool
val getElementsByName : string -> t_htmlDocument -> Dom.nodeList
val getSelection : t_htmlDocument -> Dom.selection
val hasFocus : t_htmlDocument -> bool
val open_ : t_htmlDocument -> unit
val queryCommandEnabled : string -> t_htmlDocument -> bool
val queryCommandIndeterm : string -> t_htmlDocument -> bool
val queryCommandSupported : string -> t_htmlDocument -> bool
val queryCommandValue : string -> t_htmlDocument -> string
val write : string -> t_htmlDocument -> unit
val writeln : string -> t_htmlDocument -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlElement/Impl/argument-1-T/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlElement/Impl/argument-1-T/index.html new file mode 100644 index 000000000..6a6dc20f4 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlElement/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlElement.Impl.T)

Parameter Impl.T

type t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlElement/Impl/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlElement/Impl/index.html new file mode 100644 index 000000000..f6fa087ff --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlElement/Impl/index.html @@ -0,0 +1,5 @@ + +Impl (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlElement.Impl)

Module HtmlElement.Impl

Parameters

module T : sig ... end

Signature

type t_htmlElement = T.t
val ofElement : Dom.element -> t_htmlElement option
  • deprecated Consider using Element.asHtmlElement or Element.unsafeAsHtmlElement instead
val accessKey : t_htmlElement -> string
val setAccessKey : t_htmlElement -> string -> unit
val accessKeyLabel : t_htmlElement -> string
val contentEditable : t_htmlElement -> Webapi__Dom__Types.contentEditable
val setContentEditable : + t_htmlElement -> + Webapi__Dom__Types.contentEditable -> + unit
val isContentEditable : t_htmlElement -> bool
val contextMenu : t_htmlElement -> Dom.htmlElement
val setContextMenu : t_htmlElement -> Dom.htmlElement -> unit
val dir : t_htmlElement -> Webapi__Dom__Types.dir
val setDir : t_htmlElement -> Webapi__Dom__Types.dir -> unit
val draggable : t_htmlElement -> bool
val setDraggable : t_htmlElement -> bool -> unit
val hidden : t_htmlElement -> bool
val setHidden : t_htmlElement -> bool -> unit
val itemScope : t_htmlElement -> bool
val setItemScope : t_htmlElement -> bool -> unit
val itemId : t_htmlElement -> string
val setItemId : t_htmlElement -> string -> unit
val itemValue : t_htmlElement -> < .. > Js.t
val setItemValue : t_htmlElement -> < .. > Js.t -> unit
val lang : t_htmlElement -> string
val setLang : t_htmlElement -> string -> unit
val offsetHeight : t_htmlElement -> int
val offsetLeft : t_htmlElement -> int
val offsetParent : t_htmlElement -> Dom.element option
val offsetTop : t_htmlElement -> int
val offsetWidth : t_htmlElement -> int
val spellcheck : t_htmlElement -> bool
val setSpellcheck : t_htmlElement -> bool -> unit
val setStyle : t_htmlElement -> Dom.cssStyleDeclaration -> unit
val tabIndex : t_htmlElement -> int
val setTabIndex : t_htmlElement -> int -> unit
val title : t_htmlElement -> string
val setTitle : t_htmlElement -> string -> unit
val translate : t_htmlElement -> bool
val setTranslate : t_htmlElement -> bool -> unit
val blur : t_htmlElement -> unit
val click : t_htmlElement -> unit
val focus : t_htmlElement -> unit
val focusPreventScroll : t_htmlElement -> unit
val forceSpellCheck : t_htmlElement -> unit
val value : t_htmlElement -> string
val checked : t_htmlElement -> bool
val type_ : t_htmlElement -> string
val setType : t_htmlElement -> string -> unit
val rel : t_htmlElement -> string
val setRel : t_htmlElement -> string -> unit
val href : t_htmlElement -> string
val setHref : t_htmlElement -> string -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlElement/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlElement/index.html new file mode 100644 index 000000000..d76cba9ac --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlElement/index.html @@ -0,0 +1,550 @@ + +HtmlElement (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlElement)

Module Dom.HtmlElement

module Impl (T : sig ... end) : sig ... end
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val addSelectionChangeEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addSelectionChangeEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectionChangeEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val removeSelectionChangeEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeSelectionChangeEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectionChangeEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
include sig ... end
val asHtmlElement : t -> Dom.htmlElement option
val unsafeAsHtmlElement : t -> Dom.htmlElement
val ofNode : Dom.node -> t option
val attributes : t -> Dom.namedNodeMap
val classList : t -> Dom.domTokenList
val className : t -> string
val setClassName : t -> string -> unit
val clientHeight : t -> int
val clientLeft : t -> int
val clientTop : t -> int
val clientWidth : t -> int
val id : t -> string
val setId : t -> string -> unit
val innerHTML : t -> string
val setInnerHTML : t -> string -> unit
val localName : t -> string
val namespaceURI : t -> string option
val outerHTML : t -> string
val setOuterHTML : t -> string -> unit
val prefix : t -> string option
val scrollHeight : t -> int
val scrollLeft : t -> float
val setScrollLeft : t -> float -> unit
val scrollTop : t -> float
val setScrollTop : t -> float -> unit
val scrollWidth : t -> int
val shadowRoot : t -> Dom.element
val slot : t -> string
val setSlot : t -> string -> unit
val tagName : t -> string
val attachShadow : < mode : string > Js.t -> t -> Dom.shadowRoot
val attachShadowOpen : t -> Dom.shadowRoot
val attachShadowClosed : t -> Dom.shadowRoot
val animate : < .. > Js.t -> < .. > Js.t -> t -> Dom.animation
val closest : string -> t -> Dom.element option
val createShadowRoot : t -> Dom.shadowRoot
val getAttribute : string -> t -> string option
val getAttributeNS : string -> string -> t -> string option
val getBoundingClientRect : t -> Dom.domRect
val getClientRects : t -> Dom.domRect array
val getElementsByClassName : string -> t -> Dom.htmlCollection
val getElementsByTagName : string -> t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> t -> Dom.htmlCollection
val hasAttribute : string -> t -> bool
val hasAttributeNS : string -> string -> t -> bool
val hasAttributes : t -> bool
val insertAdjacentElement : + Webapi__Dom__Types.insertPosition -> + 'a Dom.element_like -> + t -> + unit
val insertAdjacentHTML : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val insertAdjacentText : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val matches : string -> t -> bool
val releasePointerCapture : Dom.eventPointerId -> t -> unit
val removeAttribute : string -> t -> unit
val removeAttributeNS : string -> string -> t -> unit
val requestFullscreen : t -> unit
val requestPointerLock : t -> unit
val scrollIntoView : t -> unit
val scrollIntoViewNoAlignToTop : t -> unit
val scrollIntoViewWithOptions : + < behavior : string ; block : string > Js.t -> + t -> + unit
val scrollBy : float -> float -> t -> unit
val scrollByWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val scrollTo : float -> float -> t -> unit
val scrollToWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val setAttribute : string -> string -> t -> unit
val setAttributeNS : string -> string -> string -> t -> unit
val setPointerCapture : Dom.eventPointerId -> t -> unit
val setOnClick : t -> (Dom.mouseEvent -> unit) -> unit
include sig ... end
type t_htmlElement = t
val ofElement : Dom.element -> t_htmlElement option
val accessKey : t_htmlElement -> string
val setAccessKey : t_htmlElement -> string -> unit
val accessKeyLabel : t_htmlElement -> string
val contentEditable : t_htmlElement -> Webapi__Dom__Types.contentEditable
val setContentEditable : + t_htmlElement -> + Webapi__Dom__Types.contentEditable -> + unit
val isContentEditable : t_htmlElement -> bool
val contextMenu : t_htmlElement -> Dom.htmlElement
val setContextMenu : t_htmlElement -> Dom.htmlElement -> unit
val dir : t_htmlElement -> Webapi__Dom__Types.dir
val setDir : t_htmlElement -> Webapi__Dom__Types.dir -> unit
val draggable : t_htmlElement -> bool
val setDraggable : t_htmlElement -> bool -> unit
val hidden : t_htmlElement -> bool
val setHidden : t_htmlElement -> bool -> unit
val itemScope : t_htmlElement -> bool
val setItemScope : t_htmlElement -> bool -> unit
val itemId : t_htmlElement -> string
val setItemId : t_htmlElement -> string -> unit
val itemValue : t_htmlElement -> < .. > Js.t
val setItemValue : t_htmlElement -> < .. > Js.t -> unit
val lang : t_htmlElement -> string
val setLang : t_htmlElement -> string -> unit
val offsetHeight : t_htmlElement -> int
val offsetLeft : t_htmlElement -> int
val offsetParent : t_htmlElement -> Dom.element option
val offsetTop : t_htmlElement -> int
val offsetWidth : t_htmlElement -> int
val spellcheck : t_htmlElement -> bool
val setSpellcheck : t_htmlElement -> bool -> unit
val setStyle : t_htmlElement -> Dom.cssStyleDeclaration -> unit
val tabIndex : t_htmlElement -> int
val setTabIndex : t_htmlElement -> int -> unit
val title : t_htmlElement -> string
val setTitle : t_htmlElement -> string -> unit
val translate : t_htmlElement -> bool
val setTranslate : t_htmlElement -> bool -> unit
val blur : t_htmlElement -> unit
val click : t_htmlElement -> unit
val focus : t_htmlElement -> unit
val focusPreventScroll : t_htmlElement -> unit
val forceSpellCheck : t_htmlElement -> unit
val value : t_htmlElement -> string
val checked : t_htmlElement -> bool
val type_ : t_htmlElement -> string
val setType : t_htmlElement -> string -> unit
val rel : t_htmlElement -> string
val setRel : t_htmlElement -> string -> unit
val href : t_htmlElement -> string
val setHref : t_htmlElement -> string -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlFormElement/Impl/argument-1-T/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlFormElement/Impl/argument-1-T/index.html new file mode 100644 index 000000000..5b4962eaa --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlFormElement/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlFormElement.Impl.T)

Parameter Impl.T

type t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlFormElement/Impl/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlFormElement/Impl/index.html new file mode 100644 index 000000000..20aa5c9b1 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlFormElement/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlFormElement.Impl)

Module HtmlFormElement.Impl

Parameters

module T : sig ... end

Signature

type t_htmlFormElement = T.t
val length : t_htmlFormElement -> int
val name : t_htmlFormElement -> string
val setName : t_htmlFormElement -> string -> unit
val method_ : t_htmlFormElement -> string
val setMethod : t_htmlFormElement -> string -> unit
val target : t_htmlFormElement -> string
val setTarget : t_htmlFormElement -> string -> unit
val action : t_htmlFormElement -> string
val setAction : t_htmlFormElement -> string -> unit
val acceptCharset : t_htmlFormElement -> string
val setAcceptCharset : t_htmlFormElement -> string -> unit
val autocomplete : t_htmlFormElement -> string
val setAutocomplete : t_htmlFormElement -> string -> unit
val noValidate : t_htmlFormElement -> bool
val setNoValidate : t_htmlFormElement -> bool -> unit
val enctype : t_htmlFormElement -> string
val setEnctype : t_htmlFormElement -> string -> unit
val encoding : t_htmlFormElement -> string
val setEncoding : t_htmlFormElement -> string -> unit
val submit : t_htmlFormElement -> unit
val reset : t_htmlFormElement -> unit
val checkValidity : t_htmlFormElement -> bool
val reportValidity : t_htmlFormElement -> bool
val data : T.t -> Fetch.FormData.t
  • since 0.18.0
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlFormElement/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlFormElement/index.html new file mode 100644 index 000000000..b2656c1c2 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlFormElement/index.html @@ -0,0 +1,536 @@ + +HtmlFormElement (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlFormElement)

Module Dom.HtmlFormElement

module Impl (T : sig ... end) : sig ... end
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
include sig ... end
val asHtmlElement : t -> Dom.htmlElement option
val unsafeAsHtmlElement : t -> Dom.htmlElement
val ofNode : Dom.node -> t option
val attributes : t -> Dom.namedNodeMap
val classList : t -> Dom.domTokenList
val className : t -> string
val setClassName : t -> string -> unit
val clientHeight : t -> int
val clientLeft : t -> int
val clientTop : t -> int
val clientWidth : t -> int
val id : t -> string
val setId : t -> string -> unit
val innerHTML : t -> string
val setInnerHTML : t -> string -> unit
val localName : t -> string
val namespaceURI : t -> string option
val outerHTML : t -> string
val setOuterHTML : t -> string -> unit
val prefix : t -> string option
val scrollHeight : t -> int
val scrollLeft : t -> float
val setScrollLeft : t -> float -> unit
val scrollTop : t -> float
val setScrollTop : t -> float -> unit
val scrollWidth : t -> int
val shadowRoot : t -> Dom.element
val slot : t -> string
val setSlot : t -> string -> unit
val tagName : t -> string
val attachShadow : < mode : string > Js.t -> t -> Dom.shadowRoot
val attachShadowOpen : t -> Dom.shadowRoot
val attachShadowClosed : t -> Dom.shadowRoot
val animate : < .. > Js.t -> < .. > Js.t -> t -> Dom.animation
val closest : string -> t -> Dom.element option
val createShadowRoot : t -> Dom.shadowRoot
val getAttribute : string -> t -> string option
val getAttributeNS : string -> string -> t -> string option
val getBoundingClientRect : t -> Dom.domRect
val getClientRects : t -> Dom.domRect array
val getElementsByClassName : string -> t -> Dom.htmlCollection
val getElementsByTagName : string -> t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> t -> Dom.htmlCollection
val hasAttribute : string -> t -> bool
val hasAttributeNS : string -> string -> t -> bool
val hasAttributes : t -> bool
val insertAdjacentElement : + Webapi__Dom__Types.insertPosition -> + 'a Dom.element_like -> + t -> + unit
val insertAdjacentHTML : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val insertAdjacentText : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val matches : string -> t -> bool
val releasePointerCapture : Dom.eventPointerId -> t -> unit
val removeAttribute : string -> t -> unit
val removeAttributeNS : string -> string -> t -> unit
val requestFullscreen : t -> unit
val requestPointerLock : t -> unit
val scrollIntoView : t -> unit
val scrollIntoViewNoAlignToTop : t -> unit
val scrollIntoViewWithOptions : + < behavior : string ; block : string > Js.t -> + t -> + unit
val scrollBy : float -> float -> t -> unit
val scrollByWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val scrollTo : float -> float -> t -> unit
val scrollToWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val setAttribute : string -> string -> t -> unit
val setAttributeNS : string -> string -> string -> t -> unit
val setPointerCapture : Dom.eventPointerId -> t -> unit
val setOnClick : t -> (Dom.mouseEvent -> unit) -> unit
include sig ... end
type t_htmlElement = t
val ofElement : Dom.element -> t_htmlElement option
val accessKey : t_htmlElement -> string
val setAccessKey : t_htmlElement -> string -> unit
val accessKeyLabel : t_htmlElement -> string
val contentEditable : t_htmlElement -> Webapi__Dom__Types.contentEditable
val setContentEditable : + t_htmlElement -> + Webapi__Dom__Types.contentEditable -> + unit
val isContentEditable : t_htmlElement -> bool
val contextMenu : t_htmlElement -> Dom.htmlElement
val setContextMenu : t_htmlElement -> Dom.htmlElement -> unit
val dir : t_htmlElement -> Webapi__Dom__Types.dir
val setDir : t_htmlElement -> Webapi__Dom__Types.dir -> unit
val draggable : t_htmlElement -> bool
val setDraggable : t_htmlElement -> bool -> unit
val hidden : t_htmlElement -> bool
val setHidden : t_htmlElement -> bool -> unit
val itemScope : t_htmlElement -> bool
val setItemScope : t_htmlElement -> bool -> unit
val itemId : t_htmlElement -> string
val setItemId : t_htmlElement -> string -> unit
val itemValue : t_htmlElement -> < .. > Js.t
val setItemValue : t_htmlElement -> < .. > Js.t -> unit
val lang : t_htmlElement -> string
val setLang : t_htmlElement -> string -> unit
val offsetHeight : t_htmlElement -> int
val offsetLeft : t_htmlElement -> int
val offsetParent : t_htmlElement -> Dom.element option
val offsetTop : t_htmlElement -> int
val offsetWidth : t_htmlElement -> int
val spellcheck : t_htmlElement -> bool
val setSpellcheck : t_htmlElement -> bool -> unit
val setStyle : t_htmlElement -> Dom.cssStyleDeclaration -> unit
val tabIndex : t_htmlElement -> int
val setTabIndex : t_htmlElement -> int -> unit
val title : t_htmlElement -> string
val setTitle : t_htmlElement -> string -> unit
val translate : t_htmlElement -> bool
val setTranslate : t_htmlElement -> bool -> unit
val blur : t_htmlElement -> unit
val click : t_htmlElement -> unit
val focus : t_htmlElement -> unit
val focusPreventScroll : t_htmlElement -> unit
val forceSpellCheck : t_htmlElement -> unit
val value : t_htmlElement -> string
val checked : t_htmlElement -> bool
val type_ : t_htmlElement -> string
val setType : t_htmlElement -> string -> unit
val rel : t_htmlElement -> string
val setRel : t_htmlElement -> string -> unit
val href : t_htmlElement -> string
val setHref : t_htmlElement -> string -> unit
include sig ... end
type t_htmlFormElement = t
val length : t_htmlFormElement -> int
val name : t_htmlFormElement -> string
val setName : t_htmlFormElement -> string -> unit
val method_ : t_htmlFormElement -> string
val setMethod : t_htmlFormElement -> string -> unit
val target : t_htmlFormElement -> string
val setTarget : t_htmlFormElement -> string -> unit
val action : t_htmlFormElement -> string
val setAction : t_htmlFormElement -> string -> unit
val acceptCharset : t_htmlFormElement -> string
val setAcceptCharset : t_htmlFormElement -> string -> unit
val autocomplete : t_htmlFormElement -> string
val setAutocomplete : t_htmlFormElement -> string -> unit
val noValidate : t_htmlFormElement -> bool
val setNoValidate : t_htmlFormElement -> bool -> unit
val enctype : t_htmlFormElement -> string
val setEnctype : t_htmlFormElement -> string -> unit
val encoding : t_htmlFormElement -> string
val setEncoding : t_htmlFormElement -> string -> unit
val submit : t_htmlFormElement -> unit
val reset : t_htmlFormElement -> unit
val checkValidity : t_htmlFormElement -> bool
val reportValidity : t_htmlFormElement -> bool
val data : t -> Fetch.FormData.t
  • since 0.18.0
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlImageElement/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlImageElement/index.html new file mode 100644 index 000000000..9a23e5c88 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlImageElement/index.html @@ -0,0 +1,536 @@ + +HtmlImageElement (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlImageElement)

Module Dom.HtmlImageElement

type t
val make : unit -> t
val makeWithSize : int -> int -> t
val alt : t -> string
val setAlt : t -> string -> unit
val src : t -> string
val setSrc : t -> string -> unit
val srcset : t -> string
val setSrcset : t -> string -> unit
val sizes : t -> string
val setSizes : t -> string -> unit
val crossOrigin : t -> string option
val setCrossOrigin : t -> string option -> unit
val useMap : t -> string
val setUseMap : t -> string -> unit
val isMap : t -> bool
val setIsMap : t -> bool -> unit
val height : t -> int
val setHeight : t -> int -> unit
val width : t -> int
val setWidth : t -> int -> unit
val naturalHeight : t -> int
val naturalWidth : t -> int
val complete : t -> bool
val currentSrc : t -> string
val referrerPolicy : t -> string
val setReferrerPolicy : t -> string -> unit
val decoding : t -> string
val setDecoding : t -> string -> unit
val decode : t -> unit Js.Promise.t
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val asHtmlElement : t -> Dom.htmlElement option
val unsafeAsHtmlElement : t -> Dom.htmlElement
val ofNode : Dom.node -> t option
val attributes : t -> Dom.namedNodeMap
val classList : t -> Dom.domTokenList
val className : t -> string
val setClassName : t -> string -> unit
val clientHeight : t -> int
val clientLeft : t -> int
val clientTop : t -> int
val clientWidth : t -> int
val id : t -> string
val setId : t -> string -> unit
val innerHTML : t -> string
val setInnerHTML : t -> string -> unit
val localName : t -> string
val namespaceURI : t -> string option
val outerHTML : t -> string
val setOuterHTML : t -> string -> unit
val prefix : t -> string option
val scrollHeight : t -> int
val scrollLeft : t -> float
val setScrollLeft : t -> float -> unit
val scrollTop : t -> float
val setScrollTop : t -> float -> unit
val scrollWidth : t -> int
val shadowRoot : t -> Dom.element
val slot : t -> string
val setSlot : t -> string -> unit
val tagName : t -> string
val attachShadow : < mode : string > Js.t -> t -> Dom.shadowRoot
val attachShadowOpen : t -> Dom.shadowRoot
val attachShadowClosed : t -> Dom.shadowRoot
val animate : < .. > Js.t -> < .. > Js.t -> t -> Dom.animation
val closest : string -> t -> Dom.element option
val createShadowRoot : t -> Dom.shadowRoot
val getAttribute : string -> t -> string option
val getAttributeNS : string -> string -> t -> string option
val getBoundingClientRect : t -> Dom.domRect
val getClientRects : t -> Dom.domRect array
val getElementsByClassName : string -> t -> Dom.htmlCollection
val getElementsByTagName : string -> t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> t -> Dom.htmlCollection
val hasAttribute : string -> t -> bool
val hasAttributeNS : string -> string -> t -> bool
val hasAttributes : t -> bool
val insertAdjacentElement : + Webapi__Dom__Types.insertPosition -> + 'a Dom.element_like -> + t -> + unit
val insertAdjacentHTML : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val insertAdjacentText : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val matches : string -> t -> bool
val releasePointerCapture : Dom.eventPointerId -> t -> unit
val removeAttribute : string -> t -> unit
val removeAttributeNS : string -> string -> t -> unit
val requestFullscreen : t -> unit
val requestPointerLock : t -> unit
val scrollIntoView : t -> unit
val scrollIntoViewNoAlignToTop : t -> unit
val scrollIntoViewWithOptions : + < behavior : string ; block : string > Js.t -> + t -> + unit
val scrollBy : float -> float -> t -> unit
val scrollByWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val scrollTo : float -> float -> t -> unit
val scrollToWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val setAttribute : string -> string -> t -> unit
val setAttributeNS : string -> string -> string -> t -> unit
val setPointerCapture : Dom.eventPointerId -> t -> unit
val setOnClick : t -> (Dom.mouseEvent -> unit) -> unit
include sig ... end
type t_htmlElement = t
val ofElement : Dom.element -> t_htmlElement option
val accessKey : t_htmlElement -> string
val setAccessKey : t_htmlElement -> string -> unit
val accessKeyLabel : t_htmlElement -> string
val contentEditable : t_htmlElement -> Webapi__Dom__Types.contentEditable
val setContentEditable : + t_htmlElement -> + Webapi__Dom__Types.contentEditable -> + unit
val isContentEditable : t_htmlElement -> bool
val contextMenu : t_htmlElement -> Dom.htmlElement
val setContextMenu : t_htmlElement -> Dom.htmlElement -> unit
val dir : t_htmlElement -> Webapi__Dom__Types.dir
val setDir : t_htmlElement -> Webapi__Dom__Types.dir -> unit
val draggable : t_htmlElement -> bool
val setDraggable : t_htmlElement -> bool -> unit
val hidden : t_htmlElement -> bool
val setHidden : t_htmlElement -> bool -> unit
val itemScope : t_htmlElement -> bool
val setItemScope : t_htmlElement -> bool -> unit
val itemId : t_htmlElement -> string
val setItemId : t_htmlElement -> string -> unit
val itemValue : t_htmlElement -> < .. > Js.t
val setItemValue : t_htmlElement -> < .. > Js.t -> unit
val lang : t_htmlElement -> string
val setLang : t_htmlElement -> string -> unit
val offsetHeight : t_htmlElement -> int
val offsetLeft : t_htmlElement -> int
val offsetParent : t_htmlElement -> Dom.element option
val offsetTop : t_htmlElement -> int
val offsetWidth : t_htmlElement -> int
val spellcheck : t_htmlElement -> bool
val setSpellcheck : t_htmlElement -> bool -> unit
val setStyle : t_htmlElement -> Dom.cssStyleDeclaration -> unit
val tabIndex : t_htmlElement -> int
val setTabIndex : t_htmlElement -> int -> unit
val title : t_htmlElement -> string
val setTitle : t_htmlElement -> string -> unit
val translate : t_htmlElement -> bool
val setTranslate : t_htmlElement -> bool -> unit
val blur : t_htmlElement -> unit
val click : t_htmlElement -> unit
val focus : t_htmlElement -> unit
val focusPreventScroll : t_htmlElement -> unit
val forceSpellCheck : t_htmlElement -> unit
val value : t_htmlElement -> string
val checked : t_htmlElement -> bool
val type_ : t_htmlElement -> string
val setType : t_htmlElement -> string -> unit
val rel : t_htmlElement -> string
val setRel : t_htmlElement -> string -> unit
val href : t_htmlElement -> string
val setHref : t_htmlElement -> string -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/Impl/SelectionDirection/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/Impl/SelectionDirection/index.html new file mode 100644 index 000000000..ff577f038 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/Impl/SelectionDirection/index.html @@ -0,0 +1,2 @@ + +SelectionDirection (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlInputElement.Impl.SelectionDirection)

Module Impl.SelectionDirection

type t =
  1. | Forward
  2. | Backward
  3. | None
val toString : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/Impl/SelectionMode/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/Impl/SelectionMode/index.html new file mode 100644 index 000000000..3716929c3 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/Impl/SelectionMode/index.html @@ -0,0 +1,2 @@ + +SelectionMode (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlInputElement.Impl.SelectionMode)

Module Impl.SelectionMode

type t =
  1. | Select
  2. | Start
  3. | End
  4. | Preserve
val toString : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/Impl/argument-1-T/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/Impl/argument-1-T/index.html new file mode 100644 index 000000000..cb92dd9aa --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlInputElement.Impl.T)

Parameter Impl.T

type t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/Impl/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/Impl/index.html new file mode 100644 index 000000000..c1df546e5 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/Impl/index.html @@ -0,0 +1,29 @@ + +Impl (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlInputElement.Impl)

Module HtmlInputElement.Impl

Parameters

module T : sig ... end

Signature

type t_htmlInputElement = T.t
val formAction : t_htmlInputElement -> string
val setFormAction : t_htmlInputElement -> string -> unit
val formEncType : t_htmlInputElement -> string
val setFormEncType : t_htmlInputElement -> string -> unit
val formMethod : t_htmlInputElement -> string
val setFormMethod : t_htmlInputElement -> string -> unit
val formNoValidate : t_htmlInputElement -> bool
val setFormNoValidate : t_htmlInputElement -> bool -> unit
val formTarget : t_htmlInputElement -> string
val setFormTarget : t_htmlInputElement -> string -> unit
val name : t_htmlInputElement -> string
val setName : t_htmlInputElement -> string -> unit
val type_ : t_htmlInputElement -> string
val setType : t_htmlInputElement -> string -> unit
val disabled : t_htmlInputElement -> bool
val setDisabled : t_htmlInputElement -> bool -> unit
val autofocus : t_htmlInputElement -> bool
val setAutofocus : t_htmlInputElement -> bool -> unit
val required : t_htmlInputElement -> bool
val setRequired : t_htmlInputElement -> bool -> unit
val value : t_htmlInputElement -> string
val setValue : t_htmlInputElement -> string -> unit
val validity : t_htmlInputElement -> Webapi__Dom__ValidityState.t
val validationMessage : t_htmlInputElement -> string
val willValidate : t_htmlInputElement -> bool
val checked : t_htmlInputElement -> bool
val setChecked : t_htmlInputElement -> bool -> unit
val defaultChecked : t_htmlInputElement -> bool
val setDefaultChecked : t_htmlInputElement -> bool -> unit
val indeterminate : t_htmlInputElement -> bool
val setIndeterminate : t_htmlInputElement -> bool -> unit
val alt : t_htmlInputElement -> string
val setAlt : t_htmlInputElement -> string -> unit
val height : t_htmlInputElement -> string
val setHeight : t_htmlInputElement -> string -> unit
val src : t_htmlInputElement -> string
val setSrc : t_htmlInputElement -> string -> unit
val width : t_htmlInputElement -> string
val setWidth : t_htmlInputElement -> string -> unit
val accept : t_htmlInputElement -> string
val setAccept : t_htmlInputElement -> string -> unit
val autocomplete : t_htmlInputElement -> string
val setAutocomplete : t_htmlInputElement -> string -> unit
val maxLength : t_htmlInputElement -> int
val setMaxLength : t_htmlInputElement -> int -> unit
val minLength : t_htmlInputElement -> int
val setMinLength : t_htmlInputElement -> int -> unit
val size : t_htmlInputElement -> int
val setSize : t_htmlInputElement -> int -> unit
val pattern : t_htmlInputElement -> string
val setPattern : t_htmlInputElement -> string -> unit
val placeholder : t_htmlInputElement -> string
val setPlaceholder : t_htmlInputElement -> string -> unit
val readOnly : t_htmlInputElement -> bool
val setReadOnly : t_htmlInputElement -> bool -> unit
val min : t_htmlInputElement -> string
val setMin : t_htmlInputElement -> string -> unit
val max : t_htmlInputElement -> string
val setMax : t_htmlInputElement -> string -> unit
val selectionStart : t_htmlInputElement -> int
val setSelectionStart : t_htmlInputElement -> int -> unit
val selectionEnd : t_htmlInputElement -> int
val setSelectionEnd : t_htmlInputElement -> int -> unit
val selectionDirection : t_htmlInputElement -> string
val setSelectionDirection : t_htmlInputElement -> string -> unit
val defaultValue : t_htmlInputElement -> string
val setDefaultValue : t_htmlInputElement -> string -> unit
val dirName : t_htmlInputElement -> string
val setDirName : t_htmlInputElement -> string -> unit
val accessKey : t_htmlInputElement -> string
val setAccessKey : t_htmlInputElement -> string -> unit
val list : t_htmlInputElement -> Dom.htmlElement option
val multiple : t_htmlInputElement -> bool
val setMultiple : t_htmlInputElement -> bool -> unit
val labels : t_htmlInputElement -> Dom.nodeList array
val step : t_htmlInputElement -> string
val setStep : t_htmlInputElement -> string -> unit
val valueAsDate : t_htmlInputElement -> Js.Date.t option
val setValueAsDate : t_htmlInputElement -> Js.Date.t -> unit
val valueAsNumber : t_htmlInputElement -> float
val select : t_htmlInputElement -> unit
module SelectionDirection : sig ... end
val setSelectionRange : int -> int -> t_htmlInputElement -> unit
val setSelectionRangeWithDirection_ : + int -> + int -> + string -> + t_htmlInputElement -> + unit
val setSelectionRangeWithDirection : + int -> + int -> + SelectionDirection.t -> + t_htmlInputElement -> + unit
module SelectionMode : sig ... end
val setRangeTextWithinSelection : string -> t_htmlInputElement -> unit
val setRangeTextWithinInterval : + string -> + int -> + int -> + t_htmlInputElement -> + unit
val setRangeTextWithinIntervalWithSelectionMode_ : + string -> + int -> + int -> + string -> + t_htmlInputElement -> + unit
val setRangeTextWithinIntervalWithSelectionMode : + string -> + int -> + int -> + SelectionMode.t -> + t_htmlInputElement -> + unit
val setCustomValidity : string -> t_htmlInputElement -> unit
val checkValidity : t_htmlInputElement -> bool
val reportValidity : t_htmlInputElement -> bool
val stepDownBy : int -> t_htmlInputElement -> unit
val stepDownByOne : t_htmlInputElement -> unit
val stepUpBy : int -> t_htmlInputElement -> unit
val stepUpByOne : t_htmlInputElement -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/SelectionDirection/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/SelectionDirection/index.html new file mode 100644 index 000000000..d343d07be --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/SelectionDirection/index.html @@ -0,0 +1,2 @@ + +SelectionDirection (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlInputElement.SelectionDirection)

Module HtmlInputElement.SelectionDirection

type t =
  1. | Forward
  2. | Backward
  3. | None
val toString : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/SelectionMode/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/SelectionMode/index.html new file mode 100644 index 000000000..68d9772c5 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/SelectionMode/index.html @@ -0,0 +1,2 @@ + +SelectionMode (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlInputElement.SelectionMode)

Module HtmlInputElement.SelectionMode

type t =
  1. | Select
  2. | Start
  3. | End
  4. | Preserve
val toString : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/index.html b/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/index.html new file mode 100644 index 000000000..f789871da --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/HtmlInputElement/index.html @@ -0,0 +1,563 @@ + +HtmlInputElement (docs.findlib-1.melange-webapi.Webapi.Dom.HtmlInputElement)

Module Dom.HtmlInputElement

module Impl (T : sig ... end) : sig ... end
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
include sig ... end
val asHtmlElement : t -> Dom.htmlElement option
val unsafeAsHtmlElement : t -> Dom.htmlElement
val ofNode : Dom.node -> t option
val attributes : t -> Dom.namedNodeMap
val classList : t -> Dom.domTokenList
val className : t -> string
val setClassName : t -> string -> unit
val clientHeight : t -> int
val clientLeft : t -> int
val clientTop : t -> int
val clientWidth : t -> int
val id : t -> string
val setId : t -> string -> unit
val innerHTML : t -> string
val setInnerHTML : t -> string -> unit
val localName : t -> string
val namespaceURI : t -> string option
val outerHTML : t -> string
val setOuterHTML : t -> string -> unit
val prefix : t -> string option
val scrollHeight : t -> int
val scrollLeft : t -> float
val setScrollLeft : t -> float -> unit
val scrollTop : t -> float
val setScrollTop : t -> float -> unit
val scrollWidth : t -> int
val shadowRoot : t -> Dom.element
val slot : t -> string
val setSlot : t -> string -> unit
val tagName : t -> string
val attachShadow : < mode : string > Js.t -> t -> Dom.shadowRoot
val attachShadowOpen : t -> Dom.shadowRoot
val attachShadowClosed : t -> Dom.shadowRoot
val animate : < .. > Js.t -> < .. > Js.t -> t -> Dom.animation
val closest : string -> t -> Dom.element option
val createShadowRoot : t -> Dom.shadowRoot
val getAttribute : string -> t -> string option
val getAttributeNS : string -> string -> t -> string option
val getBoundingClientRect : t -> Dom.domRect
val getClientRects : t -> Dom.domRect array
val getElementsByClassName : string -> t -> Dom.htmlCollection
val getElementsByTagName : string -> t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> t -> Dom.htmlCollection
val hasAttribute : string -> t -> bool
val hasAttributeNS : string -> string -> t -> bool
val hasAttributes : t -> bool
val insertAdjacentElement : + Webapi__Dom__Types.insertPosition -> + 'a Dom.element_like -> + t -> + unit
val insertAdjacentHTML : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val insertAdjacentText : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val matches : string -> t -> bool
val releasePointerCapture : Dom.eventPointerId -> t -> unit
val removeAttribute : string -> t -> unit
val removeAttributeNS : string -> string -> t -> unit
val requestFullscreen : t -> unit
val requestPointerLock : t -> unit
val scrollIntoView : t -> unit
val scrollIntoViewNoAlignToTop : t -> unit
val scrollIntoViewWithOptions : + < behavior : string ; block : string > Js.t -> + t -> + unit
val scrollBy : float -> float -> t -> unit
val scrollByWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val scrollTo : float -> float -> t -> unit
val scrollToWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val setAttribute : string -> string -> t -> unit
val setAttributeNS : string -> string -> string -> t -> unit
val setPointerCapture : Dom.eventPointerId -> t -> unit
val setOnClick : t -> (Dom.mouseEvent -> unit) -> unit
include sig ... end
type t_htmlElement = t
val ofElement : Dom.element -> t_htmlElement option
val accessKeyLabel : t_htmlElement -> string
val contentEditable : t_htmlElement -> Webapi__Dom__Types.contentEditable
val setContentEditable : + t_htmlElement -> + Webapi__Dom__Types.contentEditable -> + unit
val isContentEditable : t_htmlElement -> bool
val contextMenu : t_htmlElement -> Dom.htmlElement
val setContextMenu : t_htmlElement -> Dom.htmlElement -> unit
val dir : t_htmlElement -> Webapi__Dom__Types.dir
val setDir : t_htmlElement -> Webapi__Dom__Types.dir -> unit
val draggable : t_htmlElement -> bool
val setDraggable : t_htmlElement -> bool -> unit
val hidden : t_htmlElement -> bool
val setHidden : t_htmlElement -> bool -> unit
val itemScope : t_htmlElement -> bool
val setItemScope : t_htmlElement -> bool -> unit
val itemId : t_htmlElement -> string
val setItemId : t_htmlElement -> string -> unit
val itemValue : t_htmlElement -> < .. > Js.t
val setItemValue : t_htmlElement -> < .. > Js.t -> unit
val lang : t_htmlElement -> string
val setLang : t_htmlElement -> string -> unit
val offsetHeight : t_htmlElement -> int
val offsetLeft : t_htmlElement -> int
val offsetParent : t_htmlElement -> Dom.element option
val offsetTop : t_htmlElement -> int
val offsetWidth : t_htmlElement -> int
val spellcheck : t_htmlElement -> bool
val setSpellcheck : t_htmlElement -> bool -> unit
val setStyle : t_htmlElement -> Dom.cssStyleDeclaration -> unit
val tabIndex : t_htmlElement -> int
val setTabIndex : t_htmlElement -> int -> unit
val title : t_htmlElement -> string
val setTitle : t_htmlElement -> string -> unit
val translate : t_htmlElement -> bool
val setTranslate : t_htmlElement -> bool -> unit
val blur : t_htmlElement -> unit
val click : t_htmlElement -> unit
val focus : t_htmlElement -> unit
val focusPreventScroll : t_htmlElement -> unit
val forceSpellCheck : t_htmlElement -> unit
val rel : t_htmlElement -> string
val setRel : t_htmlElement -> string -> unit
val href : t_htmlElement -> string
val setHref : t_htmlElement -> string -> unit
include sig ... end
type t_htmlInputElement = t
val formAction : t_htmlInputElement -> string
val setFormAction : t_htmlInputElement -> string -> unit
val formEncType : t_htmlInputElement -> string
val setFormEncType : t_htmlInputElement -> string -> unit
val formMethod : t_htmlInputElement -> string
val setFormMethod : t_htmlInputElement -> string -> unit
val formNoValidate : t_htmlInputElement -> bool
val setFormNoValidate : t_htmlInputElement -> bool -> unit
val formTarget : t_htmlInputElement -> string
val setFormTarget : t_htmlInputElement -> string -> unit
val name : t_htmlInputElement -> string
val setName : t_htmlInputElement -> string -> unit
val type_ : t_htmlInputElement -> string
val setType : t_htmlInputElement -> string -> unit
val disabled : t_htmlInputElement -> bool
val setDisabled : t_htmlInputElement -> bool -> unit
val autofocus : t_htmlInputElement -> bool
val setAutofocus : t_htmlInputElement -> bool -> unit
val required : t_htmlInputElement -> bool
val setRequired : t_htmlInputElement -> bool -> unit
val value : t_htmlInputElement -> string
val setValue : t_htmlInputElement -> string -> unit
val validity : t_htmlInputElement -> Webapi__Dom__ValidityState.t
val validationMessage : t_htmlInputElement -> string
val willValidate : t_htmlInputElement -> bool
val checked : t_htmlInputElement -> bool
val setChecked : t_htmlInputElement -> bool -> unit
val defaultChecked : t_htmlInputElement -> bool
val setDefaultChecked : t_htmlInputElement -> bool -> unit
val indeterminate : t_htmlInputElement -> bool
val setIndeterminate : t_htmlInputElement -> bool -> unit
val alt : t_htmlInputElement -> string
val setAlt : t_htmlInputElement -> string -> unit
val height : t_htmlInputElement -> string
val setHeight : t_htmlInputElement -> string -> unit
val src : t_htmlInputElement -> string
val setSrc : t_htmlInputElement -> string -> unit
val width : t_htmlInputElement -> string
val setWidth : t_htmlInputElement -> string -> unit
val accept : t_htmlInputElement -> string
val setAccept : t_htmlInputElement -> string -> unit
val autocomplete : t_htmlInputElement -> string
val setAutocomplete : t_htmlInputElement -> string -> unit
val maxLength : t_htmlInputElement -> int
val setMaxLength : t_htmlInputElement -> int -> unit
val minLength : t_htmlInputElement -> int
val setMinLength : t_htmlInputElement -> int -> unit
val size : t_htmlInputElement -> int
val setSize : t_htmlInputElement -> int -> unit
val pattern : t_htmlInputElement -> string
val setPattern : t_htmlInputElement -> string -> unit
val placeholder : t_htmlInputElement -> string
val setPlaceholder : t_htmlInputElement -> string -> unit
val readOnly : t_htmlInputElement -> bool
val setReadOnly : t_htmlInputElement -> bool -> unit
val min : t_htmlInputElement -> string
val setMin : t_htmlInputElement -> string -> unit
val max : t_htmlInputElement -> string
val setMax : t_htmlInputElement -> string -> unit
val selectionStart : t_htmlInputElement -> int
val setSelectionStart : t_htmlInputElement -> int -> unit
val selectionEnd : t_htmlInputElement -> int
val setSelectionEnd : t_htmlInputElement -> int -> unit
val selectionDirection : t_htmlInputElement -> string
val setSelectionDirection : t_htmlInputElement -> string -> unit
val defaultValue : t_htmlInputElement -> string
val setDefaultValue : t_htmlInputElement -> string -> unit
val dirName : t_htmlInputElement -> string
val setDirName : t_htmlInputElement -> string -> unit
val accessKey : t_htmlInputElement -> string
val setAccessKey : t_htmlInputElement -> string -> unit
val list : t_htmlInputElement -> Dom.htmlElement option
val multiple : t_htmlInputElement -> bool
val setMultiple : t_htmlInputElement -> bool -> unit
val labels : t_htmlInputElement -> Dom.nodeList array
val step : t_htmlInputElement -> string
val setStep : t_htmlInputElement -> string -> unit
val valueAsDate : t_htmlInputElement -> Js.Date.t option
val setValueAsDate : t_htmlInputElement -> Js.Date.t -> unit
val valueAsNumber : t_htmlInputElement -> float
val select : t_htmlInputElement -> unit
module SelectionDirection : sig ... end
val setSelectionRange : int -> int -> t_htmlInputElement -> unit
val setSelectionRangeWithDirection_ : + int -> + int -> + string -> + t_htmlInputElement -> + unit
val setSelectionRangeWithDirection : + int -> + int -> + SelectionDirection.t -> + t_htmlInputElement -> + unit
module SelectionMode : sig ... end
val setRangeTextWithinSelection : string -> t_htmlInputElement -> unit
val setRangeTextWithinInterval : + string -> + int -> + int -> + t_htmlInputElement -> + unit
val setRangeTextWithinIntervalWithSelectionMode_ : + string -> + int -> + int -> + string -> + t_htmlInputElement -> + unit
val setRangeTextWithinIntervalWithSelectionMode : + string -> + int -> + int -> + SelectionMode.t -> + t_htmlInputElement -> + unit
val setCustomValidity : string -> t_htmlInputElement -> unit
val checkValidity : t_htmlInputElement -> bool
val reportValidity : t_htmlInputElement -> bool
val stepDownBy : int -> t_htmlInputElement -> unit
val stepDownByOne : t_htmlInputElement -> unit
val stepUpBy : int -> t_htmlInputElement -> unit
val stepUpByOne : t_htmlInputElement -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/IdbVersionChangeEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/IdbVersionChangeEvent/index.html new file mode 100644 index 000000000..552ebd177 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/IdbVersionChangeEvent/index.html @@ -0,0 +1,2 @@ + +IdbVersionChangeEvent (docs.findlib-1.melange-webapi.Webapi.Dom.IdbVersionChangeEvent)

Module Dom.IdbVersionChangeEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val oldVersion : t -> int
val newVersion : t -> int
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Image/index.html b/findlib-1/melange-webapi/Webapi/Dom/Image/index.html new file mode 100644 index 000000000..bc3ead73e --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Image/index.html @@ -0,0 +1,6 @@ + +Image (docs.findlib-1.melange-webapi.Webapi.Dom.Image)

Module Dom.Image

type t
val makeWithData : + array:Js.Typed_array.Uint8ClampedArray.t -> + width:float -> + height:float -> + t
val make : width:float -> height:float -> t
val data : t -> Js.Typed_array.Uint8ClampedArray.t
val height : t -> float
val width : t -> float
diff --git a/findlib-1/melange-webapi/Webapi/Dom/InputEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/InputEvent/index.html new file mode 100644 index 000000000..7c05f9dd7 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/InputEvent/index.html @@ -0,0 +1,2 @@ + +InputEvent (docs.findlib-1.melange-webapi.Webapi.Dom.InputEvent)

Module Dom.InputEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
include sig ... end
val detail : t -> int
val view : t -> Dom.window
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val data : t -> string
val isComposing : t -> bool
diff --git a/findlib-1/melange-webapi/Webapi/Dom/KeyboardEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/KeyboardEvent/index.html new file mode 100644 index 000000000..9c027c39d --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/KeyboardEvent/index.html @@ -0,0 +1,2 @@ + +KeyboardEvent (docs.findlib-1.melange-webapi.Webapi.Dom.KeyboardEvent)

Module Dom.KeyboardEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
include sig ... end
val detail : t -> int
val view : t -> Dom.window
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val altKey : t -> bool
val code : t -> string
val ctrlKey : t -> bool
val isComposing : t -> bool
val key : t -> string
val locale : t -> string
val location : t -> int
val metaKey : t -> bool
val repeat : t -> bool
val shiftKey : t -> bool
val getModifierState : Webapi__Dom__Types.modifierKey -> t -> bool
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Location/index.html b/findlib-1/melange-webapi/Webapi/Dom/Location/index.html new file mode 100644 index 000000000..75a3316c9 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Location/index.html @@ -0,0 +1,2 @@ + +Location (docs.findlib-1.melange-webapi.Webapi.Dom.Location)

Module Dom.Location

type t = Dom.location
val href : t -> string
val setHref : t -> string -> unit
val protocol : t -> string
val setProtocol : t -> string -> unit
val host : t -> string
val setHost : t -> string -> unit
val hostname : t -> string
val setHostname : t -> string -> unit
val port : t -> string
val setPort : t -> string -> unit
val pathname : t -> string
val setPathname : t -> string -> unit
val setSearch : t -> string -> unit
val hash : t -> string
val setHash : t -> string -> unit
val username : t -> string
val setUsername : t -> string -> unit
val password : t -> string
val setPassword : t -> string -> unit
val origin : t -> string
val assign : string -> t -> unit
val reload : t -> unit
val reloadWithForce : t -> unit
val replace : string -> t -> unit
val toString : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/MouseEvent/Impl/argument-1-T/index.html b/findlib-1/melange-webapi/Webapi/Dom/MouseEvent/Impl/argument-1-T/index.html new file mode 100644 index 000000000..e47f9c712 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/MouseEvent/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.melange-webapi.Webapi.Dom.MouseEvent.Impl.T)

Parameter Impl.T

type t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/MouseEvent/Impl/index.html b/findlib-1/melange-webapi/Webapi/Dom/MouseEvent/Impl/index.html new file mode 100644 index 000000000..9c5af0f71 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/MouseEvent/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.findlib-1.melange-webapi.Webapi.Dom.MouseEvent.Impl)

Module MouseEvent.Impl

Parameters

module T : sig ... end

Signature

val altKey : T.t -> bool
val button : T.t -> int
val buttons : T.t -> int
val clientX : T.t -> int
val clientY : T.t -> int
val ctrlKey : T.t -> bool
val metaKey : T.t -> bool
val movementX : T.t -> int
val movementY : T.t -> int
val offsetX : T.t -> int
val offsetY : T.t -> int
val pageX : T.t -> int
val pageY : T.t -> int
val region : T.t -> string option
val relatedTarget : T.t -> Dom.eventTarget option
val screenX : T.t -> int
val screenY : T.t -> int
val shiftKey : T.t -> bool
val x : T.t -> int
val y : T.t -> int
val getModifierState : Webapi__Dom__Types.modifierKey -> T.t -> bool
diff --git a/findlib-1/melange-webapi/Webapi/Dom/MouseEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/MouseEvent/index.html new file mode 100644 index 000000000..cd5058dbd --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/MouseEvent/index.html @@ -0,0 +1,2 @@ + +MouseEvent (docs.findlib-1.melange-webapi.Webapi.Dom.MouseEvent)

Module Dom.MouseEvent

module Impl (T : sig ... end) : sig ... end
include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
include sig ... end
val detail : t -> int
val view : t -> Dom.window
include sig ... end
val altKey : t -> bool
val button : t -> int
val buttons : t -> int
val clientX : t -> int
val clientY : t -> int
val ctrlKey : t -> bool
val metaKey : t -> bool
val movementX : t -> int
val movementY : t -> int
val offsetX : t -> int
val offsetY : t -> int
val pageX : t -> int
val pageY : t -> int
val region : t -> string option
val relatedTarget : t -> Dom.eventTarget option
val screenX : t -> int
val screenY : t -> int
val shiftKey : t -> bool
val x : t -> int
val y : t -> int
val getModifierState : Webapi__Dom__Types.modifierKey -> t -> bool
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/MutationObserver/index.html b/findlib-1/melange-webapi/Webapi/Dom/MutationObserver/index.html new file mode 100644 index 000000000..874a5e337 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/MutationObserver/index.html @@ -0,0 +1,2 @@ + +MutationObserver (docs.findlib-1.melange-webapi.Webapi.Dom.MutationObserver)

Module Dom.MutationObserver

val make : (Dom.mutationRecord array -> t -> unit) -> t
val observe : 'a Dom.node_like -> < .. > Js.t -> t -> unit
val disconnect : t -> unit
val takeRecords : t -> Dom.mutationRecord array
diff --git a/findlib-1/melange-webapi/Webapi/Dom/MutationRecord/index.html b/findlib-1/melange-webapi/Webapi/Dom/MutationRecord/index.html new file mode 100644 index 000000000..c6048bd41 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/MutationRecord/index.html @@ -0,0 +1,2 @@ + +MutationRecord (docs.findlib-1.melange-webapi.Webapi.Dom.MutationRecord)

Module Dom.MutationRecord

val type_ : t -> string
val target : t -> Dom.node
val addedNodes : t -> Dom.nodeList
val removedNodes : t -> Dom.nodeList
val previousSibling : t -> Dom.node option
val nextSibling : t -> Dom.node option
val attributeName : t -> string
val attributeNamespace : t -> string
val oldValue : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/NamedNodeMap/index.html b/findlib-1/melange-webapi/Webapi/Dom/NamedNodeMap/index.html new file mode 100644 index 000000000..f1e47b82d --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/NamedNodeMap/index.html @@ -0,0 +1,2 @@ + +NamedNodeMap (docs.findlib-1.melange-webapi.Webapi.Dom.NamedNodeMap)

Module Dom.NamedNodeMap

val length : t -> int
val item : int -> t -> Dom.attr option
val getNamedItem : string -> t -> Dom.attr option
val getNamedItemNS : string -> string -> t -> Dom.attr option
val setNamedItem : Dom.attr -> t -> unit
val setNamedItemNS : Dom.attr -> t -> unit
val removeNamedItem : string -> t -> Dom.attr
val removeNamedItemNS : string -> string -> t -> Dom.attr
val toArray : t -> Dom.attr array
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Node/Impl/argument-1-T/index.html b/findlib-1/melange-webapi/Webapi/Dom/Node/Impl/argument-1-T/index.html new file mode 100644 index 000000000..2238265a6 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Node/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.melange-webapi.Webapi.Dom.Node.Impl.T)

Parameter Impl.T

type t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Node/Impl/index.html b/findlib-1/melange-webapi/Webapi/Dom/Node/Impl/index.html new file mode 100644 index 000000000..6246d8be9 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Node/Impl/index.html @@ -0,0 +1,10 @@ + +Impl (docs.findlib-1.melange-webapi.Webapi.Dom.Node.Impl)

Module Node.Impl

Parameters

module T : sig ... end

Signature

val asNode : T.t -> Dom.node
val childNodes : T.t -> Dom.nodeList
val firstChild : T.t -> Dom.node option
val innerText : T.t -> string
val setInnerText : T.t -> string -> unit
val lastChild : T.t -> Dom.node option
val nextSibling : T.t -> Dom.node option
val nodeName : T.t -> string
val nodeType : T.t -> Webapi__Dom__Types.nodeType
val nodeValue : T.t -> string option
val setNodeValue : T.t -> string Js.null -> unit
val ownerDocument : T.t -> Dom.document
val parentElement : T.t -> Dom.element option
val parentNode : T.t -> Dom.node option
val previousSibling : T.t -> Dom.node option
val rootNode : T.t -> Dom.node
val textContent : T.t -> string
val setTextContent : T.t -> string -> unit
val appendChild : 'a Dom.node_like -> T.t -> unit
val cloneNode : T.t -> T.t
val cloneNodeDeep : T.t -> T.t
val compareDocumentPosition : 'a Dom.node_like -> T.t -> int
val contains : 'a Dom.node_like -> T.t -> bool
val getRootNode : T.t -> Dom.node
val getRootNodeComposed : T.t -> Dom.node
val hasChildNodes : T.t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + T.t -> + 'a Dom.node_like
val isDefaultNamespace : string -> T.t -> bool
val isEqualNode : 'a Dom.node_like -> T.t -> bool
val isSameNode : 'a Dom.node_like -> T.t -> bool
val lookupNamespaceURI : string -> T.t -> string option
val lookupDefaultNamespaceURI : T.t -> string option
val lookupPrefix : T.t -> string
val normalize : T.t -> unit
val removeChild : 'a Dom.node_like -> T.t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + T.t -> + 'b Dom.node_like
  • since 0.19.0
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Node/index.html b/findlib-1/melange-webapi/Webapi/Dom/Node/index.html new file mode 100644 index 000000000..ad1b55a63 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Node/index.html @@ -0,0 +1,512 @@ + +Node (docs.findlib-1.melange-webapi.Webapi.Dom.Node)

Module Dom.Node

module Impl (T : sig ... end) : sig ... end
type t = Dom.node
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
  • since 0.19.0
diff --git a/findlib-1/melange-webapi/Webapi/Dom/NodeFilter/index.html b/findlib-1/melange-webapi/Webapi/Dom/NodeFilter/index.html new file mode 100644 index 000000000..40561939f --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/NodeFilter/index.html @@ -0,0 +1,2 @@ + +NodeFilter (docs.findlib-1.melange-webapi.Webapi.Dom.NodeFilter)

Module Dom.NodeFilter

val make : (Dom.element -> int) -> Dom.nodeFilter
diff --git a/findlib-1/melange-webapi/Webapi/Dom/NodeIterator/index.html b/findlib-1/melange-webapi/Webapi/Dom/NodeIterator/index.html new file mode 100644 index 000000000..ac6bcac6b --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/NodeIterator/index.html @@ -0,0 +1,2 @@ + +NodeIterator (docs.findlib-1.melange-webapi.Webapi.Dom.NodeIterator)

Module Dom.NodeIterator

val root : t -> Dom.node
val referenceNode : t -> Dom.node
val pointerBeforeReferenceNode : t -> bool
val whatToShow : t -> Webapi__Dom__Types.WhatToShow.t
val filter : t -> Dom.nodeFilter option
val nextNode : t -> Dom.node option
val previousNode : t -> Dom.node option
val detach : t -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/NodeList/index.html b/findlib-1/melange-webapi/Webapi/Dom/NodeList/index.html new file mode 100644 index 000000000..82784347d --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/NodeList/index.html @@ -0,0 +1,2 @@ + +NodeList (docs.findlib-1.melange-webapi.Webapi.Dom.NodeList)

Module Dom.NodeList

type t = Dom.nodeList
val toArray : t -> Dom.node array
val forEach : (Dom.node -> int -> unit) -> t -> unit
val length : t -> int
val item : int -> t -> Dom.node option
diff --git a/findlib-1/melange-webapi/Webapi/Dom/PageTransitionEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/PageTransitionEvent/index.html new file mode 100644 index 000000000..5decda53d --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/PageTransitionEvent/index.html @@ -0,0 +1,2 @@ + +PageTransitionEvent (docs.findlib-1.melange-webapi.Webapi.Dom.PageTransitionEvent)

Module Dom.PageTransitionEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val persisted : t -> bool
diff --git a/findlib-1/melange-webapi/Webapi/Dom/PointerEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/PointerEvent/index.html new file mode 100644 index 000000000..0ba4c391c --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/PointerEvent/index.html @@ -0,0 +1,2 @@ + +PointerEvent (docs.findlib-1.melange-webapi.Webapi.Dom.PointerEvent)

Module Dom.PointerEvent

type pointerId = Dom.eventPointerId
include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
include sig ... end
val detail : t -> int
val view : t -> Dom.window
include sig ... end
val altKey : t -> bool
val button : t -> int
val buttons : t -> int
val clientX : t -> int
val clientY : t -> int
val ctrlKey : t -> bool
val metaKey : t -> bool
val movementX : t -> int
val movementY : t -> int
val offsetX : t -> int
val offsetY : t -> int
val pageX : t -> int
val pageY : t -> int
val region : t -> string option
val relatedTarget : t -> Dom.eventTarget option
val screenX : t -> int
val screenY : t -> int
val shiftKey : t -> bool
val x : t -> int
val y : t -> int
val getModifierState : Webapi__Dom__Types.modifierKey -> t -> bool
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val pointerId : t -> pointerId
val width : t -> int
val height : t -> int
val pressure : t -> float
val tiltX : t -> int
val tiltY : t -> int
val pointerType : t -> Webapi__Dom__Types.pointerType
val isPrimary : t -> bool
diff --git a/findlib-1/melange-webapi/Webapi/Dom/PopStateEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/PopStateEvent/index.html new file mode 100644 index 000000000..1fc02e3c8 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/PopStateEvent/index.html @@ -0,0 +1,2 @@ + +PopStateEvent (docs.findlib-1.melange-webapi.Webapi.Dom.PopStateEvent)

Module Dom.PopStateEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val state : t -> < .. > Js.t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/ProcessingInstruction/index.html b/findlib-1/melange-webapi/Webapi/Dom/ProcessingInstruction/index.html new file mode 100644 index 000000000..c06927e75 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/ProcessingInstruction/index.html @@ -0,0 +1,512 @@ + +ProcessingInstruction (docs.findlib-1.melange-webapi.Webapi.Dom.ProcessingInstruction)

Module Dom.ProcessingInstruction

include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val previousElementSibling : t -> Dom.element option
val nextElementSibling : t -> Dom.element option
include sig ... end
val remove : t -> unit
val target : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/ProgressEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/ProgressEvent/index.html new file mode 100644 index 000000000..a77e4d166 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/ProgressEvent/index.html @@ -0,0 +1,2 @@ + +ProgressEvent (docs.findlib-1.melange-webapi.Webapi.Dom.ProgressEvent)

Module Dom.ProgressEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val lengthComputable : t -> bool
val loaded : t -> int
val total : t -> int
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Range/index.html b/findlib-1/melange-webapi/Webapi/Dom/Range/index.html new file mode 100644 index 000000000..d6726f585 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Range/index.html @@ -0,0 +1,10 @@ + +Range (docs.findlib-1.melange-webapi.Webapi.Dom.Range)

Module Dom.Range

type t = Dom.range
val make : unit -> t
val collapsed : t -> bool
val commonAncestorContainer : t -> Dom.node
val endContainer : t -> Dom.node
val endOffset : t -> int
val startContainer : t -> Dom.node
val startOffset : t -> int
val setStart : 'a Dom.node_like -> int -> t -> unit
val setEnd : 'a Dom.node_like -> int -> t -> unit
val setStartBefore : 'a Dom.node_like -> t -> unit
val setStartAfter : 'a Dom.node_like -> t -> unit
val setEndBefore : 'a Dom.node_like -> t -> unit
val setEndAfter : 'a Dom.node_like -> t -> unit
val selectNode : 'a Dom.node_like -> t -> unit
val selectNodeContents : 'a Dom.node_like -> t -> unit
val collapse : t -> unit
val collapseToStart : t -> unit
val cloneContents : t -> Dom.documentFragment
val deleteContents : t -> unit
val extractContents : t -> Dom.documentFragment
val insertNode : 'a Dom.node_like -> t -> unit
val surroundContents : 'a Dom.node_like -> t -> unit
val compareBoundaryPoints : int -> t -> t -> int
val compareBoundaryPoint : + Webapi__Dom__Types.compareHow -> + t -> + t -> + Webapi__Dom__Types.compareResult
val cloneRange : t -> t
val detach : t -> unit
val toString : t -> string
val comparePoint : + 'a Dom.node_like -> + int -> + t -> + Webapi__Dom__Types.compareResult
val createContextualFragment : string -> t -> Dom.documentFragment
val getBoundingClientRect : t -> Dom.domRect
val getClientRects : t -> Dom.domRect array
val intersectsNode : 'a Dom.node_like -> t -> bool
val isPointInRange : 'a Dom.node_like -> int -> t -> bool
diff --git a/findlib-1/melange-webapi/Webapi/Dom/RelatedEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/RelatedEvent/index.html new file mode 100644 index 000000000..5ac62b889 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/RelatedEvent/index.html @@ -0,0 +1,2 @@ + +RelatedEvent (docs.findlib-1.melange-webapi.Webapi.Dom.RelatedEvent)

Module Dom.RelatedEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val relatedTarget : t -> Dom.eventTarget option
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Selection/index.html b/findlib-1/melange-webapi/Webapi/Dom/Selection/index.html new file mode 100644 index 000000000..90e3057aa --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Selection/index.html @@ -0,0 +1,8 @@ + +Selection (docs.findlib-1.melange-webapi.Webapi.Dom.Selection)

Module Dom.Selection

type t = Dom.selection
val anchorNode : t -> Dom.node option
val anchorOffset : t -> int
val focusNode : t -> Dom.node option
val focusOffset : t -> int
val isCollapsed : t -> bool
val rangeCount : t -> int
val getRangeAt : int -> t -> Dom.range
val collapse : _ Dom.node_like -> int -> t -> unit
val extend : _ Dom.node_like -> int -> t -> unit
val collapseToStart : t -> unit
val collapseToEnd : t -> unit
val selectAllChildren : _ Dom.node_like -> t -> unit
val setBaseAndExtent : + _ Dom.node_like -> + int -> + _ Dom.node_like -> + int -> + t -> + unit
val addRange : Dom.range -> t -> unit
val removeRange : Dom.range -> t -> unit
val removeAllRanges : t -> unit
val deleteFromDocument : t -> unit
val toString : t -> string
val containsNode : _ Dom.node_like -> t -> bool
val containsNodePartly : _ Dom.node_like -> t -> bool
diff --git a/findlib-1/melange-webapi/Webapi/Dom/ShadowRoot/index.html b/findlib-1/melange-webapi/Webapi/Dom/ShadowRoot/index.html new file mode 100644 index 000000000..97e6e1f0d --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/ShadowRoot/index.html @@ -0,0 +1,512 @@ + +ShadowRoot (docs.findlib-1.melange-webapi.Webapi.Dom.ShadowRoot)

Module Dom.ShadowRoot

include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val getElementById : string -> t -> Dom.element option
include sig ... end
include sig ... end
val children : t -> Dom.htmlCollection
val firstElementChild : t -> Dom.element option
val lastElementChild : t -> Dom.element option
val childElementCount : t -> int
val querySelector : string -> t -> Dom.element option
val querySelectorAll : string -> t -> Dom.nodeList
val shadowRootMode : t -> Webapi__Dom__Types.shadowRootMode
val host : t -> Dom.element
diff --git a/findlib-1/melange-webapi/Webapi/Dom/StorageEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/StorageEvent/index.html new file mode 100644 index 000000000..dca1cc70a --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/StorageEvent/index.html @@ -0,0 +1,2 @@ + +StorageEvent (docs.findlib-1.melange-webapi.Webapi.Dom.StorageEvent)

Module Dom.StorageEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val key : t -> string
val newValue : t -> string Js.Nullable.t
val oldValue : t -> string Js.Nullable.t
val storageArea : t -> Dom.Storage.t
val url : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/SvgZoomEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/SvgZoomEvent/index.html new file mode 100644 index 000000000..9468a352e --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/SvgZoomEvent/index.html @@ -0,0 +1,2 @@ + +SvgZoomEvent (docs.findlib-1.melange-webapi.Webapi.Dom.SvgZoomEvent)

Module Dom.SvgZoomEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
include sig ... end
val detail : t -> int
val view : t -> Dom.window
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val zoomRectScreen : t -> Dom.svgRect
val previousScale : t -> float
val previousTranslate : t -> Dom.svgPoint
val newScale : t -> float
val newTranslate : t -> Dom.svgPoint
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Text/Impl/argument-1-T/index.html b/findlib-1/melange-webapi/Webapi/Dom/Text/Impl/argument-1-T/index.html new file mode 100644 index 000000000..3c502895c --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Text/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.melange-webapi.Webapi.Dom.Text.Impl.T)

Parameter Impl.T

type t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Text/Impl/index.html b/findlib-1/melange-webapi/Webapi/Dom/Text/Impl/index.html new file mode 100644 index 000000000..c7e28b6f6 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Text/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.findlib-1.melange-webapi.Webapi.Dom.Text.Impl)

Module Text.Impl

Parameters

module T : sig ... end

Signature

val ofNode : Dom.node -> T.t option
val splitText : offset:int -> unit -> T.t -> Dom.text
val wholeText : T.t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Text/index.html b/findlib-1/melange-webapi/Webapi/Dom/Text/index.html new file mode 100644 index 000000000..02bc01947 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Text/index.html @@ -0,0 +1,512 @@ + +Text (docs.findlib-1.melange-webapi.Webapi.Dom.Text)

Module Dom.Text

module Impl (T : sig ... end) : sig ... end
type t = Dom.text
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : 'a Dom.node_like -> t -> bool
val getRootNode : t -> Dom.node
val getRootNodeComposed : t -> Dom.node
val hasChildNodes : t -> bool
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : t -> string option
val lookupPrefix : t -> string
val normalize : t -> unit
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val data : t -> string
val length : t -> int
val substringData : offset:int -> count:int -> t -> string
val appendData : string -> t -> unit
val insertData : offset:int -> string -> t -> unit
val deleteData : offset:int -> count:int -> t -> unit
val replaceData : offset:int -> count:int -> string -> t -> unit
include sig ... end
val previousElementSibling : t -> Dom.element option
val nextElementSibling : t -> Dom.element option
include sig ... end
val remove : t -> unit
include sig ... end
val assignedSlot : t -> Dom.htmlSlotElement option
include sig ... end
val ofNode : Dom.node -> t option
val splitText : offset:int -> unit -> t -> Dom.text
val wholeText : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/TimeEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/TimeEvent/index.html new file mode 100644 index 000000000..276be2ac3 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/TimeEvent/index.html @@ -0,0 +1,2 @@ + +TimeEvent (docs.findlib-1.melange-webapi.Webapi.Dom.TimeEvent)

Module Dom.TimeEvent

type t = Dom.timeEvent
include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val detail : t -> int
val view : t -> Dom.window
diff --git a/findlib-1/melange-webapi/Webapi/Dom/TouchEvent/Impl/argument-1-T/index.html b/findlib-1/melange-webapi/Webapi/Dom/TouchEvent/Impl/argument-1-T/index.html new file mode 100644 index 000000000..aeb0562cf --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/TouchEvent/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.melange-webapi.Webapi.Dom.TouchEvent.Impl.T)

Parameter Impl.T

type t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/TouchEvent/Impl/index.html b/findlib-1/melange-webapi/Webapi/Dom/TouchEvent/Impl/index.html new file mode 100644 index 000000000..57314b7a0 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/TouchEvent/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.findlib-1.melange-webapi.Webapi.Dom.TouchEvent.Impl)

Module TouchEvent.Impl

Parameters

module T : sig ... end

Signature

val altKey : T.t -> bool
val changedTouches : T.t -> touchList
val ctrlKey : T.t -> bool
val metaKey : T.t -> bool
val shiftKey : T.t -> bool
val targetTouches : T.t -> touchList
val touches : T.t -> touchList
diff --git a/findlib-1/melange-webapi/Webapi/Dom/TouchEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/TouchEvent/index.html new file mode 100644 index 000000000..fc14d2902 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/TouchEvent/index.html @@ -0,0 +1,2 @@ + +TouchEvent (docs.findlib-1.melange-webapi.Webapi.Dom.TouchEvent)

Module Dom.TouchEvent

type touchList
module Impl (T : sig ... end) : sig ... end
include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
include sig ... end
val detail : t -> int
val view : t -> Dom.window
include sig ... end
val altKey : t -> bool
val changedTouches : t -> touchList
val ctrlKey : t -> bool
val metaKey : t -> bool
val shiftKey : t -> bool
val targetTouches : t -> touchList
val touches : t -> touchList
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/TrackEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/TrackEvent/index.html new file mode 100644 index 000000000..ec61098ae --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/TrackEvent/index.html @@ -0,0 +1,2 @@ + +TrackEvent (docs.findlib-1.melange-webapi.Webapi.Dom.TrackEvent)

Module Dom.TrackEvent

type track
include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val track : t -> track
diff --git a/findlib-1/melange-webapi/Webapi/Dom/TransitionEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/TransitionEvent/index.html new file mode 100644 index 000000000..927dcba51 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/TransitionEvent/index.html @@ -0,0 +1,2 @@ + +TransitionEvent (docs.findlib-1.melange-webapi.Webapi.Dom.TransitionEvent)

Module Dom.TransitionEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val propertyName : t -> string
val elapsedTime : t -> float
val pseudoElement : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/TreeWalker/index.html b/findlib-1/melange-webapi/Webapi/Dom/TreeWalker/index.html new file mode 100644 index 000000000..1bff1f548 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/TreeWalker/index.html @@ -0,0 +1,2 @@ + +TreeWalker (docs.findlib-1.melange-webapi.Webapi.Dom.TreeWalker)

Module Dom.TreeWalker

val root : t -> Dom.node
val whatToShow : t -> Webapi__Dom__Types.WhatToShow.t
val filter : t -> Dom.nodeFilter option
val currentNode : t -> Dom.node
val setCurrentNode : t -> Dom.node -> unit
val parentNode : t -> Dom.node option
val firstChild : t -> Dom.node option
val lastChild : t -> Dom.node option
val previousSibling : t -> Dom.node option
val nextSibling : t -> Dom.node option
val previousNode : t -> Dom.node option
val nextNode : t -> Dom.node option
diff --git a/findlib-1/melange-webapi/Webapi/Dom/UiEvent/Impl/argument-1-T/index.html b/findlib-1/melange-webapi/Webapi/Dom/UiEvent/Impl/argument-1-T/index.html new file mode 100644 index 000000000..692e6117a --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/UiEvent/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.melange-webapi.Webapi.Dom.UiEvent.Impl.T)

Parameter Impl.T

type t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/UiEvent/Impl/index.html b/findlib-1/melange-webapi/Webapi/Dom/UiEvent/Impl/index.html new file mode 100644 index 000000000..e6ba9d697 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/UiEvent/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.findlib-1.melange-webapi.Webapi.Dom.UiEvent.Impl)

Module UiEvent.Impl

Parameters

module T : sig ... end

Signature

val detail : T.t -> int
val view : T.t -> Dom.window
diff --git a/findlib-1/melange-webapi/Webapi/Dom/UiEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/UiEvent/index.html new file mode 100644 index 000000000..b7233af40 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/UiEvent/index.html @@ -0,0 +1,2 @@ + +UiEvent (docs.findlib-1.melange-webapi.Webapi.Dom.UiEvent)

Module Dom.UiEvent

module Impl (T : sig ... end) : sig ... end
type t = Dom.uiEvent
include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
include sig ... end
val detail : t -> int
val view : t -> Dom.window
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/ValidityState/index.html b/findlib-1/melange-webapi/Webapi/Dom/ValidityState/index.html new file mode 100644 index 000000000..f60c8f334 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/ValidityState/index.html @@ -0,0 +1,2 @@ + +ValidityState (docs.findlib-1.melange-webapi.Webapi.Dom.ValidityState)

Module Dom.ValidityState

type t
val valueMissing : t -> bool
val typeMismatch : t -> bool
val patternMismatch : t -> bool
val tooLong : t -> bool
val tooShort : t -> bool
val rangeUnderflow : t -> bool
val rangeOverflow : t -> bool
val stepMismatch : t -> bool
val badInput : t -> bool
val customError : t -> bool
val valid : t -> bool
diff --git a/findlib-1/melange-webapi/Webapi/Dom/WebGlContextEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/WebGlContextEvent/index.html new file mode 100644 index 000000000..89af9ce48 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/WebGlContextEvent/index.html @@ -0,0 +1,2 @@ + +WebGlContextEvent (docs.findlib-1.melange-webapi.Webapi.Dom.WebGlContextEvent)

Module Dom.WebGlContextEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val statusMessage : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/Dom/WhatToShow/index.html b/findlib-1/melange-webapi/Webapi/Dom/WhatToShow/index.html new file mode 100644 index 000000000..fb247e9c4 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/WhatToShow/index.html @@ -0,0 +1,2 @@ + +WhatToShow (docs.findlib-1.melange-webapi.Webapi.Dom.WhatToShow)

Module Dom.WhatToShow

type t
val _All : t
val _Element : t
val _Attribute : t
val _Text : t
val _CDATASection : t
val _EntityReference : t
val _Entity : t
val _ProcessingInstruction : t
val _Comment : t
val _Document : t
val _DocumentType : t
val _DocumentFragment : t
val _Notation : t
val many : t list -> t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/WheelEvent/index.html b/findlib-1/melange-webapi/Webapi/Dom/WheelEvent/index.html new file mode 100644 index 000000000..703901072 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/WheelEvent/index.html @@ -0,0 +1,2 @@ + +WheelEvent (docs.findlib-1.melange-webapi.Webapi.Dom.WheelEvent)

Module Dom.WheelEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : t -> unit
val stopImmediatePropagation : t -> unit
val stopPropagation : t -> unit
include sig ... end
val detail : t -> int
val view : t -> Dom.window
include sig ... end
val altKey : t -> bool
val button : t -> int
val buttons : t -> int
val clientX : t -> int
val clientY : t -> int
val ctrlKey : t -> bool
val metaKey : t -> bool
val movementX : t -> int
val movementY : t -> int
val offsetX : t -> int
val offsetY : t -> int
val pageX : t -> int
val pageY : t -> int
val region : t -> string option
val relatedTarget : t -> Dom.eventTarget option
val screenX : t -> int
val screenY : t -> int
val shiftKey : t -> bool
val x : t -> int
val y : t -> int
val getModifierState : Webapi__Dom__Types.modifierKey -> t -> bool
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val deltaX : t -> float
val deltaY : t -> float
val deltaZ : t -> float
val deltaMode : t -> Webapi__Dom__Types.deltaMode
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Window/Impl/argument-1-T/index.html b/findlib-1/melange-webapi/Webapi/Dom/Window/Impl/argument-1-T/index.html new file mode 100644 index 000000000..54eae7851 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Window/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.melange-webapi.Webapi.Dom.Window.Impl.T)

Parameter Impl.T

type t
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Window/Impl/index.html b/findlib-1/melange-webapi/Webapi/Dom/Window/Impl/index.html new file mode 100644 index 000000000..539b0a21e --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Window/Impl/index.html @@ -0,0 +1,23 @@ + +Impl (docs.findlib-1.melange-webapi.Webapi.Dom.Window.Impl)

Module Window.Impl

Parameters

module T : sig ... end

Signature

type t_window = T.t
val console : t_window -> console
val crypto : t_window -> crypto
val document : t_window -> Dom.document
val frameElement : t_window -> Dom.element option
val frames : t_window -> frameList
val fullScreen : t_window -> bool
val history : t_window -> Dom.history
val innerWidth : t_window -> int
val innerHeight : t_window -> int
val isSecureContext : t_window -> bool
val length : t_window -> int
val location : t_window -> Dom.location
val setLocation : t_window -> string -> unit
val locationbar : t_window -> locationbar
val menubar : t_window -> menubar
val name : t_window -> string
val setName : t_window -> string -> unit
val navigator : t_window -> navigator
val opener : t_window -> Dom.window option
val outerWidth : t_window -> int
val outerHeight : t_window -> int
val pageXOffset : t_window -> float
val pageYOffset : t_window -> float
val parent : t_window -> Dom.window
val performance : t_window -> Webapi__Performance.t
val personalbar : t_window -> personalbar
val screen : t_window -> screen
val screenX : t_window -> int
val screenY : t_window -> int
val scrollbars : t_window -> scrollbars
val scrollX : t_window -> float
val scrollY : t_window -> float
val self : t_window -> Dom.window
val speechSynthesis : t_window -> speechSynthesis
val status : t_window -> string
val setStatus : t_window -> string -> unit
val statusbar : t_window -> statusbar
val toolbar : t_window -> toolbar
val top : t_window -> Dom.window
val window : t_window -> t_window
val alert : string -> t_window -> unit
val blur : t_window -> unit
val cancelIdleCallback : idleCallbackId -> t_window -> unit
val close : t_window -> unit
val confirm : string -> t_window -> bool
val focus : t_window -> unit
val getComputedStyle : Dom.element -> t_window -> Dom.cssStyleDeclaration
val getComputedStyleWithPseudoElement : + Dom.element -> + string -> + t_window -> + Dom.cssStyleDeclaration
val getSelection : t_window -> Dom.selection
val matchMedia : string -> t_window -> mediaQueryList
val moveBy : int -> int -> t_window -> unit
val moveTo : int -> int -> t_window -> unit
val open_ : + url:string -> + name:string -> + ?features:string -> + t_window -> + Dom.window option
val postMessage : 'a -> string -> t_window -> unit
val postMessageWithTransfers : + 'a -> + string -> + transferable array -> + t_window -> + unit
val print : t_window -> unit
val prompt : string -> t_window -> string
val promptWithDefault : string -> string -> t_window -> string
val requestIdleCallback : (idleDeadline -> unit) -> t_window -> idleCallbackId
val requestIdleCallbackWithOptions : + (idleDeadline -> unit) -> + < timeout : int > Js.t -> + t_window -> + idleCallbackId
val resizeBy : int -> int -> t_window -> unit
val resizeTo : int -> int -> t_window -> unit
val scroll : float -> float -> t_window -> unit
val scrollBy : float -> float -> t_window -> unit
val scrollTo : float -> float -> t_window -> unit
val stop : t_window -> unit
val addPopStateEventListener : (Dom.popStateEvent -> unit) -> t_window -> unit
val removePopStateEventListener : + (Dom.popStateEvent -> unit) -> + t_window -> + unit
val setOnLoad : t_window -> (unit -> unit) -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/Window/index.html b/findlib-1/melange-webapi/Webapi/Dom/Window/index.html new file mode 100644 index 000000000..6a447506f --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/Window/index.html @@ -0,0 +1,539 @@ + +Window (docs.findlib-1.melange-webapi.Webapi.Dom.Window)

Module Dom.Window

type console
type crypto
type frameList
type idleDeadline
type locationbar
type menubar
type navigator
type personalbar
type screen
type scrollbars
type speechSynthesis
type statusbar
type toolbar
type mediaQueryList
type transferable
type idleCallbackId
module Impl (T : sig ... end) : sig ... end
type t = Dom.window
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> t -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val addSelectionChangeEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addSelectionChangeEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectionChangeEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val removeSelectionChangeEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeSelectionChangeEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectionChangeEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
include sig ... end
type t_window = t
val console : t_window -> console
val crypto : t_window -> crypto
val document : t_window -> Dom.document
val frameElement : t_window -> Dom.element option
val frames : t_window -> frameList
val fullScreen : t_window -> bool
val history : t_window -> Dom.history
val innerWidth : t_window -> int
val innerHeight : t_window -> int
val isSecureContext : t_window -> bool
val length : t_window -> int
val location : t_window -> Dom.location
val setLocation : t_window -> string -> unit
val locationbar : t_window -> locationbar
val menubar : t_window -> menubar
val name : t_window -> string
val setName : t_window -> string -> unit
val navigator : t_window -> navigator
val opener : t_window -> Dom.window option
val outerWidth : t_window -> int
val outerHeight : t_window -> int
val pageXOffset : t_window -> float
val pageYOffset : t_window -> float
val parent : t_window -> Dom.window
val performance : t_window -> Webapi__Performance.t
val personalbar : t_window -> personalbar
val screen : t_window -> screen
val screenX : t_window -> int
val screenY : t_window -> int
val scrollbars : t_window -> scrollbars
val scrollX : t_window -> float
val scrollY : t_window -> float
val self : t_window -> Dom.window
val speechSynthesis : t_window -> speechSynthesis
val status : t_window -> string
val setStatus : t_window -> string -> unit
val statusbar : t_window -> statusbar
val toolbar : t_window -> toolbar
val top : t_window -> Dom.window
val window : t_window -> t_window
val alert : string -> t_window -> unit
val blur : t_window -> unit
val cancelIdleCallback : idleCallbackId -> t_window -> unit
val close : t_window -> unit
val confirm : string -> t_window -> bool
val focus : t_window -> unit
val getComputedStyle : Dom.element -> t_window -> Dom.cssStyleDeclaration
val getComputedStyleWithPseudoElement : + Dom.element -> + string -> + t_window -> + Dom.cssStyleDeclaration
val getSelection : t_window -> Dom.selection
val matchMedia : string -> t_window -> mediaQueryList
val moveBy : int -> int -> t_window -> unit
val moveTo : int -> int -> t_window -> unit
val open_ : + url:string -> + name:string -> + ?features:string -> + t_window -> + Dom.window option
val postMessage : 'a -> string -> t_window -> unit
val postMessageWithTransfers : + 'a -> + string -> + transferable array -> + t_window -> + unit
val print : t_window -> unit
val prompt : string -> t_window -> string
val promptWithDefault : string -> string -> t_window -> string
val requestIdleCallback : (idleDeadline -> unit) -> t_window -> idleCallbackId
val requestIdleCallbackWithOptions : + (idleDeadline -> unit) -> + < timeout : int > Js.t -> + t_window -> + idleCallbackId
val resizeBy : int -> int -> t_window -> unit
val resizeTo : int -> int -> t_window -> unit
val scroll : float -> float -> t_window -> unit
val scrollBy : float -> float -> t_window -> unit
val scrollTo : float -> float -> t_window -> unit
val stop : t_window -> unit
val addPopStateEventListener : (Dom.popStateEvent -> unit) -> t_window -> unit
val removePopStateEventListener : + (Dom.popStateEvent -> unit) -> + t_window -> + unit
val setOnLoad : t_window -> (unit -> unit) -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Dom/index.html b/findlib-1/melange-webapi/Webapi/Dom/index.html new file mode 100644 index 000000000..769bde280 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/index.html @@ -0,0 +1,2 @@ + +Dom (docs.findlib-1.melange-webapi.Webapi.Dom)

Module Webapi.Dom

module AnimationEvent : sig ... end
module Attr : sig ... end
module BeforeUnloadEvent : sig ... end
module CdataSection : sig ... end
module CharacterData : sig ... end
module Comment : sig ... end
module CssStyleDeclaration : sig ... end
module ClipboardEvent : sig ... end
module CloseEvent : sig ... end
module CompositionEvent : sig ... end
module CustomEvent : sig ... end
module Document : sig ... end
module DocumentFragment : sig ... end
module DocumentType : sig ... end
module DomImplementation : sig ... end
module DomRect : sig ... end
module DomStringMap : sig ... end
module DomTokenList : sig ... end
module DragEvent : sig ... end
module Element : sig ... end
module ErrorEvent : sig ... end
module Event : sig ... end
module EventTarget : sig ... end
module FocusEvent : sig ... end
module History : sig ... end
module HtmlCollection : sig ... end
module HtmlDocument : sig ... end
module HtmlElement : sig ... end
module HtmlFormElement : sig ... end
module HtmlImageElement : sig ... end
module HtmlInputElement : sig ... end
module IdbVersionChangeEvent : sig ... end
module Image : sig ... end
module InputEvent : sig ... end
module KeyboardEvent : sig ... end
module Location : sig ... end
module MouseEvent : sig ... end
module MutationObserver : sig ... end
module MutationRecord : sig ... end
module NamedNodeMap : sig ... end
module Node : sig ... end
module NodeFilter : sig ... end
module NodeIterator : sig ... end
module NodeList : sig ... end
module PageTransitionEvent : sig ... end
module PointerEvent : sig ... end
module PopStateEvent : sig ... end
module ProcessingInstruction : sig ... end
module ProgressEvent : sig ... end
module Range : sig ... end
module RelatedEvent : sig ... end
module Selection : sig ... end
module ShadowRoot : sig ... end
module StorageEvent : sig ... end
module SvgZoomEvent : sig ... end
module Text : sig ... end
module TimeEvent : sig ... end
module TouchEvent : sig ... end
module TrackEvent : sig ... end
module TransitionEvent : sig ... end
module TreeWalker : sig ... end
module UiEvent : sig ... end
module ValidityState : sig ... end
module WebGlContextEvent : sig ... end
module WheelEvent : sig ... end
module Window : sig ... end
type compareHow =
  1. | StartToStart
  2. | StartToEnd
  3. | EndToEnd
  4. | EndToStart
val encodeCompareHow : compareHow -> int
type compareResult =
  1. | Before
  2. | Equal
  3. | After
  4. | Unknown
val decodeCompareResult : int -> compareResult
type compatMode =
  1. | BackCompat
  2. | CSS1Compat
  3. | Unknown
val decodeCompatMode : string -> compatMode
type contentEditable =
  1. | True
  2. | False
  3. | Inherit
  4. | Unknown
val encodeContentEditable : contentEditable -> string
val decodeContentEditable : string -> contentEditable
type deltaMode =
  1. | Pixel
  2. | Line
  3. | Page
val decodeDeltaMode : int -> deltaMode
type designMode =
  1. | On
  2. | Off
  3. | Unknown
val encodeDesignMode : designMode -> string
val decodeDesignMode : string -> designMode
type dir =
  1. | Ltr
  2. | Rtl
  3. | Unknown
val encodeDir : dir -> string
val decodeDir : string -> dir
module EventPhase : sig ... end
type eventPhase = EventPhase.t =
  1. | None
  2. | CapturingPhase
  3. | AtTarget
  4. | BubblingPhase
  5. | Unknown
  • deprecated Use EventPhase.t
type filterAction =
  1. | Accept
  2. | Reject
  3. | Skip
val encodeFilterAction : filterAction -> int
type insertPosition =
  1. | BeforeBegin
  2. | AfterBegin
  3. | BeforeEnd
  4. | AfterEnd
val encodeInsertPosition : insertPosition -> string
type modifierKey =
  1. | Alt
  2. | AltGraph
  3. | CapsLock
  4. | Control
  5. | Fn
  6. | FnLock
  7. | Hyper
  8. | Meta
  9. | NumLock
  10. | ScrollLock
  11. | Shift
  12. | Super
  13. | Symbol
  14. | SymbolLock
val encodeModifierKey : modifierKey -> string
type nodeType =
  1. | Element
  2. | Attribute
  3. | Text
  4. | CDATASection
  5. | EntityReference
  6. | Entity
  7. | ProcessingInstruction
  8. | Comment
  9. | Document
  10. | DocumentType
  11. | DocumentFragment
  12. | Notation
  13. | Unknown
val decodeNodeType : int -> nodeType
type pointerType =
  1. | Mouse
  2. | Pen
  3. | Touch
  4. | Unknown
val decodePointerType : string -> pointerType
type readyState =
  1. | Loading
  2. | Interactive
  3. | Complete
  4. | Unknown
val decodeReadyState : string -> readyState
type shadowRootMode =
  1. | Open
  2. | Closed
val decodeShadowRootMode : string -> shadowRootMode
type visibilityState =
  1. | Visible
  2. | Hidden
  3. | Prerender
  4. | Unloaded
  5. | Unknown
val decodeVisibilityState : string -> visibilityState
type image
module type WhatToShowT = sig ... end
val window : Dom.window
val document : Dom.document
val history : Dom.history
val location : Dom.location
diff --git a/findlib-1/melange-webapi/Webapi/Dom/module-type-WhatToShowT/index.html b/findlib-1/melange-webapi/Webapi/Dom/module-type-WhatToShowT/index.html new file mode 100644 index 000000000..1f26e8035 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Dom/module-type-WhatToShowT/index.html @@ -0,0 +1,2 @@ + +WhatToShowT (docs.findlib-1.melange-webapi.Webapi.Dom.WhatToShowT)

Module type Dom.WhatToShowT

type t
val _All : t
val _Element : t
val _Attribute : t
val _Text : t
val _CDATASection : t
val _EntityReference : t
val _Entity : t
val _ProcessingInstruction : t
val _Comment : t
val _Document : t
val _DocumentType : t
val _DocumentFragment : t
val _Notation : t
val many : t list -> t
diff --git a/findlib-1/melange-webapi/Webapi/File/index.html b/findlib-1/melange-webapi/Webapi/File/index.html new file mode 100644 index 000000000..eb945e49c --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/File/index.html @@ -0,0 +1,2 @@ + +File (docs.findlib-1.melange-webapi.Webapi.File)

Module Webapi.File

type t = Fetch.file

Blob superclass

include sig ... end
val arrayBuffer : t -> Js.Typed_array.ArrayBuffer.t Js.Promise.t
val size : t -> float
val slice : ?start:int -> ?end_:int -> ?contentType:string -> t -> t
val stream : t -> Fetch.readableStream
val text : t -> string Js.Promise.t
val type_ : t -> string
val _type : t -> string
  • deprecated Use [type_] instead

File class

val lastModified : t -> float
  • since 0.18.0
val name : t -> string
val preview : t -> string
diff --git a/findlib-1/melange-webapi/Webapi/FormData/index.html b/findlib-1/melange-webapi/Webapi/FormData/index.html new file mode 100644 index 000000000..01aa323da --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/FormData/index.html @@ -0,0 +1,2 @@ + +FormData (docs.findlib-1.melange-webapi.Webapi.FormData)

Module Webapi.FormData

Re-export from bs-fetch for convenience. To use, you will also need to add the bs-fetch package as a dependency.

To get the FormData of an HTML form, use Webapi.Dom.HtmlFormElement.data.

include module type of struct include Fetch.FormData end
module EntryValue = Fetch.FormData.EntryValue
module Iterator = Fetch.FormData.Iterator
val make : unit -> t
val append : string -> string -> t -> unit
val delete : string -> t -> unit
val get : string -> t -> EntryValue.t option
val getAll : string -> t -> EntryValue.t array
val set : string -> string -> t -> unit
val has : string -> t -> bool
val keys : t -> string Iterator.t
val values : t -> EntryValue.t Iterator.t
val appendObject : string -> < .. > Js.t -> ?filename:string -> t -> unit

This is for React Native compatibility purposes

val appendBlob : string -> Fetch.blob -> ?filename:string -> t -> unit
val appendFile : string -> Fetch.file -> ?filename:string -> t -> unit
val setObject : string -> < .. > Js.t -> ?filename:string -> t -> unit

This is for React Native compatibility purposes

val setBlob : string -> Fetch.blob -> ?filename:string -> t -> unit
val setFile : string -> Fetch.file -> ?filename:string -> t -> unit
val entries : t -> (string * EntryValue.t) Iterator.t
val makeWithHtmlFormElement : Dom.HtmlFormElement.t -> t
diff --git a/findlib-1/melange-webapi/Webapi/Performance/index.html b/findlib-1/melange-webapi/Webapi/Performance/index.html new file mode 100644 index 000000000..aefb7e0dd --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Performance/index.html @@ -0,0 +1,2 @@ + +Performance (docs.findlib-1.melange-webapi.Webapi.Performance)

Module Webapi.Performance

type t
val now : t -> float
diff --git a/findlib-1/melange-webapi/Webapi/ReadableStream/BYOBReader/index.html b/findlib-1/melange-webapi/Webapi/ReadableStream/BYOBReader/index.html new file mode 100644 index 000000000..5cab7ba48 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/ReadableStream/BYOBReader/index.html @@ -0,0 +1,2 @@ + +BYOBReader (docs.findlib-1.melange-webapi.Webapi.ReadableStream.BYOBReader)

Module ReadableStream.BYOBReader

include Reader
type t
type closed
val closed : t -> closed Js.Promise.t
val cancel : t -> unit Js.Promise.t
val cancelWith : string -> t -> string Js.Promise.t
val releaseLock : t -> unit
diff --git a/findlib-1/melange-webapi/Webapi/ReadableStream/DefaultReader/index.html b/findlib-1/melange-webapi/Webapi/ReadableStream/DefaultReader/index.html new file mode 100644 index 000000000..314fbfdc9 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/ReadableStream/DefaultReader/index.html @@ -0,0 +1,2 @@ + +DefaultReader (docs.findlib-1.melange-webapi.Webapi.ReadableStream.DefaultReader)

Module ReadableStream.DefaultReader

include Reader
type t
type closed
val closed : t -> closed Js.Promise.t
val cancel : t -> unit Js.Promise.t
val cancelWith : string -> t -> string Js.Promise.t
val releaseLock : t -> unit
val read : t -> string Fetch__Iterator.Next.t Js.Promise.t
diff --git a/findlib-1/melange-webapi/Webapi/ReadableStream/index.html b/findlib-1/melange-webapi/Webapi/ReadableStream/index.html new file mode 100644 index 000000000..a871f6883 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/ReadableStream/index.html @@ -0,0 +1,2 @@ + +ReadableStream (docs.findlib-1.melange-webapi.Webapi.ReadableStream)

Module Webapi.ReadableStream

module type Reader = sig ... end
module DefaultReader : sig ... end
module BYOBReader : sig ... end
val locked : t -> bool
val cancel : t -> unit Js.Promise.t
val cancelWith : string -> t -> string Js.Promise.t
val getReader : t -> DefaultReader.t
val getReaderBYOB : t -> BYOBReader.t
val tee : t -> t * t
diff --git a/findlib-1/melange-webapi/Webapi/ReadableStream/module-type-Reader/index.html b/findlib-1/melange-webapi/Webapi/ReadableStream/module-type-Reader/index.html new file mode 100644 index 000000000..32371ceb2 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/ReadableStream/module-type-Reader/index.html @@ -0,0 +1,2 @@ + +Reader (docs.findlib-1.melange-webapi.Webapi.ReadableStream.Reader)

Module type ReadableStream.Reader

type t
type closed
val closed : t -> closed Js.Promise.t
val cancel : t -> unit Js.Promise.t
val cancelWith : string -> t -> string Js.Promise.t
val releaseLock : t -> unit
diff --git a/findlib-1/melange-webapi/Webapi/ResizeObserver/ResizeObserverEntry/index.html b/findlib-1/melange-webapi/Webapi/ResizeObserver/ResizeObserverEntry/index.html new file mode 100644 index 000000000..3109e110b --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/ResizeObserver/ResizeObserverEntry/index.html @@ -0,0 +1,2 @@ + +ResizeObserverEntry (docs.findlib-1.melange-webapi.Webapi.ResizeObserver.ResizeObserverEntry)

Module ResizeObserver.ResizeObserverEntry

type t
val contentRect : t -> Dom.domRect
val target : t -> Dom.element
diff --git a/findlib-1/melange-webapi/Webapi/ResizeObserver/index.html b/findlib-1/melange-webapi/Webapi/ResizeObserver/index.html new file mode 100644 index 000000000..e94e0872e --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/ResizeObserver/index.html @@ -0,0 +1,2 @@ + +ResizeObserver (docs.findlib-1.melange-webapi.Webapi.ResizeObserver)

Module Webapi.ResizeObserver

module ResizeObserverEntry : sig ... end
type t
val make : (ResizeObserverEntry.t array -> unit) -> t
val makeWithObserver : (ResizeObserverEntry.t array -> t -> unit) -> t
val disconnect : t -> unit
val observe : t -> Dom.element -> unit
val unobserve : t -> Dom.element -> unit
diff --git a/findlib-1/melange-webapi/Webapi/Url/URLSearchParams/index.html b/findlib-1/melange-webapi/Webapi/Url/URLSearchParams/index.html new file mode 100644 index 000000000..e799ecd88 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Url/URLSearchParams/index.html @@ -0,0 +1,2 @@ + +URLSearchParams (docs.findlib-1.melange-webapi.Webapi.Url.URLSearchParams)

Module Url.URLSearchParams

type t
val make : string -> t
val makeWithDict : string Js.Dict.t -> t
val makeWithArray : (string * string) array -> t
val append : string -> string -> t -> unit
val delete : string -> t -> unit
val entries : t -> (string * string) Js.Array.array_like
val forEach : (string -> string -> unit) -> t -> unit
val get : string -> t -> string option
val getAll : string -> t -> string array
val has : string -> t -> bool
val keys : t -> string Js.Array.array_like
val set : string -> string -> t -> unit
val sort : t -> unit
val toString : t -> string
val values : t -> string Js.Array.array_like
diff --git a/findlib-1/melange-webapi/Webapi/Url/index.html b/findlib-1/melange-webapi/Webapi/Url/index.html new file mode 100644 index 000000000..6fc4d0cfd --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/Url/index.html @@ -0,0 +1,2 @@ + +Url (docs.findlib-1.melange-webapi.Webapi.Url)

Module Webapi.Url

module URLSearchParams : sig ... end
type t
val make : string -> t
val makeWithBase : string -> string -> t

Deprecated, use makeWith instead.

  • deprecated Use [makeWith] instead.
val makeWith : string -> base:string -> t
  • since 0.19.0
val hash : t -> string
val setHash : t -> string -> unit
val host : t -> string
val setHost : t -> string -> unit
val hostname : t -> string
val setHostname : t -> string -> unit
val href : t -> string
val setHref : t -> string -> unit
val origin : t -> string
val password : t -> string
val setPassword : t -> string -> unit
val pathname : t -> string
val setPathname : t -> string -> unit
val port : t -> string
val setPort : t -> string -> unit
val protocol : t -> string
val setProtocol : t -> string -> unit
val setSearch : t -> string -> unit
val searchParams : t -> URLSearchParams.t
val username : t -> string
val setUsername : t -> string -> unit
val toJson : t -> string
val createObjectURL : Fetch.file -> string
val revokeObjectURL : string -> unit
diff --git a/findlib-1/melange-webapi/Webapi/index.html b/findlib-1/melange-webapi/Webapi/index.html new file mode 100644 index 000000000..553d05569 --- /dev/null +++ b/findlib-1/melange-webapi/Webapi/index.html @@ -0,0 +1,2 @@ + +Webapi (docs.findlib-1.melange-webapi.Webapi)

Module Webapi

module Base64 : sig ... end
module Blob : sig ... end
module Canvas : sig ... end
module Dom : sig ... end
module File : sig ... end
module FormData : sig ... end

Re-export from bs-fetch for convenience. To use, you will also need to add the bs-fetch package as a dependency.

module Iterator = FormData.Iterator

Re-export from bs-fetch for convenience. See also FormData.

module Performance : sig ... end
module ReadableStream : sig ... end
module ResizeObserver : sig ... end
module Url : sig ... end
type rafId
val requestAnimationFrame : (float -> unit) -> unit
val requestCancellableAnimationFrame : (float -> unit) -> rafId
val cancelAnimationFrame : rafId -> unit
diff --git a/findlib-1/melange-webapi/index.html b/findlib-1/melange-webapi/index.html new file mode 100644 index 000000000..b7e0e087a --- /dev/null +++ b/findlib-1/melange-webapi/index.html @@ -0,0 +1,2 @@ + +melange-webapi (docs.findlib-1.melange-webapi)

Package melange-webapi

Library melange-webapi

The entry point of this library is the module: Webapi.

diff --git a/findlib-1/melange/Stdlib/Arg/index.html b/findlib-1/melange/Stdlib/Arg/index.html new file mode 100644 index 000000000..32267c9ee --- /dev/null +++ b/findlib-1/melange/Stdlib/Arg/index.html @@ -0,0 +1,38 @@ + +Arg (docs.findlib-1.melange.Stdlib.Arg)

Module Stdlib.Arg

Parsing of command line arguments.

This module provides a general mechanism for extracting options and arguments from the command line to the program. For example:

let usage_msg = "append [-verbose] <file1> [<file2>] ... -o <output>"
+let verbose = ref false
+let input_files = ref []
+let output_file = ref ""
+
+let anon_fun filename =
+  input_files := filename::!input_files
+
+let speclist =
+  [("-verbose", Arg.Set verbose, "Output debug information");
+   ("-o", Arg.Set_string output_file, "Set output file name")]
+
+let () =
+  Arg.parse speclist anon_fun usage_msg;
+  (* Main functionality here *)

Syntax of command lines: A keyword is a character string starting with a -. An option is a keyword alone or followed by an argument. The types of keywords are: Unit, Bool, Set, Clear, String, Set_string, Int, Set_int, Float, Set_float, Tuple, Symbol, Rest, Rest_all and Expand.

Unit, Set and Clear keywords take no argument.

A Rest or Rest_all keyword takes the remainder of the command line as arguments. (More explanations below.)

Every other keyword takes the following word on the command line as argument. For compatibility with GNU getopt_long, keyword=arg is also allowed. Arguments not preceded by a keyword are called anonymous arguments.

Examples (cmd is assumed to be the command name):

Rest takes a function that is called repeatedly for each remaining command line argument. Rest_all takes a function that is called once, with the list of all remaining arguments.

Note that if no arguments follow a Rest keyword then the function is not called at all whereas the function for a Rest_all keyword is called with an empty list.

type spec =
  1. | Unit of unit -> unit
    (*

    Call the function with unit argument

    *)
  2. | Bool of bool -> unit
    (*

    Call the function with a bool argument

    *)
  3. | Set of bool ref
    (*

    Set the reference to true

    *)
  4. | Clear of bool ref
    (*

    Set the reference to false

    *)
  5. | String of string -> unit
    (*

    Call the function with a string argument

    *)
  6. | Set_string of string ref
    (*

    Set the reference to the string argument

    *)
  7. | Int of int -> unit
    (*

    Call the function with an int argument

    *)
  8. | Set_int of int ref
    (*

    Set the reference to the int argument

    *)
  9. | Float of float -> unit
    (*

    Call the function with a float argument

    *)
  10. | Set_float of float ref
    (*

    Set the reference to the float argument

    *)
  11. | Tuple of spec list
    (*

    Take several arguments according to the spec list

    *)
  12. | Symbol of string list * string -> unit
    (*

    Take one of the symbols as argument and call the function with the symbol

    *)
  13. | Rest of string -> unit
    (*

    Stop interpreting keywords and call the function with each remaining argument

    *)
  14. | Rest_all of string list -> unit
    (*

    Stop interpreting keywords and call the function with all remaining arguments

    *)
  15. | Expand of string -> string array
    (*

    If the remaining arguments to process are of the form ["-foo"; "arg"] @ rest where "foo" is registered as Expand f, then the arguments f "arg" @ rest are processed. Only allowed in parse_and_expand_argv_dynamic.

    *)

The concrete type describing the behavior associated with a keyword.

type key = string
type doc = string
type usage_msg = string
type anon_fun = string -> unit
val parse : (key * spec * doc) list -> anon_fun -> usage_msg -> unit

Arg.parse speclist anon_fun usage_msg parses the command line. speclist is a list of triples (key, spec, doc). key is the option keyword, it must start with a '-' character. spec gives the option type and the function to call when this option is found on the command line. doc is a one-line description of this option. anon_fun is called on anonymous arguments. The functions in spec and anon_fun are called in the same order as their arguments appear on the command line.

If an error occurs, Arg.parse exits the program, after printing to standard error an error message as follows:

  • The reason for the error: unknown option, invalid or missing argument, etc.
  • usage_msg
  • The list of options, each followed by the corresponding doc string. Beware: options that have an empty doc string will not be included in the list.

For the user to be able to specify anonymous arguments starting with a -, include for example ("-", String anon_fun, doc) in speclist.

By default, parse recognizes two unit options, -help and --help, which will print to standard output usage_msg and the list of options, and exit the program. You can override this behaviour by specifying your own -help and --help options in speclist.

val parse_dynamic : + (key * spec * doc) list ref -> + anon_fun -> + usage_msg -> + unit

Same as Arg.parse, except that the speclist argument is a reference and may be updated during the parsing. A typical use for this feature is to parse command lines of the form:

  • command subcommand options where the list of options depends on the value of the subcommand argument.
  • since 4.01
val parse_argv : + ?current:int ref -> + string array -> + (key * spec * doc) list -> + anon_fun -> + usage_msg -> + unit

Arg.parse_argv ~current args speclist anon_fun usage_msg parses the array args as if it were the command line. It uses and updates the value of ~current (if given), or Arg.current. You must set it before calling parse_argv. The initial value of current is the index of the program name (argument 0) in the array. If an error occurs, Arg.parse_argv raises Arg.Bad with the error message as argument. If option -help or --help is given, Arg.parse_argv raises Arg.Help with the help message as argument.

val parse_argv_dynamic : + ?current:int ref -> + string array -> + (key * spec * doc) list ref -> + anon_fun -> + string -> + unit

Same as Arg.parse_argv, except that the speclist argument is a reference and may be updated during the parsing. See Arg.parse_dynamic.

  • since 4.01
val parse_and_expand_argv_dynamic : + int ref -> + string array ref -> + (key * spec * doc) list ref -> + anon_fun -> + string -> + unit

Same as Arg.parse_argv_dynamic, except that the argv argument is a reference and may be updated during the parsing of Expand arguments. See Arg.parse_argv_dynamic.

  • since 4.05
val parse_expand : (key * spec * doc) list -> anon_fun -> usage_msg -> unit

Same as Arg.parse, except that the Expand arguments are allowed and the current reference is not updated.

  • since 4.05
exception Help of string

Raised by Arg.parse_argv when the user asks for help.

exception Bad of string

Functions in spec or anon_fun can raise Arg.Bad with an error message to reject invalid arguments. Arg.Bad is also raised by Arg.parse_argv in case of an error.

val usage : (key * spec * doc) list -> usage_msg -> unit

Arg.usage speclist usage_msg prints to standard error an error message that includes the list of valid options. This is the same message that Arg.parse prints in case of error. speclist and usage_msg are the same as for Arg.parse.

val usage_string : (key * spec * doc) list -> usage_msg -> string

Returns the message that would have been printed by Arg.usage, if provided with the same parameters.

val align : ?limit:int -> (key * spec * doc) list -> (key * spec * doc) list

Align the documentation strings by inserting spaces at the first alignment separator (tab or, if tab is not found, space), according to the length of the keyword. Use a alignment separator as the first character in a doc string if you want to align the whole string. The doc strings corresponding to Symbol arguments are aligned on the next line.

  • parameter limit

    options with keyword and message longer than limit will not be used to compute the alignment.

val current : int ref

Position (in Sys.argv) of the argument being processed. You can change this value, e.g. to force Arg.parse to skip some arguments. Arg.parse uses the initial value of Arg.current as the index of argument 0 (the program name) and starts parsing arguments at the next element.

val read_arg : string -> string array

Arg.read_arg file reads newline-terminated command line arguments from file file.

  • since 4.05
val read_arg0 : string -> string array

Identical to Arg.read_arg but assumes null character terminated command line arguments.

  • since 4.05
val write_arg : string -> string array -> unit

Arg.write_arg file args writes the arguments args newline-terminated into the file file. If any of the arguments in args contains a newline, use Arg.write_arg0 instead.

  • since 4.05
val write_arg0 : string -> string array -> unit

Identical to Arg.write_arg but uses the null character for terminator instead of newline.

  • since 4.05
diff --git a/findlib-1/melange/Stdlib/Array/index.html b/findlib-1/melange/Stdlib/Array/index.html new file mode 100644 index 000000000..a9c82465b --- /dev/null +++ b/findlib-1/melange/Stdlib/Array/index.html @@ -0,0 +1,19 @@ + +Array (docs.findlib-1.melange.Stdlib.Array)

Module Stdlib.Array

Array operations.

The labeled version of this module can be used as described in the StdLabels module.

type 'a t = 'a array

An alias for the type of arrays.

val length : 'a array -> int

Return the length (number of elements) of the given array.

val get : 'a array -> int -> 'a

get a n returns the element number n of array a. The first element has number 0. The last element has number length a - 1. You can also write a.(n) instead of get a n.

val set : 'a array -> int -> 'a -> unit

set a n x modifies array a in place, replacing element number n with x. You can also write a.(n) <- x instead of set a n x.

val make : int -> 'a -> 'a array

make n x returns a fresh array of length n, initialized with x. All the elements of this new array are initially physically equal to x (in the sense of the == predicate). Consequently, if x is mutable, it is shared among all elements of the array, and modifying x through one of the array entries will modify all other entries at the same time.

  • raises Invalid_argument

    if n < 0 or n > Sys.max_array_length. If the value of x is a floating-point number, then the maximum size is only Sys.max_array_length / 2.

val create_float : int -> float array

create_float n returns a fresh float array of length n, with uninitialized data.

  • since 4.03
val init : int -> (int -> 'a) -> 'a array

init n f returns a fresh array of length n, with element number i initialized to the result of f i. In other terms, init n f tabulates the results of f applied in order to the integers 0 to n-1.

  • raises Invalid_argument

    if n < 0 or n > Sys.max_array_length. If the return type of f is float, then the maximum size is only Sys.max_array_length / 2.

val make_matrix : int -> int -> 'a -> 'a array array

make_matrix dimx dimy e returns a two-dimensional array (an array of arrays) with first dimension dimx and second dimension dimy. All the elements of this new matrix are initially physically equal to e. The element (x,y) of a matrix m is accessed with the notation m.(x).(y).

  • raises Invalid_argument

    if dimx or dimy is negative or greater than Sys.max_array_length. If the value of e is a floating-point number, then the maximum size is only Sys.max_array_length / 2.

val append : 'a array -> 'a array -> 'a array

append v1 v2 returns a fresh array containing the concatenation of the arrays v1 and v2.

val concat : 'a array list -> 'a array

Same as append, but concatenates a list of arrays.

val sub : 'a array -> int -> int -> 'a array

sub a pos len returns a fresh array of length len, containing the elements number pos to pos + len - 1 of array a.

  • raises Invalid_argument

    if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

val copy : 'a array -> 'a array

copy a returns a copy of a, that is, a fresh array containing the same elements as a.

val fill : 'a array -> int -> int -> 'a -> unit

fill a pos len x modifies the array a in place, storing x in elements number pos to pos + len - 1.

val blit : 'a array -> int -> 'a array -> int -> int -> unit

blit src src_pos dst dst_pos len copies len elements from array src, starting at element number src_pos, to array dst, starting at element number dst_pos. It works correctly even if src and dst are the same array, and the source and destination chunks overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

val to_list : 'a array -> 'a list

to_list a returns the list of all the elements of a.

val of_list : 'a list -> 'a array

of_list l returns a fresh array containing the elements of l.

  • raises Invalid_argument

    if the length of l is greater than Sys.max_array_length.

Iterators

val iter : ('a -> unit) -> 'a array -> unit

iter f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

val iteri : (int -> 'a -> unit) -> 'a array -> unit

Same as iter, but the function is applied to the index of the element as first argument, and the element itself as second argument.

val map : ('a -> 'b) -> 'a array -> 'b array

map f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

val map_inplace : ('a -> 'a) -> 'a array -> unit

map_inplace f a applies function f to all elements of a, and updates their values in place.

  • since 5.1
val mapi : (int -> 'a -> 'b) -> 'a array -> 'b array

Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

val mapi_inplace : (int -> 'a -> 'a) -> 'a array -> unit

Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

  • since 5.1
val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a array -> 'acc

fold_left f init a computes f (... (f (f init a.(0)) a.(1)) ...) a.(n-1), where n is the length of the array a.

val fold_left_map : + ('acc -> 'a -> 'acc * 'b) -> + 'acc -> + 'a array -> + 'acc * 'b array

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.13
val fold_right : ('a -> 'acc -> 'acc) -> 'a array -> 'acc -> 'acc

fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the array a.

Iterators on two arrays

val iter2 : ('a -> 'b -> unit) -> 'a array -> 'b array -> unit

iter2 f a b applies function f to all the elements of a and b.

  • since 4.03 (4.05 in ArrayLabels)
val map2 : ('a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array

map2 f a b applies function f to all the elements of a and b, and builds an array with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

  • since 4.03 (4.05 in ArrayLabels)

Array scanning

val for_all : ('a -> bool) -> 'a array -> bool

for_all f [|a1; ...; an|] checks if all elements of the array satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

  • since 4.03
val exists : ('a -> bool) -> 'a array -> bool

exists f [|a1; ...; an|] checks if at least one element of the array satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

  • since 4.03
val for_all2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool

Same as for_all, but for a two-argument predicate.

  • since 4.11
val exists2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool

Same as exists, but for a two-argument predicate.

  • since 4.11
val mem : 'a -> 'a array -> bool

mem a set is true if and only if a is structurally equal to an element of l (i.e. there is an x in l such that compare a x = 0).

  • since 4.03
val memq : 'a -> 'a array -> bool

Same as mem, but uses physical equality instead of structural equality to compare list elements.

  • since 4.03
val find_opt : ('a -> bool) -> 'a array -> 'a option

find_opt f a returns the first element of the array a that satisfies the predicate f, or None if there is no value that satisfies f in the array a.

  • since 4.13
val find_index : ('a -> bool) -> 'a array -> int option

find_index f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_map : ('a -> 'b option) -> 'a array -> 'b option

find_map f a applies f to the elements of a in order, and returns the first result of the form Some v, or None if none exist.

  • since 4.13
val find_mapi : (int -> 'a -> 'b option) -> 'a array -> 'b option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1

Arrays of pairs

val split : ('a * 'b) array -> 'a array * 'b array

split [|(a1,b1); ...; (an,bn)|] is ([|a1; ...; an|], [|b1; ...; bn|]).

  • since 4.13
val combine : 'a array -> 'b array -> ('a * 'b) array

combine [|a1; ...; an|] [|b1; ...; bn|] is [|(a1,b1); ...; (an,bn)|]. Raise Invalid_argument if the two arrays have different lengths.

  • since 4.13

Sorting

val sort : ('a -> 'a -> int) -> 'a array -> unit

Sort an array in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

The current implementation uses Heap Sort. It runs in constant stack space.

Specification of the comparison function: Let a be the array and cmp the comparison function. The following must be true for all x, y, z in a :

  • cmp x y > 0 if and only if cmp y x < 0
  • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

  • cmp a.(i) a.(j) >= 0 if and only if i >= j
val stable_sort : ('a -> 'a -> int) -> 'a array -> unit

Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

The current implementation uses Merge Sort. It uses a temporary array of length n/2, where n is the length of the array. It is usually faster than the current implementation of sort.

val fast_sort : ('a -> 'a -> int) -> 'a array -> unit

Same as sort or stable_sort, whichever is faster on typical input.

Arrays and Sequences

val to_seq : 'a array -> 'a Seq.t

Iterate on the array, in increasing order. Modifications of the array during iteration will be reflected in the sequence.

  • since 4.07
val to_seqi : 'a array -> (int * 'a) Seq.t

Iterate on the array, in increasing order, yielding indices along elements. Modifications of the array during iteration will be reflected in the sequence.

  • since 4.07
val of_seq : 'a Seq.t -> 'a array

Create an array from the generator

  • since 4.07

Arrays and concurrency safety

Care must be taken when concurrently accessing arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

For example, consider the following program:

let size = 100_000_000
+let a = Array.make size 1
+let d1 = Domain.spawn (fun () ->
+   Array.iteri (fun i x -> a.(i) <- x + 1) a
+)
+let d2 = Domain.spawn (fun () ->
+  Array.iteri (fun i x -> a.(i) <- 2 * x + 1) a
+)
+let () = Domain.join d1; Domain.join d2

After executing this code, each field of the array a is either 2, 3, 4 or 5. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

Data races

If two domains only access disjoint parts of the array, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

A data race is said to occur when two domains access the same array element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the array elements.

Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location (with a few exceptions for float arrays).

Float arrays

Float arrays have two supplementary caveats in the presence of data races.

First, the blit operation might copy an array byte-by-byte. Data races between such a blit operation and another operation might produce surprising values due to tearing: partial writes interleaved with other operations can create float values that would not exist with a sequential execution.

For instance, at the end of

let zeros = Array.make size 0.
+let max_floats = Array.make size Float.max_float
+let res = Array.copy zeros
+let d1 = Domain.spawn (fun () -> Array.blit zeros 0 res 0 size)
+let d2 = Domain.spawn (fun () -> Array.blit max_floats 0 res 0 size)
+let () = Domain.join d1; Domain.join d2

the res array might contain values that are neither 0. nor max_float.

Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation.

diff --git a/findlib-1/melange/Stdlib/ArrayLabels/index.html b/findlib-1/melange/Stdlib/ArrayLabels/index.html new file mode 100644 index 000000000..0d76ef814 --- /dev/null +++ b/findlib-1/melange/Stdlib/ArrayLabels/index.html @@ -0,0 +1,25 @@ + +ArrayLabels (docs.findlib-1.melange.Stdlib.ArrayLabels)

Module Stdlib.ArrayLabels

Array operations.

The labeled version of this module can be used as described in the StdLabels module.

type 'a t = 'a array

An alias for the type of arrays.

val length : 'a array -> int

Return the length (number of elements) of the given array.

val get : 'a array -> int -> 'a

get a n returns the element number n of array a. The first element has number 0. The last element has number length a - 1. You can also write a.(n) instead of get a n.

val set : 'a array -> int -> 'a -> unit

set a n x modifies array a in place, replacing element number n with x. You can also write a.(n) <- x instead of set a n x.

val make : int -> 'a -> 'a array

make n x returns a fresh array of length n, initialized with x. All the elements of this new array are initially physically equal to x (in the sense of the == predicate). Consequently, if x is mutable, it is shared among all elements of the array, and modifying x through one of the array entries will modify all other entries at the same time.

  • raises Invalid_argument

    if n < 0 or n > Sys.max_array_length. If the value of x is a floating-point number, then the maximum size is only Sys.max_array_length / 2.

val create_float : int -> float array

create_float n returns a fresh float array of length n, with uninitialized data.

  • since 4.03
val init : int -> f:(int -> 'a) -> 'a array

init n ~f returns a fresh array of length n, with element number i initialized to the result of f i. In other terms, init n ~f tabulates the results of f applied in order to the integers 0 to n-1.

  • raises Invalid_argument

    if n < 0 or n > Sys.max_array_length. If the return type of f is float, then the maximum size is only Sys.max_array_length / 2.

val make_matrix : dimx:int -> dimy:int -> 'a -> 'a array array

make_matrix ~dimx ~dimy e returns a two-dimensional array (an array of arrays) with first dimension dimx and second dimension dimy. All the elements of this new matrix are initially physically equal to e. The element (x,y) of a matrix m is accessed with the notation m.(x).(y).

  • raises Invalid_argument

    if dimx or dimy is negative or greater than Sys.max_array_length. If the value of e is a floating-point number, then the maximum size is only Sys.max_array_length / 2.

val append : 'a array -> 'a array -> 'a array

append v1 v2 returns a fresh array containing the concatenation of the arrays v1 and v2.

val concat : 'a array list -> 'a array

Same as append, but concatenates a list of arrays.

val sub : 'a array -> pos:int -> len:int -> 'a array

sub a ~pos ~len returns a fresh array of length len, containing the elements number pos to pos + len - 1 of array a.

  • raises Invalid_argument

    if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

val copy : 'a array -> 'a array

copy a returns a copy of a, that is, a fresh array containing the same elements as a.

val fill : 'a array -> pos:int -> len:int -> 'a -> unit

fill a ~pos ~len x modifies the array a in place, storing x in elements number pos to pos + len - 1.

val blit : + src:'a array -> + src_pos:int -> + dst:'a array -> + dst_pos:int -> + len:int -> + unit

blit ~src ~src_pos ~dst ~dst_pos ~len copies len elements from array src, starting at element number src_pos, to array dst, starting at element number dst_pos. It works correctly even if src and dst are the same array, and the source and destination chunks overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

val to_list : 'a array -> 'a list

to_list a returns the list of all the elements of a.

val of_list : 'a list -> 'a array

of_list l returns a fresh array containing the elements of l.

  • raises Invalid_argument

    if the length of l is greater than Sys.max_array_length.

Iterators

val iter : f:('a -> unit) -> 'a array -> unit

iter ~f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

val iteri : f:(int -> 'a -> unit) -> 'a array -> unit

Same as iter, but the function is applied to the index of the element as first argument, and the element itself as second argument.

val map : f:('a -> 'b) -> 'a array -> 'b array

map ~f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

val map_inplace : f:('a -> 'a) -> 'a array -> unit

map_inplace ~f a applies function f to all elements of a, and updates their values in place.

  • since 5.1
val mapi : f:(int -> 'a -> 'b) -> 'a array -> 'b array

Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

val mapi_inplace : f:(int -> 'a -> 'a) -> 'a array -> unit

Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

  • since 5.1
val fold_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a array -> 'acc

fold_left ~f ~init a computes f (... (f (f init a.(0)) a.(1)) ...) a.(n-1), where n is the length of the array a.

val fold_left_map : + f:('acc -> 'a -> 'acc * 'b) -> + init:'acc -> + 'a array -> + 'acc * 'b array

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.13
val fold_right : f:('a -> 'acc -> 'acc) -> 'a array -> init:'acc -> 'acc

fold_right ~f a ~init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the array a.

Iterators on two arrays

val iter2 : f:('a -> 'b -> unit) -> 'a array -> 'b array -> unit

iter2 ~f a b applies function f to all the elements of a and b.

  • since 4.05
val map2 : f:('a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array

map2 ~f a b applies function f to all the elements of a and b, and builds an array with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

  • since 4.05

Array scanning

val for_all : f:('a -> bool) -> 'a array -> bool

for_all ~f [|a1; ...; an|] checks if all elements of the array satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

  • since 4.03
val exists : f:('a -> bool) -> 'a array -> bool

exists ~f [|a1; ...; an|] checks if at least one element of the array satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

  • since 4.03
val for_all2 : f:('a -> 'b -> bool) -> 'a array -> 'b array -> bool

Same as for_all, but for a two-argument predicate.

  • since 4.11
val exists2 : f:('a -> 'b -> bool) -> 'a array -> 'b array -> bool

Same as exists, but for a two-argument predicate.

  • since 4.11
val mem : 'a -> set:'a array -> bool

mem a ~set is true if and only if a is structurally equal to an element of l (i.e. there is an x in l such that compare a x = 0).

  • since 4.03
val memq : 'a -> set:'a array -> bool

Same as mem, but uses physical equality instead of structural equality to compare list elements.

  • since 4.03
val find_opt : f:('a -> bool) -> 'a array -> 'a option

find_opt ~f a returns the first element of the array a that satisfies the predicate f, or None if there is no value that satisfies f in the array a.

  • since 4.13
val find_index : f:('a -> bool) -> 'a array -> int option

find_index ~f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_map : f:('a -> 'b option) -> 'a array -> 'b option

find_map ~f a applies f to the elements of a in order, and returns the first result of the form Some v, or None if none exist.

  • since 4.13
val find_mapi : f:(int -> 'a -> 'b option) -> 'a array -> 'b option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1

Arrays of pairs

val split : ('a * 'b) array -> 'a array * 'b array

split [|(a1,b1); ...; (an,bn)|] is ([|a1; ...; an|], [|b1; ...; bn|]).

  • since 4.13
val combine : 'a array -> 'b array -> ('a * 'b) array

combine [|a1; ...; an|] [|b1; ...; bn|] is [|(a1,b1); ...; (an,bn)|]. Raise Invalid_argument if the two arrays have different lengths.

  • since 4.13

Sorting

val sort : cmp:('a -> 'a -> int) -> 'a array -> unit

Sort an array in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

The current implementation uses Heap Sort. It runs in constant stack space.

Specification of the comparison function: Let a be the array and cmp the comparison function. The following must be true for all x, y, z in a :

  • cmp x y > 0 if and only if cmp y x < 0
  • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

  • cmp a.(i) a.(j) >= 0 if and only if i >= j
val stable_sort : cmp:('a -> 'a -> int) -> 'a array -> unit

Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

The current implementation uses Merge Sort. It uses a temporary array of length n/2, where n is the length of the array. It is usually faster than the current implementation of sort.

val fast_sort : cmp:('a -> 'a -> int) -> 'a array -> unit

Same as sort or stable_sort, whichever is faster on typical input.

Arrays and Sequences

val to_seq : 'a array -> 'a Seq.t

Iterate on the array, in increasing order. Modifications of the array during iteration will be reflected in the sequence.

  • since 4.07
val to_seqi : 'a array -> (int * 'a) Seq.t

Iterate on the array, in increasing order, yielding indices along elements. Modifications of the array during iteration will be reflected in the sequence.

  • since 4.07
val of_seq : 'a Seq.t -> 'a array

Create an array from the generator

  • since 4.07

Arrays and concurrency safety

Care must be taken when concurrently accessing arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

For example, consider the following program:

let size = 100_000_000
+let a = ArrayLabels.make size 1
+let d1 = Domain.spawn (fun () ->
+   ArrayLabels.iteri ~f:(fun i x -> a.(i) <- x + 1) a
+)
+let d2 = Domain.spawn (fun () ->
+  ArrayLabels.iteri ~f:(fun i x -> a.(i) <- 2 * x + 1) a
+)
+let () = Domain.join d1; Domain.join d2

After executing this code, each field of the array a is either 2, 3, 4 or 5. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

Data races

If two domains only access disjoint parts of the array, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

A data race is said to occur when two domains access the same array element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the array elements.

Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location (with a few exceptions for float arrays).

Float arrays

Float arrays have two supplementary caveats in the presence of data races.

First, the blit operation might copy an array byte-by-byte. Data races between such a blit operation and another operation might produce surprising values due to tearing: partial writes interleaved with other operations can create float values that would not exist with a sequential execution.

For instance, at the end of

let zeros = Array.make size 0.
+let max_floats = Array.make size Float.max_float
+let res = Array.copy zeros
+let d1 = Domain.spawn (fun () -> Array.blit zeros 0 res 0 size)
+let d2 = Domain.spawn (fun () -> Array.blit max_floats 0 res 0 size)
+let () = Domain.join d1; Domain.join d2

the res array might contain values that are neither 0. nor max_float.

Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation.

diff --git a/findlib-1/melange/Stdlib/Atomic/index.html b/findlib-1/melange/Stdlib/Atomic/index.html new file mode 100644 index 000000000..d19775a4a --- /dev/null +++ b/findlib-1/melange/Stdlib/Atomic/index.html @@ -0,0 +1,64 @@ + +Atomic (docs.findlib-1.melange.Stdlib.Atomic)

Module Stdlib.Atomic

Atomic references.

See the examples below. See 'Memory model: The hard bits' chapter in the manual.

type !'a t

An atomic (mutable) reference to a value of type 'a.

val make : 'a -> 'a t

Create an atomic reference.

val get : 'a t -> 'a

Get the current value of the atomic reference.

val set : 'a t -> 'a -> unit

Set a new value for the atomic reference.

val exchange : 'a t -> 'a -> 'a

Set a new value for the atomic reference, and return the current value.

val compare_and_set : 'a t -> 'a -> 'a -> bool

compare_and_set r seen v sets the new value of r to v only if its current value is physically equal to seen -- the comparison and the set occur atomically. Returns true if the comparison succeeded (so the set happened) and false otherwise.

val fetch_and_add : int t -> int -> int

fetch_and_add r n atomically increments the value of r by n, and returns the current value (before the increment).

val incr : int t -> unit

incr r atomically increments the value of r by 1.

val decr : int t -> unit

decr r atomically decrements the value of r by 1.

Examples

Basic Thread Coordination

A basic use case is to have global counters that are updated in a thread-safe way, for example to keep some sorts of metrics over IOs performed by the program. Another basic use case is to coordinate the termination of threads in a given program, for example when one thread finds an answer, or when the program is shut down by the user.

Here, for example, we're going to try to find a number whose hash satisfies a basic property. To do that, we'll run multiple threads which will try random numbers until they find one that works.

Of course the output below is a sample run and will change every time the program is run.

(* use for termination *)
+let stop_all_threads = Atomic.make false
+
+(* total number of individual attempts to find a number *)
+let num_attempts = Atomic.make 0
+
+(* find a number that satisfies [p], by... trying random numbers
+   until one fits. *)
+let find_number_where (p:int -> bool) =
+  let rand = Random.State.make_self_init() in
+  while not (Atomic.get stop_all_threads) do
+
+    let n = Random.State.full_int rand max_int in
+    ignore (Atomic.fetch_and_add num_attempts 1 : int);
+
+    if p (Hashtbl.hash n) then (
+      Printf.printf "found %d (hash=%d)\n%!" n (Hashtbl.hash n);
+      Atomic.set stop_all_threads true; (* signal all threads to stop *)
+    )
+  done;;
+
+
+(* run multiple domains to search for a [n] where [hash n <= 100] *)
+let () =
+  let criterion n = n <= 100 in
+  let threads =
+    Array.init 8
+      (fun _ -> Domain.spawn (fun () -> find_number_where criterion))
+  in
+  Array.iter Domain.join threads;
+  Printf.printf "total number of attempts: %d\n%!"
+    (Atomic.get num_attempts) ;;
+
+- : unit = ()
+found 1651745641680046833 (hash=33)
+total number of attempts: 30230350

Treiber Stack

Another example is a basic Treiber stack (a thread-safe stack) that can be safely shared between threads.

Note how both push and pop are recursive, because they attempt to swap the new stack (with one more, or one fewer, element) with the old stack. This is optimistic concurrency: each iteration of, say, push stack x gets the old stack l, and hopes that by the time it tries to replace l with x::l, nobody else has had time to modify the list. If the compare_and_set fails it means we were too optimistic, and must try again.

type 'a stack = 'a list Atomic.t
+
+let rec push (stack: _ stack) elt : unit =
+  let cur = Atomic.get stack in
+  let success = Atomic.compare_and_set stack cur (elt :: cur) in
+  if not success then
+    push stack elt
+
+let rec pop (stack: _ stack) : _ option =
+  let cur = Atomic.get stack in
+  match cur with
+  | [] -> None
+  | x :: tail ->
+    let success = Atomic.compare_and_set stack cur tail in
+    if success then Some x
+    else pop stack
+
+# let st = Atomic.make []
+# push st 1
+- : unit = ()
+# push st 2
+- : unit = ()
+# pop st
+- : int option = Some 2
+# pop st
+- : int option = Some 1
+# pop st
+- : int option = None
diff --git a/findlib-1/melange/Stdlib/Bool/index.html b/findlib-1/melange/Stdlib/Bool/index.html new file mode 100644 index 000000000..09e54d538 --- /dev/null +++ b/findlib-1/melange/Stdlib/Bool/index.html @@ -0,0 +1,2 @@ + +Bool (docs.findlib-1.melange.Stdlib.Bool)

Module Stdlib.Bool

Boolean values.

Booleans

type t = bool =
  1. | false
  2. | true

The type of booleans (truth values).

The constructors false and true are included here so that they have paths, but they are not intended to be used in user-defined data types.

val not : bool -> bool

not b is the boolean negation of b.

val (&&) : bool -> bool -> bool

e0 && e1 is the lazy boolean conjunction of expressions e0 and e1. If e0 evaluates to false, e1 is not evaluated. Right-associative operator at precedence level 3/11.

val (||) : bool -> bool -> bool

e0 || e1 is the lazy boolean disjunction of expressions e0 and e1. If e0 evaluates to true, e1 is not evaluated. Right-associative operator at precedence level 2/11.

Predicates and comparisons

val equal : bool -> bool -> bool

equal b0 b1 is true if and only if b0 and b1 are both true or both false.

val compare : bool -> bool -> int

compare b0 b1 is a total order on boolean values. false is smaller than true.

Converting

val to_int : bool -> int

to_int b is 0 if b is false and 1 if b is true.

val to_float : bool -> float

to_float b is 0. if b is false and 1. if b is true.

val to_string : bool -> string

to_string b is "true" if b is true and "false" if b is false.

val seeded_hash : int -> bool -> int

A seeded hash function for booleans, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : bool -> int

An unseeded hash function for booleans, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.1
diff --git a/findlib-1/melange/Stdlib/Buffer/index.html b/findlib-1/melange/Stdlib/Buffer/index.html new file mode 100644 index 000000000..05f59ea73 --- /dev/null +++ b/findlib-1/melange/Stdlib/Buffer/index.html @@ -0,0 +1,5 @@ + +Buffer (docs.findlib-1.melange.Stdlib.Buffer)

Module Stdlib.Buffer

Extensible buffers.

This module implements buffers that automatically expand as necessary. It provides accumulative concatenation of strings in linear time (instead of quadratic time when strings are concatenated pairwise). For example:

let concat_strings ss =
+  let b = Buffer.create 16 in
+    List.iter (Buffer.add_string b) ss;
+    Buffer.contents b

Unsynchronized accesses

Unsynchronized accesses to a buffer may lead to an invalid buffer state. Thus, concurrent accesses to a buffer must be synchronized (for instance with a Mutex.t).

type t

The abstract type of buffers.

val create : int -> t

create n returns a fresh buffer, initially empty. The n parameter is the initial size of the internal byte sequence that holds the buffer contents. That byte sequence is automatically reallocated when more than n characters are stored in the buffer, but shrinks back to n characters when reset is called. For best performance, n should be of the same order of magnitude as the number of characters that are expected to be stored in the buffer (for instance, 80 for a buffer that holds one output line). Nothing bad will happen if the buffer grows beyond that limit, however. In doubt, take n = 16 for instance. If n is not between 1 and Sys.max_string_length, it will be clipped to that interval.

val contents : t -> string

Return a copy of the current contents of the buffer. The buffer itself is unchanged.

val to_bytes : t -> bytes

Return a copy of the current contents of the buffer. The buffer itself is unchanged.

  • since 4.02
val sub : t -> int -> int -> string

Buffer.sub b off len returns a copy of len bytes from the current contents of the buffer b, starting at offset off.

val blit : t -> int -> bytes -> int -> int -> unit

Buffer.blit src srcoff dst dstoff len copies len characters from the current contents of the buffer src, starting at offset srcoff to dst, starting at character dstoff.

  • raises Invalid_argument

    if srcoff and len do not designate a valid range of src, or if dstoff and len do not designate a valid range of dst.

  • since 3.11.2
val nth : t -> int -> char

Get the n-th character of the buffer.

val length : t -> int

Return the number of characters currently contained in the buffer.

val clear : t -> unit

Empty the buffer.

val reset : t -> unit

Empty the buffer and deallocate the internal byte sequence holding the buffer contents, replacing it with the initial internal byte sequence of length n that was allocated by Buffer.create n. For long-lived buffers that may have grown a lot, reset allows faster reclamation of the space used by the buffer.

val output_buffer : out_channel -> t -> unit

output_buffer oc b writes the current contents of buffer b on the output channel oc.

val truncate : t -> int -> unit

truncate b len truncates the length of b to len Note: the internal byte sequence is not shortened.

  • since 4.05

Appending

Note: all add_* operations can raise Failure if the internal byte sequence of the buffer would need to grow beyond Sys.max_string_length.

val add_char : t -> char -> unit

add_char b c appends the character c at the end of buffer b.

val add_utf_8_uchar : t -> Uchar.t -> unit

add_utf_8_uchar b u appends the UTF-8 encoding of u at the end of buffer b.

  • since 4.06
val add_utf_16le_uchar : t -> Uchar.t -> unit

add_utf_16le_uchar b u appends the UTF-16LE encoding of u at the end of buffer b.

  • since 4.06
val add_utf_16be_uchar : t -> Uchar.t -> unit

add_utf_16be_uchar b u appends the UTF-16BE encoding of u at the end of buffer b.

  • since 4.06
val add_string : t -> string -> unit

add_string b s appends the string s at the end of buffer b.

val add_bytes : t -> bytes -> unit

add_bytes b s appends the byte sequence s at the end of buffer b.

  • since 4.02
val add_substring : t -> string -> int -> int -> unit

add_substring b s ofs len takes len characters from offset ofs in string s and appends them at the end of buffer b.

val add_subbytes : t -> bytes -> int -> int -> unit

add_subbytes b s ofs len takes len characters from offset ofs in byte sequence s and appends them at the end of buffer b.

  • since 4.02
val add_substitute : t -> (string -> string) -> string -> unit

add_substitute b f s appends the string pattern s at the end of buffer b with substitution. The substitution process looks for variables into the pattern and substitutes each variable name by its value, as obtained by applying the mapping f to the variable name. Inside the string pattern, a variable name immediately follows a non-escaped $ character and is one of the following:

  • a non empty sequence of alphanumeric or _ characters,
  • an arbitrary sequence of characters enclosed by a pair of matching parentheses or curly brackets. An escaped $ character is a $ that immediately follows a backslash character; it then stands for a plain $.
  • raises Not_found

    if the closing character of a parenthesized variable cannot be found.

val add_buffer : t -> t -> unit

add_buffer b1 b2 appends the current contents of buffer b2 at the end of buffer b1. b2 is not modified.

val add_channel : t -> in_channel -> int -> unit

add_channel b ic n reads at most n characters from the input channel ic and stores them at the end of buffer b.

  • raises End_of_file

    if the channel contains fewer than n characters. In this case, the characters are still added to the buffer, so as to avoid loss of data.

Buffers and Sequences

val to_seq : t -> char Seq.t

Iterate on the buffer, in increasing order.

The behavior is not specified if the buffer is modified during iteration.

  • since 4.07
val to_seqi : t -> (int * char) Seq.t

Iterate on the buffer, in increasing order, yielding indices along chars.

The behavior is not specified if the buffer is modified during iteration.

  • since 4.07
val add_seq : t -> char Seq.t -> unit

Add chars to the buffer

  • since 4.07
val of_seq : char Seq.t -> t

Create a buffer from the generator

  • since 4.07

Binary encoding of integers

The functions in this section append binary encodings of integers to buffers.

Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. Functions that encode these values truncate their inputs to their least significant bytes.

val add_uint8 : t -> int -> unit

add_uint8 b i appends a binary unsigned 8-bit integer i to b.

  • since 4.08
val add_int8 : t -> int -> unit

add_int8 b i appends a binary signed 8-bit integer i to b.

  • since 4.08
val add_uint16_ne : t -> int -> unit

add_uint16_ne b i appends a binary native-endian unsigned 16-bit integer i to b.

  • since 4.08
val add_uint16_be : t -> int -> unit

add_uint16_be b i appends a binary big-endian unsigned 16-bit integer i to b.

  • since 4.08
val add_uint16_le : t -> int -> unit

add_uint16_le b i appends a binary little-endian unsigned 16-bit integer i to b.

  • since 4.08
val add_int16_ne : t -> int -> unit

add_int16_ne b i appends a binary native-endian signed 16-bit integer i to b.

  • since 4.08
val add_int16_be : t -> int -> unit

add_int16_be b i appends a binary big-endian signed 16-bit integer i to b.

  • since 4.08
val add_int16_le : t -> int -> unit

add_int16_le b i appends a binary little-endian signed 16-bit integer i to b.

  • since 4.08
val add_int32_ne : t -> int32 -> unit

add_int32_ne b i appends a binary native-endian 32-bit integer i to b.

  • since 4.08
val add_int32_be : t -> int32 -> unit

add_int32_be b i appends a binary big-endian 32-bit integer i to b.

  • since 4.08
val add_int32_le : t -> int32 -> unit

add_int32_le b i appends a binary little-endian 32-bit integer i to b.

  • since 4.08
val add_int64_ne : t -> int64 -> unit

add_int64_ne b i appends a binary native-endian 64-bit integer i to b.

  • since 4.08
val add_int64_be : t -> int64 -> unit

add_int64_be b i appends a binary big-endian 64-bit integer i to b.

  • since 4.08
val add_int64_le : t -> int64 -> unit

add_int64_ne b i appends a binary little-endian 64-bit integer i to b.

  • since 4.08
diff --git a/findlib-1/melange/Stdlib/Bytes/index.html b/findlib-1/melange/Stdlib/Bytes/index.html new file mode 100644 index 000000000..f6d11e8a5 --- /dev/null +++ b/findlib-1/melange/Stdlib/Bytes/index.html @@ -0,0 +1,17 @@ + +Bytes (docs.findlib-1.melange.Stdlib.Bytes)

Module Stdlib.Bytes

Byte sequence operations.

A byte sequence is a mutable data structure that contains a fixed-length sequence of bytes. Each byte can be indexed in constant time for reading or writing.

Given a byte sequence s of length l, we can access each of the l bytes of s via its index in the sequence. Indexes start at 0, and we will call an index valid in s if it falls within the range [0...l-1] (inclusive). A position is the point between two bytes or at the beginning or end of the sequence. We call a position valid in s if it falls within the range [0...l] (inclusive). Note that the byte at index n is between positions n and n+1.

Two parameters start and len are said to designate a valid range of s if len >= 0 and start and start+len are valid positions in s.

Byte sequences can be modified in place, for instance via the set and blit functions described below. See also strings (module String), which are almost the same data structure, but cannot be modified in place.

Bytes are represented by the OCaml type char.

The labeled version of this module can be used as described in the StdLabels module.

val length : bytes -> int

Return the length (number of bytes) of the argument.

val get : bytes -> int -> char

get s n returns the byte at index n in argument s.

val set : bytes -> int -> char -> unit

set s n c modifies s in place, replacing the byte at index n with c.

val create : int -> bytes

create n returns a new byte sequence of length n. The sequence is uninitialized and contains arbitrary bytes.

val make : int -> char -> bytes

make n c returns a new byte sequence of length n, filled with the byte c.

val init : int -> (int -> char) -> bytes

init n f returns a fresh byte sequence of length n, with character i initialized to the result of f i (in increasing index order).

val empty : bytes

A byte sequence of size 0.

val copy : bytes -> bytes

Return a new byte sequence that contains the same bytes as the argument.

val of_string : string -> bytes

Return a new byte sequence that contains the same bytes as the given string.

val to_string : bytes -> string

Return a new string that contains the same bytes as the given byte sequence.

val sub : bytes -> int -> int -> bytes

sub s pos len returns a new byte sequence of length len, containing the subsequence of s that starts at position pos and has length len.

val sub_string : bytes -> int -> int -> string

Same as sub but return a string instead of a byte sequence.

val extend : bytes -> int -> int -> bytes

extend s left right returns a new byte sequence that contains the bytes of s, with left uninitialized bytes prepended and right uninitialized bytes appended to it. If left or right is negative, then bytes are removed (instead of appended) from the corresponding side of s.

  • since 4.05 in BytesLabels
val fill : bytes -> int -> int -> char -> unit

fill s pos len c modifies s in place, replacing len characters with c, starting at pos.

val blit : bytes -> int -> bytes -> int -> int -> unit

blit src src_pos dst dst_pos len copies len bytes from byte sequence src, starting at index src_pos, to byte sequence dst, starting at index dst_pos. It works correctly even if src and dst are the same byte sequence, and the source and destination intervals overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

val blit_string : string -> int -> bytes -> int -> int -> unit

blit_string src src_pos dst dst_pos len copies len bytes from string src, starting at index src_pos, to byte sequence dst, starting at index dst_pos.

  • raises Invalid_argument

    if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

  • since 4.05 in BytesLabels
val concat : bytes -> bytes list -> bytes

concat sep sl concatenates the list of byte sequences sl, inserting the separator byte sequence sep between each, and returns the result as a new byte sequence.

val cat : bytes -> bytes -> bytes

cat s1 s2 concatenates s1 and s2 and returns the result as a new byte sequence.

  • since 4.05 in BytesLabels
val iter : (char -> unit) -> bytes -> unit

iter f s applies function f in turn to all the bytes of s. It is equivalent to f (get s 0); f (get s 1); ...; f (get s + (length s - 1)); ().

val iteri : (int -> char -> unit) -> bytes -> unit

Same as iter, but the function is applied to the index of the byte as first argument and the byte itself as second argument.

val map : (char -> char) -> bytes -> bytes

map f s applies function f in turn to all the bytes of s (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

val mapi : (int -> char -> char) -> bytes -> bytes

mapi f s calls f with each character of s and its index (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

val fold_left : ('acc -> char -> 'acc) -> 'acc -> bytes -> 'acc

fold_left f x s computes f (... (f (f x (get s 0)) (get s 1)) ...) (get s (n-1)), where n is the length of s.

  • since 4.13
val fold_right : (char -> 'acc -> 'acc) -> bytes -> 'acc -> 'acc

fold_right f s x computes f (get s 0) (f (get s 1) ( ... (f (get s (n-1)) x) ...)), where n is the length of s.

  • since 4.13
val for_all : (char -> bool) -> bytes -> bool

for_all p s checks if all characters in s satisfy the predicate p.

  • since 4.13
val exists : (char -> bool) -> bytes -> bool

exists p s checks if at least one character of s satisfies the predicate p.

  • since 4.13
val trim : bytes -> bytes

Return a copy of the argument, without leading and trailing whitespace. The bytes regarded as whitespace are the ASCII characters ' ', '\012', '\n', '\r', and '\t'.

val escaped : bytes -> bytes

Return a copy of the argument, with special characters represented by escape sequences, following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash and double-quote.

val index : bytes -> char -> int

index s c returns the index of the first occurrence of byte c in s.

val index_opt : bytes -> char -> int option

index_opt s c returns the index of the first occurrence of byte c in s or None if c does not occur in s.

  • since 4.05
val rindex : bytes -> char -> int

rindex s c returns the index of the last occurrence of byte c in s.

val rindex_opt : bytes -> char -> int option

rindex_opt s c returns the index of the last occurrence of byte c in s or None if c does not occur in s.

  • since 4.05
val index_from : bytes -> int -> char -> int

index_from s i c returns the index of the first occurrence of byte c in s after position i. index s c is equivalent to index_from s 0 c.

  • raises Not_found

    if c does not occur in s after position i.

val index_from_opt : bytes -> int -> char -> int option

index_from_opt s i c returns the index of the first occurrence of byte c in s after position i or None if c does not occur in s after position i. index_opt s c is equivalent to index_from_opt s 0 c.

  • since 4.05
val rindex_from : bytes -> int -> char -> int

rindex_from s i c returns the index of the last occurrence of byte c in s before position i+1. rindex s c is equivalent to rindex_from s (length s - 1) c.

  • raises Not_found

    if c does not occur in s before position i+1.

val rindex_from_opt : bytes -> int -> char -> int option

rindex_from_opt s i c returns the index of the last occurrence of byte c in s before position i+1 or None if c does not occur in s before position i+1. rindex_opt s c is equivalent to rindex_from s (length s - 1) c.

  • since 4.05
val contains : bytes -> char -> bool

contains s c tests if byte c appears in s.

val contains_from : bytes -> int -> char -> bool

contains_from s start c tests if byte c appears in s after position start. contains s c is equivalent to contains_from + s 0 c.

val rcontains_from : bytes -> int -> char -> bool

rcontains_from s stop c tests if byte c appears in s before position stop+1.

val uppercase_ascii : bytes -> bytes

Return a copy of the argument, with all lowercase letters translated to uppercase, using the US-ASCII character set.

  • since 4.03 (4.05 in BytesLabels)
val lowercase_ascii : bytes -> bytes

Return a copy of the argument, with all uppercase letters translated to lowercase, using the US-ASCII character set.

  • since 4.03 (4.05 in BytesLabels)
val capitalize_ascii : bytes -> bytes

Return a copy of the argument, with the first character set to uppercase, using the US-ASCII character set.

  • since 4.03 (4.05 in BytesLabels)
val uncapitalize_ascii : bytes -> bytes

Return a copy of the argument, with the first character set to lowercase, using the US-ASCII character set.

  • since 4.03 (4.05 in BytesLabels)
type t = bytes

An alias for the type of byte sequences.

val compare : t -> t -> int

The comparison function for byte sequences, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Bytes to be passed as argument to the functors Set.Make and Map.Make.

val equal : t -> t -> bool

The equality function for byte sequences.

  • since 4.03 (4.05 in BytesLabels)
val starts_with : prefix:bytes -> bytes -> bool

starts_with ~prefix s is true if and only if s starts with prefix.

  • since 4.13
val ends_with : suffix:bytes -> bytes -> bool

ends_with ~suffix s is true if and only if s ends with suffix.

  • since 4.13

Unsafe conversions (for advanced users)

This section describes unsafe, low-level conversion functions between bytes and string. They do not copy the internal data; used improperly, they can break the immutability invariant on strings provided by the -safe-string option. They are available for expert library authors, but for most purposes you should use the always-correct to_string and of_string instead.

val unsafe_to_string : bytes -> string

Unsafely convert a byte sequence into a string.

To reason about the use of unsafe_to_string, it is convenient to consider an "ownership" discipline. A piece of code that manipulates some data "owns" it; there are several disjoint ownership modes, including:

  • Unique ownership: the data may be accessed and mutated
  • Shared ownership: the data has several owners, that may only access it, not mutate it.

Unique ownership is linear: passing the data to another piece of code means giving up ownership (we cannot write the data again). A unique owner may decide to make the data shared (giving up mutation rights on it), but shared data may not become uniquely-owned again.

unsafe_to_string s can only be used when the caller owns the byte sequence s -- either uniquely or as shared immutable data. The caller gives up ownership of s, and gains ownership of the returned string.

There are two valid use-cases that respect this ownership discipline:

1. Creating a string by initializing and mutating a byte sequence that is never changed after initialization is performed.

let string_init len f : string =
+  let s = Bytes.create len in
+  for i = 0 to len - 1 do Bytes.set s i (f i) done;
+  Bytes.unsafe_to_string s

This function is safe because the byte sequence s will never be accessed or mutated after unsafe_to_string is called. The string_init code gives up ownership of s, and returns the ownership of the resulting string to its caller.

Note that it would be unsafe if s was passed as an additional parameter to the function f as it could escape this way and be mutated in the future -- string_init would give up ownership of s to pass it to f, and could not call unsafe_to_string safely.

We have provided the String.init, String.map and String.mapi functions to cover most cases of building new strings. You should prefer those over to_string or unsafe_to_string whenever applicable.

2. Temporarily giving ownership of a byte sequence to a function that expects a uniquely owned string and returns ownership back, so that we can mutate the sequence again after the call ended.

let bytes_length (s : bytes) =
+  String.length (Bytes.unsafe_to_string s)

In this use-case, we do not promise that s will never be mutated after the call to bytes_length s. The String.length function temporarily borrows unique ownership of the byte sequence (and sees it as a string), but returns this ownership back to the caller, which may assume that s is still a valid byte sequence after the call. Note that this is only correct because we know that String.length does not capture its argument -- it could escape by a side-channel such as a memoization combinator.

The caller may not mutate s while the string is borrowed (it has temporarily given up ownership). This affects concurrent programs, but also higher-order functions: if String.length returned a closure to be called later, s should not be mutated until this closure is fully applied and returns ownership.

val unsafe_of_string : string -> bytes

Unsafely convert a shared string to a byte sequence that should not be mutated.

The same ownership discipline that makes unsafe_to_string correct applies to unsafe_of_string: you may use it if you were the owner of the string value, and you will own the return bytes in the same mode.

In practice, unique ownership of string values is extremely difficult to reason about correctly. You should always assume strings are shared, never uniquely owned.

For example, string literals are implicitly shared by the compiler, so you never uniquely own them.

let incorrect = Bytes.unsafe_of_string "hello"
+let s = Bytes.of_string "hello"

The first declaration is incorrect, because the string literal "hello" could be shared by the compiler with other parts of the program, and mutating incorrect is a bug. You must always use the second version, which performs a copy and is thus correct.

Assuming unique ownership of strings that are not string literals, but are (partly) built from string literals, is also incorrect. For example, mutating unsafe_of_string ("foo" ^ s) could mutate the shared string "foo" -- assuming a rope-like representation of strings. More generally, functions operating on strings will assume shared ownership, they do not preserve unique ownership. It is thus incorrect to assume unique ownership of the result of unsafe_of_string.

The only case we have reasonable confidence is safe is if the produced bytes is shared -- used as an immutable byte sequence. This is possibly useful for incremental migration of low-level programs that manipulate immutable sequences of bytes (for example Marshal.from_bytes) and previously used the string type for this purpose.

val split_on_char : char -> bytes -> bytes list

split_on_char sep s returns the list of all (possibly empty) subsequences of s that are delimited by the sep character.

The function's output is specified by the following invariants:

  • The list is not empty.
  • Concatenating its elements using sep as a separator returns a byte sequence equal to the input (Bytes.concat (Bytes.make 1 sep) + (Bytes.split_on_char sep s) = s).
  • No byte sequence in the result contains the sep character.
  • since 4.13

Iterators

val to_seq : t -> char Seq.t

Iterate on the string, in increasing index order. Modifications of the string during iteration will be reflected in the sequence.

  • since 4.07
val to_seqi : t -> (int * char) Seq.t

Iterate on the string, in increasing order, yielding indices along chars

  • since 4.07
val of_seq : char Seq.t -> t

Create a string from the generator

  • since 4.07

UTF codecs and validations

UTF-8

val get_utf_8_uchar : t -> int -> Uchar.utf_decode

get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

val set_utf_8_uchar : t -> int -> Uchar.t -> int

set_utf_8_uchar b i u UTF-8 encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

val is_valid_utf_8 : t -> bool

is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

UTF-16BE

val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

val set_utf_16be_uchar : t -> int -> Uchar.t -> int

set_utf_16be_uchar b i u UTF-16BE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

val is_valid_utf_16be : t -> bool

is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

UTF-16LE

val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

val set_utf_16le_uchar : t -> int -> Uchar.t -> int

set_utf_16le_uchar b i u UTF-16LE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

val is_valid_utf_16le : t -> bool

is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

Binary encoding/decoding of integers

The functions in this section binary encode and decode integers to and from byte sequences.

All following functions raise Invalid_argument if the space needed at index i to decode or encode the integer is not available.

Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are handled as follows:

val get_uint8 : bytes -> int -> int

get_uint8 b i is b's unsigned 8-bit integer starting at byte index i.

  • since 4.08
val get_int8 : bytes -> int -> int

get_int8 b i is b's signed 8-bit integer starting at byte index i.

  • since 4.08
val get_uint16_ne : bytes -> int -> int

get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at byte index i.

  • since 4.08
val get_uint16_be : bytes -> int -> int

get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at byte index i.

  • since 4.08
val get_uint16_le : bytes -> int -> int

get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at byte index i.

  • since 4.08
val get_int16_ne : bytes -> int -> int

get_int16_ne b i is b's native-endian signed 16-bit integer starting at byte index i.

  • since 4.08
val get_int16_be : bytes -> int -> int

get_int16_be b i is b's big-endian signed 16-bit integer starting at byte index i.

  • since 4.08
val get_int16_le : bytes -> int -> int

get_int16_le b i is b's little-endian signed 16-bit integer starting at byte index i.

  • since 4.08
val get_int32_ne : bytes -> int -> int32

get_int32_ne b i is b's native-endian 32-bit integer starting at byte index i.

  • since 4.08
val get_int32_be : bytes -> int -> int32

get_int32_be b i is b's big-endian 32-bit integer starting at byte index i.

  • since 4.08
val get_int32_le : bytes -> int -> int32

get_int32_le b i is b's little-endian 32-bit integer starting at byte index i.

  • since 4.08
val get_int64_ne : bytes -> int -> int64

get_int64_ne b i is b's native-endian 64-bit integer starting at byte index i.

  • since 4.08
val get_int64_be : bytes -> int -> int64

get_int64_be b i is b's big-endian 64-bit integer starting at byte index i.

  • since 4.08
val get_int64_le : bytes -> int -> int64

get_int64_le b i is b's little-endian 64-bit integer starting at byte index i.

  • since 4.08
val set_uint8 : bytes -> int -> int -> unit

set_uint8 b i v sets b's unsigned 8-bit integer starting at byte index i to v.

  • since 4.08
val set_int8 : bytes -> int -> int -> unit

set_int8 b i v sets b's signed 8-bit integer starting at byte index i to v.

  • since 4.08
val set_uint16_ne : bytes -> int -> int -> unit

set_uint16_ne b i v sets b's native-endian unsigned 16-bit integer starting at byte index i to v.

  • since 4.08
val set_uint16_be : bytes -> int -> int -> unit

set_uint16_be b i v sets b's big-endian unsigned 16-bit integer starting at byte index i to v.

  • since 4.08
val set_uint16_le : bytes -> int -> int -> unit

set_uint16_le b i v sets b's little-endian unsigned 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int16_ne : bytes -> int -> int -> unit

set_int16_ne b i v sets b's native-endian signed 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int16_be : bytes -> int -> int -> unit

set_int16_be b i v sets b's big-endian signed 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int16_le : bytes -> int -> int -> unit

set_int16_le b i v sets b's little-endian signed 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int32_ne : bytes -> int -> int32 -> unit

set_int32_ne b i v sets b's native-endian 32-bit integer starting at byte index i to v.

  • since 4.08
val set_int32_be : bytes -> int -> int32 -> unit

set_int32_be b i v sets b's big-endian 32-bit integer starting at byte index i to v.

  • since 4.08
val set_int32_le : bytes -> int -> int32 -> unit

set_int32_le b i v sets b's little-endian 32-bit integer starting at byte index i to v.

  • since 4.08
val set_int64_ne : bytes -> int -> int64 -> unit

set_int64_ne b i v sets b's native-endian 64-bit integer starting at byte index i to v.

  • since 4.08
val set_int64_be : bytes -> int -> int64 -> unit

set_int64_be b i v sets b's big-endian 64-bit integer starting at byte index i to v.

  • since 4.08
val set_int64_le : bytes -> int -> int64 -> unit

set_int64_le b i v sets b's little-endian 64-bit integer starting at byte index i to v.

  • since 4.08

Byte sequences and concurrency safety

Care must be taken when concurrently accessing byte sequences from multiple domains: accessing a byte sequence will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every byte sequence operation that accesses more than one byte is not atomic. This includes iteration and scanning.

For example, consider the following program:

let size = 100_000_000
+let b = Bytes.make size  ' '
+let update b f ()  =
+  Bytes.iteri (fun i x -> Bytes.set b i (Char.chr (f (Char.code x)))) b
+let d1 = Domain.spawn (update b (fun x -> x + 1))
+let d2 = Domain.spawn (update b (fun x -> 2 * x + 1))
+let () = Domain.join d1; Domain.join d2

the bytes sequence b may contain a non-deterministic mixture of '!', 'A', 'B', and 'C' values.

After executing this code, each byte of the sequence b is either '!', 'A', 'B', or 'C'. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

Data races

If two domains only access disjoint parts of a byte sequence, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

A data race is said to occur when two domains access the same byte without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the elements of the sequence.

Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location.

Mixed-size accesses

Another subtle point is that if a data race involves mixed-size writes and reads to the same location, the order in which those writes and reads are observed by domains is not specified. For instance, the following code write sequentially a 32-bit integer and a char to the same index

let b = Bytes.make 10 '\000'
+let d1 = Domain.spawn (fun () -> Bytes.set_int32_ne b 0 100; b.[0] <- 'd' )

In this situation, a domain that observes the write of 'd' to b.0 is not guaranteed to also observe the write to indices 1, 2, or 3.

diff --git a/findlib-1/melange/Stdlib/BytesLabels/index.html b/findlib-1/melange/Stdlib/BytesLabels/index.html new file mode 100644 index 000000000..f7c6136eb --- /dev/null +++ b/findlib-1/melange/Stdlib/BytesLabels/index.html @@ -0,0 +1,29 @@ + +BytesLabels (docs.findlib-1.melange.Stdlib.BytesLabels)

Module Stdlib.BytesLabels

Byte sequence operations.

A byte sequence is a mutable data structure that contains a fixed-length sequence of bytes. Each byte can be indexed in constant time for reading or writing.

Given a byte sequence s of length l, we can access each of the l bytes of s via its index in the sequence. Indexes start at 0, and we will call an index valid in s if it falls within the range [0...l-1] (inclusive). A position is the point between two bytes or at the beginning or end of the sequence. We call a position valid in s if it falls within the range [0...l] (inclusive). Note that the byte at index n is between positions n and n+1.

Two parameters start and len are said to designate a valid range of s if len >= 0 and start and start+len are valid positions in s.

Byte sequences can be modified in place, for instance via the set and blit functions described below. See also strings (module String), which are almost the same data structure, but cannot be modified in place.

Bytes are represented by the OCaml type char.

The labeled version of this module can be used as described in the StdLabels module.

val length : bytes -> int

Return the length (number of bytes) of the argument.

val get : bytes -> int -> char

get s n returns the byte at index n in argument s.

val set : bytes -> int -> char -> unit

set s n c modifies s in place, replacing the byte at index n with c.

val create : int -> bytes

create n returns a new byte sequence of length n. The sequence is uninitialized and contains arbitrary bytes.

val make : int -> char -> bytes

make n c returns a new byte sequence of length n, filled with the byte c.

val init : int -> f:(int -> char) -> bytes

init n f returns a fresh byte sequence of length n, with character i initialized to the result of f i (in increasing index order).

val empty : bytes

A byte sequence of size 0.

val copy : bytes -> bytes

Return a new byte sequence that contains the same bytes as the argument.

val of_string : string -> bytes

Return a new byte sequence that contains the same bytes as the given string.

val to_string : bytes -> string

Return a new string that contains the same bytes as the given byte sequence.

val sub : bytes -> pos:int -> len:int -> bytes

sub s ~pos ~len returns a new byte sequence of length len, containing the subsequence of s that starts at position pos and has length len.

val sub_string : bytes -> pos:int -> len:int -> string

Same as sub but return a string instead of a byte sequence.

val extend : bytes -> left:int -> right:int -> bytes

extend s ~left ~right returns a new byte sequence that contains the bytes of s, with left uninitialized bytes prepended and right uninitialized bytes appended to it. If left or right is negative, then bytes are removed (instead of appended) from the corresponding side of s.

  • since 4.05 in BytesLabels
val fill : bytes -> pos:int -> len:int -> char -> unit

fill s ~pos ~len c modifies s in place, replacing len characters with c, starting at pos.

val blit : + src:bytes -> + src_pos:int -> + dst:bytes -> + dst_pos:int -> + len:int -> + unit

blit ~src ~src_pos ~dst ~dst_pos ~len copies len bytes from byte sequence src, starting at index src_pos, to byte sequence dst, starting at index dst_pos. It works correctly even if src and dst are the same byte sequence, and the source and destination intervals overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

val blit_string : + src:string -> + src_pos:int -> + dst:bytes -> + dst_pos:int -> + len:int -> + unit

blit_string ~src ~src_pos ~dst ~dst_pos ~len copies len bytes from string src, starting at index src_pos, to byte sequence dst, starting at index dst_pos.

  • raises Invalid_argument

    if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

  • since 4.05 in BytesLabels
val concat : sep:bytes -> bytes list -> bytes

concat ~sep sl concatenates the list of byte sequences sl, inserting the separator byte sequence sep between each, and returns the result as a new byte sequence.

val cat : bytes -> bytes -> bytes

cat s1 s2 concatenates s1 and s2 and returns the result as a new byte sequence.

  • since 4.05 in BytesLabels
val iter : f:(char -> unit) -> bytes -> unit

iter ~f s applies function f in turn to all the bytes of s. It is equivalent to f (get s 0); f (get s 1); ...; f (get s + (length s - 1)); ().

val iteri : f:(int -> char -> unit) -> bytes -> unit

Same as iter, but the function is applied to the index of the byte as first argument and the byte itself as second argument.

val map : f:(char -> char) -> bytes -> bytes

map ~f s applies function f in turn to all the bytes of s (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

val mapi : f:(int -> char -> char) -> bytes -> bytes

mapi ~f s calls f with each character of s and its index (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> bytes -> 'acc

fold_left f x s computes f (... (f (f x (get s 0)) (get s 1)) ...) (get s (n-1)), where n is the length of s.

  • since 4.13
val fold_right : f:(char -> 'acc -> 'acc) -> bytes -> init:'acc -> 'acc

fold_right f s x computes f (get s 0) (f (get s 1) ( ... (f (get s (n-1)) x) ...)), where n is the length of s.

  • since 4.13
val for_all : f:(char -> bool) -> bytes -> bool

for_all p s checks if all characters in s satisfy the predicate p.

  • since 4.13
val exists : f:(char -> bool) -> bytes -> bool

exists p s checks if at least one character of s satisfies the predicate p.

  • since 4.13
val trim : bytes -> bytes

Return a copy of the argument, without leading and trailing whitespace. The bytes regarded as whitespace are the ASCII characters ' ', '\012', '\n', '\r', and '\t'.

val escaped : bytes -> bytes

Return a copy of the argument, with special characters represented by escape sequences, following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash and double-quote.

val index : bytes -> char -> int

index s c returns the index of the first occurrence of byte c in s.

val index_opt : bytes -> char -> int option

index_opt s c returns the index of the first occurrence of byte c in s or None if c does not occur in s.

  • since 4.05
val rindex : bytes -> char -> int

rindex s c returns the index of the last occurrence of byte c in s.

val rindex_opt : bytes -> char -> int option

rindex_opt s c returns the index of the last occurrence of byte c in s or None if c does not occur in s.

  • since 4.05
val index_from : bytes -> int -> char -> int

index_from s i c returns the index of the first occurrence of byte c in s after position i. index s c is equivalent to index_from s 0 c.

  • raises Not_found

    if c does not occur in s after position i.

val index_from_opt : bytes -> int -> char -> int option

index_from_opt s i c returns the index of the first occurrence of byte c in s after position i or None if c does not occur in s after position i. index_opt s c is equivalent to index_from_opt s 0 c.

  • since 4.05
val rindex_from : bytes -> int -> char -> int

rindex_from s i c returns the index of the last occurrence of byte c in s before position i+1. rindex s c is equivalent to rindex_from s (length s - 1) c.

  • raises Not_found

    if c does not occur in s before position i+1.

val rindex_from_opt : bytes -> int -> char -> int option

rindex_from_opt s i c returns the index of the last occurrence of byte c in s before position i+1 or None if c does not occur in s before position i+1. rindex_opt s c is equivalent to rindex_from s (length s - 1) c.

  • since 4.05
val contains : bytes -> char -> bool

contains s c tests if byte c appears in s.

val contains_from : bytes -> int -> char -> bool

contains_from s start c tests if byte c appears in s after position start. contains s c is equivalent to contains_from + s 0 c.

val rcontains_from : bytes -> int -> char -> bool

rcontains_from s stop c tests if byte c appears in s before position stop+1.

val uppercase_ascii : bytes -> bytes

Return a copy of the argument, with all lowercase letters translated to uppercase, using the US-ASCII character set.

  • since 4.05
val lowercase_ascii : bytes -> bytes

Return a copy of the argument, with all uppercase letters translated to lowercase, using the US-ASCII character set.

  • since 4.05
val capitalize_ascii : bytes -> bytes

Return a copy of the argument, with the first character set to uppercase, using the US-ASCII character set.

  • since 4.05
val uncapitalize_ascii : bytes -> bytes

Return a copy of the argument, with the first character set to lowercase, using the US-ASCII character set.

  • since 4.05
type t = bytes

An alias for the type of byte sequences.

val compare : t -> t -> int

The comparison function for byte sequences, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Bytes to be passed as argument to the functors Set.Make and Map.Make.

val equal : t -> t -> bool

The equality function for byte sequences.

  • since 4.05
val starts_with : prefix:bytes -> bytes -> bool

starts_with ~prefix s is true if and only if s starts with prefix.

  • since 4.13
val ends_with : suffix:bytes -> bytes -> bool

ends_with ~suffix s is true if and only if s ends with suffix.

  • since 4.13

Unsafe conversions (for advanced users)

This section describes unsafe, low-level conversion functions between bytes and string. They do not copy the internal data; used improperly, they can break the immutability invariant on strings provided by the -safe-string option. They are available for expert library authors, but for most purposes you should use the always-correct to_string and of_string instead.

val unsafe_to_string : bytes -> string

Unsafely convert a byte sequence into a string.

To reason about the use of unsafe_to_string, it is convenient to consider an "ownership" discipline. A piece of code that manipulates some data "owns" it; there are several disjoint ownership modes, including:

  • Unique ownership: the data may be accessed and mutated
  • Shared ownership: the data has several owners, that may only access it, not mutate it.

Unique ownership is linear: passing the data to another piece of code means giving up ownership (we cannot write the data again). A unique owner may decide to make the data shared (giving up mutation rights on it), but shared data may not become uniquely-owned again.

unsafe_to_string s can only be used when the caller owns the byte sequence s -- either uniquely or as shared immutable data. The caller gives up ownership of s, and gains ownership of the returned string.

There are two valid use-cases that respect this ownership discipline:

1. Creating a string by initializing and mutating a byte sequence that is never changed after initialization is performed.

let string_init len f : string =
+  let s = Bytes.create len in
+  for i = 0 to len - 1 do Bytes.set s i (f i) done;
+  Bytes.unsafe_to_string s

This function is safe because the byte sequence s will never be accessed or mutated after unsafe_to_string is called. The string_init code gives up ownership of s, and returns the ownership of the resulting string to its caller.

Note that it would be unsafe if s was passed as an additional parameter to the function f as it could escape this way and be mutated in the future -- string_init would give up ownership of s to pass it to f, and could not call unsafe_to_string safely.

We have provided the String.init, String.map and String.mapi functions to cover most cases of building new strings. You should prefer those over to_string or unsafe_to_string whenever applicable.

2. Temporarily giving ownership of a byte sequence to a function that expects a uniquely owned string and returns ownership back, so that we can mutate the sequence again after the call ended.

let bytes_length (s : bytes) =
+  String.length (Bytes.unsafe_to_string s)

In this use-case, we do not promise that s will never be mutated after the call to bytes_length s. The String.length function temporarily borrows unique ownership of the byte sequence (and sees it as a string), but returns this ownership back to the caller, which may assume that s is still a valid byte sequence after the call. Note that this is only correct because we know that String.length does not capture its argument -- it could escape by a side-channel such as a memoization combinator.

The caller may not mutate s while the string is borrowed (it has temporarily given up ownership). This affects concurrent programs, but also higher-order functions: if String.length returned a closure to be called later, s should not be mutated until this closure is fully applied and returns ownership.

val unsafe_of_string : string -> bytes

Unsafely convert a shared string to a byte sequence that should not be mutated.

The same ownership discipline that makes unsafe_to_string correct applies to unsafe_of_string: you may use it if you were the owner of the string value, and you will own the return bytes in the same mode.

In practice, unique ownership of string values is extremely difficult to reason about correctly. You should always assume strings are shared, never uniquely owned.

For example, string literals are implicitly shared by the compiler, so you never uniquely own them.

let incorrect = Bytes.unsafe_of_string "hello"
+let s = Bytes.of_string "hello"

The first declaration is incorrect, because the string literal "hello" could be shared by the compiler with other parts of the program, and mutating incorrect is a bug. You must always use the second version, which performs a copy and is thus correct.

Assuming unique ownership of strings that are not string literals, but are (partly) built from string literals, is also incorrect. For example, mutating unsafe_of_string ("foo" ^ s) could mutate the shared string "foo" -- assuming a rope-like representation of strings. More generally, functions operating on strings will assume shared ownership, they do not preserve unique ownership. It is thus incorrect to assume unique ownership of the result of unsafe_of_string.

The only case we have reasonable confidence is safe is if the produced bytes is shared -- used as an immutable byte sequence. This is possibly useful for incremental migration of low-level programs that manipulate immutable sequences of bytes (for example Marshal.from_bytes) and previously used the string type for this purpose.

val split_on_char : sep:char -> bytes -> bytes list

split_on_char sep s returns the list of all (possibly empty) subsequences of s that are delimited by the sep character.

The function's output is specified by the following invariants:

  • The list is not empty.
  • Concatenating its elements using sep as a separator returns a byte sequence equal to the input (Bytes.concat (Bytes.make 1 sep) + (Bytes.split_on_char sep s) = s).
  • No byte sequence in the result contains the sep character.
  • since 4.13

Iterators

val to_seq : t -> char Seq.t

Iterate on the string, in increasing index order. Modifications of the string during iteration will be reflected in the sequence.

  • since 4.07
val to_seqi : t -> (int * char) Seq.t

Iterate on the string, in increasing order, yielding indices along chars

  • since 4.07
val of_seq : char Seq.t -> t

Create a string from the generator

  • since 4.07

UTF codecs and validations

UTF-8

val get_utf_8_uchar : t -> int -> Uchar.utf_decode

get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

val set_utf_8_uchar : t -> int -> Uchar.t -> int

set_utf_8_uchar b i u UTF-8 encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

val is_valid_utf_8 : t -> bool

is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

UTF-16BE

val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

val set_utf_16be_uchar : t -> int -> Uchar.t -> int

set_utf_16be_uchar b i u UTF-16BE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

val is_valid_utf_16be : t -> bool

is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

UTF-16LE

val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

val set_utf_16le_uchar : t -> int -> Uchar.t -> int

set_utf_16le_uchar b i u UTF-16LE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

val is_valid_utf_16le : t -> bool

is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

Binary encoding/decoding of integers

The functions in this section binary encode and decode integers to and from byte sequences.

All following functions raise Invalid_argument if the space needed at index i to decode or encode the integer is not available.

Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are handled as follows:

val get_uint8 : bytes -> int -> int

get_uint8 b i is b's unsigned 8-bit integer starting at byte index i.

  • since 4.08
val get_int8 : bytes -> int -> int

get_int8 b i is b's signed 8-bit integer starting at byte index i.

  • since 4.08
val get_uint16_ne : bytes -> int -> int

get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at byte index i.

  • since 4.08
val get_uint16_be : bytes -> int -> int

get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at byte index i.

  • since 4.08
val get_uint16_le : bytes -> int -> int

get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at byte index i.

  • since 4.08
val get_int16_ne : bytes -> int -> int

get_int16_ne b i is b's native-endian signed 16-bit integer starting at byte index i.

  • since 4.08
val get_int16_be : bytes -> int -> int

get_int16_be b i is b's big-endian signed 16-bit integer starting at byte index i.

  • since 4.08
val get_int16_le : bytes -> int -> int

get_int16_le b i is b's little-endian signed 16-bit integer starting at byte index i.

  • since 4.08
val get_int32_ne : bytes -> int -> int32

get_int32_ne b i is b's native-endian 32-bit integer starting at byte index i.

  • since 4.08
val get_int32_be : bytes -> int -> int32

get_int32_be b i is b's big-endian 32-bit integer starting at byte index i.

  • since 4.08
val get_int32_le : bytes -> int -> int32

get_int32_le b i is b's little-endian 32-bit integer starting at byte index i.

  • since 4.08
val get_int64_ne : bytes -> int -> int64

get_int64_ne b i is b's native-endian 64-bit integer starting at byte index i.

  • since 4.08
val get_int64_be : bytes -> int -> int64

get_int64_be b i is b's big-endian 64-bit integer starting at byte index i.

  • since 4.08
val get_int64_le : bytes -> int -> int64

get_int64_le b i is b's little-endian 64-bit integer starting at byte index i.

  • since 4.08
val set_uint8 : bytes -> int -> int -> unit

set_uint8 b i v sets b's unsigned 8-bit integer starting at byte index i to v.

  • since 4.08
val set_int8 : bytes -> int -> int -> unit

set_int8 b i v sets b's signed 8-bit integer starting at byte index i to v.

  • since 4.08
val set_uint16_ne : bytes -> int -> int -> unit

set_uint16_ne b i v sets b's native-endian unsigned 16-bit integer starting at byte index i to v.

  • since 4.08
val set_uint16_be : bytes -> int -> int -> unit

set_uint16_be b i v sets b's big-endian unsigned 16-bit integer starting at byte index i to v.

  • since 4.08
val set_uint16_le : bytes -> int -> int -> unit

set_uint16_le b i v sets b's little-endian unsigned 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int16_ne : bytes -> int -> int -> unit

set_int16_ne b i v sets b's native-endian signed 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int16_be : bytes -> int -> int -> unit

set_int16_be b i v sets b's big-endian signed 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int16_le : bytes -> int -> int -> unit

set_int16_le b i v sets b's little-endian signed 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int32_ne : bytes -> int -> int32 -> unit

set_int32_ne b i v sets b's native-endian 32-bit integer starting at byte index i to v.

  • since 4.08
val set_int32_be : bytes -> int -> int32 -> unit

set_int32_be b i v sets b's big-endian 32-bit integer starting at byte index i to v.

  • since 4.08
val set_int32_le : bytes -> int -> int32 -> unit

set_int32_le b i v sets b's little-endian 32-bit integer starting at byte index i to v.

  • since 4.08
val set_int64_ne : bytes -> int -> int64 -> unit

set_int64_ne b i v sets b's native-endian 64-bit integer starting at byte index i to v.

  • since 4.08
val set_int64_be : bytes -> int -> int64 -> unit

set_int64_be b i v sets b's big-endian 64-bit integer starting at byte index i to v.

  • since 4.08
val set_int64_le : bytes -> int -> int64 -> unit

set_int64_le b i v sets b's little-endian 64-bit integer starting at byte index i to v.

  • since 4.08

Byte sequences and concurrency safety

Care must be taken when concurrently accessing byte sequences from multiple domains: accessing a byte sequence will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every byte sequence operation that accesses more than one byte is not atomic. This includes iteration and scanning.

For example, consider the following program:

let size = 100_000_000
+let b = Bytes.make size  ' '
+let update b f ()  =
+  Bytes.iteri (fun i x -> Bytes.set b i (Char.chr (f (Char.code x)))) b
+let d1 = Domain.spawn (update b (fun x -> x + 1))
+let d2 = Domain.spawn (update b (fun x -> 2 * x + 1))
+let () = Domain.join d1; Domain.join d2

the bytes sequence b may contain a non-deterministic mixture of '!', 'A', 'B', and 'C' values.

After executing this code, each byte of the sequence b is either '!', 'A', 'B', or 'C'. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

Data races

If two domains only access disjoint parts of a byte sequence, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

A data race is said to occur when two domains access the same byte without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the elements of the sequence.

Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location.

Mixed-size accesses

Another subtle point is that if a data race involves mixed-size writes and reads to the same location, the order in which those writes and reads are observed by domains is not specified. For instance, the following code write sequentially a 32-bit integer and a char to the same index

let b = Bytes.make 10 '\000'
+let d1 = Domain.spawn (fun () -> Bytes.set_int32_ne b 0 100; b.[0] <- 'd' )

In this situation, a domain that observes the write of 'd' to b.0 is not guaranteed to also observe the write to indices 1, 2, or 3.

diff --git a/findlib-1/melange/Stdlib/Char/index.html b/findlib-1/melange/Stdlib/Char/index.html new file mode 100644 index 000000000..6e0a8c812 --- /dev/null +++ b/findlib-1/melange/Stdlib/Char/index.html @@ -0,0 +1,2 @@ + +Char (docs.findlib-1.melange.Stdlib.Char)

Module Stdlib.Char

Character operations.

val code : char -> int

Return the ASCII code of the argument.

val chr : int -> char

Return the character with the given ASCII code.

val escaped : char -> string

Return a string representing the given character, with special characters escaped following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash, double-quote, and single-quote.

val lowercase_ascii : char -> char

Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

  • since 4.03
val uppercase_ascii : char -> char

Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

  • since 4.03
type t = char

An alias for the type of characters.

val compare : t -> t -> int

The comparison function for characters, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Char to be passed as argument to the functors Set.Make and Map.Make.

val equal : t -> t -> bool

The equal function for chars.

  • since 4.03
val seeded_hash : int -> t -> int

A seeded hash function for characters, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : t -> int

An unseeded hash function for characters, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.1
diff --git a/findlib-1/melange/Stdlib/Complex/index.html b/findlib-1/melange/Stdlib/Complex/index.html new file mode 100644 index 000000000..820a89c30 --- /dev/null +++ b/findlib-1/melange/Stdlib/Complex/index.html @@ -0,0 +1,2 @@ + +Complex (docs.findlib-1.melange.Stdlib.Complex)

Module Stdlib.Complex

Complex numbers.

This module provides arithmetic operations on complex numbers. Complex numbers are represented by their real and imaginary parts (cartesian representation). Each part is represented by a double-precision floating-point number (type float).

type t = {
  1. re : float;
  2. im : float;
}

The type of complex numbers. re is the real part and im the imaginary part.

val zero : t

The complex number 0.

val one : t

The complex number 1.

val i : t

The complex number i.

val neg : t -> t

Unary negation.

val conj : t -> t

Conjugate: given the complex x + i.y, returns x - i.y.

val add : t -> t -> t

Addition

val sub : t -> t -> t

Subtraction

val mul : t -> t -> t

Multiplication

val inv : t -> t

Multiplicative inverse (1/z).

val div : t -> t -> t

Division

val sqrt : t -> t

Square root. The result x + i.y is such that x > 0 or x = 0 and y >= 0. This function has a discontinuity along the negative real axis.

val norm2 : t -> float

Norm squared: given x + i.y, returns x^2 + y^2.

val norm : t -> float

Norm: given x + i.y, returns sqrt(x^2 + y^2).

val arg : t -> float

Argument. The argument of a complex number is the angle in the complex plane between the positive real axis and a line passing through zero and the number. This angle ranges from -pi to pi. This function has a discontinuity along the negative real axis.

val polar : float -> float -> t

polar norm arg returns the complex having norm norm and argument arg.

val exp : t -> t

Exponentiation. exp z returns e to the z power.

val log : t -> t

Natural logarithm (in base e).

val pow : t -> t -> t

Power function. pow z1 z2 returns z1 to the z2 power.

diff --git a/findlib-1/melange/Stdlib/Digest/index.html b/findlib-1/melange/Stdlib/Digest/index.html new file mode 100644 index 000000000..aedefda80 --- /dev/null +++ b/findlib-1/melange/Stdlib/Digest/index.html @@ -0,0 +1,2 @@ + +Digest (docs.findlib-1.melange.Stdlib.Digest)

Module Stdlib.Digest

MD5 message digest.

This module provides functions to compute 128-bit 'digests' of arbitrary-length strings or files. The algorithm used is MD5.

The MD5 hash function is not cryptographically secure. Hence, this module should not be used for security-sensitive applications. More recent, stronger cryptographic primitives should be used instead.

type t = string

The type of digests: 16-character strings.

val compare : t -> t -> int

The comparison function for 16-character digest, with the same specification as Stdlib.compare and the implementation shared with String.compare. Along with the type t, this function compare allows the module Digest to be passed as argument to the functors Set.Make and Map.Make.

  • since 4.00
val equal : t -> t -> bool

The equal function for 16-character digest.

  • since 4.03
val string : string -> t

Return the digest of the given string.

val bytes : bytes -> t

Return the digest of the given byte sequence.

  • since 4.02
val substring : string -> int -> int -> t

Digest.substring s ofs len returns the digest of the substring of s starting at index ofs and containing len characters.

val subbytes : bytes -> int -> int -> t

Digest.subbytes s ofs len returns the digest of the subsequence of s starting at index ofs and containing len bytes.

  • since 4.02
val channel : in_channel -> int -> t

If len is nonnegative, Digest.channel ic len reads len characters from channel ic and returns their digest, or raises End_of_file if end-of-file is reached before len characters are read. If len is negative, Digest.channel ic len reads all characters from ic until end-of-file is reached and return their digest.

val file : string -> t

Return the digest of the file whose name is given.

val output : out_channel -> t -> unit

Write a digest on the given output channel.

val input : in_channel -> t

Read a digest from the given input channel.

val to_hex : t -> string

Return the printable hexadecimal representation of the given digest.

val from_hex : string -> t

Convert a hexadecimal representation back into the corresponding digest.

  • raises Invalid_argument

    if the argument is not exactly 32 hexadecimal characters.

  • since 4.00
diff --git a/findlib-1/melange/Stdlib/Domain/DLS/index.html b/findlib-1/melange/Stdlib/Domain/DLS/index.html new file mode 100644 index 000000000..93bcb1503 --- /dev/null +++ b/findlib-1/melange/Stdlib/Domain/DLS/index.html @@ -0,0 +1,12 @@ + +DLS (docs.findlib-1.melange.Stdlib.Domain.DLS)

Module Domain.DLS

Domain-local Storage

type 'a key

Type of a DLS key

val new_key : ?split_from_parent:('a -> 'a) -> (unit -> 'a) -> 'a key

new_key f returns a new key bound to initialiser f for accessing , domain-local variables.

If split_from_parent is not provided, the value for a new domain will be computed on-demand by the new domain: the first get call will call the initializer f and store that value.

If split_from_parent is provided, spawning a domain will derive the child value (for this key) from the parent value. This computation happens in the parent domain and it always happens, regardless of whether the child domain will use it. If the splitting function is expensive or requires child-side computation, consider using 'a Lazy.t key:

let init () = ...
+
+let split_from_parent parent_value =
+  ... parent-side computation ...;
+  lazy (
+    ... child-side computation ...
+  )
+
+let key = Domain.DLS.new_key ~split_from_parent init
+
+let get () = Lazy.force (Domain.DLS.get key)

In this case a part of the computation happens on the child domain; in particular, it can access parent_value concurrently with the parent domain, which may require explicit synchronization to avoid data races.

val get : 'a key -> 'a

get k returns v if a value v is associated to the key k on the calling domain's domain-local state. Sets k's value with its initialiser and returns it otherwise.

val set : 'a key -> 'a -> unit

set k v updates the calling domain's domain-local state to associate the key k with value v. It overwrites any previous values associated to k, which cannot be restored later.

diff --git a/findlib-1/melange/Stdlib/Domain/index.html b/findlib-1/melange/Stdlib/Domain/index.html new file mode 100644 index 000000000..e4c9a21a9 --- /dev/null +++ b/findlib-1/melange/Stdlib/Domain/index.html @@ -0,0 +1,5 @@ + +Domain (docs.findlib-1.melange.Stdlib.Domain)

Module Stdlib.Domain

Domains.

See 'Parallel programming' chapter in the manual.

type !'a t

A domain of type 'a t runs independently, eventually producing a result of type 'a, or an exception

val spawn : (unit -> 'a) -> 'a t

spawn f creates a new domain that runs in parallel with the current domain.

  • raises Failure

    if the program has insufficient resources to create another domain.

val join : 'a t -> 'a

join d blocks until domain d runs to completion. If d results in a value, then that is returned by join d. If d raises an uncaught exception, then that is re-raised by join d.

type id = private int

Domains have unique integer identifiers

val get_id : 'a t -> id

get_id d returns the identifier of the domain d

val self : unit -> id

self () is the identifier of the currently running domain

val before_first_spawn : (unit -> unit) -> unit

before_first_spawn f registers f to be called before the first domain is spawned by the program. The functions registered with before_first_spawn are called on the main (initial) domain. The functions registered with before_first_spawn are called in 'first in, first out' order: the oldest function added with before_first_spawn is called first.

val at_exit : (unit -> unit) -> unit

at_exit f registers f to be called when the current domain exits. Note that at_exit callbacks are domain-local and only apply to the calling domain. The registered functions are called in 'last in, first out' order: the function most recently added with at_exit is called first. An example:

let temp_file_key = Domain.DLS.new_key (fun _ ->
+  let tmp = snd (Filename.open_temp_file "" "") in
+  Domain.at_exit (fun () -> close_out_noerr tmp);
+  tmp)

The snippet above creates a key that when retrieved for the first time will open a temporary file and register an at_exit callback to close it, thus guaranteeing the descriptor is not leaked in case the current domain exits.

val cpu_relax : unit -> unit

If busy-waiting, calling cpu_relax () between iterations will improve performance on some CPU architectures

val is_main_domain : unit -> bool

is_main_domain () returns true if called from the initial domain.

The recommended maximum number of domains which should be running simultaneously (including domains already running).

The value returned is at least 1.

module DLS : sig ... end

Domain-local Storage

diff --git a/findlib-1/melange/Stdlib/Dynarray/index.html b/findlib-1/melange/Stdlib/Dynarray/index.html new file mode 100644 index 000000000..16de70797 --- /dev/null +++ b/findlib-1/melange/Stdlib/Dynarray/index.html @@ -0,0 +1,102 @@ + +Dynarray (docs.findlib-1.melange.Stdlib.Dynarray)

Module Stdlib.Dynarray

Dynamic arrays.

The Array module provide arrays of fixed length. Dynarray provides arrays whose length can change over time, by adding or removing elements at the end of the array.

This is typically used to accumulate elements whose number is not known in advance or changes during computation, while also providing fast access to elements at arbitrary positions.

let dynarray_of_list li =
+  let arr = Dynarray.create () in
+  List.iter (fun v -> Dynarray.add_last arr v) li;
+  arr

The Buffer module provides similar features, but it is specialized for accumulating characters into a dynamically-resized string.

The Stack module provides a last-in first-out data structure that can be easily implemented on top of dynamic arrays.

Warning. In their current implementation, the memory layout of dynamic arrays differs from the one of Arrays. See the Memory Layout section for more information.

Unsynchronized accesses

Concurrent accesses to dynamic arrays must be synchronized (for instance with a Mutex.t). Unsynchronized accesses to a dynamic array are a programming error that may lead to an invalid dynamic array state, on which some operations would fail with an Invalid_argument exception.

Dynamic arrays

type !'a t

A dynamic array containing values of type 'a.

A dynamic array a provides constant-time get and set operations on indices between 0 and Dynarray.length a - 1 included. Its length may change over time by adding or removing elements to the end of the array.

We say that an index into a dynarray a is valid if it is in 0 .. length a - 1 and invalid otherwise.

val create : unit -> 'a t

create () is a new, empty array.

val make : int -> 'a -> 'a t

make n x is a new array of length n, filled with x.

val init : int -> (int -> 'a) -> 'a t

init n f is a new array a of length n, such that get a i is f i. In other words, the elements of a are f 0, then f 1, then f 2... and f (n - 1) last, evaluated in that order.

This is similar to Array.init.

val get : 'a t -> int -> 'a

get a i is the i-th element of a, starting with index 0.

val set : 'a t -> int -> 'a -> unit

set a i x sets the i-th element of a to be x.

i must be a valid index. set does not add new elements to the array -- see add_last to add an element.

val length : 'a t -> int

length a is the number of elements in the array.

val is_empty : 'a t -> bool

is_empty a is true if a is empty, that is, if length a = 0.

val get_last : 'a t -> 'a

get_last a is the element of a at index length a - 1.

val find_last : 'a t -> 'a option

find_last a is None if a is empty and Some (get_last a) otherwise.

val copy : 'a t -> 'a t

copy a is a shallow copy of a, a new array containing the same elements as a.

Adding elements

Note: all operations adding elements raise Invalid_argument if the length needs to grow beyond Sys.max_array_length.

val add_last : 'a t -> 'a -> unit

add_last a x adds the element x at the end of the array a.

val append_array : 'a t -> 'a array -> unit

append_array a b adds all elements of b at the end of a, in the order they appear in b.

For example:

let a = Dynarray.of_list [1;2] in
+Dynarray.append_array a [|3; 4|];
+assert (Dynarray.to_list a = [1; 2; 3; 4])
val append_list : 'a t -> 'a list -> unit

Like append_array but with a list.

val append : 'a t -> 'a t -> unit

append a b is like append_array a b, but b is itself a dynamic array instead of a fixed-size array.

Warning: append a a is a programming error because it iterates on a and adds elements to it at the same time -- see the Iteration section below. It fails with Invalid_argument. If you really want to append a copy of a to itself, you can use Dynarray.append_array a (Dynarray.to_array a) which copies a into a temporary array.

val append_seq : 'a t -> 'a Seq.t -> unit

Like append_array but with a sequence.

Warning: append_seq a (to_seq_reentrant a) simultaneously traverses a and adds element to it; the ordering of those operations is unspecified, and may result in an infinite loop -- the new elements may in turn be produced by to_seq_reentrant a and get added again and again.

val append_iter : 'a t -> (('a -> unit) -> 'x -> unit) -> 'x -> unit

append_iter a iter x adds each element of x to the end of a. This is iter (add_last a) x.

For example, append_iter a List.iter [1;2;3] would add elements 1, 2, and then 3 at the end of a. append_iter a Queue.iter q adds elements from the queue q.

Removing elements

val pop_last_opt : 'a t -> 'a option

pop_last_opt a removes and returns the last element of a, or None if the array is empty.

val pop_last : 'a t -> 'a

pop_last a removes and returns the last element of a.

val remove_last : 'a t -> unit

remove_last a removes the last element of a, if any. It does nothing if a is empty.

val truncate : 'a t -> int -> unit

truncate a n truncates a to have at most n elements.

It removes elements whose index is greater or equal to n. It does nothing if n >= length a.

truncate a n is equivalent to:

if n < 0 then invalid_argument "...";
+while length a > n do
+  remove_last a
+done
val clear : 'a t -> unit

clear a is truncate a 0, it removes all the elements of a.

Iteration

The iteration functions traverse the elements of a dynamic array. Traversals of a are computed in increasing index order: from the element of index 0 to the element of index length a - 1.

It is a programming error to change the length of an array (by adding or removing elements) during an iteration on the array. Any iteration function will fail with Invalid_argument if it detects such a length change.

val iter : ('a -> unit) -> 'a t -> unit

iter f a calls f on each element of a.

val iteri : (int -> 'a -> unit) -> 'a t -> unit

iteri f a calls f i x for each x at index i in a.

val map : ('a -> 'b) -> 'a t -> 'b t

map f a is a new array of elements of the form f x for each element x of a.

For example, if the elements of a are x0, x1, x2, then the elements of b are f x0, f x1, f x2.

val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t

mapi f a is a new array of elements of the form f i x for each element x of a at index i.

For example, if the elements of a are x0, x1, x2, then the elements of b are f 0 x0, f 1 x1, f 2 x2.

val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

fold_left f acc a folds f over a in order, starting with accumulator acc.

For example, if the elements of a are x0, x1, then fold f acc a is

let acc = f acc x0 in
+let acc = f acc x1 in
+acc
val fold_right : ('a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold_right f a acc computes f x0 (f x1 (... (f xn acc) ...)) where x0, x1, ..., xn are the elements of a.

val exists : ('a -> bool) -> 'a t -> bool

exists f a is true if some element of a satisfies f.

For example, if the elements of a are x0, x1, x2, then exists f a is f x0 || f x1 || f x2.

val for_all : ('a -> bool) -> 'a t -> bool

for_all f a is true if all elements of a satisfy f. This includes the case where a is empty.

For example, if the elements of a are x0, x1, then exists f a is f x0 && f x1 && f x2.

val filter : ('a -> bool) -> 'a t -> 'a t

filter f a is a new array of all the elements of a that satisfy f. In other words, it is an array b such that, for each element x in a in order, x is added to b if f x is true.

For example, filter (fun x -> x >= 0) a is a new array of all non-negative elements of a, in order.

val filter_map : ('a -> 'b option) -> 'a t -> 'b t

filter_map f a is a new array of elements y such that f x is Some y for an element x of a. In others words, it is an array b such that, for each element x of a in order:

  • if f x = Some y, then y is added to b,
  • if f x = None, then no element is added to b.

For example, filter_map int_of_string_opt inputs returns a new array of integers read from the strings in inputs, ignoring strings that cannot be converted to integers.

Conversions to other data structures

Note: the of_* functions raise Invalid_argument if the length needs to grow beyond Sys.max_array_length.

The to_* functions, except those specifically marked "reentrant", iterate on their dynarray argument. In particular it is a programming error if the length of the dynarray changes during their execution, and the conversion functions raise Invalid_argument if they observe such a change.

val of_array : 'a array -> 'a t

of_array arr returns a dynamic array corresponding to the fixed-sized array a. Operates in O(n) time by making a copy.

val to_array : 'a t -> 'a array

to_array a returns a fixed-sized array corresponding to the dynamic array a. This always allocate a new array and copies elements into it.

val of_list : 'a list -> 'a t

of_list l is the array containing the elements of l in the same order.

val to_list : 'a t -> 'a list

to_list a is a list with the elements contained in the array a.

val of_seq : 'a Seq.t -> 'a t

of_seq seq is an array containing the same elements as seq.

It traverses seq once and will terminate only if seq is finite.

val to_seq : 'a t -> 'a Seq.t

to_seq a is the sequence of elements get a 0, get a 1... get a (length a - 1).

val to_seq_reentrant : 'a t -> 'a Seq.t

to_seq_reentrant a is a reentrant variant of to_seq, in the sense that one may still access its elements after the length of a has changed.

Demanding the i-th element of the resulting sequence (which can happen zero, one or several times) will access the i-th element of a at the time of the demand. The sequence stops if a has less than i elements at this point.

val to_seq_rev : 'a t -> 'a Seq.t

to_seq_rev a is the sequence of elements get a (l - 1), get a (l - 2)... get a 0, where l is length a at the time to_seq_rev is invoked.

val to_seq_rev_reentrant : 'a t -> 'a Seq.t

to_seq_rev_reentrant a is a reentrant variant of to_seq_rev, in the sense that one may still access its elements after the length of a has changed.

Elements that have been removed from the array by the time they are demanded in the sequence are skipped.

Advanced topics for performance

Backing array, capacity

Internally, a dynamic array uses a backing array (a fixed-size array as provided by the Array module) whose length is greater or equal to the length of the dynamic array. We define the capacity of a dynamic array as the length of its backing array.

The capacity of a dynamic array is relevant in advanced scenarios, when reasoning about the performance of dynamic array programs:

The implementation uses a standard exponential reallocation strategy which guarantees amortized constant-time operation; in particular, the total capacity of all backing arrays allocated over the lifetime of a dynamic array is at worst proportional to the total number of elements added.

In other words, users need not care about capacity and reallocations, and they will get reasonable behavior by default. However, in some performance-sensitive scenarios the functions below can help control memory usage or guarantee an optimal number of reallocations.

val capacity : 'a t -> int

capacity a is the length of a's backing array.

val ensure_capacity : 'a t -> int -> unit

ensure_capacity a n makes sure that the capacity of a is at least n.

  • raises Invalid_argument

    if the requested capacity is outside the range 0 .. Sys.max_array_length.

    An example would be to reimplement of_array without using init:

    let of_array arr =
    +  let a = Dynarray.create () in
    +  Dynarray.ensure_capacity a (Array.length arr);
    +  Array.iter (fun v -> add_last a v) arr

    Using ensure_capacity guarantees that at most one reallocation will take place, instead of possibly several.

    Without this ensure_capacity hint, the number of resizes would be logarithmic in the length of arr, creating a constant-factor slowdown noticeable when arr is large.

val ensure_extra_capacity : 'a t -> int -> unit

ensure_extra_capacity a n is ensure_capacity a (length a + n), it makes sure that a has room for n extra items.

  • raises Invalid_argument

    if the total requested capacity is outside the range 0 .. Sys.max_array_length.

    A use case would be to implement append_array:

    let append_array a arr =
    +  ensure_extra_capacity a (Array.length arr);
    +  Array.iter (fun v -> add_last a v) arr
val fit_capacity : 'a t -> unit

fit_capacity a reallocates a backing array if necessary, so that the resulting capacity is exactly length a, with no additional empty space at the end. This can be useful to make sure there is no memory wasted on a long-lived array.

Note that calling fit_capacity breaks the amortized complexity guarantees provided by the default reallocation strategy. Calling it repeatedly on an array may have quadratic complexity, both in time and in total number of words allocated.

If you know that a dynamic array has reached its final length, which will remain fixed in the future, it is sufficient to call to_array and only keep the resulting fixed-size array. fit_capacity is useful when you need to keep a dynamic array for eventual future resizes.

val set_capacity : 'a t -> int -> unit

set_capacity a n reallocates a backing array if necessary, so that the resulting capacity is exactly n. In particular, all elements of index n or greater are removed.

Like fit_capacity, this function breaks the amortized complexity guarantees provided by the reallocation strategy. Calling it repeatedly on an array may have quadratic complexity, both in time and in total number of words allocated.

This is an advanced function; in particular, ensure_capacity should be preferred to increase the capacity, as it preserves those amortized guarantees.

val reset : 'a t -> unit

reset a clears a and replaces its backing array by an empty array.

It is equivalent to set_capacity a 0 or clear a; fit_capacity a.

No leaks: preservation of memory liveness

The user-provided values reachable from a dynamic array a are exactly the elements in the positions 0 to length a - 1. In particular, no user-provided values are "leaked" by being present in the backing array in position length a or later.

Memory layout of dynarrays

In the current implementation, the backing array of an 'a Dynarray.t is not an 'a array, but something with the same representation as an 'a option array or 'a ref array. Each element is in a "box", allocated when the element is first added to the array -- see the implementation for more details.

Using an 'a array would be delicate, as there is no obvious type-correct way to represent the empty space at the end of the backing array -- using user-provided values would either complicate the API or violate the no leaks guarantee. The constraint of remaining memory-safe under unsynchronized concurrent usage makes it even more difficult. Various unsafe ways to do this have been discussed, with no consensus on a standard implementation so far.

On a realistic automated-theorem-proving program that relies heavily on dynamic arrays, we measured the overhead of this extra "boxing" as at most 25%. We believe that the overhead for most uses of dynarray is much smaller, negligible in many cases, but you may still prefer to use your own specialized implementation for performance. (If you know that you do not need the no leaks guarantee, you can also speed up deleting elements.)

Code examples

Min-heaps for mutable priority queues

We can use dynamic arrays to implement a mutable priority queue. A priority queue provides a function to add elements, and a function to extract the minimum element -- according to some comparison function.

(* We present our priority queues as a functor
+   parametrized on the comparison function. *)
+module Heap (Elem : Map.OrderedType) : sig
+  type t
+  val create : unit -> t
+  val add : t -> Elem.t -> unit
+  val pop_min : t -> Elem.t option
+end = struct
+
+  (* Our priority queues are implemented using the standard "min heap"
+     data structure, a dynamic array representing a binary tree. *)
+  type t = Elem.t Dynarray.t
+  let create = Dynarray.create
+
+ (* The node of index [i] has as children the nodes of index [2 * i + 1]
+    and [2 * i + 2] -- if they are valid indices in the dynarray. *)
+  let left_child i = 2 * i + 1
+  let right_child i = 2 * i + 2
+  let parent_node i = (i - 1) / 2
+
+  (* We use indexing operators for convenient notations. *)
+  let ( .!() ) = Dynarray.get
+  let ( .!()<- ) = Dynarray.set
+
+  (* Auxiliary functions to compare and swap two elements
+     in the dynamic array. *)
+  let order h i j =
+    Elem.compare h.!(i) h.!(j)
+
+  let swap h i j =
+    let v = h.!(i) in
+    h.!(i) <- h.!(j);
+    h.!(j) <- v
+
+  (* We say that a heap respects the "heap ordering" if the value of
+     each node is smaller than the value of its children. The
+     algorithm manipulates arrays that respect the heap algorithm,
+     except for one node whose value may be too small or too large.
+
+     The auxiliary functions [heap_up] and [heap_down] take
+     such a misplaced value, and move it "up" (respectively: "down")
+     the tree by permuting it with its parent value (respectively:
+     a child value) until the heap ordering is restored. *)
+
+  let rec heap_up h i =
+    if i = 0 then () else
+    let parent = parent_node i in
+    if order h i parent < 0 then
+      (swap h i parent; heap_up h parent)
+
+  and heap_down h ~len i =
+    let left, right = left_child i, right_child i in
+    if left >= len then () (* no child, stop *) else
+    let smallest =
+      if right >= len then left (* no right child *) else
+      if order h left right < 0 then left else right
+    in
+    if order h i smallest > 0 then
+      (swap h i smallest; heap_down h ~len smallest)
+
+  let add h s =
+    let i = Dynarray.length h in
+    Dynarray.add_last h s;
+    heap_up h i
+
+  let pop_min h =
+    if Dynarray.is_empty h then None
+    else begin
+      (* Standard trick: swap the 'best' value at index 0
+         with the last value of the array. *)
+      let last = Dynarray.length h - 1 in
+      swap h 0 last;
+      (* At this point [pop_last] returns the 'best' value,
+         and leaves a heap with one misplaced element at position 0. *)
+      let best = Dynarray.pop_last h in
+      (* Restore the heap ordering -- does nothing if the heap is empty. *)
+      heap_down h ~len:last 0;
+      Some best
+    end
+end

The production code from which this example was inspired includes logic to free the backing array when the heap becomes empty, only in the case where the capacity is above a certain threshold. This can be done by calling the following function from pop:

let shrink h =
+  if Dynarray.length h = 0 && Dynarray.capacity h > 1 lsl 18 then
+    Dynarray.reset h

The Heap functor can be used to implement a sorting function, by adding all elements into a priority queue and then extracting them in order.

let heap_sort (type a) cmp li =
+  let module Heap = Heap(struct type t = a let compare = cmp end) in
+  let heap = Heap.create () in
+  List.iter (Heap.add heap) li;
+  List.map (fun _ -> Heap.pop_min heap |> Option.get) li
diff --git a/findlib-1/melange/Stdlib/Effect/Deep/index.html b/findlib-1/melange/Stdlib/Effect/Deep/index.html new file mode 100644 index 000000000..cb5c6c118 --- /dev/null +++ b/findlib-1/melange/Stdlib/Effect/Deep/index.html @@ -0,0 +1,6 @@ + +Deep (docs.findlib-1.melange.Stdlib.Effect.Deep)

Module Effect.Deep

Deep handlers

type ('a, 'b) continuation

('a,'b) continuation is a delimited continuation that expects a 'a value and returns a 'b value.

val continue : ('a, 'b) continuation -> 'a -> 'b

continue k x resumes the continuation k by passing x to k.

val discontinue : ('a, 'b) continuation -> exn -> 'b

discontinue k e resumes the continuation k by raising the exception e in k.

val discontinue_with_backtrace : + ('a, 'b) continuation -> + exn -> + Printexc.raw_backtrace -> + 'b

discontinue_with_backtrace k e bt resumes the continuation k by raising the exception e in k using bt as the origin for the exception.

type ('a, 'b) handler = {
  1. retc : 'a -> 'b;
  2. exnc : exn -> 'b;
  3. effc : 'c. 'c t -> (('c, 'b) continuation -> 'b) option;
}

('a,'b) handler is a handler record with three fields -- retc is the value handler, exnc handles exceptions, and effc handles the effects performed by the computation enclosed by the handler.

val match_with : ('c -> 'a) -> 'c -> ('a, 'b) handler -> 'b

match_with f v h runs the computation f v in the handler h.

type 'a effect_handler = {
  1. effc : 'b. 'b t -> (('b, 'a) continuation -> 'a) option;
}

'a effect_handler is a deep handler with an identity value handler fun x -> x and an exception handler that raises any exception fun e -> raise e.

val try_with : ('b -> 'a) -> 'b -> 'a effect_handler -> 'a

try_with f v h runs the computation f v under the handler h.

val get_callstack : ('a, 'b) continuation -> int -> Printexc.raw_backtrace

get_callstack c n returns a description of the top of the call stack on the continuation c, with at most n entries.

diff --git a/findlib-1/melange/Stdlib/Effect/Shallow/index.html b/findlib-1/melange/Stdlib/Effect/Shallow/index.html new file mode 100644 index 000000000..22d53485c --- /dev/null +++ b/findlib-1/melange/Stdlib/Effect/Shallow/index.html @@ -0,0 +1,7 @@ + +Shallow (docs.findlib-1.melange.Stdlib.Effect.Shallow)

Module Effect.Shallow

type ('a, 'b) continuation

('a,'b) continuation is a delimited continuation that expects a 'a value and returns a 'b value.

val fiber : ('a -> 'b) -> ('a, 'b) continuation

fiber f constructs a continuation that runs the computation f.

type ('a, 'b) handler = {
  1. retc : 'a -> 'b;
  2. exnc : exn -> 'b;
  3. effc : 'c. 'c t -> (('c, 'a) continuation -> 'b) option;
}

('a,'b) handler is a handler record with three fields -- retc is the value handler, exnc handles exceptions, and effc handles the effects performed by the computation enclosed by the handler.

val continue_with : ('c, 'a) continuation -> 'c -> ('a, 'b) handler -> 'b

continue_with k v h resumes the continuation k with value v with the handler h.

val discontinue_with : ('c, 'a) continuation -> exn -> ('a, 'b) handler -> 'b

discontinue_with k e h resumes the continuation k by raising the exception e with the handler h.

val discontinue_with_backtrace : + ('a, 'b) continuation -> + exn -> + Printexc.raw_backtrace -> + ('b, 'c) handler -> + 'c

discontinue_with k e bt h resumes the continuation k by raising the exception e with the handler h using the raw backtrace bt as the origin of the exception.

val get_callstack : ('a, 'b) continuation -> int -> Printexc.raw_backtrace

get_callstack c n returns a description of the top of the call stack on the continuation c, with at most n entries.

diff --git a/findlib-1/melange/Stdlib/Effect/index.html b/findlib-1/melange/Stdlib/Effect/index.html new file mode 100644 index 000000000..a3b4eefe2 --- /dev/null +++ b/findlib-1/melange/Stdlib/Effect/index.html @@ -0,0 +1,2 @@ + +Effect (docs.findlib-1.melange.Stdlib.Effect)

Module Stdlib.Effect

Effects.

See 'Language extensions/Effect handlers' section in the manual.

type _ t = ..

The type of effects.

exception Unhandled : 'a t -> exn

Unhandled e is raised when effect e is performed and there is no handler for it.

exception Continuation_already_resumed

Exception raised when a continuation is continued or discontinued more than once.

val perform : 'a t -> 'a

perform e performs an effect e.

  • raises Unhandled

    if there is no handler for e.

module Deep : sig ... end

Deep handlers

module Shallow : sig ... end
diff --git a/findlib-1/melange/Stdlib/Either/index.html b/findlib-1/melange/Stdlib/Either/index.html new file mode 100644 index 000000000..f595fb7a4 --- /dev/null +++ b/findlib-1/melange/Stdlib/Either/index.html @@ -0,0 +1,17 @@ + +Either (docs.findlib-1.melange.Stdlib.Either)

Module Stdlib.Either

Either type.

Either is the simplest and most generic sum/variant type: a value of ('a, 'b) Either.t is either a Left (v : 'a) or a Right (v : 'b).

It is a natural choice in the API of generic functions where values could fall in two different cases, possibly at different types, without assigning a specific meaning to what each case should be.

For example:

List.partition_map:
+  ('a -> ('b, 'c) Either.t) -> 'a list -> 'b list * 'c list

If you are looking for a parametrized type where one alternative means success and the other means failure, you should use the more specific type Result.t.

type ('a, 'b) t =
  1. | Left of 'a
  2. | Right of 'b

A value of ('a, 'b) Either.t contains either a value of 'a or a value of 'b

val left : 'a -> ('a, 'b) t

left v is Left v.

val right : 'b -> ('a, 'b) t

right v is Right v.

val is_left : ('a, 'b) t -> bool

is_left (Left v) is true, is_left (Right v) is false.

val is_right : ('a, 'b) t -> bool

is_right (Left v) is false, is_right (Right v) is true.

val find_left : ('a, 'b) t -> 'a option

find_left (Left v) is Some v, find_left (Right _) is None

val find_right : ('a, 'b) t -> 'b option

find_right (Right v) is Some v, find_right (Left _) is None

val map_left : ('a1 -> 'a2) -> ('a1, 'b) t -> ('a2, 'b) t

map_left f e is Left (f v) if e is Left v and e if e is Right _.

val map_right : ('b1 -> 'b2) -> ('a, 'b1) t -> ('a, 'b2) t

map_right f e is Right (f v) if e is Right v and e if e is Left _.

val map : + left:('a1 -> 'a2) -> + right:('b1 -> 'b2) -> + ('a1, 'b1) t -> + ('a2, 'b2) t

map ~left ~right (Left v) is Left (left v), map ~left ~right (Right v) is Right (right v).

val fold : left:('a -> 'c) -> right:('b -> 'c) -> ('a, 'b) t -> 'c

fold ~left ~right (Left v) is left v, and fold ~left ~right (Right v) is right v.

val iter : left:('a -> unit) -> right:('b -> unit) -> ('a, 'b) t -> unit

iter ~left ~right (Left v) is left v, and iter ~left ~right (Right v) is right v.

val for_all : left:('a -> bool) -> right:('b -> bool) -> ('a, 'b) t -> bool

for_all ~left ~right (Left v) is left v, and for_all ~left ~right (Right v) is right v.

val equal : + left:('a -> 'a -> bool) -> + right:('b -> 'b -> bool) -> + ('a, 'b) t -> + ('a, 'b) t -> + bool

equal ~left ~right e0 e1 tests equality of e0 and e1 using left and right to respectively compare values wrapped by Left _ and Right _.

val compare : + left:('a -> 'a -> int) -> + right:('b -> 'b -> int) -> + ('a, 'b) t -> + ('a, 'b) t -> + int

compare ~left ~right e0 e1 totally orders e0 and e1 using left and right to respectively compare values wrapped by Left _ and Right _. Left _ values are smaller than Right _ values.

diff --git a/findlib-1/melange/Stdlib/Filename/index.html b/findlib-1/melange/Stdlib/Filename/index.html new file mode 100644 index 000000000..83d1df446 --- /dev/null +++ b/findlib-1/melange/Stdlib/Filename/index.html @@ -0,0 +1,14 @@ + +Filename (docs.findlib-1.melange.Stdlib.Filename)

Module Stdlib.Filename

Operations on file names.

val current_dir_name : string

The conventional name for the current directory (e.g. . in Unix).

val parent_dir_name : string

The conventional name for the parent of the current directory (e.g. .. in Unix).

val dir_sep : string

The directory separator (e.g. / in Unix).

  • since 3.11.2
val concat : string -> string -> string

concat dir file returns a file name that designates file file in directory dir.

val is_relative : string -> bool

Return true if the file name is relative to the current directory, false if it is absolute (i.e. in Unix, starts with /).

val is_implicit : string -> bool

Return true if the file name is relative and does not start with an explicit reference to the current directory (./ or ../ in Unix), false if it starts with an explicit reference to the root directory or the current directory.

val check_suffix : string -> string -> bool

check_suffix name suff returns true if the filename name ends with the suffix suff.

Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

val chop_suffix : string -> string -> string

chop_suffix name suff removes the suffix suff from the filename name.

val chop_suffix_opt : suffix:string -> string -> string option

chop_suffix_opt ~suffix filename removes the suffix from the filename if possible, or returns None if the filename does not end with the suffix.

Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

  • since 4.08
val extension : string -> string

extension name is the shortest suffix ext of name0 where:

  • name0 is the longest suffix of name that does not contain a directory separator;
  • ext starts with a period;
  • ext is preceded by at least one non-period character in name0.

If such a suffix does not exist, extension name is the empty string.

  • since 4.04
val remove_extension : string -> string

Return the given file name without its extension, as defined in Filename.extension. If the extension is empty, the function returns the given file name.

The following invariant holds for any file name s:

remove_extension s ^ extension s = s

  • since 4.04
val chop_extension : string -> string

Same as Filename.remove_extension, but raise Invalid_argument if the given name has an empty extension.

val basename : string -> string

Split a file name into directory name / base file name. If name is a valid file name, then concat (dirname name) (basename name) returns a file name which is equivalent to name. Moreover, after setting the current directory to dirname name (with Sys.chdir), references to basename name (which is a relative file name) designate the same file as name before the call to Sys.chdir.

This function conforms to the specification of POSIX.1-2008 for the basename utility.

val dirname : string -> string

See Filename.basename. This function conforms to the specification of POSIX.1-2008 for the dirname utility.

val null : string

null is "/dev/null" on POSIX and "NUL" on Windows. It represents a file on the OS that discards all writes and returns end of file on reads.

  • since 4.10
val temp_file : ?temp_dir:string -> string -> string -> string

temp_file prefix suffix returns the name of a fresh temporary file in the temporary directory. The base name of the temporary file is formed by concatenating prefix, then a suitably chosen integer number, then suffix. The optional argument temp_dir indicates the temporary directory to use, defaulting to the current result of Filename.get_temp_dir_name. The temporary file is created empty, with permissions 0o600 (readable and writable only by the file owner). The file is guaranteed to be different from any other file that existed when temp_file was called.

  • raises Sys_error

    if the file could not be created.

  • before 3.11.2

    no ?temp_dir optional argument

val open_temp_file : + ?mode:open_flag list -> + ?perms:int -> + ?temp_dir:string -> + string -> + string -> + string * out_channel

Same as Filename.temp_file, but returns both the name of a fresh temporary file, and an output channel opened (atomically) on this file. This function is more secure than temp_file: there is no risk that the temporary file will be modified (e.g. replaced by a symbolic link) before the program opens it. The optional argument mode is a list of additional flags to control the opening of the file. It can contain one or several of Open_append, Open_binary, and Open_text. The default is [Open_text] (open in text mode). The file is created with permissions perms (defaults to readable and writable only by the file owner, 0o600).

  • raises Sys_error

    if the file could not be opened.

  • before 4.03

    no ?perms optional argument

  • before 3.11.2

    no ?temp_dir optional argument

val temp_dir : ?temp_dir:string -> ?perms:int -> string -> string -> string

temp_dir prefix suffix creates and returns the name of a fresh temporary directory with permissions perms (defaults to 0o700) inside temp_dir. The base name of the temporary directory is formed by concatenating prefix, then a suitably chosen integer number, then suffix. The optional argument temp_dir indicates the temporary directory to use, defaulting to the current result of Filename.get_temp_dir_name. The temporary directory is created empty, with permissions 0o700 (readable, writable, and searchable only by the file owner). The directory is guaranteed to be different from any other directory that existed when temp_dir was called.

If temp_dir does not exist, this function does not create it. Instead, it raises Sys_error.

  • raises Sys_error

    if the directory could not be created.

  • since 5.1
val get_temp_dir_name : unit -> string

The name of the temporary directory: Under Unix, the value of the TMPDIR environment variable, or "/tmp" if the variable is not set. Under Windows, the value of the TEMP environment variable, or "." if the variable is not set. The temporary directory can be changed with Filename.set_temp_dir_name.

  • since 4.00
val set_temp_dir_name : string -> unit

Change the temporary directory returned by Filename.get_temp_dir_name and used by Filename.temp_file and Filename.open_temp_file. The temporary directory is a domain-local value which is inherited by child domains.

  • since 4.00
val quote : string -> string

Return a quoted version of a file name, suitable for use as one argument in a command line, escaping all meta-characters. Warning: under Windows, the output is only suitable for use with programs that follow the standard Windows quoting conventions.

val quote_command : + string -> + ?stdin:string -> + ?stdout:string -> + ?stderr:string -> + string list -> + string

quote_command cmd args returns a quoted command line, suitable for use as an argument to Sys.command, Unix.system, and the Unix.open_process functions.

The string cmd is the command to call. The list args is the list of arguments to pass to this command. It can be empty.

The optional arguments ?stdin and ?stdout and ?stderr are file names used to redirect the standard input, the standard output, or the standard error of the command. If ~stdin:f is given, a redirection < f is performed and the standard input of the command reads from file f. If ~stdout:f is given, a redirection > f is performed and the standard output of the command is written to file f. If ~stderr:f is given, a redirection 2> f is performed and the standard error of the command is written to file f. If both ~stdout:f and ~stderr:f are given, with the exact same file name f, a 2>&1 redirection is performed so that the standard output and the standard error of the command are interleaved and redirected to the same file f.

Under Unix and Cygwin, the command, the arguments, and the redirections if any are quoted using Filename.quote, then concatenated. Under Win32, additional quoting is performed as required by the cmd.exe shell that is called by Sys.command.

  • raises Failure

    if the command cannot be escaped on the current platform.

  • since 4.10
diff --git a/findlib-1/melange/Stdlib/Float/Array/index.html b/findlib-1/melange/Stdlib/Float/Array/index.html new file mode 100644 index 000000000..5302c3088 --- /dev/null +++ b/findlib-1/melange/Stdlib/Float/Array/index.html @@ -0,0 +1,13 @@ + +Array (docs.findlib-1.melange.Stdlib.Float.Array)

Module Float.Array

Float arrays with packed representation.

type t = floatarray

The type of float arrays with packed representation.

  • since 4.08
val length : t -> int

Return the length (number of elements) of the given floatarray.

val get : t -> int -> float

get a n returns the element number n of floatarray a.

val set : t -> int -> float -> unit

set a n x modifies floatarray a in place, replacing element number n with x.

val make : int -> float -> t

make n x returns a fresh floatarray of length n, initialized with x.

val create : int -> t

create n returns a fresh floatarray of length n, with uninitialized data.

val init : int -> (int -> float) -> t

init n f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n f tabulates the results of f applied to the integers 0 to n-1.

val append : t -> t -> t

append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

val concat : t list -> t

Same as append, but concatenates a list of floatarrays.

val sub : t -> int -> int -> t

sub a pos len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

  • raises Invalid_argument

    if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

val copy : t -> t

copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

val fill : t -> int -> int -> float -> unit

fill a pos len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

val blit : t -> int -> t -> int -> int -> unit

blit src src_pos dst dst_pos len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

val to_list : t -> float list

to_list a returns the list of all the elements of a.

val of_list : float list -> t

of_list l returns a fresh floatarray containing the elements of l.

  • raises Invalid_argument

    if the length of l is greater than Sys.max_floatarray_length.

Iterators

val iter : (float -> unit) -> t -> unit

iter f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

val iteri : (int -> float -> unit) -> t -> unit

Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

val map : (float -> float) -> t -> t

map f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

val map_inplace : (float -> float) -> t -> unit

map_inplace f a applies function f to all elements of a, and updates their values in place.

  • since 5.1
val mapi : (int -> float -> float) -> t -> t

Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

val mapi_inplace : (int -> float -> float) -> t -> unit

Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

  • since 5.1
val fold_left : ('acc -> float -> 'acc) -> 'acc -> t -> 'acc

fold_left f x init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

val fold_right : (float -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

Iterators on two arrays

val iter2 : (float -> float -> unit) -> t -> t -> unit

Array.iter2 f a b applies function f to all the elements of a and b.

val map2 : (float -> float -> float) -> t -> t -> t

map2 f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

Array scanning

val for_all : (float -> bool) -> t -> bool

for_all f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

val exists : (float -> bool) -> t -> bool

exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

val mem : float -> t -> bool

mem a set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

val mem_ieee : float -> t -> bool

Same as mem, but uses IEEE equality instead of structural equality.

Array searching

val find_opt : (float -> bool) -> t -> float option
val find_index : (float -> bool) -> t -> int option

find_index f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_map : (float -> 'a option) -> t -> 'a option
val find_mapi : (int -> float -> 'a option) -> t -> 'a option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1

Sorting

val sort : (float -> float -> int) -> t -> unit

Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

The current implementation uses Heap Sort. It runs in constant stack space.

Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

  • cmp x y > 0 if and only if cmp y x < 0
  • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

  • cmp a.(i) a.(j) >= 0 if and only if i >= j
val stable_sort : (float -> float -> int) -> t -> unit

Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

val fast_sort : (float -> float -> int) -> t -> unit

Same as sort or stable_sort, whichever is faster on typical input.

Float arrays and Sequences

val to_seq : t -> float Seq.t

Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

val to_seqi : t -> (int * float) Seq.t

Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

val of_seq : float Seq.t -> t

Create an array from the generator.

val map_to_array : (float -> 'a) -> t -> 'a array

map_to_array f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

val map_from_array : ('a -> float) -> 'a array -> t

map_from_array f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

Arrays and concurrency safety

Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

For example, consider the following program:

let size = 100_000_000
+let a = Float.Array.make size 1.
+let update a f () =
+   Float.Array.iteri (fun i x -> Float.Array.set a i (f x)) a
+let d1 = Domain.spawn (update a (fun x -> x +. 1.))
+let d2 = Domain.spawn (update a (fun x ->  2. *. x +. 1.))
+let () = Domain.join d1; Domain.join d2

After executing this code, each field of the float array a is either 2., 3., 4. or 5.. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

Data races

If two domains only access disjoint parts of the array, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

A data race is said to occur when two domains access the same array element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the array elements.

Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location with a few exceptions.

Tearing

Float arrays have two supplementary caveats in the presence of data races.

First, the blit operation might copy an array byte-by-byte. Data races between such a blit operation and another operation might produce surprising values due to tearing: partial writes interleaved with other operations can create float values that would not exist with a sequential execution.

For instance, at the end of

let zeros = Float.Array.make size 0.
+let max_floats = Float.Array.make size Float.max_float
+let res = Float.Array.copy zeros
+let d1 = Domain.spawn (fun () -> Float.Array.blit zeros 0 res 0 size)
+let d2 = Domain.spawn (fun () -> Float.Array.blit max_floats 0 res 0 size)
+let () = Domain.join d1; Domain.join d2

the res float array might contain values that are neither 0. nor max_float.

Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation.

diff --git a/findlib-1/melange/Stdlib/Float/ArrayLabels/index.html b/findlib-1/melange/Stdlib/Float/ArrayLabels/index.html new file mode 100644 index 000000000..96ee37c86 --- /dev/null +++ b/findlib-1/melange/Stdlib/Float/ArrayLabels/index.html @@ -0,0 +1,13 @@ + +ArrayLabels (docs.findlib-1.melange.Stdlib.Float.ArrayLabels)

Module Float.ArrayLabels

Float arrays with packed representation (labeled functions).

type t = floatarray

The type of float arrays with packed representation.

  • since 4.08
val length : t -> int

Return the length (number of elements) of the given floatarray.

val get : t -> int -> float

get a n returns the element number n of floatarray a.

val set : t -> int -> float -> unit

set a n x modifies floatarray a in place, replacing element number n with x.

val make : int -> float -> t

make n x returns a fresh floatarray of length n, initialized with x.

val create : int -> t

create n returns a fresh floatarray of length n, with uninitialized data.

val init : int -> f:(int -> float) -> t

init n ~f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n ~f tabulates the results of f applied to the integers 0 to n-1.

val append : t -> t -> t

append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

val concat : t list -> t

Same as append, but concatenates a list of floatarrays.

val sub : t -> pos:int -> len:int -> t

sub a ~pos ~len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

  • raises Invalid_argument

    if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

val copy : t -> t

copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

val fill : t -> pos:int -> len:int -> float -> unit

fill a ~pos ~len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

val blit : src:t -> src_pos:int -> dst:t -> dst_pos:int -> len:int -> unit

blit ~src ~src_pos ~dst ~dst_pos ~len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

val to_list : t -> float list

to_list a returns the list of all the elements of a.

val of_list : float list -> t

of_list l returns a fresh floatarray containing the elements of l.

  • raises Invalid_argument

    if the length of l is greater than Sys.max_floatarray_length.

Iterators

val iter : f:(float -> unit) -> t -> unit

iter ~f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

val iteri : f:(int -> float -> unit) -> t -> unit

Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

val map : f:(float -> float) -> t -> t

map ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

val map_inplace : f:(float -> float) -> t -> unit

map_inplace f a applies function f to all elements of a, and updates their values in place.

  • since 5.1
val mapi : f:(int -> float -> float) -> t -> t

Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

val mapi_inplace : f:(int -> float -> float) -> t -> unit

Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

  • since 5.1
val fold_left : f:('acc -> float -> 'acc) -> init:'acc -> t -> 'acc

fold_left ~f x ~init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

val fold_right : f:(float -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

Iterators on two arrays

val iter2 : f:(float -> float -> unit) -> t -> t -> unit

Array.iter2 ~f a b applies function f to all the elements of a and b.

val map2 : f:(float -> float -> float) -> t -> t -> t

map2 ~f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

Array scanning

val for_all : f:(float -> bool) -> t -> bool

for_all ~f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

val exists : f:(float -> bool) -> t -> bool

exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

val mem : float -> set:t -> bool

mem a ~set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

val mem_ieee : float -> set:t -> bool

Same as mem, but uses IEEE equality instead of structural equality.

Array searching

val find_opt : f:(float -> bool) -> t -> float option
val find_index : f:(float -> bool) -> t -> int option

find_index ~f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_map : f:(float -> 'a option) -> t -> 'a option
val find_mapi : f:(int -> float -> 'a option) -> t -> 'a option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1

Sorting

val sort : cmp:(float -> float -> int) -> t -> unit

Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

The current implementation uses Heap Sort. It runs in constant stack space.

Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

  • cmp x y > 0 if and only if cmp y x < 0
  • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

  • cmp a.(i) a.(j) >= 0 if and only if i >= j
val stable_sort : cmp:(float -> float -> int) -> t -> unit

Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

val fast_sort : cmp:(float -> float -> int) -> t -> unit

Same as sort or stable_sort, whichever is faster on typical input.

Float arrays and Sequences

val to_seq : t -> float Seq.t

Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

val to_seqi : t -> (int * float) Seq.t

Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

val of_seq : float Seq.t -> t

Create an array from the generator.

val map_to_array : f:(float -> 'a) -> t -> 'a array

map_to_array ~f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

val map_from_array : f:('a -> float) -> 'a array -> t

map_from_array ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

Arrays and concurrency safety

Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

For example, consider the following program:

let size = 100_000_000
+let a = Float.ArrayLabels.make size 1.
+let update a f () =
+   Float.ArrayLabels.iteri ~f:(fun i x -> Float.Array.set a i (f x)) a
+let d1 = Domain.spawn (update a (fun x -> x +. 1.))
+let d2 = Domain.spawn (update a (fun x ->  2. *. x +. 1.))
+let () = Domain.join d1; Domain.join d2

After executing this code, each field of the float array a is either 2., 3., 4. or 5.. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

Data races

If two domains only access disjoint parts of the array, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

A data race is said to occur when two domains access the same array element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the array elements.

Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location with a few exceptions.

Tearing

Float arrays have two supplementary caveats in the presence of data races.

First, the blit operation might copy an array byte-by-byte. Data races between such a blit operation and another operation might produce surprising values due to tearing: partial writes interleaved with other operations can create float values that would not exist with a sequential execution.

For instance, at the end of

let zeros = Float.Array.make size 0.
+let max_floats = Float.Array.make size Float.max_float
+let res = Float.Array.copy zeros
+let d1 = Domain.spawn (fun () -> Float.Array.blit zeros 0 res 0 size)
+let d2 = Domain.spawn (fun () -> Float.Array.blit max_floats 0 res 0 size)
+let () = Domain.join d1; Domain.join d2

the res float array might contain values that are neither 0. nor max_float.

Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation.

diff --git a/findlib-1/melange/Stdlib/Float/index.html b/findlib-1/melange/Stdlib/Float/index.html new file mode 100644 index 000000000..eb3aa2e88 --- /dev/null +++ b/findlib-1/melange/Stdlib/Float/index.html @@ -0,0 +1,2 @@ + +Float (docs.findlib-1.melange.Stdlib.Float)

Module Stdlib.Float

Floating-point arithmetic.

OCaml's floating-point numbers follow the IEEE 754 standard, using double precision (64 bits) numbers. Floating-point operations never raise an exception on overflow, underflow, division by zero, etc. Instead, special IEEE numbers are returned as appropriate, such as infinity for 1.0 /. 0.0, neg_infinity for -1.0 /. 0.0, and nan ('not a number') for 0.0 /. 0.0. These special numbers then propagate through floating-point computations as expected: for instance, 1.0 /. infinity is 0.0, basic arithmetic operations (+., -., *., /.) with nan as an argument return nan, ...

val zero : float

The floating point 0.

  • since 4.08
val one : float

The floating-point 1.

  • since 4.08
val minus_one : float

The floating-point -1.

  • since 4.08
val neg : float -> float

Unary negation.

val add : float -> float -> float

Floating-point addition.

val sub : float -> float -> float

Floating-point subtraction.

val mul : float -> float -> float

Floating-point multiplication.

val div : float -> float -> float

Floating-point division.

val fma : float -> float -> float -> float

fma x y z returns x * y + z, with a best effort for computing this expression with a single rounding, using either hardware instructions (providing full IEEE compliance) or a software emulation.

On 64-bit Cygwin, 64-bit mingw-w64 and MSVC 2017 and earlier, this function may be emulated owing to known bugs on limitations on these platforms. Note: since software emulation of the fma is costly, make sure that you are using hardware fma support if performance matters.

  • since 4.08
val rem : float -> float -> float

rem a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

val succ : float -> float

succ x returns the floating point number right after x i.e., the smallest floating-point number greater than x. See also next_after.

  • since 4.08
val pred : float -> float

pred x returns the floating-point number right before x i.e., the greatest floating-point number smaller than x. See also next_after.

  • since 4.08
val abs : float -> float

abs f returns the absolute value of f.

val infinity : float

Positive infinity.

val neg_infinity : float

Negative infinity.

val nan : float

A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

nan is quiet_nan since 5.1; it was a signaling NaN before.

val signaling_nan : float

Signaling NaN. The corresponding signals do not raise OCaml exception, but the value can be useful for interoperability with C libraries.

  • since 5.1
val quiet_nan : float

Quiet NaN.

  • since 5.1
val pi : float

The constant pi.

val max_float : float

The largest positive finite value of type float.

val min_float : float

The smallest positive, non-zero, non-denormalized value of type float.

val epsilon : float

The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

val is_finite : float -> bool

is_finite x is true if and only if x is finite i.e., not infinite and not nan.

  • since 4.08
val is_infinite : float -> bool

is_infinite x is true if and only if x is infinity or neg_infinity.

  • since 4.08
val is_nan : float -> bool

is_nan x is true if and only if x is not a number (see nan).

  • since 4.08
val is_integer : float -> bool

is_integer x is true if and only if x is an integer.

  • since 4.08
val of_int : int -> float

Convert an integer to floating-point.

val to_int : float -> int

Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

val of_string : string -> float

Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X). The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit. The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit. In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional. The _ (underscore) character can appear anywhere in the string and is ignored. Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

  • raises Failure

    if the given string is not a valid representation of a float.

val of_string_opt : string -> float option

Same as of_string, but returns None instead of raising.

val to_string : float -> string

Return a string representation of a floating-point number.

This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

This function is an alias for Stdlib.string_of_float.

type fpclass = fpclass =
  1. | FP_normal
    (*

    Normal number, none of the below

    *)
  2. | FP_subnormal
    (*

    Number very close to 0.0, has reduced precision

    *)
  3. | FP_zero
    (*

    Number is 0.0 or -0.0

    *)
  4. | FP_infinite
    (*

    Number is positive or negative infinity

    *)
  5. | FP_nan
    (*

    Not a number: result of an undefined operation

    *)

The five classes of floating-point numbers, as determined by the classify_float function.

val classify_float : float -> fpclass

Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

val pow : float -> float -> float

Exponentiation.

val sqrt : float -> float

Square root.

val cbrt : float -> float

Cube root.

  • since 4.13
val exp : float -> float

Exponential.

val exp2 : float -> float

Base 2 exponential function.

  • since 4.13
val log : float -> float

Natural logarithm.

val log10 : float -> float

Base 10 logarithm.

val log2 : float -> float

Base 2 logarithm.

  • since 4.13
val expm1 : float -> float

expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

val log1p : float -> float

log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

val cos : float -> float

Cosine. Argument is in radians.

val sin : float -> float

Sine. Argument is in radians.

val tan : float -> float

Tangent. Argument is in radians.

val acos : float -> float

Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

val asin : float -> float

Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

val atan : float -> float

Arc tangent. Result is in radians and is between -pi/2 and pi/2.

val atan2 : float -> float -> float

atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

val hypot : float -> float -> float

hypot x y returns sqrt(x *. x +. y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

val cosh : float -> float

Hyperbolic cosine. Argument is in radians.

val sinh : float -> float

Hyperbolic sine. Argument is in radians.

val tanh : float -> float

Hyperbolic tangent. Argument is in radians.

val acosh : float -> float

Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

  • since 4.13
val asinh : float -> float

Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

  • since 4.13
val atanh : float -> float

Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

  • since 4.13
val erf : float -> float

Error function. The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

  • since 4.13
val erfc : float -> float

Complementary error function (erfc x = 1 - erf x). The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

  • since 4.13
val trunc : float -> float

trunc x rounds x to the nearest integer whose absolute value is less than or equal to x.

  • since 4.08
val round : float -> float

round x rounds x to the nearest integer with ties (fractional values of 0.5) rounded away from zero, regardless of the current rounding direction. If x is an integer, +0., -0., nan, or infinite, x itself is returned.

On 64-bit mingw-w64, this function may be emulated owing to a bug in the C runtime library (CRT) on this platform.

  • since 4.08
val ceil : float -> float

Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

val floor : float -> float

Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

val next_after : float -> float -> float

next_after x y returns the next representable floating-point value following x in the direction of y. More precisely, if y is greater (resp. less) than x, it returns the smallest (resp. largest) representable number greater (resp. less) than x. If x equals y, the function returns y. If x or y is nan, a nan is returned. Note that next_after max_float infinity = infinity and that next_after 0. infinity is the smallest denormalized positive number. If x is the smallest denormalized positive number, next_after x 0. = 0.

  • since 4.08
val copy_sign : float -> float -> float

copy_sign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

val sign_bit : float -> bool

sign_bit x is true if and only if the sign bit of x is set. For example sign_bit 1. and signbit 0. are false while sign_bit (-1.) and sign_bit (-0.) are true.

  • since 4.08
val frexp : float -> float * int

frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

val ldexp : float -> int -> float

ldexp x n returns x *. 2 ** n.

val modf : float -> float * float

modf f returns the pair of the fractional and integral part of f.

type t = float

An alias for the type of floating-point numbers.

val compare : t -> t -> int

compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

val equal : t -> t -> bool

The equal function for floating-point numbers, compared using compare.

val min : t -> t -> t

min x y returns the minimum of x and y. It returns nan when x or y is nan. Moreover min (-0.) (+0.) = -0.

  • since 4.08
val max : float -> float -> float

max x y returns the maximum of x and y. It returns nan when x or y is nan. Moreover max (-0.) (+0.) = +0.

  • since 4.08
val min_max : float -> float -> float * float

min_max x y is (min x y, max x y), just more efficient.

  • since 4.08
val min_num : t -> t -> t

min_num x y returns the minimum of x and y treating nan as missing values. If both x and y are nan, nan is returned. Moreover min_num (-0.) (+0.) = -0.

  • since 4.08
val max_num : t -> t -> t

max_num x y returns the maximum of x and y treating nan as missing values. If both x and y are nan nan is returned. Moreover max_num (-0.) (+0.) = +0.

  • since 4.08
val min_max_num : float -> float -> float * float

min_max_num x y is (min_num x y, max_num x y), just more efficient. Note that in particular min_max_num x nan = (x, x) and min_max_num nan y = (y, y).

  • since 4.08
val seeded_hash : int -> t -> int

A seeded hash function for floats, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : t -> int

An unseeded hash function for floats, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

module Array : sig ... end

Float arrays with packed representation.

module ArrayLabels : sig ... end

Float arrays with packed representation (labeled functions).

diff --git a/findlib-1/melange/Stdlib/Format/index.html b/findlib-1/melange/Stdlib/Format/index.html new file mode 100644 index 000000000..76367a210 --- /dev/null +++ b/findlib-1/melange/Stdlib/Format/index.html @@ -0,0 +1,148 @@ + +Format (docs.findlib-1.melange.Stdlib.Format)

Module Stdlib.Format

Pretty-printing.

If you are new to this module, see the examples below.

This module implements a pretty-printing facility to format values within 'pretty-printing boxes' and 'semantic tags' combined with a set of printf-like functions. The pretty-printer splits lines at specified break hints, and indents lines according to the box structure. Similarly, semantic tags can be used to decouple text presentation from its contents.

This pretty-printing facility is implemented as an overlay on top of abstract formatters which provide basic output functions. Some formatters are predefined, notably:

Most functions in the Format module come in two variants: a short version that operates on the current domain's standard formatter as obtained using get_std_formatter and the generic version prefixed by pp_ that takes a formatter as its first argument. For the version that operates on the current domain's standard formatter, the call to get_std_formatter is delayed until the last argument is received.

More formatters can be created with formatter_of_out_channel, formatter_of_buffer, formatter_of_symbolic_output_buffer or using custom formatters.

Warning: Since formatters contain mutable state, it is not thread-safe to use the same formatter on multiple domains in parallel without synchronization.

If multiple domains write to the same output channel using the predefined formatters (as obtained by get_std_formatter or get_err_formatter), the output from the domains will be interleaved with each other at points where the formatters are flushed, such as with print_flush. This synchronization is not performed by formatters obtained from formatter_of_out_channel (on the standard out channels or others).

Introduction

You may consider this module as providing an extension to the printf facility to provide automatic line splitting. The addition of pretty-printing annotations to your regular printf format strings gives you fancy indentation and line breaks. Pretty-printing annotations are described below in the documentation of the function Format.fprintf.

You may also use the explicit pretty-printing box management and printing functions provided by this module. This style is more basic but more verbose than the concise fprintf format strings.

For instance, the sequence open_box 0; print_string "x ="; print_space (); + print_int 1; close_box (); print_newline () that prints x = 1 within a pretty-printing box, can be abbreviated as printf "@[%s@ %i@]@." "x =" 1, or even shorter printf "@[x =@ %i@]@." 1.

Rule of thumb for casual users of this library:

The behavior of pretty-printing commands is unspecified if there is no open pretty-printing box. Each box opened by one of the open_ functions below must be closed using close_box for proper formatting. Otherwise, some of the material printed in the boxes may not be output, or may be formatted incorrectly.

In case of interactive use, each phrase is executed in the initial state of the standard pretty-printer: after each phrase execution, the interactive system closes all open pretty-printing boxes, flushes all pending text, and resets the standard pretty-printer.

Warning: mixing calls to pretty-printing functions of this module with calls to Stdlib low level output functions is error prone.

The pretty-printing functions output material that is delayed in the pretty-printer queue and stacks in order to compute proper line splitting. In contrast, basic I/O output functions write directly in their output device. As a consequence, the output of a basic I/O function may appear before the output of a pretty-printing function that has been called before. For instance, + Stdlib.print_string "<"; + Format.print_string "PRETTY"; + Stdlib.print_string ">"; + Format.print_string "TEXT"; + leads to output <>PRETTYTEXT.

Formatters

type formatter

Abstract data corresponding to a pretty-printer (also called a formatter) and all its machinery. See also Defining formatters.

Pretty-printing boxes

The pretty-printing engine uses the concepts of pretty-printing box and break hint to drive indentation and line splitting behavior of the pretty-printer.

Each different pretty-printing box kind introduces a specific line splitting policy:

Note that line splitting policy is box specific: the policy of a box does not rule the policy of inner boxes. For instance, if a vertical box is nested in an horizontal box, all break hints within the vertical box will split the line.

Moreover, opening a box after the maximum indentation limit splits the line whether or not the box would end up fitting on the line.

val pp_open_box : formatter -> int -> unit
val open_box : int -> unit

pp_open_box ppf d opens a new compacting pretty-printing box with offset d in the formatter ppf.

Within this box, the pretty-printer prints as much as possible material on every line.

A break hint splits the line if there is no more room on the line to print the remainder of the box.

Within this box, the pretty-printer emphasizes the box structure: if a structural box does not fit fully on a simple line, a break hint also splits the line if the splitting ``moves to the left'' (i.e. the new line gets an indentation smaller than the one of the current line).

This box is the general purpose pretty-printing box.

If the pretty-printer splits the line in the box, offset d is added to the current indentation.

val pp_close_box : formatter -> unit -> unit
val close_box : unit -> unit

Closes the most recently open pretty-printing box.

val pp_open_hbox : formatter -> unit -> unit
val open_hbox : unit -> unit

pp_open_hbox ppf () opens a new 'horizontal' pretty-printing box.

This box prints material on a single line.

Break hints in a horizontal box never split the line. (Line splitting may still occur inside boxes nested deeper).

val pp_open_vbox : formatter -> int -> unit
val open_vbox : int -> unit

pp_open_vbox ppf d opens a new 'vertical' pretty-printing box with offset d.

This box prints material on as many lines as break hints in the box.

Every break hint in a vertical box splits the line.

If the pretty-printer splits the line in the box, d is added to the current indentation.

val pp_open_hvbox : formatter -> int -> unit
val open_hvbox : int -> unit

pp_open_hvbox ppf d opens a new 'horizontal/vertical' pretty-printing box with offset d.

This box behaves as an horizontal box if it fits on a single line, otherwise it behaves as a vertical box.

If the pretty-printer splits the line in the box, d is added to the current indentation.

val pp_open_hovbox : formatter -> int -> unit
val open_hovbox : int -> unit

pp_open_hovbox ppf d opens a new 'horizontal-or-vertical' pretty-printing box with offset d.

This box prints material as much as possible on every line.

A break hint splits the line if there is no more room on the line to print the remainder of the box.

If the pretty-printer splits the line in the box, d is added to the current indentation.

Formatting functions

val pp_print_string : formatter -> string -> unit
val print_string : string -> unit

pp_print_string ppf s prints s in the current pretty-printing box.

val pp_print_bytes : formatter -> bytes -> unit
val print_bytes : bytes -> unit

pp_print_bytes ppf b prints b in the current pretty-printing box.

  • since 4.13
val pp_print_as : formatter -> int -> string -> unit
val print_as : int -> string -> unit

pp_print_as ppf len s prints s in the current pretty-printing box. The pretty-printer formats s as if it were of length len.

val pp_print_int : formatter -> int -> unit
val print_int : int -> unit

Print an integer in the current pretty-printing box.

val pp_print_float : formatter -> float -> unit
val print_float : float -> unit

Print a floating point number in the current pretty-printing box.

val pp_print_char : formatter -> char -> unit
val print_char : char -> unit

Print a character in the current pretty-printing box.

val pp_print_bool : formatter -> bool -> unit
val print_bool : bool -> unit

Print a boolean in the current pretty-printing box.

Break hints

A 'break hint' tells the pretty-printer to output some space or split the line whichever way is more appropriate to the current pretty-printing box splitting rules.

Break hints are used to separate printing items and are mandatory to let the pretty-printer correctly split lines and indent items.

Simple break hints are:

Note: the notions of space and line splitting are abstract for the pretty-printing engine, since those notions can be completely redefined by the programmer. However, in the pretty-printer default setting, ``output a space'' simply means printing a space character (ASCII code 32) and ``split the line'' means printing a newline character (ASCII code 10).

val pp_print_space : formatter -> unit -> unit
val print_space : unit -> unit

pp_print_space ppf () emits a 'space' break hint: the pretty-printer may split the line at this point, otherwise it prints one space.

pp_print_space ppf () is equivalent to pp_print_break ppf 1 0.

val pp_print_cut : formatter -> unit -> unit
val print_cut : unit -> unit

pp_print_cut ppf () emits a 'cut' break hint: the pretty-printer may split the line at this point, otherwise it prints nothing.

pp_print_cut ppf () is equivalent to pp_print_break ppf 0 0.

val pp_print_break : formatter -> int -> int -> unit
val print_break : int -> int -> unit

pp_print_break ppf nspaces offset emits a 'full' break hint: the pretty-printer may split the line at this point, otherwise it prints nspaces spaces.

If the pretty-printer splits the line, offset is added to the current indentation.

val pp_print_custom_break : + formatter -> + fits:(string * int * string) -> + breaks:(string * int * string) -> + unit

pp_print_custom_break ppf ~fits:(s1, n, s2) ~breaks:(s3, m, s4) emits a custom break hint: the pretty-printer may split the line at this point.

If it does not split the line, then the s1 is emitted, then n spaces, then s2.

If it splits the line, then it emits the s3 string, then an indent (according to the box rules), then an offset of m spaces, then the s4 string.

While n and m are handled by formatter_out_functions.out_indent, the strings will be handled by formatter_out_functions.out_string. This allows for a custom formatter that handles indentation distinctly, for example, outputs <br/> tags or &nbsp; entities.

The custom break is useful if you want to change which visible (non-whitespace) characters are printed in case of break or no break. For example, when printing a list [a; b; c] , you might want to add a trailing semicolon when it is printed vertically:

[
+  a;
+  b;
+  c;
+]

You can do this as follows:

printf "@[<v 0>[@;<0 2>@[<v 0>a;@,b;@,c@]%t]@]@\n"
+  (pp_print_custom_break ~fits:("", 0, "") ~breaks:(";", 0, ""))
  • since 4.08
val pp_force_newline : formatter -> unit -> unit
val force_newline : unit -> unit

Force a new line in the current pretty-printing box.

The pretty-printer must split the line at this point,

Not the normal way of pretty-printing, since imperative line splitting may interfere with current line counters and box size calculation. Using break hints within an enclosing vertical box is a better alternative.

val pp_print_if_newline : formatter -> unit -> unit
val print_if_newline : unit -> unit

Execute the next formatting command if the preceding line has just been split. Otherwise, ignore the next formatting command.

Pretty-printing termination

val pp_print_flush : formatter -> unit -> unit
val print_flush : unit -> unit

End of pretty-printing: resets the pretty-printer to initial state.

All open pretty-printing boxes are closed, all pending text is printed. In addition, the pretty-printer low level output device is flushed to ensure that all pending text is really displayed.

Note: never use print_flush in the normal course of a pretty-printing routine, since the pretty-printer uses a complex buffering machinery to properly indent the output; manually flushing those buffers at random would conflict with the pretty-printer strategy and result to poor rendering.

Only consider using print_flush when displaying all pending material is mandatory (for instance in case of interactive use when you want the user to read some text) and when resetting the pretty-printer state will not disturb further pretty-printing.

Warning: If the output device of the pretty-printer is an output channel, repeated calls to print_flush means repeated calls to Stdlib.flush to flush the out channel; these explicit flush calls could foil the buffering strategy of output channels and could dramatically impact efficiency.

val pp_print_newline : formatter -> unit -> unit
val print_newline : unit -> unit

End of pretty-printing: resets the pretty-printer to initial state.

All open pretty-printing boxes are closed, all pending text is printed.

Equivalent to print_flush with a new line emitted on the pretty-printer low-level output device immediately before the device is flushed. See corresponding words of caution for print_flush.

Note: this is not the normal way to output a new line; the preferred method is using break hints within a vertical pretty-printing box.

Margin

val pp_set_margin : formatter -> int -> unit
val set_margin : int -> unit

pp_set_margin ppf d sets the right margin to d (in characters): the pretty-printer splits lines that overflow the right margin according to the break hints given. Setting the margin to d means that the formatting engine aims at printing at most d-1 characters per line. Nothing happens if d is smaller than 2. If d is too large, the right margin is set to the maximum admissible value (which is greater than 10 ^ 9). If d is less than the current maximum indentation limit, the maximum indentation limit is decreased while trying to preserve a minimal ratio max_indent/margin>=50% and if possible the current difference margin - max_indent.

See also pp_set_geometry.

val pp_get_margin : formatter -> unit -> int
val get_margin : unit -> int

Returns the position of the right margin.

Maximum indentation limit

val pp_set_max_indent : formatter -> int -> unit
val set_max_indent : int -> unit

pp_set_max_indent ppf d sets the maximum indentation limit of lines to d (in characters): once this limit is reached, new pretty-printing boxes are rejected to the left, unless the enclosing box fully fits on the current line. As an illustration,

set_margin 10; set_max_indent 5; printf "@[123456@[7@]89A@]@." 

yields

123456
+789A

because the nested box "@[7@]" is opened after the maximum indentation limit (7>5) and its parent box does not fit on the current line. Either decreasing the length of the parent box to make it fit on a line:

printf "@[123456@[7@]89@]@." 

or opening an intermediary box before the maximum indentation limit which fits on the current line

printf "@[123@[456@[7@]89@]A@]@." 

avoids the rejection to the left of the inner boxes and print respectively "123456789" and "123456789A" . Note also that vertical boxes never fit on a line whereas horizontal boxes always fully fit on the current line. Opening a box may split a line whereas the contents may have fit. If this behavior is problematic, it can be curtailed by setting the maximum indentation limit to margin - 1. Note that setting the maximum indentation limit to margin is invalid.

Nothing happens if d is smaller than 2.

If d is too large, the limit is set to the maximum admissible value (which is greater than 10 ^ 9).

If d is greater or equal than the current margin, it is ignored, and the current maximum indentation limit is kept.

See also pp_set_geometry.

val pp_get_max_indent : formatter -> unit -> int
val get_max_indent : unit -> int

Return the maximum indentation limit (in characters).

Geometry

Geometric functions can be used to manipulate simultaneously the coupled variables, margin and maximum indentation limit.

type geometry = {
  1. max_indent : int;
  2. margin : int;
}
  • since 4.08
val check_geometry : geometry -> bool

Check if the formatter geometry is valid: 1 < max_indent < margin

  • since 4.08
val pp_set_geometry : formatter -> max_indent:int -> margin:int -> unit
val set_geometry : max_indent:int -> margin:int -> unit
val pp_safe_set_geometry : formatter -> max_indent:int -> margin:int -> unit
val safe_set_geometry : max_indent:int -> margin:int -> unit

pp_set_geometry ppf ~max_indent ~margin sets both the margin and maximum indentation limit for ppf.

When 1 < max_indent < margin, pp_set_geometry ppf ~max_indent ~margin is equivalent to pp_set_margin ppf margin; pp_set_max_indent ppf max_indent; and avoids the subtly incorrect pp_set_max_indent ppf max_indent; pp_set_margin ppf margin;

Outside of this domain, pp_set_geometry raises an invalid argument exception whereas pp_safe_set_geometry does nothing.

  • since 4.08
val pp_update_geometry : formatter -> (geometry -> geometry) -> unit

pp_update_geometry ppf (fun geo -> { geo with ... }) lets you update a formatter's geometry in a way that is robust to extension of the geometry record with new fields.

Raises an invalid argument exception if the returned geometry does not satisfy check_geometry.

  • since 4.11
val update_geometry : (geometry -> geometry) -> unit
val pp_get_geometry : formatter -> unit -> geometry
val get_geometry : unit -> geometry

Return the current geometry of the formatter

  • since 4.08

Maximum formatting depth

The maximum formatting depth is the maximum number of pretty-printing boxes simultaneously open.

Material inside boxes nested deeper is printed as an ellipsis (more precisely as the text returned by get_ellipsis_text ()).

val pp_set_max_boxes : formatter -> int -> unit
val set_max_boxes : int -> unit

pp_set_max_boxes ppf max sets the maximum number of pretty-printing boxes simultaneously open.

Material inside boxes nested deeper is printed as an ellipsis (more precisely as the text returned by get_ellipsis_text ()).

Nothing happens if max is smaller than 2.

val pp_get_max_boxes : formatter -> unit -> int
val get_max_boxes : unit -> int

Returns the maximum number of pretty-printing boxes allowed before ellipsis.

val pp_over_max_boxes : formatter -> unit -> bool
val over_max_boxes : unit -> bool

Tests if the maximum number of pretty-printing boxes allowed have already been opened.

Tabulation boxes

A tabulation box prints material on lines divided into cells of fixed length. A tabulation box provides a simple way to display vertical columns of left adjusted text.

This box features command set_tab to define cell boundaries, and command print_tab to move from cell to cell and split the line when there is no more cells to print on the line.

Note: printing within tabulation box is line directed, so arbitrary line splitting inside a tabulation box leads to poor rendering. Yet, controlled use of tabulation boxes allows simple printing of columns within module Format.

val pp_open_tbox : formatter -> unit -> unit
val open_tbox : unit -> unit

open_tbox () opens a new tabulation box.

This box prints lines separated into cells of fixed width.

Inside a tabulation box, special tabulation markers defines points of interest on the line (for instance to delimit cell boundaries). Function Format.set_tab sets a tabulation marker at insertion point.

A tabulation box features specific tabulation breaks to move to next tabulation marker or split the line. Function Format.print_tbreak prints a tabulation break.

val pp_close_tbox : formatter -> unit -> unit
val close_tbox : unit -> unit

Closes the most recently opened tabulation box.

val pp_set_tab : formatter -> unit -> unit
val set_tab : unit -> unit

Sets a tabulation marker at current insertion point.

val pp_print_tab : formatter -> unit -> unit
val print_tab : unit -> unit

print_tab () emits a 'next' tabulation break hint: if not already set on a tabulation marker, the insertion point moves to the first tabulation marker on the right, or the pretty-printer splits the line and insertion point moves to the leftmost tabulation marker.

It is equivalent to print_tbreak 0 0.

val pp_print_tbreak : formatter -> int -> int -> unit
val print_tbreak : int -> int -> unit

print_tbreak nspaces offset emits a 'full' tabulation break hint.

If not already set on a tabulation marker, the insertion point moves to the first tabulation marker on the right and the pretty-printer prints nspaces spaces.

If there is no next tabulation marker on the right, the pretty-printer splits the line at this point, then insertion point moves to the leftmost tabulation marker of the box.

If the pretty-printer splits the line, offset is added to the current indentation.

Ellipsis

val pp_set_ellipsis_text : formatter -> string -> unit
val set_ellipsis_text : string -> unit

Set the text of the ellipsis printed when too many pretty-printing boxes are open (a single dot, ., by default).

val pp_get_ellipsis_text : formatter -> unit -> string
val get_ellipsis_text : unit -> string

Return the text of the ellipsis.

Semantic tags

type stag = ..

Semantic tags (or simply tags) are user's defined annotations to associate user's specific operations to printed entities.

Common usage of semantic tags is text decoration to get specific font or text size rendering for a display device, or marking delimitation of entities (e.g. HTML or TeX elements or terminal escape sequences). More sophisticated usage of semantic tags could handle dynamic modification of the pretty-printer behavior to properly print the material within some specific tags. For instance, we can define an RGB tag like so:

type stag += RGB of {r:int;g:int;b:int}

In order to properly delimit printed entities, a semantic tag must be opened before and closed after the entity. Semantic tags must be properly nested like parentheses using pp_open_stag and pp_close_stag.

Tag specific operations occur any time a tag is opened or closed, At each occurrence, two kinds of operations are performed tag-marking and tag-printing:

  • The tag-marking operation is the simpler tag specific operation: it simply writes a tag specific string into the output device of the formatter. Tag-marking does not interfere with line-splitting computation.
  • The tag-printing operation is the more involved tag specific operation: it can print arbitrary material to the formatter. Tag-printing is tightly linked to the current pretty-printer operations.

Roughly speaking, tag-marking is commonly used to get a better rendering of texts in the rendering device, while tag-printing allows fine tuning of printing routines to print the same entity differently according to the semantic tags (i.e. print additional material or even omit parts of the output).

More precisely: when a semantic tag is opened or closed then both and successive 'tag-printing' and 'tag-marking' operations occur:

  • Tag-printing a semantic tag means calling the formatter specific function print_open_stag (resp. print_close_stag) with the name of the tag as argument: that tag-printing function can then print any regular material to the formatter (so that this material is enqueued as usual in the formatter queue for further line splitting computation).
  • Tag-marking a semantic tag means calling the formatter specific function mark_open_stag (resp. mark_close_stag) with the name of the tag as argument: that tag-marking function can then return the 'tag-opening marker' (resp. `tag-closing marker') for direct output into the output device of the formatter.

Being written directly into the output device of the formatter, semantic tag marker strings are not considered as part of the printing material that drives line splitting (in other words, the length of the strings corresponding to tag markers is considered as zero for line splitting).

Thus, semantic tag handling is in some sense transparent to pretty-printing and does not interfere with usual indentation. Hence, a single pretty-printing routine can output both simple 'verbatim' material or richer decorated output depending on the treatment of tags. By default, tags are not active, hence the output is not decorated with tag information. Once set_tags is set to true, the pretty-printer engine honors tags and decorates the output accordingly.

Default tag-marking functions behave the HTML way: string tags are enclosed in "<" and ">" while other tags are ignored; hence, opening marker for tag string "t" is "<t>" and closing marker is "</t>".

Default tag-printing functions just do nothing.

Tag-marking and tag-printing functions are user definable and can be set by calling set_formatter_stag_functions.

Semantic tag operations may be set on or off with set_tags. Tag-marking operations may be set on or off with set_mark_tags. Tag-printing operations may be set on or off with set_print_tags.

  • since 4.08
type tag = string
type stag +=
  1. | String_tag of tag
    (*

    String_tag s is a string tag s. String tags can be inserted either by explicitly using the constructor String_tag or by using the dedicated format syntax "@{<s> ... @}".

    • since 4.08
    *)
val pp_open_stag : formatter -> stag -> unit
val open_stag : stag -> unit

pp_open_stag ppf t opens the semantic tag named t.

The print_open_stag tag-printing function of the formatter is called with t as argument; then the opening tag marker for t, as given by mark_open_stag t, is written into the output device of the formatter.

  • since 4.08
val pp_close_stag : formatter -> unit -> unit
val close_stag : unit -> unit

pp_close_stag ppf () closes the most recently opened semantic tag t.

The closing tag marker, as given by mark_close_stag t, is written into the output device of the formatter; then the print_close_stag tag-printing function of the formatter is called with t as argument.

  • since 4.08
val pp_set_tags : formatter -> bool -> unit
val set_tags : bool -> unit

pp_set_tags ppf b turns on or off the treatment of semantic tags (default is off).

val pp_set_print_tags : formatter -> bool -> unit
val set_print_tags : bool -> unit

pp_set_print_tags ppf b turns on or off the tag-printing operations.

val pp_set_mark_tags : formatter -> bool -> unit
val set_mark_tags : bool -> unit

pp_set_mark_tags ppf b turns on or off the tag-marking operations.

val pp_get_print_tags : formatter -> unit -> bool
val get_print_tags : unit -> bool

Return the current status of tag-printing operations.

val pp_get_mark_tags : formatter -> unit -> bool
val get_mark_tags : unit -> bool

Return the current status of tag-marking operations.

val pp_set_formatter_out_channel : formatter -> out_channel -> unit

Redirecting the standard formatter output

val set_formatter_out_channel : out_channel -> unit

Redirect the standard pretty-printer output to the given channel. (All the output functions of the standard formatter are set to the default output functions printing to the given channel.)

set_formatter_out_channel is equivalent to pp_set_formatter_out_channel std_formatter.

val pp_set_formatter_output_functions : + formatter -> + (string -> int -> int -> unit) -> + (unit -> unit) -> + unit
val set_formatter_output_functions : + (string -> int -> int -> unit) -> + (unit -> unit) -> + unit

pp_set_formatter_output_functions ppf out flush redirects the standard pretty-printer output functions to the functions out and flush.

The out function performs all the pretty-printer string output. It is called with a string s, a start position p, and a number of characters n; it is supposed to output characters p to p + n - 1 of s.

The flush function is called whenever the pretty-printer is flushed (via conversion %!, or pretty-printing indications @? or @., or using low level functions print_flush or print_newline).

val pp_get_formatter_output_functions : + formatter -> + unit -> + (string -> int -> int -> unit) * (unit -> unit)
val get_formatter_output_functions : + unit -> + (string -> int -> int -> unit) * (unit -> unit)

Return the current output functions of the standard pretty-printer.

Redefining formatter output

The Format module is versatile enough to let you completely redefine the meaning of pretty-printing output: you may provide your own functions to define how to handle indentation, line splitting, and even printing of all the characters that have to be printed!

Redefining output functions

type formatter_out_functions = {
  1. out_string : string -> int -> int -> unit;
  2. out_flush : unit -> unit;
  3. out_newline : unit -> unit;
  4. out_spaces : int -> unit;
  5. out_indent : int -> unit;
    (*
    • since 4.06
    *)
}

The set of output functions specific to a formatter:

  • the out_string function performs all the pretty-printer string output. It is called with a string s, a start position p, and a number of characters n; it is supposed to output characters p to p + n - 1 of s.
  • the out_flush function flushes the pretty-printer output device.
  • out_newline is called to open a new line when the pretty-printer splits the line.
  • the out_spaces function outputs spaces when a break hint leads to spaces instead of a line split. It is called with the number of spaces to output.
  • the out_indent function performs new line indentation when the pretty-printer splits the line. It is called with the indentation value of the new line.

By default:

  • fields out_string and out_flush are output device specific; (e.g. Stdlib.output_string and Stdlib.flush for a Stdlib.out_channel device, or Buffer.add_substring and Stdlib.ignore for a Buffer.t output device),
  • field out_newline is equivalent to out_string "\n" 0 1;
  • fields out_spaces and out_indent are equivalent to out_string (String.make n ' ') 0 n.
  • since 4.01
val pp_set_formatter_out_functions : + formatter -> + formatter_out_functions -> + unit
val set_formatter_out_functions : formatter_out_functions -> unit

pp_set_formatter_out_functions ppf out_funs Set all the pretty-printer output functions of ppf to those of argument out_funs,

This way, you can change the meaning of indentation (which can be something else than just printing space characters) and the meaning of new lines opening (which can be connected to any other action needed by the application at hand).

Reasonable defaults for functions out_spaces and out_newline are respectively out_funs.out_string (String.make n ' ') 0 n and out_funs.out_string "\n" 0 1.

  • since 4.01
val pp_get_formatter_out_functions : + formatter -> + unit -> + formatter_out_functions
val get_formatter_out_functions : unit -> formatter_out_functions

Return the current output functions of the pretty-printer, including line splitting and indentation functions. Useful to record the current setting and restore it afterwards.

  • since 4.01

Redefining semantic tag operations

type formatter_stag_functions = {
  1. mark_open_stag : stag -> string;
  2. mark_close_stag : stag -> string;
  3. print_open_stag : stag -> unit;
  4. print_close_stag : stag -> unit;
}

The semantic tag handling functions specific to a formatter: mark versions are the 'tag-marking' functions that associate a string marker to a tag in order for the pretty-printing engine to write those markers as 0 length tokens in the output device of the formatter. print versions are the 'tag-printing' functions that can perform regular printing when a tag is closed or opened.

  • since 4.08
val pp_set_formatter_stag_functions : + formatter -> + formatter_stag_functions -> + unit
val set_formatter_stag_functions : formatter_stag_functions -> unit

pp_set_formatter_stag_functions ppf tag_funs changes the meaning of opening and closing semantic tag operations to use the functions in tag_funs when printing on ppf.

When opening a semantic tag with name t, the string t is passed to the opening tag-marking function (the mark_open_stag field of the record tag_funs), that must return the opening tag marker for that name. When the next call to close_stag () happens, the semantic tag name t is sent back to the closing tag-marking function (the mark_close_stag field of record tag_funs), that must return a closing tag marker for that name.

The print_ field of the record contains the tag-printing functions that are called at tag opening and tag closing time, to output regular material in the pretty-printer queue.

  • since 4.08
val pp_get_formatter_stag_functions : + formatter -> + unit -> + formatter_stag_functions
val get_formatter_stag_functions : unit -> formatter_stag_functions

Return the current semantic tag operation functions of the standard pretty-printer.

  • since 4.08

Defining formatters

Defining new formatters permits unrelated output of material in parallel on several output devices. All the parameters of a formatter are local to the formatter: right margin, maximum indentation limit, maximum number of pretty-printing boxes simultaneously open, ellipsis, and so on, are specific to each formatter and may be fixed independently.

For instance, given a Buffer.t buffer b, formatter_of_buffer b returns a new formatter using buffer b as its output device. Similarly, given a Stdlib.out_channel output channel oc, formatter_of_out_channel oc returns a new formatter using channel oc as its output device.

Alternatively, given out_funs, a complete set of output functions for a formatter, then formatter_of_out_functions out_funs computes a new formatter using those functions for output.

val formatter_of_out_channel : out_channel -> formatter

formatter_of_out_channel oc returns a new formatter writing to the corresponding output channel oc.

val synchronized_formatter_of_out_channel : + out_channel -> + formatter Domain.DLS.key

synchronized_formatter_of_out_channel oc returns the key to the domain-local state that holds the domain-local formatter for writing to the corresponding output channel oc.

When the formatter is used with multiple domains, the output from the domains will be interleaved with each other at points where the formatter is flushed, such as with print_flush.

  • alert unstable
val std_formatter : formatter

The initial domain's standard formatter to write to standard output.

It is defined as formatter_of_out_channel Stdlib.stdout.

val get_std_formatter : unit -> formatter

get_std_formatter () returns the current domain's standard formatter used to write to standard output.

  • since 5.0
val err_formatter : formatter

The initial domain's formatter to write to standard error.

It is defined as formatter_of_out_channel Stdlib.stderr.

val get_err_formatter : unit -> formatter

get_err_formatter () returns the current domain's formatter used to write to standard error.

  • since 5.0
val formatter_of_buffer : Buffer.t -> formatter

formatter_of_buffer b returns a new formatter writing to buffer b. At the end of pretty-printing, the formatter must be flushed using pp_print_flush or pp_print_newline, to print all the pending material into the buffer.

val stdbuf : Buffer.t

The initial domain's string buffer in which str_formatter writes.

val get_stdbuf : unit -> Buffer.t

get_stdbuf () returns the current domain's string buffer in which the current domain's string formatter writes.

  • since 5.0
val str_formatter : formatter

The initial domain's formatter to output to the stdbuf string buffer.

str_formatter is defined as formatter_of_buffer stdbuf.

val get_str_formatter : unit -> formatter

The current domain's formatter to output to the current domains string buffer.

  • since 5.0
val flush_str_formatter : unit -> string

Returns the material printed with str_formatter of the current domain, flushes the formatter and resets the corresponding buffer.

val make_formatter : + (string -> int -> int -> unit) -> + (unit -> unit) -> + formatter

make_formatter out flush returns a new formatter that outputs with function out, and flushes with function flush.

For instance,

make_formatter
+  (Stdlib.output oc)
+  (fun () -> Stdlib.flush oc)

returns a formatter to the Stdlib.out_channel oc.

val make_synchronized_formatter : + (string -> int -> int -> unit) -> + (unit -> unit) -> + formatter Domain.DLS.key

make_synchronized_formatter out flush returns the key to the domain-local state that holds the domain-local formatter that outputs with function out, and flushes with function flush.

When the formatter is used with multiple domains, the output from the domains will be interleaved with each other at points where the formatter is flushed, such as with print_flush.

  • since 5.0
  • alert unstable
val formatter_of_out_functions : formatter_out_functions -> formatter

formatter_of_out_functions out_funs returns a new formatter that writes with the set of output functions out_funs.

See definition of type formatter_out_functions for the meaning of argument out_funs.

  • since 4.06

Symbolic pretty-printing

Symbolic pretty-printing is pretty-printing using a symbolic formatter, i.e. a formatter that outputs symbolic pretty-printing items.

When using a symbolic formatter, all regular pretty-printing activities occur but output material is symbolic and stored in a buffer of output items. At the end of pretty-printing, flushing the output buffer allows post-processing of symbolic output before performing low level output operations.

In practice, first define a symbolic output buffer b using:

Use symbolic formatter ppf as usual, and retrieve symbolic items at end of pretty-printing by flushing symbolic output buffer sob with:

type symbolic_output_item =
  1. | Output_flush
    (*

    symbolic flush command

    *)
  2. | Output_newline
    (*

    symbolic newline command

    *)
  3. | Output_string of string
    (*

    Output_string s: symbolic output for string s

    *)
  4. | Output_spaces of int
    (*

    Output_spaces n: symbolic command to output n spaces

    *)
  5. | Output_indent of int
    (*

    Output_indent i: symbolic indentation of size i

    *)

Items produced by symbolic pretty-printers

  • since 4.06
type symbolic_output_buffer

The output buffer of a symbolic pretty-printer.

  • since 4.06
val make_symbolic_output_buffer : unit -> symbolic_output_buffer

make_symbolic_output_buffer () returns a fresh buffer for symbolic output.

  • since 4.06
val clear_symbolic_output_buffer : symbolic_output_buffer -> unit

clear_symbolic_output_buffer sob resets buffer sob.

  • since 4.06
val get_symbolic_output_buffer : + symbolic_output_buffer -> + symbolic_output_item list

get_symbolic_output_buffer sob returns the contents of buffer sob.

  • since 4.06
val flush_symbolic_output_buffer : + symbolic_output_buffer -> + symbolic_output_item list

flush_symbolic_output_buffer sob returns the contents of buffer sob and resets buffer sob. flush_symbolic_output_buffer sob is equivalent to let items = get_symbolic_output_buffer sob in + clear_symbolic_output_buffer sob; items

  • since 4.06
val add_symbolic_output_item : + symbolic_output_buffer -> + symbolic_output_item -> + unit

add_symbolic_output_item sob itm adds item itm to buffer sob.

  • since 4.06
val formatter_of_symbolic_output_buffer : symbolic_output_buffer -> formatter

formatter_of_symbolic_output_buffer sob returns a symbolic formatter that outputs to symbolic_output_buffer sob.

  • since 4.06

Convenience formatting functions.

val pp_print_iter : + ?pp_sep:(formatter -> unit -> unit) -> + (('a -> unit) -> 'b -> unit) -> + (formatter -> 'a -> unit) -> + formatter -> + 'b -> + unit

pp_print_iter ~pp_sep iter pp_v ppf v formats on ppf the iterations of iter over a collection v of values using pp_v. Iterations are separated by pp_sep (defaults to pp_print_cut).

  • since 5.1
val pp_print_list : + ?pp_sep:(formatter -> unit -> unit) -> + (formatter -> 'a -> unit) -> + formatter -> + 'a list -> + unit

pp_print_list ?pp_sep pp_v ppf l prints items of list l, using pp_v to print each item, and calling pp_sep between items (pp_sep defaults to pp_print_cut). Does nothing on empty lists.

  • since 4.02
val pp_print_array : + ?pp_sep:(formatter -> unit -> unit) -> + (formatter -> 'a -> unit) -> + formatter -> + 'a array -> + unit

pp_print_array ?pp_sep pp_v ppf a prints items of array a, using pp_v to print each item, and calling pp_sep between items (pp_sep defaults to pp_print_cut). Does nothing on empty arrays.

If a is mutated after pp_print_array is called, the printed values may not be what is expected because Format can delay the printing. This can be avoided by flushing ppf.

  • since 5.1
val pp_print_seq : + ?pp_sep:(formatter -> unit -> unit) -> + (formatter -> 'a -> unit) -> + formatter -> + 'a Seq.t -> + unit

pp_print_seq ?pp_sep pp_v ppf s prints items of sequence s, using pp_v to print each item, and calling pp_sep between items (pp_sep defaults to pp_print_cut. Does nothing on empty sequences.

This function does not terminate on infinite sequences.

  • since 4.12
val pp_print_text : formatter -> string -> unit

pp_print_text ppf s prints s with spaces and newlines respectively printed using pp_print_space and pp_force_newline.

  • since 4.02
val pp_print_option : + ?none:(formatter -> unit -> unit) -> + (formatter -> 'a -> unit) -> + formatter -> + 'a option -> + unit

pp_print_option ?none pp_v ppf o prints o on ppf using pp_v if o is Some v and none if it is None. none prints nothing by default.

  • since 4.08
val pp_print_result : + ok:(formatter -> 'a -> unit) -> + error:(formatter -> 'e -> unit) -> + formatter -> + ('a, 'e) result -> + unit

pp_print_result ~ok ~error ppf r prints r on ppf using ok if r is Ok _ and error if r is Error _.

  • since 4.08
val pp_print_either : + left:(formatter -> 'a -> unit) -> + right:(formatter -> 'b -> unit) -> + formatter -> + ('a, 'b) Either.t -> + unit

pp_print_either ~left ~right ppf e prints e on ppf using left if e is Either.Left _ and right if e is Either.Right _.

  • since 4.13

Formatted pretty-printing

Module Format provides a complete set of printf like functions for pretty-printing using format string specifications.

Specific annotations may be added in the format strings to give pretty-printing commands to the pretty-printing engine.

Those annotations are introduced in the format strings using the @ character. For instance, @ means a space break, @, means a cut, @[ opens a new box, and @] closes the last open box.

val fprintf : formatter -> ('a, formatter, unit) format -> 'a

fprintf ff fmt arg1 ... argN formats the arguments arg1 to argN according to the format string fmt, and outputs the resulting string on the formatter ff.

The format string fmt is a character string which contains three types of objects: plain characters and conversion specifications as specified in the Printf module, and pretty-printing indications specific to the Format module.

The pretty-printing indication characters are introduced by a @ character, and their meanings are:

Note: To prevent the interpretation of a @ character as a pretty-printing indication, escape it with a % character. Old quotation mode @@ is deprecated since it is not compatible with formatted input interpretation of character '@'.

Example: printf "@[%s@ %d@]@." "x =" 1 is equivalent to open_box (); print_string "x ="; print_space (); + print_int 1; close_box (); print_newline (). It prints x = 1 within a pretty-printing 'horizontal-or-vertical' box.

val printf : ('a, formatter, unit) format -> 'a

Same as fprintf above, but output on get_std_formatter ().

It is defined similarly to fun fmt -> fprintf (get_std_formatter ()) fmt but delays calling get_std_formatter until after the final argument required by the format is received. When used with multiple domains, the output from the domains will be interleaved with each other at points where the formatter is flushed, such as with print_flush.

val eprintf : ('a, formatter, unit) format -> 'a

Same as fprintf above, but output on get_err_formatter ().

It is defined similarly to fun fmt -> fprintf (get_err_formatter ()) fmt but delays calling get_err_formatter until after the final argument required by the format is received. When used with multiple domains, the output from the domains will be interleaved with each other at points where the formatter is flushed, such as with print_flush.

val sprintf : ('a, unit, string) format -> 'a

Same as printf above, but instead of printing on a formatter, returns a string containing the result of formatting the arguments. Note that the pretty-printer queue is flushed at the end of each call to sprintf. Note that if your format string contains a %a, you should use asprintf.

In case of multiple and related calls to sprintf to output material on a single string, you should consider using fprintf with the predefined formatter str_formatter and call flush_str_formatter () to get the final result.

Alternatively, you can use Format.fprintf with a formatter writing to a buffer of your own: flushing the formatter and the buffer at the end of pretty-printing returns the desired string.

val asprintf : ('a, formatter, unit, string) format4 -> 'a

Same as printf above, but instead of printing on a formatter, returns a string containing the result of formatting the arguments. The type of asprintf is general enough to interact nicely with %a conversions.

  • since 4.01
val dprintf : ('a, formatter, unit, formatter -> unit) format4 -> 'a

Same as fprintf, except the formatter is the last argument. dprintf "..." a b c is a function of type formatter -> unit which can be given to a format specifier %t.

This can be used as a replacement for asprintf to delay formatting decisions. Using the string returned by asprintf in a formatting context forces formatting decisions to be taken in isolation, and the final string may be created prematurely. dprintf allows delay of formatting decisions until the final formatting context is known. For example:

let t = Format.dprintf "%i@ %i@ %i" 1 2 3 in
+...
+Format.printf "@[<v>%t@]" t
  • since 4.08
val ifprintf : formatter -> ('a, formatter, unit) format -> 'a

Same as fprintf above, but does not print anything. Useful to ignore some material when conditionally printing.

  • since 3.10

Formatted Pretty-Printing with continuations.

val kfprintf : + (formatter -> 'a) -> + formatter -> + ('b, formatter, unit, 'a) format4 -> + 'b

Same as fprintf above, but instead of returning immediately, passes the formatter to its first argument at the end of printing.

val kdprintf : + ((formatter -> unit) -> 'a) -> + ('b, formatter, unit, 'a) format4 -> + 'b

Same as dprintf above, but instead of returning immediately, passes the suspended printer to its first argument at the end of printing.

  • since 4.08
val ikfprintf : + (formatter -> 'a) -> + formatter -> + ('b, formatter, unit, 'a) format4 -> + 'b

Same as kfprintf above, but does not print anything. Useful to ignore some material when conditionally printing.

  • since 3.12
val ksprintf : (string -> 'a) -> ('b, unit, string, 'a) format4 -> 'b

Same as sprintf above, but instead of returning the string, passes it to the first argument.

val kasprintf : (string -> 'a) -> ('b, formatter, unit, 'a) format4 -> 'b

Same as asprintf above, but instead of returning the string, passes it to the first argument.

  • since 4.03

Examples

A few warmup examples to get an idea of how Format is used.

We have a list l of pairs (int * bool), which the toplevel prints for us:

# let l = List.init 20 (fun n -> n, n mod 2 = 0)
+val l : (int * bool) list =
+[(0, true); (1, false); (2, true); (3, false); (4, true); (5, false);
+ (6, true); (7, false); (8, true); (9, false); (10, true); (11, false);
+ (12, true); (13, false); (14, true); (15, false); (16, true); (17, false);
+ (18, true); (19, false)]

If we want to print it ourself without the toplevel magic, we can try this:

# let pp_pair out (x,y) = Format.fprintf out "(%d, %b)" x y
+val pp_pair : Format.formatter -> int * bool -> unit = <fun>
+# Format.printf "l: [@[<hov>%a@]]@."
+  Format.(pp_print_list ~pp_sep:(fun out () -> fprintf out ";@ ") pp_pair) l
+  l: [(0, true); (1, false); (2, true); (3, false); (4, true); (5, false);
+      (6, true); (7, false); (8, true); (9, false); (10, true); (11, false);
+      (12, true); (13, false); (14, true); (15, false); (16, true);
+      (17, false); (18, true); (19, false)]

What this does, briefly, is:

If we omit "@ ", we get an ugly single-line print:

# Format.printf "l: [@[<hov>%a@]]@."
+      Format.(pp_print_list ~pp_sep:(fun out () -> fprintf out "; ") pp_pair) l
+  l: [(0, true); (1, false); (2, true); (* ... *); (18, true); (19, false)]
+- : unit = ()

Generally, it is good practice to define custom printers for important types in your program. If, for example, you were to define basic geometry types like so:

type point = {
+  x: float;
+  y: float;
+}
+
+type rectangle = {
+  ll: point; (* lower left *)
+  ur: point; (* upper right *)
+}

For debugging purpose, or to display information in logs, or on the console, it would be convenient to define printers for these types. Here is an example of to do it. Note that "%.3f" is a float printer up to 3 digits of precision after the dot; "%f" would print as many digits as required, which is somewhat verbose; "%h" is an hexadecimal float printer.

let pp_point out (p:point) =
+  Format.fprintf out "{ @[x=%.3f;@ y=%.3f@] }" p.x p.y
+
+let pp_rectangle out (r:rectangle) =
+  Format.fprintf out "{ @[ll=%a;@ ur=%a@] }"
+    pp_point r.ll pp_point r.ur

In the .mli file, we could have:

val pp_point : Format.formatter -> point -> unit
+
+val pp_rectangle : Format.formatter -> rectangle -> unit

These printers can now be used with "%a" inside other printers.

# Format.printf "some rectangle: %a@."
+      (Format.pp_print_option pp_rectangle)
+      (Some {ll={x=1.; y=2.}; ur={x=42.; y=500.12345}})
+some rectangle: { l={ x=1.000; y=2.000 }; ur={ x=42.000; y=500.123 } }
+
+# Format.printf "no rectangle: %a@."
+      (Format.pp_option pp_rectangle)
+      None
+no rectangle:

See how we combine pp_print_option (option printer) and our newly defined rectangle printer, like we did with pp_print_list earlier.

For a more extensive tutorial, see "Using the Format module".

A final note: the Format module is a starting point. The OCaml ecosystem has libraries that makes formatting easier and more expressive, with more combinators, more concise names, etc. An example of such a library is Fmt.

Automatic deriving of pretty-printers from type definitions is also possible, using https://github.com/ocaml-ppx/ppx_deriving or similar ppx derivers.

diff --git a/findlib-1/melange/Stdlib/Fun/index.html b/findlib-1/melange/Stdlib/Fun/index.html new file mode 100644 index 000000000..fd81a556a --- /dev/null +++ b/findlib-1/melange/Stdlib/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (docs.findlib-1.melange.Stdlib.Fun)

Module Stdlib.Fun

Function manipulation.

Combinators

val id : 'a -> 'a

id is the identity function. For any argument x, id x is x.

val const : 'a -> _ -> 'a

const c is a function that always returns the value c. For any argument x, (const c) x is c.

val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c

flip f reverses the argument order of the binary function f. For any arguments x and y, (flip f) x y is f y x.

val negate : ('a -> bool) -> 'a -> bool

negate p is the negation of the predicate function p. For any argument x, (negate p) x is not (p x).

Exception handling

val protect : finally:(unit -> unit) -> (unit -> 'a) -> 'a

protect ~finally work invokes work () and then finally () before work () returns with its value or an exception. In the latter case the exception is re-raised after finally (). If finally () raises an exception, then the exception Finally_raised is raised instead.

protect can be used to enforce local invariants whether work () returns normally or raises an exception. However, it does not protect against unexpected exceptions raised inside finally () such as Stdlib.Out_of_memory, Stdlib.Stack_overflow, or asynchronous exceptions raised by signal handlers (e.g. Sys.Break).

Note: It is a programming error if other kinds of exceptions are raised by finally, as any exception raised in work () will be lost in the event of a Finally_raised exception. Therefore, one should make sure to handle those inside the finally.

exception Finally_raised of exn

Finally_raised exn is raised by protect ~finally work when finally raises an exception exn. This exception denotes either an unexpected exception or a programming error. As a general rule, one should not catch a Finally_raised exception except as part of a catch-all handler.

diff --git a/findlib-1/melange/Stdlib/Gc/Memprof/index.html b/findlib-1/melange/Stdlib/Gc/Memprof/index.html new file mode 100644 index 000000000..4e3986383 --- /dev/null +++ b/findlib-1/melange/Stdlib/Gc/Memprof/index.html @@ -0,0 +1,6 @@ + +Memprof (docs.findlib-1.melange.Stdlib.Gc.Memprof)

Module Gc.Memprof

Memprof is a sampling engine for allocated memory words. Every allocated word has a probability of being sampled equal to a configurable sampling rate. Once a block is sampled, it becomes tracked. A tracked block triggers a user-defined callback as soon as it is allocated, promoted or deallocated.

Since blocks are composed of several words, a block can potentially be sampled several times. If a block is sampled several times, then each of the callback is called once for each event of this block: the multiplicity is given in the n_samples field of the allocation structure.

This engine makes it possible to implement a low-overhead memory profiler as an OCaml library.

Note: this API is EXPERIMENTAL. It may change without prior notice.

type allocation_source =
  1. | Normal
  2. | Marshal
  3. | Custom
type allocation = private {
  1. n_samples : int;
    (*

    The number of samples in this block (>= 1).

    *)
  2. size : int;
    (*

    The size of the block, in words, excluding the header.

    *)
  3. source : allocation_source;
    (*

    The type of the allocation.

    *)
  4. callstack : Printexc.raw_backtrace;
    (*

    The callstack for the allocation.

    *)
}

The type of metadata associated with allocations. This is the type of records passed to the callback triggered by the sampling of an allocation.

type ('minor, 'major) tracker = {
  1. alloc_minor : allocation -> 'minor option;
  2. alloc_major : allocation -> 'major option;
  3. promote : 'minor -> 'major option;
  4. dealloc_minor : 'minor -> unit;
  5. dealloc_major : 'major -> unit;
}

A ('minor, 'major) tracker describes how memprof should track sampled blocks over their lifetime, keeping a user-defined piece of metadata for each of them: 'minor is the type of metadata to keep for minor blocks, and 'major the type of metadata for major blocks.

When using threads, it is guaranteed that allocation callbacks are always run in the thread where the allocation takes place.

If an allocation-tracking or promotion-tracking function returns None, memprof stops tracking the corresponding value.

val null_tracker : ('minor, 'major) tracker

Default callbacks simply return None or ()

val start : + sampling_rate:float -> + ?callstack_size:int -> + ('minor, 'major) tracker -> + unit

Start the sampling with the given parameters. Fails if sampling is already active.

The parameter sampling_rate is the sampling rate in samples per word (including headers). Usually, with cheap callbacks, a rate of 1e-4 has no visible effect on performance, and 1e-3 causes the program to run a few percent slower

The parameter callstack_size is the length of the callstack recorded at every sample. Its default is max_int.

The parameter tracker determines how to track sampled blocks over their lifetime in the minor and major heap.

Sampling is temporarily disabled when calling a callback for the current thread. So they do not need to be re-entrant if the program is single-threaded. However, if threads are used, it is possible that a context switch occurs during a callback, in this case the callback functions must be re-entrant.

Note that the callback can be postponed slightly after the actual event. The callstack passed to the callback is always accurate, but the program state may have evolved.

val stop : unit -> unit

Stop the sampling. Fails if sampling is not active.

This function does not allocate memory.

All the already tracked blocks are discarded. If there are pending postponed callbacks, they may be discarded.

Calling stop when a callback is running can lead to callbacks not being called even though some events happened.

diff --git a/findlib-1/melange/Stdlib/Gc/index.html b/findlib-1/melange/Stdlib/Gc/index.html new file mode 100644 index 000000000..b3598c688 --- /dev/null +++ b/findlib-1/melange/Stdlib/Gc/index.html @@ -0,0 +1,2 @@ + +Gc (docs.findlib-1.melange.Stdlib.Gc)

Module Stdlib.Gc

Memory management control and statistics; finalised values.

type stat = {
  1. minor_words : float;
    (*

    Number of words allocated in the minor heap since the program was started.

    *)
  2. promoted_words : float;
    (*

    Number of words allocated in the minor heap that survived a minor collection and were moved to the major heap since the program was started.

    *)
  3. major_words : float;
    (*

    Number of words allocated in the major heap, including the promoted words, since the program was started.

    *)
  4. minor_collections : int;
    (*

    Number of minor collections since the program was started.

    *)
  5. major_collections : int;
    (*

    Number of major collection cycles completed since the program was started.

    *)
  6. heap_words : int;
    (*

    Total size of the major heap, in words.

    *)
  7. heap_chunks : int;
    (*

    Number of contiguous pieces of memory that make up the major heap. This metrics is currently not available in OCaml 5: the field value is always 0.

    *)
  8. live_words : int;
    (*

    Number of words of live data in the major heap, including the header words.

    Note that "live" words refers to every word in the major heap that isn't currently known to be collectable, which includes words that have become unreachable by the program after the start of the previous gc cycle. It is typically much simpler and more predictable to call Gc.full_major (or Gc.compact) then computing gc stats, as then "live" words has the simple meaning of "reachable by the program". One caveat is that a single call to Gc.full_major will not reclaim values that have a finaliser from Gc.finalise (this does not apply to Gc.finalise_last). If this caveat matters, simply call Gc.full_major twice instead of once.

    *)
  9. live_blocks : int;
    (*

    Number of live blocks in the major heap.

    See live_words for a caveat about what "live" means.

    *)
  10. free_words : int;
    (*

    Number of words in the free list.

    *)
  11. free_blocks : int;
    (*

    Number of blocks in the free list. This metrics is currently not available in OCaml 5: the field value is always 0.

    *)
  12. largest_free : int;
    (*

    Size (in words) of the largest block in the free list. This metrics is currently not available in OCaml 5: the field value is always 0.

    *)
  13. fragments : int;
    (*

    Number of wasted words due to fragmentation. These are 1-words free blocks placed between two live blocks. They are not available for allocation.

    *)
  14. compactions : int;
    (*

    Number of heap compactions since the program was started.

    *)
  15. top_heap_words : int;
    (*

    Maximum size reached by the major heap, in words.

    *)
  16. stack_size : int;
    (*

    Current size of the stack, in words. This metrics is currently not available in OCaml 5: the field value is always 0.

    • since 3.12
    *)
  17. forced_major_collections : int;
    (*

    Number of forced full major collections completed since the program was started.

    • since 4.12
    *)
}

The memory management counters are returned in a stat record. These counters give values for the whole program.

The total amount of memory allocated by the program since it was started is (in words) minor_words + major_words - promoted_words. Multiply by the word size (4 on a 32-bit machine, 8 on a 64-bit machine) to get the number of bytes.

type control = {
  1. minor_heap_size : int;
    (*

    The size (in words) of the minor heap. Changing this parameter will trigger a minor collection. The total size of the minor heap used by this program is the sum of the heap sizes of the active domains. Default: 256k.

    *)
  2. major_heap_increment : int;
    (*

    How much to add to the major heap when increasing it. If this number is less than or equal to 1000, it is a percentage of the current heap size (i.e. setting it to 100 will double the heap size at each increase). If it is more than 1000, it is a fixed number of words that will be added to the heap. Default: 15.

    *)
  3. space_overhead : int;
    (*

    The major GC speed is computed from this parameter. This is the memory that will be "wasted" because the GC does not immediately collect unreachable blocks. It is expressed as a percentage of the memory used for live data. The GC will work more (use more CPU time and collect blocks more eagerly) if space_overhead is smaller. Default: 120.

    *)
  4. verbose : int;
    (*

    This value controls the GC messages on standard error output. It is a sum of some of the following flags, to print messages on the corresponding events:

    • 0x001 Start and end of major GC cycle.
    • 0x002 Minor collection and major GC slice.
    • 0x004 Growing and shrinking of the heap.
    • 0x008 Resizing of stacks and memory manager tables.
    • 0x010 Heap compaction.
    • 0x020 Change of GC parameters.
    • 0x040 Computation of major GC slice size.
    • 0x080 Calling of finalisation functions.
    • 0x100 Bytecode executable and shared library search at start-up.
    • 0x200 Computation of compaction-triggering condition.
    • 0x400 Output GC statistics at program exit. Default: 0.
    *)
  5. max_overhead : int;
    (*

    Heap compaction is triggered when the estimated amount of "wasted" memory is more than max_overhead percent of the amount of live data. If max_overhead is set to 0, heap compaction is triggered at the end of each major GC cycle (this setting is intended for testing purposes only). If max_overhead >= 1000000, compaction is never triggered. If compaction is permanently disabled, it is strongly suggested to set allocation_policy to 2. Default: 500.

    *)
  6. stack_limit : int;
    (*

    The maximum size of the fiber stacks (in words). Default: 1024k.

    *)
  7. allocation_policy : int;
    (*

    The policy used for allocating in the major heap. Possible values are 0, 1 and 2.

    • 0 is the next-fit policy, which is usually fast but can result in fragmentation, increasing memory consumption.
    • 1 is the first-fit policy, which avoids fragmentation but has corner cases (in certain realistic workloads) where it is sensibly slower.
    • 2 is the best-fit policy, which is fast and avoids fragmentation. In our experiments it is faster and uses less memory than both next-fit and first-fit. (since OCaml 4.10)

    The default is best-fit.

    On one example that was known to be bad for next-fit and first-fit, next-fit takes 28s using 855Mio of memory, first-fit takes 47s using 566Mio of memory, best-fit takes 27s using 545Mio of memory.

    Note: If you change to next-fit, you may need to reduce the space_overhead setting, for example using 80 instead of the default 120 which is tuned for best-fit. Otherwise, your program will need more memory.

    Note: changing the allocation policy at run-time forces a heap compaction, which is a lengthy operation unless the heap is small (e.g. at the start of the program).

    Default: 2.

    • since 3.11
    *)
  8. window_size : int;
    (*

    The size of the window used by the major GC for smoothing out variations in its workload. This is an integer between 1 and 50. Default: 1.

    • since 4.03
    *)
  9. custom_major_ratio : int;
    (*

    Target ratio of floating garbage to major heap size for out-of-heap memory held by custom values located in the major heap. The GC speed is adjusted to try to use this much memory for dead values that are not yet collected. Expressed as a percentage of major heap size. The default value keeps the out-of-heap floating garbage about the same size as the in-heap overhead. Note: this only applies to values allocated with caml_alloc_custom_mem (e.g. bigarrays). Default: 44.

    • since 4.08
    *)
  10. custom_minor_ratio : int;
    (*

    Bound on floating garbage for out-of-heap memory held by custom values in the minor heap. A minor GC is triggered when this much memory is held by custom values located in the minor heap. Expressed as a percentage of minor heap size. Note: this only applies to values allocated with caml_alloc_custom_mem (e.g. bigarrays). Default: 100.

    • since 4.08
    *)
  11. custom_minor_max_size : int;
    (*

    Maximum amount of out-of-heap memory for each custom value allocated in the minor heap. Custom values that hold more than this many bytes are allocated on the major heap. Note: this only applies to values allocated with caml_alloc_custom_mem (e.g. bigarrays). Default: 70000 bytes.

    • since 4.08
    *)
}

The GC parameters are given as a control record. Note that these parameters can also be initialised by setting the OCAMLRUNPARAM environment variable. See the documentation of ocamlrun.

val stat : unit -> stat

Return the current values of the memory management counters in a stat record that represent the program's total memory stats. This function causes a full major collection.

val quick_stat : unit -> stat

Same as stat except that live_words, live_blocks, free_words, free_blocks, largest_free, and fragments are set to 0. Due to per-domain buffers it may only represent the state of the program's total memory usage since the last minor collection. This function is much faster than stat because it does not need to trigger a full major collection.

val counters : unit -> float * float * float

Return (minor_words, promoted_words, major_words) for the current domain or potentially previous domains. This function is as fast as quick_stat.

val minor_words : unit -> float

Number of words allocated in the minor heap by this domain or potentially previous domains. This number is accurate in byte-code programs, but only an approximation in programs compiled to native code.

In native code this function does not allocate.

  • since 4.04
val get : unit -> control

Return the current values of the GC parameters in a control record.

  • alert unsynchronized_access GC parameters are a mutable global state.
val set : control -> unit

set r changes the GC parameters according to the control record r. The normal usage is: Gc.set { (Gc.get()) with Gc.verbose = 0x00d }

  • alert unsynchronized_access GC parameters are a mutable global state.
val minor : unit -> unit

Trigger a minor collection.

val major_slice : int -> int

major_slice n Do a minor collection and a slice of major collection. n is the size of the slice: the GC will do enough work to free (on average) n words of memory. If n = 0, the GC will try to do enough work to ensure that the next automatic slice has no work to do. This function returns an unspecified integer (currently: 0).

val major : unit -> unit

Do a minor collection and finish the current major collection cycle.

val full_major : unit -> unit

Do a minor collection, finish the current major collection cycle, and perform a complete new cycle. This will collect all currently unreachable blocks.

val compact : unit -> unit

Perform a full major collection and compact the heap. Note that heap compaction is a lengthy operation.

val print_stat : out_channel -> unit

Print the current values of the memory management counters (in human-readable form) of the total program into the channel argument.

val allocated_bytes : unit -> float

Return the number of bytes allocated by this domain and potentially a previous domain. It is returned as a float to avoid overflow problems with int on 32-bit machines.

val get_minor_free : unit -> int

Return the current size of the free space inside the minor heap of this domain.

  • since 4.03
val finalise : ('a -> unit) -> 'a -> unit

finalise f v registers f as a finalisation function for v. v must be heap-allocated. f will be called with v as argument at some point between the first time v becomes unreachable (including through weak pointers) and the time v is collected by the GC. Several functions can be registered for the same value, or even several instances of the same function. Each instance will be called once (or never, if the program terminates before v becomes unreachable).

The GC will call the finalisation functions in the order of deallocation. When several values become unreachable at the same time (i.e. during the same GC cycle), the finalisation functions will be called in the reverse order of the corresponding calls to finalise. If finalise is called in the same order as the values are allocated, that means each value is finalised before the values it depends upon. Of course, this becomes false if additional dependencies are introduced by assignments.

In the presence of multiple OCaml threads it should be assumed that any particular finaliser may be executed in any of the threads.

Anything reachable from the closure of finalisation functions is considered reachable, so the following code will not work as expected:

  • let v = ... in Gc.finalise (fun _ -> ...v...) v

Instead you should make sure that v is not in the closure of the finalisation function by writing:

  • let f = fun x -> ... let v = ... in Gc.finalise f v

The f function can use all features of OCaml, including assignments that make the value reachable again. It can also loop forever (in this case, the other finalisation functions will not be called during the execution of f, unless it calls finalise_release). It can call finalise on v or other values to register other functions or even itself. It can raise an exception; in this case the exception will interrupt whatever the program was doing when the function was called.

finalise will raise Invalid_argument if v is not guaranteed to be heap-allocated. Some examples of values that are not heap-allocated are integers, constant constructors, booleans, the empty array, the empty list, the unit value. The exact list of what is heap-allocated or not is implementation-dependent. Some constant values can be heap-allocated but never deallocated during the lifetime of the program, for example a list of integer constants; this is also implementation-dependent. Note that values of types float are sometimes allocated and sometimes not, so finalising them is unsafe, and finalise will also raise Invalid_argument for them. Values of type 'a Lazy.t (for any 'a) are like float in this respect, except that the compiler sometimes optimizes them in a way that prevents finalise from detecting them. In this case, it will not raise Invalid_argument, but you should still avoid calling finalise on lazy values.

The results of calling String.make, Bytes.make, Bytes.create, Array.make, and Stdlib.ref are guaranteed to be heap-allocated and non-constant except when the length argument is 0.

val finalise_last : (unit -> unit) -> 'a -> unit

same as finalise except the value is not given as argument. So you can't use the given value for the computation of the finalisation function. The benefit is that the function is called after the value is unreachable for the last time instead of the first time. So contrary to finalise the value will never be reachable again or used again. In particular every weak pointer and ephemeron that contained this value as key or data is unset before running the finalisation function. Moreover the finalisation functions attached with finalise are always called before the finalisation functions attached with finalise_last.

  • since 4.04
val finalise_release : unit -> unit

A finalisation function may call finalise_release to tell the GC that it can launch the next finalisation function without waiting for the current one to return.

type alarm

An alarm is a piece of data that calls a user function at the end of each major GC cycle. The following functions are provided to create and delete alarms.

val create_alarm : (unit -> unit) -> alarm

create_alarm f will arrange for f to be called at the end of each major GC cycle, not caused by f itself, starting with the current cycle or the next one. A value of type alarm is returned that you can use to call delete_alarm.

val delete_alarm : alarm -> unit

delete_alarm a will stop the calls to the function associated to a. Calling delete_alarm a again has no effect.

val eventlog_pause : unit -> unit
  • deprecated Use Runtime_events.pause instead.
val eventlog_resume : unit -> unit
  • deprecated Use Runtime_events.resume instead.
module Memprof : sig ... end

Memprof is a sampling engine for allocated memory words. Every allocated word has a probability of being sampled equal to a configurable sampling rate. Once a block is sampled, it becomes tracked. A tracked block triggers a user-defined callback as soon as it is allocated, promoted or deallocated.

diff --git a/findlib-1/melange/Stdlib/Hashtbl/Make/argument-1-H/index.html b/findlib-1/melange/Stdlib/Hashtbl/Make/argument-1-H/index.html new file mode 100644 index 000000000..399d9ace3 --- /dev/null +++ b/findlib-1/melange/Stdlib/Hashtbl/Make/argument-1-H/index.html @@ -0,0 +1,2 @@ + +H (docs.findlib-1.melange.Stdlib.Hashtbl.Make.H)

Parameter Make.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/findlib-1/melange/Stdlib/Hashtbl/Make/index.html b/findlib-1/melange/Stdlib/Hashtbl/Make/index.html new file mode 100644 index 000000000..e303da9bc --- /dev/null +++ b/findlib-1/melange/Stdlib/Hashtbl/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.findlib-1.melange.Stdlib.Hashtbl.Make)

Module Hashtbl.Make

Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

Parameters

module H : HashedType

Signature

type key = H.t
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/findlib-1/melange/Stdlib/Hashtbl/MakeSeeded/argument-1-H/index.html b/findlib-1/melange/Stdlib/Hashtbl/MakeSeeded/argument-1-H/index.html new file mode 100644 index 000000000..1429a90ba --- /dev/null +++ b/findlib-1/melange/Stdlib/Hashtbl/MakeSeeded/argument-1-H/index.html @@ -0,0 +1,2 @@ + +H (docs.findlib-1.melange.Stdlib.Hashtbl.MakeSeeded.H)

Parameter MakeSeeded.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

diff --git a/findlib-1/melange/Stdlib/Hashtbl/MakeSeeded/index.html b/findlib-1/melange/Stdlib/Hashtbl/MakeSeeded/index.html new file mode 100644 index 000000000..8b1b56e21 --- /dev/null +++ b/findlib-1/melange/Stdlib/Hashtbl/MakeSeeded/index.html @@ -0,0 +1,2 @@ + +MakeSeeded (docs.findlib-1.melange.Stdlib.Hashtbl.MakeSeeded)

Module Hashtbl.MakeSeeded

Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

Parameters

Signature

type key = H.t
type !'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/findlib-1/melange/Stdlib/Hashtbl/index.html b/findlib-1/melange/Stdlib/Hashtbl/index.html new file mode 100644 index 000000000..245b783f2 --- /dev/null +++ b/findlib-1/melange/Stdlib/Hashtbl/index.html @@ -0,0 +1,80 @@ + +Hashtbl (docs.findlib-1.melange.Stdlib.Hashtbl)

Module Stdlib.Hashtbl

Hash tables and hash functions.

Hash tables are hashed association tables, with in-place modification. Because most operations on a hash table modify their input, they're more commonly used in imperative code. The lookup of the value associated with a key (see find, find_opt) is normally very fast, often faster than the equivalent lookup in Map.

The functors Make and MakeSeeded can be used when performance or flexibility are key. The user provides custom equality and hash functions for the key type, and obtains a custom hash table type for this particular type of key.

Warning a hash table is only as good as the hash function. A bad hash function will turn the table into a degenerate association list, with linear time lookup instead of constant time lookup.

The polymorphic t hash table is useful in simpler cases or in interactive environments. It uses the polymorphic hash function defined in the OCaml runtime (at the time of writing, it's SipHash), as well as the polymorphic equality (=).

See the examples section.

Unsynchronized accesses

Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

Generic interface

type (!'a, !'b) t

The type of hash tables from type 'a to type 'b.

val create : ?random:bool -> int -> ('a, 'b) t

Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

  • before 4.00

    the ~random parameter was not present and all hash tables were created in non-randomized mode.

val clear : ('a, 'b) t -> unit

Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

val reset : ('a, 'b) t -> unit

Empty a hash table and shrink the size of the bucket table to its initial size.

  • since 4.00
val copy : ('a, 'b) t -> ('a, 'b) t

Return a copy of the given hashtable.

val add : ('a, 'b) t -> 'a -> 'b -> unit

Hashtbl.add tbl key data adds a binding of key to data in table tbl.

Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

If you desire the classic behavior of replacing elements, see replace.

val find : ('a, 'b) t -> 'a -> 'b

Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

val find_opt : ('a, 'b) t -> 'a -> 'b option

Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

  • since 4.05
val find_all : ('a, 'b) t -> 'a -> 'b list

Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

val mem : ('a, 'b) t -> 'a -> bool

Hashtbl.mem tbl x checks if x is bound in tbl.

val remove : ('a, 'b) t -> 'a -> unit

Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

val replace : ('a, 'b) t -> 'a -> 'b -> unit

Hashtbl.replace tbl key data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit

Hashtbl.iter f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

The behavior is not specified if the hash table is modified by f during the iteration.

val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit

Hashtbl.filter_map_inplace f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

Other comments for iter apply as well.

  • since 4.03
val fold : ('a -> 'b -> 'acc -> 'acc) -> ('a, 'b) t -> 'acc -> 'acc

Hashtbl.fold f tbl init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

The behavior is not specified if the hash table is modified by f during the iteration.

val length : ('a, 'b) t -> int

Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

val randomize : unit -> unit

After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

  • since 4.00
val is_randomized : unit -> bool

Return true if the tables are currently created in randomized mode by default, false otherwise.

  • since 4.03
val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

  • since 4.12
type statistics = {
  1. num_bindings : int;
    (*

    Number of bindings present in the table. Same value as returned by length.

    *)
  2. num_buckets : int;
    (*

    Number of buckets in the table.

    *)
  3. max_bucket_length : int;
    (*

    Maximal number of bindings per bucket.

    *)
  4. bucket_histogram : int array;
    (*

    Histogram of bucket sizes. This array histo has length max_bucket_length + 1. The value of histo.(i) is the number of buckets whose size is i.

    *)
}
  • since 4.00
val stats : ('a, 'b) t -> statistics

Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

  • since 4.00

Hash tables and Sequences

val to_seq : ('a, 'b) t -> ('a * 'b) Seq.t

Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

The behavior is not specified if the hash table is modified during the iteration.

  • since 4.07
val to_seq_keys : ('a, _) t -> 'a Seq.t

Same as Seq.map fst (to_seq m)

  • since 4.07
val to_seq_values : (_, 'b) t -> 'b Seq.t

Same as Seq.map snd (to_seq m)

  • since 4.07
val add_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

Add the given bindings to the table, using add

  • since 4.07
val replace_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

Add the given bindings to the table, using replace

  • since 4.07
val of_seq : ('a * 'b) Seq.t -> ('a, 'b) t

Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

  • since 4.07

Functorial interface

The functorial interface allows the use of specific comparison and hash functions, either for performance/security concerns, or because keys are not hashable/comparable with the polymorphic builtins.

For instance, one might want to specialize a table for integer keys:

module IntHash =
+  struct
+    type t = int
+    let equal i j = i=j
+    let hash i = i land max_int
+  end
+
+module IntHashtbl = Hashtbl.Make(IntHash)
+
+let h = IntHashtbl.create 17 in
+IntHashtbl.add h 12 "hello"

This creates a new module IntHashtbl, with a new type 'a + IntHashtbl.t of tables from int to 'a. In this example, h contains string values so its type is string IntHashtbl.t.

Note that the new type 'a IntHashtbl.t is not compatible with the type ('a,'b) Hashtbl.t of the generic interface. For example, Hashtbl.length h would not type-check, you must use IntHashtbl.length.

module type HashedType = sig ... end

The input signature of the functor Make.

module type S = sig ... end

The output signature of the functor Make.

module Make (H : HashedType) : S with type key = H.t

Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

module type SeededHashedType = sig ... end

The input signature of the functor MakeSeeded.

module type SeededS = sig ... end

The output signature of the functor MakeSeeded.

module MakeSeeded (H : SeededHashedType) : SeededS with type key = H.t

Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

The polymorphic hash functions

val hash : 'a -> int

Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

val seeded_hash : int -> 'a -> int

A variant of hash that is further parameterized by an integer seed.

  • since 4.00
val hash_param : int -> int -> 'a -> int

Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

val seeded_hash_param : int -> int -> int -> 'a -> int

A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

  • since 4.00

Examples

Basic Example

(* 0...99 *)
+let seq = Seq.ints 0 |> Seq.take 100
+
+(* build from Seq.t *)
+# let tbl =
+    seq
+    |> Seq.map (fun x -> x, string_of_int x)
+    |> Hashtbl.of_seq
+val tbl : (int, string) Hashtbl.t = <abstr>
+
+# Hashtbl.length tbl
+- : int = 100
+
+# Hashtbl.find_opt tbl 32
+- : string option = Some "32"
+
+# Hashtbl.find_opt tbl 166
+- : string option = None
+
+# Hashtbl.replace tbl 166 "one six six"
+- : unit = ()
+
+# Hashtbl.find_opt tbl 166
+- : string option = Some "one six six"
+
+# Hashtbl.length tbl
+- : int = 101

Counting Elements

Given a sequence of elements (here, a Seq.t), we want to count how many times each distinct element occurs in the sequence. A simple way to do this, assuming the elements are comparable and hashable, is to use a hash table that maps elements to their number of occurrences.

Here we illustrate that principle using a sequence of (ascii) characters (type char). We use a custom Char_tbl specialized for char.

# module Char_tbl = Hashtbl.Make(struct
+    type t = char
+    let equal = Char.equal
+    let hash = Hashtbl.hash
+  end)
+
+(*  count distinct occurrences of chars in [seq] *)
+# let count_chars (seq : char Seq.t) : _ list =
+    let counts = Char_tbl.create 16 in
+    Seq.iter
+      (fun c ->
+        let count_c =
+          Char_tbl.find_opt counts c
+          |> Option.value ~default:0
+        in
+        Char_tbl.replace counts c (count_c + 1))
+      seq;
+    (* turn into a list *)
+    Char_tbl.fold (fun c n l -> (c,n) :: l) counts []
+      |> List.sort (fun (c1,_)(c2,_) -> Char.compare c1 c2)
+val count_chars : Char_tbl.key Seq.t -> (Char.t * int) list = <fun>
+
+(* basic seq from a string *)
+# let seq = String.to_seq "hello world, and all the camels in it!"
+val seq : char Seq.t = <fun>
+
+# count_chars seq
+- : (Char.t * int) list =
+[(' ', 7); ('!', 1); (',', 1); ('a', 3); ('c', 1); ('d', 2); ('e', 3);
+ ('h', 2); ('i', 2); ('l', 6); ('m', 1); ('n', 2); ('o', 2); ('r', 1);
+ ('s', 1); ('t', 2); ('w', 1)]
+
+(* "abcabcabc..." *)
+# let seq2 =
+    Seq.cycle (String.to_seq "abc") |> Seq.take 31
+val seq2 : char Seq.t = <fun>
+
+# String.of_seq seq2
+- : String.t = "abcabcabcabcabcabcabcabcabcabca"
+
+# count_chars seq2
+- : (Char.t * int) list = [('a', 11); ('b', 10); ('c', 10)]
diff --git a/findlib-1/melange/Stdlib/Hashtbl/module-type-HashedType/index.html b/findlib-1/melange/Stdlib/Hashtbl/module-type-HashedType/index.html new file mode 100644 index 000000000..4bc9ae8f2 --- /dev/null +++ b/findlib-1/melange/Stdlib/Hashtbl/module-type-HashedType/index.html @@ -0,0 +1,2 @@ + +HashedType (docs.findlib-1.melange.Stdlib.Hashtbl.HashedType)

Module type Hashtbl.HashedType

The input signature of the functor Make.

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/findlib-1/melange/Stdlib/Hashtbl/module-type-S/index.html b/findlib-1/melange/Stdlib/Hashtbl/module-type-S/index.html new file mode 100644 index 000000000..e4c560021 --- /dev/null +++ b/findlib-1/melange/Stdlib/Hashtbl/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (docs.findlib-1.melange.Stdlib.Hashtbl.S)

Module type Hashtbl.S

The output signature of the functor Make.

type key
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/findlib-1/melange/Stdlib/Hashtbl/module-type-SeededHashedType/index.html b/findlib-1/melange/Stdlib/Hashtbl/module-type-SeededHashedType/index.html new file mode 100644 index 000000000..8a5267f6d --- /dev/null +++ b/findlib-1/melange/Stdlib/Hashtbl/module-type-SeededHashedType/index.html @@ -0,0 +1,2 @@ + +SeededHashedType (docs.findlib-1.melange.Stdlib.Hashtbl.SeededHashedType)

Module type Hashtbl.SeededHashedType

The input signature of the functor MakeSeeded.

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

diff --git a/findlib-1/melange/Stdlib/Hashtbl/module-type-SeededS/index.html b/findlib-1/melange/Stdlib/Hashtbl/module-type-SeededS/index.html new file mode 100644 index 000000000..097bb8c41 --- /dev/null +++ b/findlib-1/melange/Stdlib/Hashtbl/module-type-SeededS/index.html @@ -0,0 +1,2 @@ + +SeededS (docs.findlib-1.melange.Stdlib.Hashtbl.SeededS)

Module type Hashtbl.SeededS

The output signature of the functor MakeSeeded.

type key
type !'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/findlib-1/melange/Stdlib/In_channel/index.html b/findlib-1/melange/Stdlib/In_channel/index.html new file mode 100644 index 000000000..3ce070127 --- /dev/null +++ b/findlib-1/melange/Stdlib/In_channel/index.html @@ -0,0 +1,3 @@ + +In_channel (docs.findlib-1.melange.Stdlib.In_channel)

Module Stdlib.In_channel

Input channels.

This module provides functions for working with input channels.

See the example section below.

Channels

type t = in_channel

The type of input channel.

type open_flag = open_flag =
  1. | Open_rdonly
    (*

    open for reading.

    *)
  2. | Open_wronly
    (*

    open for writing.

    *)
  3. | Open_append
    (*

    open for appending: always write at end of file.

    *)
  4. | Open_creat
    (*

    create the file if it does not exist.

    *)
  5. | Open_trunc
    (*

    empty the file if it already exists.

    *)
  6. | Open_excl
    (*

    fail if Open_creat and the file already exists.

    *)
  7. | Open_binary
    (*

    open in binary mode (no conversion).

    *)
  8. | Open_text
    (*

    open in text mode (may perform conversions).

    *)
  9. | Open_nonblock
    (*

    open in non-blocking mode.

    *)

Opening modes for open_gen.

val stdin : t

The standard input for the process.

val open_bin : string -> t

Open the named file for reading, and return a new input channel on that file, positioned at the beginning of the file.

val open_text : string -> t

Same as open_bin, but the file is opened in text mode, so that newline translation takes place during reads. On operating systems that do not distinguish between text mode and binary mode, this function behaves like open_bin.

val open_gen : open_flag list -> int -> string -> t

open_gen mode perm filename opens the named file for reading, as described above. The extra arguments mode and perm specify the opening mode and file permissions. open_text and open_bin are special cases of this function.

val with_open_bin : string -> (t -> 'a) -> 'a

with_open_bin fn f opens a channel ic on file fn and returns f + ic. After f returns, either with a value or by raising an exception, ic is guaranteed to be closed.

val with_open_text : string -> (t -> 'a) -> 'a

Like with_open_bin, but the channel is opened in text mode (see open_text).

val with_open_gen : open_flag list -> int -> string -> (t -> 'a) -> 'a

Like with_open_bin, but can specify the opening mode and file permission, in case the file must be created (see open_gen).

val close : t -> unit

Close the given channel. Input functions raise a Sys_error exception when they are applied to a closed input channel, except close, which does nothing when applied to an already closed channel.

val close_noerr : t -> unit

Same as close, but ignore all errors.

Input

val input_char : t -> char option

Read one character from the given input channel. Returns None if there are no more characters to read.

val input_byte : t -> int option

Same as input_char, but return the 8-bit integer representing the character. Returns None if the end of file was reached.

val input_line : t -> string option

input_line ic reads characters from ic until a newline or the end of file is reached. Returns the string of all characters read, without the newline (if any). Returns None if the end of the file has been reached. In particular, this will be the case if the last line of input is empty.

A newline is the character \n unless the file is open in text mode and Sys.win32 is true in which case it is the sequence of characters \r\n.

val really_input_string : t -> int -> string option

really_input_string ic len reads len characters from channel ic and returns them in a new string. Returns None if the end of file is reached before len characters have been read.

If the same channel is read concurrently by multiple threads, the returned string is not guaranteed to contain contiguous characters from the input.

val input_all : t -> string

input_all ic reads all remaining data from ic.

If the same channel is read concurrently by multiple threads, the returned string is not guaranteed to contain contiguous characters from the input.

val input_lines : t -> string list

input_lines ic reads lines using input_line until the end of file is reached. It returns the list of all lines read, in the order they were read. The newline characters that terminate lines are not included in the returned strings. Empty lines produce empty strings.

  • since 5.1

Advanced input

val input : t -> bytes -> int -> int -> int

input ic buf pos len reads up to len characters from the given channel ic, storing them in byte sequence buf, starting at character number pos. It returns the actual number of characters read, between 0 and len (inclusive). A return value of 0 means that the end of file was reached.

Use really_input to read exactly len characters.

val really_input : t -> bytes -> int -> int -> unit option

really_input ic buf pos len reads len characters from channel ic, storing them in byte sequence buf, starting at character number pos.

Returns None if the end of file is reached before len characters have been read.

If the same channel is read concurrently by multiple threads, the bytes read by really_input are not guaranteed to be contiguous.

val fold_lines : ('acc -> string -> 'acc) -> 'acc -> t -> 'acc

fold_lines f init ic reads lines from ic using input_line until the end of file is reached, and successively passes each line to function f in the style of a fold. More precisely, if lines l1, ..., lN are read, fold_lines f init ic computes f (... (f (f init l1) l2) ...) lN. If f has no side effects, this is equivalent to List.fold_left f init (In_channel.input_lines ic), but is more efficient since it does not construct the list of all lines read.

  • since 5.1

Seeking

val seek : t -> int64 -> unit

seek chan pos sets the current reading position to pos for channel chan. This works only for regular files. On files of other kinds, the behavior is unspecified.

val pos : t -> int64

Return the current reading position for the given channel. For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos, then going back to this position using seek will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

Attributes

val length : t -> int64

Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless. The returned size does not take into account the end-of-line translations that can be performed when reading from a channel opened in text mode.

val set_binary_mode : t -> bool -> unit

set_binary_mode ic true sets the channel ic to binary mode: no translations take place during input.

set_binary_mode ic false sets the channel ic to text mode: depending on the operating system, some translations may take place during input. For instance, under Windows, end-of-lines will be translated from \r\n to \n.

This function has no effect under operating systems that do not distinguish between text mode and binary mode.

val isatty : t -> bool

isatty ic is true if ic refers to a terminal or console window, false otherwise.

  • since 5.1

Examples

Reading the contents of a file:

let read_file file = In_channel.with_open_bin file In_channel.input_all

Reading a line from stdin:

let user_input () = In_channel.input_line In_channel.stdin
diff --git a/findlib-1/melange/Stdlib/Int/index.html b/findlib-1/melange/Stdlib/Int/index.html new file mode 100644 index 000000000..19271e8eb --- /dev/null +++ b/findlib-1/melange/Stdlib/Int/index.html @@ -0,0 +1,2 @@ + +Int (docs.findlib-1.melange.Stdlib.Int)

Module Stdlib.Int

Integer values.

Integers are Sys.int_size bits wide and use two's complement representation. All operations are taken modulo 2Sys.int_size. They do not fail on overflow.

Integers

type t = int

The type for integer values.

val zero : int

zero is the integer 0.

val one : int

one is the integer 1.

val minus_one : int

minus_one is the integer -1.

val neg : int -> int

neg x is ~-x.

val add : int -> int -> int

add x y is the addition x + y.

val sub : int -> int -> int

sub x y is the subtraction x - y.

val mul : int -> int -> int

mul x y is the multiplication x * y.

val div : int -> int -> int

div x y is the division x / y. See Stdlib.(/) for details.

val rem : int -> int -> int

rem x y is the remainder x mod y. See Stdlib.(mod) for details.

val succ : int -> int

succ x is add x 1.

val pred : int -> int

pred x is sub x 1.

val abs : int -> int

abs x is the absolute value of x. That is x if x is positive and neg x if x is negative. Warning. This may be negative if the argument is min_int.

val max_int : int

max_int is the greatest representable integer, 2{^[Sys.int_size - 1]} - 1.

val min_int : int

min_int is the smallest representable integer, -2{^[Sys.int_size - 1]}.

val logand : int -> int -> int

logand x y is the bitwise logical and of x and y.

val logor : int -> int -> int

logor x y is the bitwise logical or of x and y.

val logxor : int -> int -> int

logxor x y is the bitwise logical exclusive or of x and y.

val lognot : int -> int

lognot x is the bitwise logical negation of x.

val shift_left : int -> int -> int

shift_left x n shifts x to the left by n bits. The result is unspecified if n < 0 or n > Sys.int_size.

val shift_right : int -> int -> int

shift_right x n shifts x to the right by n bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if n < 0 or n > Sys.int_size.

val shift_right_logical : int -> int -> int

shift_right x n shifts x to the right by n bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if n < 0 or n > Sys.int_size.

Predicates and comparisons

val equal : int -> int -> bool

equal x y is true if and only if x = y.

val compare : int -> int -> int

compare x y is Stdlib.compare x y but more efficient.

val min : int -> int -> int

Return the smaller of the two arguments.

  • since 4.13
val max : int -> int -> int

Return the greater of the two arguments.

  • since 4.13

Converting

val to_float : int -> float

to_float x is x as a floating point number.

val of_float : float -> int

of_float x truncates x to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

val to_string : int -> string

to_string x is the written representation of x in decimal.

val seeded_hash : int -> int -> int

A seeded hash function for ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : int -> int

An unseeded hash function for ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.1
diff --git a/findlib-1/melange/Stdlib/Int32/index.html b/findlib-1/melange/Stdlib/Int32/index.html new file mode 100644 index 000000000..80140432d --- /dev/null +++ b/findlib-1/melange/Stdlib/Int32/index.html @@ -0,0 +1,4 @@ + +Int32 (docs.findlib-1.melange.Stdlib.Int32)

Module Stdlib.Int32

32-bit integers.

This module provides operations on the type int32 of signed 32-bit integers. Unlike the built-in int type, the type int32 is guaranteed to be exactly 32-bit wide on all platforms. All arithmetic operations over int32 are taken modulo 232.

Performance notice: values of type int32 occupy more memory space than values of type int, and arithmetic operations on int32 are generally slower than those on int. Use int32 only when the application requires exact 32-bit arithmetic.

Literals for 32-bit integers are suffixed by l:

let zero: int32 = 0l
+let one: int32 = 1l
+let m_one: int32 = -1l
val zero : int32

The 32-bit integer 0.

val one : int32

The 32-bit integer 1.

val minus_one : int32

The 32-bit integer -1.

val neg : int32 -> int32

Unary negation.

val add : int32 -> int32 -> int32

Addition.

val sub : int32 -> int32 -> int32

Subtraction.

val mul : int32 -> int32 -> int32

Multiplication.

val div : int32 -> int32 -> int32

Integer division. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val unsigned_div : int32 -> int32 -> int32

Same as div, except that arguments and result are interpreted as unsigned 32-bit integers.

  • since 4.08
val rem : int32 -> int32 -> int32

Integer remainder. If y is not zero, the result of Int32.rem x y satisfies the following property: x = Int32.add (Int32.mul (Int32.div x y) y) (Int32.rem x y). If y = 0, Int32.rem x y raises Division_by_zero.

val unsigned_rem : int32 -> int32 -> int32

Same as rem, except that arguments and result are interpreted as unsigned 32-bit integers.

  • since 4.08
val succ : int32 -> int32

Successor. Int32.succ x is Int32.add x Int32.one.

val pred : int32 -> int32

Predecessor. Int32.pred x is Int32.sub x Int32.one.

val abs : int32 -> int32

abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

val max_int : int32

The greatest representable 32-bit integer, 231 - 1.

val min_int : int32

The smallest representable 32-bit integer, -231.

val logand : int32 -> int32 -> int32

Bitwise logical and.

val logor : int32 -> int32 -> int32

Bitwise logical or.

val logxor : int32 -> int32 -> int32

Bitwise logical exclusive or.

val lognot : int32 -> int32

Bitwise logical negation.

val shift_left : int32 -> int -> int32

Int32.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= 32.

val shift_right : int32 -> int -> int32

Int32.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 32.

val shift_right_logical : int32 -> int -> int32

Int32.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 32.

val of_int : int -> int32

Convert the given integer (type int) to a 32-bit integer (type int32). On 64-bit platforms, the argument is taken modulo 232.

val to_int : int32 -> int

Convert the given 32-bit integer (type int32) to an integer (type int). On 32-bit platforms, the 32-bit integer is taken modulo 231, i.e. the high-order bit is lost during the conversion. On 64-bit platforms, the conversion is exact.

val unsigned_to_int : int32 -> int option

Same as to_int, but interprets the argument as an unsigned integer. Returns None if the unsigned value of the argument cannot fit into an int.

  • since 4.08
val of_float : float -> int32

Convert the given floating-point number to a 32-bit integer, discarding the fractional part (truncate towards 0). If the truncated floating-point number is outside the range [Int32.min_int, Int32.max_int], no exception is raised, and an unspecified, platform-dependent integer is returned.

val to_float : int32 -> float

Convert the given 32-bit integer to a floating-point number.

val of_string : string -> int32

Convert the given string to a 32-bit integer. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.

The 0u prefix reads the input as an unsigned integer in the range [0, 2*Int32.max_int+1]. If the input exceeds Int32.max_int it is converted to the signed integer Int32.min_int + input - Int32.max_int - 1.

The _ (underscore) character can appear anywhere in the string and is ignored.

  • raises Failure

    if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int32.

val of_string_opt : string -> int32 option

Same as of_string, but return None instead of raising.

  • since 4.05
val to_string : int32 -> string

Return the string representation of its argument, in signed decimal.

val bits_of_float : float -> int32

Return the internal representation of the given float according to the IEEE 754 floating-point 'single format' bit layout. Bit 31 of the result represents the sign of the float; bits 30 to 23 represent the (biased) exponent; bits 22 to 0 represent the mantissa.

val float_of_bits : int32 -> float

Return the floating-point number whose internal representation, according to the IEEE 754 floating-point 'single format' bit layout, is the given int32.

type t = int32

An alias for the type of 32-bit integers.

val compare : t -> t -> int

The comparison function for 32-bit integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Int32 to be passed as argument to the functors Set.Make and Map.Make.

val unsigned_compare : t -> t -> int

Same as compare, except that arguments are interpreted as unsigned 32-bit integers.

  • since 4.08
val equal : t -> t -> bool

The equal function for int32s.

  • since 4.03
val min : t -> t -> t

Return the smaller of the two arguments.

  • since 4.13
val max : t -> t -> t

Return the greater of the two arguments.

  • since 4.13
val seeded_hash : int -> t -> int

A seeded hash function for 32-bit ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : t -> int

An unseeded hash function for 32-bit ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.1
diff --git a/findlib-1/melange/Stdlib/Int64/index.html b/findlib-1/melange/Stdlib/Int64/index.html new file mode 100644 index 000000000..71b5c287f --- /dev/null +++ b/findlib-1/melange/Stdlib/Int64/index.html @@ -0,0 +1,4 @@ + +Int64 (docs.findlib-1.melange.Stdlib.Int64)

Module Stdlib.Int64

64-bit integers.

This module provides operations on the type int64 of signed 64-bit integers. Unlike the built-in int type, the type int64 is guaranteed to be exactly 64-bit wide on all platforms. All arithmetic operations over int64 are taken modulo 264

Performance notice: values of type int64 occupy more memory space than values of type int, and arithmetic operations on int64 are generally slower than those on int. Use int64 only when the application requires exact 64-bit arithmetic.

Literals for 64-bit integers are suffixed by L:

let zero: int64 = 0L
+let one: int64 = 1L
+let m_one: int64 = -1L
val zero : int64

The 64-bit integer 0.

val one : int64

The 64-bit integer 1.

val minus_one : int64

The 64-bit integer -1.

val neg : int64 -> int64

Unary negation.

val add : int64 -> int64 -> int64

Addition.

val sub : int64 -> int64 -> int64

Subtraction.

val mul : int64 -> int64 -> int64

Multiplication.

val div : int64 -> int64 -> int64

Integer division.

  • raises Division_by_zero

    if the second argument is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val unsigned_div : int64 -> int64 -> int64

Same as div, except that arguments and result are interpreted as unsigned 64-bit integers.

  • since 4.08
val rem : int64 -> int64 -> int64

Integer remainder. If y is not zero, the result of Int64.rem x y satisfies the following property: x = Int64.add (Int64.mul (Int64.div x y) y) (Int64.rem x y). If y = 0, Int64.rem x y raises Division_by_zero.

val unsigned_rem : int64 -> int64 -> int64

Same as rem, except that arguments and result are interpreted as unsigned 64-bit integers.

  • since 4.08
val succ : int64 -> int64

Successor. Int64.succ x is Int64.add x Int64.one.

val pred : int64 -> int64

Predecessor. Int64.pred x is Int64.sub x Int64.one.

val abs : int64 -> int64

abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

val max_int : int64

The greatest representable 64-bit integer, 263 - 1.

val min_int : int64

The smallest representable 64-bit integer, -263.

val logand : int64 -> int64 -> int64

Bitwise logical and.

val logor : int64 -> int64 -> int64

Bitwise logical or.

val logxor : int64 -> int64 -> int64

Bitwise logical exclusive or.

val lognot : int64 -> int64

Bitwise logical negation.

val shift_left : int64 -> int -> int64

Int64.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= 64.

val shift_right : int64 -> int -> int64

Int64.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 64.

val shift_right_logical : int64 -> int -> int64

Int64.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 64.

val of_int : int -> int64

Convert the given integer (type int) to a 64-bit integer (type int64).

val to_int : int64 -> int

Convert the given 64-bit integer (type int64) to an integer (type int). On 64-bit platforms, the 64-bit integer is taken modulo 263, i.e. the high-order bit is lost during the conversion. On 32-bit platforms, the 64-bit integer is taken modulo 231, i.e. the top 33 bits are lost during the conversion.

val unsigned_to_int : int64 -> int option

Same as to_int, but interprets the argument as an unsigned integer. Returns None if the unsigned value of the argument cannot fit into an int.

  • since 4.08
val of_float : float -> int64

Convert the given floating-point number to a 64-bit integer, discarding the fractional part (truncate towards 0). If the truncated floating-point number is outside the range [Int64.min_int, Int64.max_int], no exception is raised, and an unspecified, platform-dependent integer is returned.

val to_float : int64 -> float

Convert the given 64-bit integer to a floating-point number.

val of_int32 : int32 -> int64

Convert the given 32-bit integer (type int32) to a 64-bit integer (type int64).

val to_int32 : int64 -> int32

Convert the given 64-bit integer (type int64) to a 32-bit integer (type int32). The 64-bit integer is taken modulo 232, i.e. the top 32 bits are lost during the conversion.

val of_nativeint : nativeint -> int64

Convert the given native integer (type nativeint) to a 64-bit integer (type int64).

val to_nativeint : int64 -> nativeint

Convert the given 64-bit integer (type int64) to a native integer. On 32-bit platforms, the 64-bit integer is taken modulo 232. On 64-bit platforms, the conversion is exact.

val of_string : string -> int64

Convert the given string to a 64-bit integer. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.

The 0u prefix reads the input as an unsigned integer in the range [0, 2*Int64.max_int+1]. If the input exceeds Int64.max_int it is converted to the signed integer Int64.min_int + input - Int64.max_int - 1.

The _ (underscore) character can appear anywhere in the string and is ignored.

  • raises Failure

    if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int64.

val of_string_opt : string -> int64 option

Same as of_string, but return None instead of raising.

  • since 4.05
val to_string : int64 -> string

Return the string representation of its argument, in decimal.

val bits_of_float : float -> int64

Return the internal representation of the given float according to the IEEE 754 floating-point 'double format' bit layout. Bit 63 of the result represents the sign of the float; bits 62 to 52 represent the (biased) exponent; bits 51 to 0 represent the mantissa.

val float_of_bits : int64 -> float

Return the floating-point number whose internal representation, according to the IEEE 754 floating-point 'double format' bit layout, is the given int64.

type t = int64

An alias for the type of 64-bit integers.

val compare : t -> t -> int

The comparison function for 64-bit integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Int64 to be passed as argument to the functors Set.Make and Map.Make.

val unsigned_compare : t -> t -> int

Same as compare, except that arguments are interpreted as unsigned 64-bit integers.

  • since 4.08
val equal : t -> t -> bool

The equal function for int64s.

  • since 4.03
val min : t -> t -> t

Return the smaller of the two arguments.

  • since 4.13
val max : t -> t -> t

Return the greater of the two arguments.

  • since 4.13
val seeded_hash : int -> t -> int

A seeded hash function for 64-bit ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : t -> int

An unseeded hash function for 64-bit ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.1
diff --git a/findlib-1/melange/Stdlib/LargeFile/index.html b/findlib-1/melange/Stdlib/LargeFile/index.html new file mode 100644 index 000000000..d0d2f7ac6 --- /dev/null +++ b/findlib-1/melange/Stdlib/LargeFile/index.html @@ -0,0 +1,2 @@ + +LargeFile (docs.findlib-1.melange.Stdlib.LargeFile)

Module Stdlib.LargeFile

Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

val seek_out : out_channel -> int64 -> unit
val pos_out : out_channel -> int64
val out_channel_length : out_channel -> int64
val seek_in : in_channel -> int64 -> unit
val pos_in : in_channel -> int64
val in_channel_length : in_channel -> int64
diff --git a/findlib-1/melange/Stdlib/Lazy/index.html b/findlib-1/melange/Stdlib/Lazy/index.html new file mode 100644 index 000000000..9b7b0600b --- /dev/null +++ b/findlib-1/melange/Stdlib/Lazy/index.html @@ -0,0 +1,5 @@ + +Lazy (docs.findlib-1.melange.Stdlib.Lazy)

Module Stdlib.Lazy

Deferred computations.

type 'a t = 'a CamlinternalLazy.t

A value of type 'a Lazy.t is a deferred computation, called a suspension, that has a result of type 'a. The special expression syntax lazy (expr) makes a suspension of the computation of expr, without computing expr itself yet. "Forcing" the suspension will then compute expr and return its result. Matching a suspension with the special pattern syntax lazy(pattern) also computes the underlying expression and tries to bind it to pattern:

let lazy_option_map f x =
+match x with
+| lazy (Some x) -> Some (Lazy.force f x)
+| _ -> None

Note: If lazy patterns appear in multiple cases in a pattern-matching, lazy expressions may be forced even outside of the case ultimately selected by the pattern matching. In the example above, the suspension x is always computed.

Note: lazy_t is the built-in type constructor used by the compiler for the lazy keyword. You should not use it directly. Always use Lazy.t instead.

Note: Lazy.force is not concurrency-safe. If you use this module with multiple fibers, systhreads or domains, then you will need to add some locks. The module however ensures memory-safety, and hence, concurrently accessing this module will not lead to a crash but the behaviour is unspecified.

Note: if the program is compiled with the -rectypes option, ill-founded recursive definitions of the form let rec x = lazy x or let rec x = lazy(lazy(...(lazy x))) are accepted by the type-checker and lead, when forced, to ill-formed values that trigger infinite loops in the garbage collector and other parts of the run-time system. Without the -rectypes option, such ill-founded recursive definitions are rejected by the type-checker.

exception Undefined

Raised when forcing a suspension concurrently from multiple fibers, systhreads or domains, or when the suspension tries to force itself recursively.

val force : 'a t -> 'a

force x forces the suspension x and returns its result. If x has already been forced, Lazy.force x returns the same value again without recomputing it. If it raised an exception, the same exception is raised again.

Iterators

val map : ('a -> 'b) -> 'a t -> 'b t

map f x returns a suspension that, when forced, forces x and applies f to its value.

It is equivalent to lazy (f (Lazy.force x)).

  • since 4.13

Reasoning on already-forced suspensions

val is_val : 'a t -> bool

is_val x returns true if x has already been forced and did not raise an exception.

  • since 4.00
val from_val : 'a -> 'a t

from_val v evaluates v first (as any function would) and returns an already-forced suspension of its result. It is the same as let x = v in lazy x, but uses dynamic tests to optimize suspension creation in some cases.

  • since 4.00
val map_val : ('a -> 'b) -> 'a t -> 'b t

map_val f x applies f directly if x is already forced, otherwise it behaves as map f x.

When x is already forced, this behavior saves the construction of a suspension, but on the other hand it performs more work eagerly that may not be useful if you never force the function result.

If f raises an exception, it will be raised immediately when is_val x, or raised only when forcing the thunk otherwise.

If map_val f x does not raise an exception, then is_val (map_val f x) is equal to is_val x.

  • since 4.13

Advanced

The following definitions are for advanced uses only; they require familiary with the lazy compilation scheme to be used appropriately.

val from_fun : (unit -> 'a) -> 'a t

from_fun f is the same as lazy (f ()) but slightly more efficient.

It should only be used if the function f is already defined. In particular it is always less efficient to write from_fun (fun () -> expr) than lazy expr.

  • since 4.00
val force_val : 'a t -> 'a

force_val x forces the suspension x and returns its result. If x has already been forced, force_val x returns the same value again without recomputing it.

If the computation of x raises an exception, it is unspecified whether force_val x raises the same exception or Undefined.

  • raises Undefined

    if the forcing of x tries to force x itself recursively.

diff --git a/findlib-1/melange/Stdlib/Lexing/index.html b/findlib-1/melange/Stdlib/Lexing/index.html new file mode 100644 index 000000000..dfbb3c86d --- /dev/null +++ b/findlib-1/melange/Stdlib/Lexing/index.html @@ -0,0 +1,2 @@ + +Lexing (docs.findlib-1.melange.Stdlib.Lexing)

Module Stdlib.Lexing

The run-time library for lexers generated by ocamllex.

Positions

type position = {
  1. pos_fname : string;
  2. pos_lnum : int;
  3. pos_bol : int;
  4. pos_cnum : int;
}

A value of type position describes a point in a source file. pos_fname is the file name; pos_lnum is the line number; pos_bol is the offset of the beginning of the line (number of characters between the beginning of the lexbuf and the beginning of the line); pos_cnum is the offset of the position (number of characters between the beginning of the lexbuf and the position). The difference between pos_cnum and pos_bol is the character offset within the line (i.e. the column number, assuming each character is one column wide).

See the documentation of type lexbuf for information about how the lexing engine will manage positions.

val dummy_pos : position

A value of type position, guaranteed to be different from any valid position.

Lexer buffers

type lexbuf = {
  1. refill_buff : lexbuf -> unit;
  2. mutable lex_buffer : bytes;
  3. mutable lex_buffer_len : int;
  4. mutable lex_abs_pos : int;
  5. mutable lex_start_pos : int;
  6. mutable lex_curr_pos : int;
  7. mutable lex_last_pos : int;
  8. mutable lex_last_action : int;
  9. mutable lex_eof_reached : bool;
  10. mutable lex_mem : int array;
  11. mutable lex_start_p : position;
  12. mutable lex_curr_p : position;
}

The type of lexer buffers. A lexer buffer is the argument passed to the scanning functions defined by the generated scanners. The lexer buffer holds the current state of the scanner, plus a function to refill the buffer from the input.

Lexers can optionally maintain the lex_curr_p and lex_start_p position fields. This "position tracking" mode is the default, and it corresponds to passing ~with_position:true to functions that create lexer buffers. In this mode, the lexing engine and lexer actions are co-responsible for properly updating the position fields, as described in the next paragraph. When the mode is explicitly disabled (with ~with_position:false), the lexing engine will not touch the position fields and the lexer actions should be careful not to do it either; the lex_curr_p and lex_start_p field will then always hold the dummy_pos invalid position. Not tracking positions avoids allocations and memory writes and can significantly improve the performance of the lexer in contexts where lex_start_p and lex_curr_p are not needed.

Position tracking mode works as follows. At each token, the lexing engine will copy lex_curr_p to lex_start_p, then change the pos_cnum field of lex_curr_p by updating it with the number of characters read since the start of the lexbuf. The other fields are left unchanged by the lexing engine. In order to keep them accurate, they must be initialised before the first use of the lexbuf, and updated by the relevant lexer actions (i.e. at each end of line -- see also new_line).

val from_channel : ?with_positions:bool -> in_channel -> lexbuf

Create a lexer buffer on the given input channel. Lexing.from_channel inchan returns a lexer buffer which reads from the input channel inchan, at the current reading position.

val from_string : ?with_positions:bool -> string -> lexbuf

Create a lexer buffer which reads from the given string. Reading starts from the first character in the string. An end-of-input condition is generated when the end of the string is reached.

val from_function : ?with_positions:bool -> (bytes -> int -> int) -> lexbuf

Create a lexer buffer with the given function as its reading method. When the scanner needs more characters, it will call the given function, giving it a byte sequence s and a byte count n. The function should put n bytes or fewer in s, starting at index 0, and return the number of bytes provided. A return value of 0 means end of input.

val set_position : lexbuf -> position -> unit

Set the initial tracked input position for lexbuf to a custom value. Ignores pos_fname. See set_filename for changing this field.

  • since 4.11
val set_filename : lexbuf -> string -> unit

Set filename in the initial tracked position to file in lexbuf.

  • since 4.11
val with_positions : lexbuf -> bool

Tell whether the lexer buffer keeps track of position fields lex_curr_p / lex_start_p, as determined by the corresponding optional argument for functions that create lexer buffers (whose default value is true).

When with_positions is false, lexer actions should not modify position fields. Doing it nevertheless could re-enable the with_position mode and degrade performances.

Functions for lexer semantic actions

The following functions can be called from the semantic actions of lexer definitions (the ML code enclosed in braces that computes the value returned by lexing functions). They give access to the character string matched by the regular expression associated with the semantic action. These functions must be applied to the argument lexbuf, which, in the code generated by ocamllex, is bound to the lexer buffer passed to the parsing function.

val lexeme : lexbuf -> string

Lexing.lexeme lexbuf returns the string matched by the regular expression.

val lexeme_char : lexbuf -> int -> char

Lexing.lexeme_char lexbuf i returns character number i in the matched string.

val lexeme_start : lexbuf -> int

Lexing.lexeme_start lexbuf returns the offset in the input stream of the first character of the matched string. The first character of the stream has offset 0.

val lexeme_end : lexbuf -> int

Lexing.lexeme_end lexbuf returns the offset in the input stream of the character following the last character of the matched string. The first character of the stream has offset 0.

val lexeme_start_p : lexbuf -> position

Like lexeme_start, but return a complete position instead of an offset. When position tracking is disabled, the function returns dummy_pos.

val lexeme_end_p : lexbuf -> position

Like lexeme_end, but return a complete position instead of an offset. When position tracking is disabled, the function returns dummy_pos.

val new_line : lexbuf -> unit

Update the lex_curr_p field of the lexbuf to reflect the start of a new line. You can call this function in the semantic action of the rule that matches the end-of-line character. The function does nothing when position tracking is disabled.

  • since 3.11

Miscellaneous functions

val flush_input : lexbuf -> unit

Discard the contents of the buffer and reset the current position to 0. The next use of the lexbuf will trigger a refill.

diff --git a/findlib-1/melange/Stdlib/List/index.html b/findlib-1/melange/Stdlib/List/index.html new file mode 100644 index 000000000..d46519f62 --- /dev/null +++ b/findlib-1/melange/Stdlib/List/index.html @@ -0,0 +1,16 @@ + +List (docs.findlib-1.melange.Stdlib.List)

Module Stdlib.List

List operations.

Some functions are flagged as not tail-recursive. A tail-recursive function uses constant stack space, while a non-tail-recursive function uses stack space proportional to the length of its list argument, which can be a problem with very long lists. When the function takes several list arguments, an approximate formula giving stack usage (in some unspecified constant unit) is shown in parentheses.

The above considerations can usually be ignored if your lists are not longer than about 10000 elements.

The labeled version of this module can be used as described in the StdLabels module.

type 'a t = 'a list =
  1. | []
  2. | :: of 'a * 'a list

An alias for the type of lists.

val length : 'a list -> int

Return the length (number of elements) of the given list.

val compare_lengths : 'a list -> 'b list -> int

Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

  • since 4.05
val compare_length_with : 'a list -> int -> int

Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

  • since 4.05
val is_empty : 'a list -> bool

is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

  • since 5.1
val cons : 'a -> 'a list -> 'a list

cons x xs is x :: xs

  • since 4.03 (4.05 in ListLabels)
val hd : 'a list -> 'a

Return the first element of the given list.

  • raises Failure

    if the list is empty.

val tl : 'a list -> 'a list

Return the given list without its first element.

  • raises Failure

    if the list is empty.

val nth : 'a list -> int -> 'a

Return the n-th element of the given list. The first element (head of the list) is at position 0.

  • raises Failure

    if the list is too short.

val nth_opt : 'a list -> int -> 'a option

Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

  • since 4.05
val rev : 'a list -> 'a list

List reversal.

val init : int -> (int -> 'a) -> 'a list

init len f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

  • since 4.06
val append : 'a list -> 'a list -> 'a list

append l0 l1 appends l1 to l0. Same function as the infix operator @.

  • since 5.1 this function is tail-recursive.
val rev_append : 'a list -> 'a list -> 'a list

rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

val concat : 'a list list -> 'a list

Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

val flatten : 'a list list -> 'a list

Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

Comparison

val equal : ('a -> 'a -> bool) -> 'a list -> 'a list -> bool

equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

  • since 4.12
val compare : ('a -> 'a -> int) -> 'a list -> 'a list -> int

compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

  • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
  • the empty list [] is strictly smaller than non-empty lists

Note: the cmp function will be called even if the lists have different lengths.

  • since 4.12

Iterators

val iter : ('a -> unit) -> 'a list -> unit

iter f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

val iteri : (int -> 'a -> unit) -> 'a list -> unit

Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val map : ('a -> 'b) -> 'a list -> 'b list

map f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list

Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val rev_map : ('a -> 'b) -> 'a list -> 'b list

rev_map f l gives the same result as rev (map f l), but is more efficient.

val filter_map : ('a -> 'b option) -> 'a list -> 'b list

filter_map f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

  • since 4.08
val concat_map : ('a -> 'b list) -> 'a list -> 'b list

concat_map f l gives the same result as concat (map f l). Tail-recursive.

  • since 4.10
val fold_left_map : + ('acc -> 'a -> 'acc * 'b) -> + 'acc -> + 'a list -> + 'acc * 'b list

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.11
val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc

fold_left f init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

val fold_right : ('a -> 'acc -> 'acc) -> 'a list -> 'acc -> 'acc

fold_right f [a1; ...; an] init is f a1 (f a2 (... (f an init) ...)). Not tail-recursive.

Iterators on two lists

val iter2 : ('a -> 'b -> unit) -> 'a list -> 'b list -> unit

iter2 f [a1; ...; an] [b1; ...; bn] calls in turn f a1 b1; ...; f an bn.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

map2 f [a1; ...; an] [b1; ...; bn] is [f a1 b1; ...; f an bn].

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val rev_map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

rev_map2 f l1 l2 gives the same result as rev (map2 f l1 l2), but is more efficient.

val fold_left2 : + ('acc -> 'a -> 'b -> 'acc) -> + 'acc -> + 'a list -> + 'b list -> + 'acc

fold_left2 f init [a1; ...; an] [b1; ...; bn] is f (... (f (f init a1 b1) a2 b2) ...) an bn.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val fold_right2 : + ('a -> 'b -> 'acc -> 'acc) -> + 'a list -> + 'b list -> + 'acc -> + 'acc

fold_right2 f [a1; ...; an] [b1; ...; bn] init is f a1 b1 (f a2 b2 (... (f an bn init) ...)).

  • raises Invalid_argument

    if the two lists are determined to have different lengths. Not tail-recursive.

List scanning

val for_all : ('a -> bool) -> 'a list -> bool

for_all f [a1; ...; an] checks if all elements of the list satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an) for a non-empty list and true if the list is empty.

val exists : ('a -> bool) -> 'a list -> bool

exists f [a1; ...; an] checks if at least one element of the list satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an) for a non-empty list and false if the list is empty.

val for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool

Same as for_all, but for a two-argument predicate.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val exists2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool

Same as exists, but for a two-argument predicate.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val mem : 'a -> 'a list -> bool

mem a set is true if and only if a is equal to an element of set.

val memq : 'a -> 'a list -> bool

Same as mem, but uses physical equality instead of structural equality to compare list elements.

List searching

val find : ('a -> bool) -> 'a list -> 'a

find f l returns the first element of the list l that satisfies the predicate f.

  • raises Not_found

    if there is no value that satisfies f in the list l.

val find_opt : ('a -> bool) -> 'a list -> 'a option

find f l returns the first element of the list l that satisfies the predicate f. Returns None if there is no value that satisfies f in the list l.

  • since 4.05
val find_index : ('a -> bool) -> 'a list -> int option

find_index f xs returns Some i, where i is the index of the first element of the list xs that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_map : ('a -> 'b option) -> 'a list -> 'b option

find_map f l applies f to the elements of l in order, and returns the first result of the form Some v, or None if none exist.

  • since 4.10
val find_mapi : (int -> 'a -> 'b option) -> 'a list -> 'b option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1
val filter : ('a -> bool) -> 'a list -> 'a list

filter f l returns all the elements of the list l that satisfy the predicate f. The order of the elements in the input list is preserved.

val find_all : ('a -> bool) -> 'a list -> 'a list

find_all is another name for filter.

val filteri : (int -> 'a -> bool) -> 'a list -> 'a list

Same as filter, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.11
val partition : ('a -> bool) -> 'a list -> 'a list * 'a list

partition f l returns a pair of lists (l1, l2), where l1 is the list of all the elements of l that satisfy the predicate f, and l2 is the list of all the elements of l that do not satisfy f. The order of the elements in the input list is preserved.

val partition_map : ('a -> ('b, 'c) Either.t) -> 'a list -> 'b list * 'c list

partition_map f l returns a pair of lists (l1, l2) such that, for each element x of the input list l:

  • if f x is Left y1, then y1 is in l1, and
  • if f x is Right y2, then y2 is in l2.

The output elements are included in l1 and l2 in the same relative order as the corresponding input elements in l.

In particular, partition_map (fun x -> if f x then Left x else Right x) l is equivalent to partition f l.

  • since 4.12

Association lists

val assoc : 'a -> ('a * 'b) list -> 'b

assoc a l returns the value associated with key a in the list of pairs l. That is, assoc a [ ...; (a,b); ...] = b if (a,b) is the leftmost binding of a in list l.

  • raises Not_found

    if there is no value associated with a in the list l.

val assoc_opt : 'a -> ('a * 'b) list -> 'b option

assoc_opt a l returns the value associated with key a in the list of pairs l. That is, assoc_opt a [ ...; (a,b); ...] = Some b if (a,b) is the leftmost binding of a in list l. Returns None if there is no value associated with a in the list l.

  • since 4.05
val assq : 'a -> ('a * 'b) list -> 'b

Same as assoc, but uses physical equality instead of structural equality to compare keys.

val assq_opt : 'a -> ('a * 'b) list -> 'b option

Same as assoc_opt, but uses physical equality instead of structural equality to compare keys.

  • since 4.05
val mem_assoc : 'a -> ('a * 'b) list -> bool

Same as assoc, but simply return true if a binding exists, and false if no bindings exist for the given key.

val mem_assq : 'a -> ('a * 'b) list -> bool

Same as mem_assoc, but uses physical equality instead of structural equality to compare keys.

val remove_assoc : 'a -> ('a * 'b) list -> ('a * 'b) list

remove_assoc a l returns the list of pairs l without the first pair with key a, if any. Not tail-recursive.

val remove_assq : 'a -> ('a * 'b) list -> ('a * 'b) list

Same as remove_assoc, but uses physical equality instead of structural equality to compare keys. Not tail-recursive.

Lists of pairs

val split : ('a * 'b) list -> 'a list * 'b list

Transform a list of pairs into a pair of lists: split [(a1,b1); ...; (an,bn)] is ([a1; ...; an], [b1; ...; bn]). Not tail-recursive.

val combine : 'a list -> 'b list -> ('a * 'b) list

Transform a pair of lists into a list of pairs: combine [a1; ...; an] [b1; ...; bn] is [(a1,b1); ...; (an,bn)].

  • raises Invalid_argument

    if the two lists have different lengths. Not tail-recursive.

Sorting

val sort : ('a -> 'a -> int) -> 'a list -> 'a list

Sort a list in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see Array.sort for a complete specification). For example, Stdlib.compare is a suitable comparison function. The resulting list is sorted in increasing order. sort is guaranteed to run in constant heap space (in addition to the size of the result list) and logarithmic stack space.

The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

val stable_sort : ('a -> 'a -> int) -> 'a list -> 'a list

Same as sort, but the sorting algorithm is guaranteed to be stable (i.e. elements that compare equal are kept in their original order).

The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

val fast_sort : ('a -> 'a -> int) -> 'a list -> 'a list

Same as sort or stable_sort, whichever is faster on typical input.

val sort_uniq : ('a -> 'a -> int) -> 'a list -> 'a list

Same as sort, but also remove duplicates.

  • since 4.02 (4.03 in ListLabels)
val merge : ('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

Merge two lists: Assuming that l1 and l2 are sorted according to the comparison function cmp, merge cmp l1 l2 will return a sorted list containing all the elements of l1 and l2. If several elements compare equal, the elements of l1 will be before the elements of l2. Not tail-recursive (sum of the lengths of the arguments).

Lists and Sequences

val to_seq : 'a list -> 'a Seq.t

Iterate on the list.

  • since 4.07
val of_seq : 'a Seq.t -> 'a list

Create a list from a sequence.

  • since 4.07
diff --git a/findlib-1/melange/Stdlib/ListLabels/index.html b/findlib-1/melange/Stdlib/ListLabels/index.html new file mode 100644 index 000000000..f2b61ef20 --- /dev/null +++ b/findlib-1/melange/Stdlib/ListLabels/index.html @@ -0,0 +1,16 @@ + +ListLabels (docs.findlib-1.melange.Stdlib.ListLabels)

Module Stdlib.ListLabels

List operations.

Some functions are flagged as not tail-recursive. A tail-recursive function uses constant stack space, while a non-tail-recursive function uses stack space proportional to the length of its list argument, which can be a problem with very long lists. When the function takes several list arguments, an approximate formula giving stack usage (in some unspecified constant unit) is shown in parentheses.

The above considerations can usually be ignored if your lists are not longer than about 10000 elements.

The labeled version of this module can be used as described in the StdLabels module.

type 'a t = 'a list =
  1. | []
  2. | :: of 'a * 'a list

An alias for the type of lists.

val length : 'a list -> int

Return the length (number of elements) of the given list.

val compare_lengths : 'a list -> 'b list -> int

Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

  • since 4.05
val compare_length_with : 'a list -> len:int -> int

Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

  • since 4.05
val is_empty : 'a list -> bool

is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

  • since 5.1
val cons : 'a -> 'a list -> 'a list

cons x xs is x :: xs

  • since 4.05
val hd : 'a list -> 'a

Return the first element of the given list.

  • raises Failure

    if the list is empty.

val tl : 'a list -> 'a list

Return the given list without its first element.

  • raises Failure

    if the list is empty.

val nth : 'a list -> int -> 'a

Return the n-th element of the given list. The first element (head of the list) is at position 0.

  • raises Failure

    if the list is too short.

val nth_opt : 'a list -> int -> 'a option

Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

  • since 4.05
val rev : 'a list -> 'a list

List reversal.

val init : len:int -> f:(int -> 'a) -> 'a list

init ~len ~f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

  • since 4.06
val append : 'a list -> 'a list -> 'a list

append l0 l1 appends l1 to l0. Same function as the infix operator @.

  • since 5.1 this function is tail-recursive.
val rev_append : 'a list -> 'a list -> 'a list

rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

val concat : 'a list list -> 'a list

Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

val flatten : 'a list list -> 'a list

Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

Comparison

val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

  • since 4.12
val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

  • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
  • the empty list [] is strictly smaller than non-empty lists

Note: the cmp function will be called even if the lists have different lengths.

  • since 4.12

Iterators

val iter : f:('a -> unit) -> 'a list -> unit

iter ~f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val map : f:('a -> 'b) -> 'a list -> 'b list

map ~f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

val mapi : f:(int -> 'a -> 'b) -> 'a list -> 'b list

Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val rev_map : f:('a -> 'b) -> 'a list -> 'b list

rev_map ~f l gives the same result as rev (map f l), but is more efficient.

val filter_map : f:('a -> 'b option) -> 'a list -> 'b list

filter_map ~f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

  • since 4.08
val concat_map : f:('a -> 'b list) -> 'a list -> 'b list

concat_map ~f l gives the same result as concat (map f l). Tail-recursive.

  • since 4.10
val fold_left_map : + f:('acc -> 'a -> 'acc * 'b) -> + init:'acc -> + 'a list -> + 'acc * 'b list

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.11
val fold_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a list -> 'acc

fold_left ~f ~init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

val fold_right : f:('a -> 'acc -> 'acc) -> 'a list -> init:'acc -> 'acc

fold_right ~f [a1; ...; an] ~init is f a1 (f a2 (... (f an init) ...)). Not tail-recursive.

Iterators on two lists

val iter2 : f:('a -> 'b -> unit) -> 'a list -> 'b list -> unit

iter2 ~f [a1; ...; an] [b1; ...; bn] calls in turn f a1 b1; ...; f an bn.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val map2 : f:('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

map2 ~f [a1; ...; an] [b1; ...; bn] is [f a1 b1; ...; f an bn].

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val rev_map2 : f:('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

rev_map2 ~f l1 l2 gives the same result as rev (map2 f l1 l2), but is more efficient.

val fold_left2 : + f:('acc -> 'a -> 'b -> 'acc) -> + init:'acc -> + 'a list -> + 'b list -> + 'acc

fold_left2 ~f ~init [a1; ...; an] [b1; ...; bn] is f (... (f (f init a1 b1) a2 b2) ...) an bn.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val fold_right2 : + f:('a -> 'b -> 'acc -> 'acc) -> + 'a list -> + 'b list -> + init:'acc -> + 'acc

fold_right2 ~f [a1; ...; an] [b1; ...; bn] ~init is f a1 b1 (f a2 b2 (... (f an bn init) ...)).

  • raises Invalid_argument

    if the two lists are determined to have different lengths. Not tail-recursive.

List scanning

val for_all : f:('a -> bool) -> 'a list -> bool

for_all ~f [a1; ...; an] checks if all elements of the list satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an) for a non-empty list and true if the list is empty.

val exists : f:('a -> bool) -> 'a list -> bool

exists ~f [a1; ...; an] checks if at least one element of the list satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an) for a non-empty list and false if the list is empty.

val for_all2 : f:('a -> 'b -> bool) -> 'a list -> 'b list -> bool

Same as for_all, but for a two-argument predicate.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val exists2 : f:('a -> 'b -> bool) -> 'a list -> 'b list -> bool

Same as exists, but for a two-argument predicate.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val mem : 'a -> set:'a list -> bool

mem a ~set is true if and only if a is equal to an element of set.

val memq : 'a -> set:'a list -> bool

Same as mem, but uses physical equality instead of structural equality to compare list elements.

List searching

val find : f:('a -> bool) -> 'a list -> 'a

find ~f l returns the first element of the list l that satisfies the predicate f.

  • raises Not_found

    if there is no value that satisfies f in the list l.

val find_opt : f:('a -> bool) -> 'a list -> 'a option

find ~f l returns the first element of the list l that satisfies the predicate f. Returns None if there is no value that satisfies f in the list l.

  • since 4.05
val find_index : f:('a -> bool) -> 'a list -> int option

find_index ~f xs returns Some i, where i is the index of the first element of the list xs that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_map : f:('a -> 'b option) -> 'a list -> 'b option

find_map ~f l applies f to the elements of l in order, and returns the first result of the form Some v, or None if none exist.

  • since 4.10
val find_mapi : f:(int -> 'a -> 'b option) -> 'a list -> 'b option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1
val filter : f:('a -> bool) -> 'a list -> 'a list

filter ~f l returns all the elements of the list l that satisfy the predicate f. The order of the elements in the input list is preserved.

val find_all : f:('a -> bool) -> 'a list -> 'a list

find_all is another name for filter.

val filteri : f:(int -> 'a -> bool) -> 'a list -> 'a list

Same as filter, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.11
val partition : f:('a -> bool) -> 'a list -> 'a list * 'a list

partition ~f l returns a pair of lists (l1, l2), where l1 is the list of all the elements of l that satisfy the predicate f, and l2 is the list of all the elements of l that do not satisfy f. The order of the elements in the input list is preserved.

val partition_map : f:('a -> ('b, 'c) Either.t) -> 'a list -> 'b list * 'c list

partition_map f l returns a pair of lists (l1, l2) such that, for each element x of the input list l:

  • if f x is Left y1, then y1 is in l1, and
  • if f x is Right y2, then y2 is in l2.

The output elements are included in l1 and l2 in the same relative order as the corresponding input elements in l.

In particular, partition_map (fun x -> if f x then Left x else Right x) l is equivalent to partition f l.

  • since 4.12

Association lists

val assoc : 'a -> ('a * 'b) list -> 'b

assoc a l returns the value associated with key a in the list of pairs l. That is, assoc a [ ...; (a,b); ...] = b if (a,b) is the leftmost binding of a in list l.

  • raises Not_found

    if there is no value associated with a in the list l.

val assoc_opt : 'a -> ('a * 'b) list -> 'b option

assoc_opt a l returns the value associated with key a in the list of pairs l. That is, assoc_opt a [ ...; (a,b); ...] = Some b if (a,b) is the leftmost binding of a in list l. Returns None if there is no value associated with a in the list l.

  • since 4.05
val assq : 'a -> ('a * 'b) list -> 'b

Same as assoc, but uses physical equality instead of structural equality to compare keys.

val assq_opt : 'a -> ('a * 'b) list -> 'b option

Same as assoc_opt, but uses physical equality instead of structural equality to compare keys.

  • since 4.05
val mem_assoc : 'a -> map:('a * 'b) list -> bool

Same as assoc, but simply return true if a binding exists, and false if no bindings exist for the given key.

val mem_assq : 'a -> map:('a * 'b) list -> bool

Same as mem_assoc, but uses physical equality instead of structural equality to compare keys.

val remove_assoc : 'a -> ('a * 'b) list -> ('a * 'b) list

remove_assoc a l returns the list of pairs l without the first pair with key a, if any. Not tail-recursive.

val remove_assq : 'a -> ('a * 'b) list -> ('a * 'b) list

Same as remove_assoc, but uses physical equality instead of structural equality to compare keys. Not tail-recursive.

Lists of pairs

val split : ('a * 'b) list -> 'a list * 'b list

Transform a list of pairs into a pair of lists: split [(a1,b1); ...; (an,bn)] is ([a1; ...; an], [b1; ...; bn]). Not tail-recursive.

val combine : 'a list -> 'b list -> ('a * 'b) list

Transform a pair of lists into a list of pairs: combine [a1; ...; an] [b1; ...; bn] is [(a1,b1); ...; (an,bn)].

  • raises Invalid_argument

    if the two lists have different lengths. Not tail-recursive.

Sorting

val sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

Sort a list in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see Array.sort for a complete specification). For example, Stdlib.compare is a suitable comparison function. The resulting list is sorted in increasing order. sort is guaranteed to run in constant heap space (in addition to the size of the result list) and logarithmic stack space.

The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

val stable_sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

Same as sort, but the sorting algorithm is guaranteed to be stable (i.e. elements that compare equal are kept in their original order).

The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

val fast_sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

Same as sort or stable_sort, whichever is faster on typical input.

val sort_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list

Same as sort, but also remove duplicates.

  • since 4.03
val merge : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

Merge two lists: Assuming that l1 and l2 are sorted according to the comparison function cmp, merge ~cmp l1 l2 will return a sorted list containing all the elements of l1 and l2. If several elements compare equal, the elements of l1 will be before the elements of l2. Not tail-recursive (sum of the lengths of the arguments).

Lists and Sequences

val to_seq : 'a list -> 'a Seq.t

Iterate on the list.

  • since 4.07
val of_seq : 'a Seq.t -> 'a list

Create a list from a sequence.

  • since 4.07
diff --git a/findlib-1/melange/Stdlib/Map/Make/argument-1-Ord/index.html b/findlib-1/melange/Stdlib/Map/Make/argument-1-Ord/index.html new file mode 100644 index 000000000..14bc793f0 --- /dev/null +++ b/findlib-1/melange/Stdlib/Map/Make/argument-1-Ord/index.html @@ -0,0 +1,2 @@ + +Ord (docs.findlib-1.melange.Stdlib.Map.Make.Ord)

Parameter Make.Ord

type t

The type of the map keys.

val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/findlib-1/melange/Stdlib/Map/Make/index.html b/findlib-1/melange/Stdlib/Map/Make/index.html new file mode 100644 index 000000000..3e56f382b --- /dev/null +++ b/findlib-1/melange/Stdlib/Map/Make/index.html @@ -0,0 +1,8 @@ + +Make (docs.findlib-1.melange.Stdlib.Map.Make)

Module Map.Make

Functor building an implementation of the map structure given a totally ordered type.

Parameters

module Ord : OrderedType

Signature

Maps

type key = Ord.t

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/findlib-1/melange/Stdlib/Map/index.html b/findlib-1/melange/Stdlib/Map/index.html new file mode 100644 index 000000000..0a4a7cc6e --- /dev/null +++ b/findlib-1/melange/Stdlib/Map/index.html @@ -0,0 +1,13 @@ + +Map (docs.findlib-1.melange.Stdlib.Map)

Module Stdlib.Map

Association tables over ordered types.

This module implements applicative association tables, also known as finite maps or dictionaries, given a total ordering function over the keys. All operations over maps are purely applicative (no side-effects). The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

For instance:

module IntPairs =
+  struct
+    type t = int * int
+    let compare (x0,y0) (x1,y1) =
+      match Stdlib.compare x0 x1 with
+          0 -> Stdlib.compare y0 y1
+        | c -> c
+  end
+
+module PairsMap = Map.Make(IntPairs)
+
+let m = PairsMap.(empty |> add (0,1) "hello" |> add (1,0) "world")

This creates a new module PairsMap, with a new type 'a PairsMap.t of maps from int * int to 'a. In this example, m contains string values so its type is string PairsMap.t.

module type OrderedType = sig ... end

Input signature of the functor Make.

module type S = sig ... end

Output signature of the functor Make.

module Make (Ord : OrderedType) : S with type key = Ord.t

Functor building an implementation of the map structure given a totally ordered type.

diff --git a/findlib-1/melange/Stdlib/Map/module-type-OrderedType/index.html b/findlib-1/melange/Stdlib/Map/module-type-OrderedType/index.html new file mode 100644 index 000000000..94a907f4e --- /dev/null +++ b/findlib-1/melange/Stdlib/Map/module-type-OrderedType/index.html @@ -0,0 +1,2 @@ + +OrderedType (docs.findlib-1.melange.Stdlib.Map.OrderedType)

Module type Map.OrderedType

Input signature of the functor Make.

type t

The type of the map keys.

val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/findlib-1/melange/Stdlib/Map/module-type-S/index.html b/findlib-1/melange/Stdlib/Map/module-type-S/index.html new file mode 100644 index 000000000..7bc4abc31 --- /dev/null +++ b/findlib-1/melange/Stdlib/Map/module-type-S/index.html @@ -0,0 +1,8 @@ + +S (docs.findlib-1.melange.Stdlib.Map.S)

Module type Map.S

Output signature of the functor Make.

Maps

type key

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/findlib-1/melange/Stdlib/Marshal/index.html b/findlib-1/melange/Stdlib/Marshal/index.html new file mode 100644 index 000000000..22cdda5a5 --- /dev/null +++ b/findlib-1/melange/Stdlib/Marshal/index.html @@ -0,0 +1,2 @@ + +Marshal (docs.findlib-1.melange.Stdlib.Marshal)

Module Stdlib.Marshal

Marshaling of data structures.

This module provides functions to encode arbitrary data structures as sequences of bytes, which can then be written on a file or sent over a pipe or network connection. The bytes can then be read back later, possibly in another process, and decoded back into a data structure. The format for the byte sequences is compatible across all machines for a given version of OCaml.

Warning: marshaling is currently not type-safe. The type of marshaled data is not transmitted along the value of the data, making it impossible to check that the data read back possesses the type expected by the context. In particular, the result type of the Marshal.from_* functions is given as 'a, but this is misleading: the returned OCaml value does not possess type 'a for all 'a; it has one, unique type which cannot be determined at compile-time. The programmer should explicitly give the expected type of the returned value, using the following syntax:

Values of extensible variant types, for example exceptions (of extensible type exn), returned by the unmarshaller should not be pattern-matched over through match ... with or try ... with, because unmarshalling does not preserve the information required for matching their constructors. Structural equalities with other extensible variant values does not work either. Most other uses such as Printexc.to_string, will still work as expected.

The representation of marshaled values is not human-readable, and uses bytes that are not printable characters. Therefore, input and output channels used in conjunction with Marshal.to_channel and Marshal.from_channel must be opened in binary mode, using e.g. open_out_bin or open_in_bin; channels opened in text mode will cause unmarshaling errors on platforms where text channels behave differently than binary channels, e.g. Windows.

type extern_flags =
  1. | No_sharing
    (*

    Don't preserve sharing

    *)
  2. | Closures
    (*

    Send function closures

    *)
  3. | Compat_32
    (*

    Ensure 32-bit compatibility

    *)

The flags to the Marshal.to_* functions below.

val to_channel : out_channel -> 'a -> extern_flags list -> unit

Marshal.to_channel chan v flags writes the representation of v on channel chan. The flags argument is a possibly empty list of flags that governs the marshaling behavior with respect to sharing, functional values, and compatibility between 32- and 64-bit platforms.

If flags does not contain Marshal.No_sharing, circularities and sharing inside the value v are detected and preserved in the sequence of bytes produced. In particular, this guarantees that marshaling always terminates. Sharing between values marshaled by successive calls to Marshal.to_channel is neither detected nor preserved, though. If flags contains Marshal.No_sharing, sharing is ignored. This results in faster marshaling if v contains no shared substructures, but may cause slower marshaling and larger byte representations if v actually contains sharing, or even non-termination if v contains cycles.

If flags does not contain Marshal.Closures, marshaling fails when it encounters a functional value inside v: only 'pure' data structures, containing neither functions nor objects, can safely be transmitted between different programs. If flags contains Marshal.Closures, functional values will be marshaled as a the position in the code of the program together with the values corresponding to the free variables captured in the closure. In this case, the output of marshaling can only be read back in processes that run exactly the same program, with exactly the same compiled code. (This is checked at un-marshaling time, using an MD5 digest of the code transmitted along with the code position.)

The exact definition of which free variables are captured in a closure is not specified and can vary between bytecode and native code (and according to optimization flags). In particular, a function value accessing a global reference may or may not include the reference in its closure. If it does, unmarshaling the corresponding closure will create a new reference, different from the global one.

If flags contains Marshal.Compat_32, marshaling fails when it encounters an integer value outside the range [-2{^30}, 2{^30}-1] of integers that are representable on a 32-bit platform. This ensures that marshaled data generated on a 64-bit platform can be safely read back on a 32-bit platform. If flags does not contain Marshal.Compat_32, integer values outside the range [-2{^30}, 2{^30}-1] are marshaled, and can be read back on a 64-bit platform, but will cause an error at un-marshaling time when read back on a 32-bit platform. The Mashal.Compat_32 flag only matters when marshaling is performed on a 64-bit platform; it has no effect if marshaling is performed on a 32-bit platform.

  • raises Failure

    if chan is not in binary mode.

val to_bytes : 'a -> extern_flags list -> bytes

Marshal.to_bytes v flags returns a byte sequence containing the representation of v. The flags argument has the same meaning as for Marshal.to_channel.

  • since 4.02
val to_string : 'a -> extern_flags list -> string

Same as to_bytes but return the result as a string instead of a byte sequence.

val to_buffer : bytes -> int -> int -> 'a -> extern_flags list -> int

Marshal.to_buffer buff ofs len v flags marshals the value v, storing its byte representation in the sequence buff, starting at index ofs, and writing at most len bytes. It returns the number of bytes actually written to the sequence. If the byte representation of v does not fit in len characters, the exception Failure is raised.

val from_channel : in_channel -> 'a

Marshal.from_channel chan reads from channel chan the byte representation of a structured value, as produced by one of the Marshal.to_* functions, and reconstructs and returns the corresponding value.

  • raises End_of_file

    if chan is already at the end of the file.

  • raises Failure

    if the end of the file is reached during unmarshalling itself or if chan is not in binary mode.

val from_bytes : bytes -> int -> 'a

Marshal.from_bytes buff ofs unmarshals a structured value like Marshal.from_channel does, except that the byte representation is not read from a channel, but taken from the byte sequence buff, starting at position ofs. The byte sequence is not mutated.

  • since 4.02
val from_string : string -> int -> 'a

Same as from_bytes but take a string as argument instead of a byte sequence.

val header_size : int

The bytes representing a marshaled value are composed of a fixed-size header and a variable-sized data part, whose size can be determined from the header. Marshal.header_size is the size, in bytes, of the header. Marshal.data_size buff ofs is the size, in bytes, of the data part, assuming a valid header is stored in buff starting at position ofs. Finally, Marshal.total_size buff ofs is the total size, in bytes, of the marshaled value. Both Marshal.data_size and Marshal.total_size raise Failure if buff, ofs does not contain a valid header.

To read the byte representation of a marshaled value into a byte sequence, the program needs to read first Marshal.header_size bytes into the sequence, then determine the length of the remainder of the representation using Marshal.data_size, make sure the sequence is large enough to hold the remaining data, then read it, and finally call Marshal.from_bytes to unmarshal the value.

val data_size : bytes -> int -> int
val total_size : bytes -> int -> int
diff --git a/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/Make/argument-1-H/index.html b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/Make/argument-1-H/index.html new file mode 100644 index 000000000..bc586d82a --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/Make/argument-1-H/index.html @@ -0,0 +1,2 @@ + +H (docs.findlib-1.melange.Stdlib.MoreLabels.Hashtbl.Make.H)

Parameter Make.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/Make/index.html b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/Make/index.html new file mode 100644 index 000000000..236a623eb --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.findlib-1.melange.Stdlib.MoreLabels.Hashtbl.Make)

Module Hashtbl.Make

Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

Parameters

module H : HashedType

Signature

type key = H.t
type 'a t = 'a Hashtbl.Make(H).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key:key -> data:'a -> unit
val mem : 'a t -> key -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html new file mode 100644 index 000000000..c61b0339c --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html @@ -0,0 +1,2 @@ + +H (docs.findlib-1.melange.Stdlib.MoreLabels.Hashtbl.MakeSeeded.H)

Parameter MakeSeeded.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

diff --git a/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/MakeSeeded/index.html b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/MakeSeeded/index.html new file mode 100644 index 000000000..b7d523c1d --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/MakeSeeded/index.html @@ -0,0 +1,2 @@ + +MakeSeeded (docs.findlib-1.melange.Stdlib.MoreLabels.Hashtbl.MakeSeeded)

Module Hashtbl.MakeSeeded

Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

Parameters

Signature

type key = H.t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key:key -> data:'a -> unit
val mem : 'a t -> key -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/index.html b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/index.html new file mode 100644 index 000000000..73d7553fb --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/index.html @@ -0,0 +1,91 @@ + +Hashtbl (docs.findlib-1.melange.Stdlib.MoreLabels.Hashtbl)

Module MoreLabels.Hashtbl

Hash tables and hash functions.

Hash tables are hashed association tables, with in-place modification. Because most operations on a hash table modify their input, they're more commonly used in imperative code. The lookup of the value associated with a key (see find, find_opt) is normally very fast, often faster than the equivalent lookup in Map.

The functors Make and MakeSeeded can be used when performance or flexibility are key. The user provides custom equality and hash functions for the key type, and obtains a custom hash table type for this particular type of key.

Warning a hash table is only as good as the hash function. A bad hash function will turn the table into a degenerate association list, with linear time lookup instead of constant time lookup.

The polymorphic t hash table is useful in simpler cases or in interactive environments. It uses the polymorphic hash function defined in the OCaml runtime (at the time of writing, it's SipHash), as well as the polymorphic equality (=).

See the examples section.

Unsynchronized accesses

Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

Generic interface

type (!'a, !'b) t = ('a, 'b) Hashtbl.t

The type of hash tables from type 'a to type 'b.

val create : ?random:bool -> int -> ('a, 'b) t

Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

  • before 4.00

    the ~random parameter was not present and all hash tables were created in non-randomized mode.

val clear : ('a, 'b) t -> unit

Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

val reset : ('a, 'b) t -> unit

Empty a hash table and shrink the size of the bucket table to its initial size.

  • since 4.00
val copy : ('a, 'b) t -> ('a, 'b) t

Return a copy of the given hashtable.

val add : ('a, 'b) t -> key:'a -> data:'b -> unit

Hashtbl.add tbl ~key ~data adds a binding of key to data in table tbl.

Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

If you desire the classic behavior of replacing elements, see replace.

val find : ('a, 'b) t -> 'a -> 'b

Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

val find_opt : ('a, 'b) t -> 'a -> 'b option

Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

  • since 4.05
val find_all : ('a, 'b) t -> 'a -> 'b list

Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

val mem : ('a, 'b) t -> 'a -> bool

Hashtbl.mem tbl x checks if x is bound in tbl.

val remove : ('a, 'b) t -> 'a -> unit

Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

val replace : ('a, 'b) t -> key:'a -> data:'b -> unit

Hashtbl.replace tbl ~key ~data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

val iter : f:(key:'a -> data:'b -> unit) -> ('a, 'b) t -> unit

Hashtbl.iter ~f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

The behavior is not specified if the hash table is modified by f during the iteration.

val filter_map_inplace : + f:(key:'a -> data:'b -> 'b option) -> + ('a, 'b) t -> + unit

Hashtbl.filter_map_inplace ~f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

Other comments for iter apply as well.

  • since 4.03
val fold : + f:(key:'a -> data:'b -> 'acc -> 'acc) -> + ('a, 'b) t -> + init:'acc -> + 'acc

Hashtbl.fold ~f tbl ~init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

The behavior is not specified if the hash table is modified by f during the iteration.

val length : ('a, 'b) t -> int

Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

val randomize : unit -> unit

After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

  • since 4.00
val is_randomized : unit -> bool

Return true if the tables are currently created in randomized mode by default, false otherwise.

  • since 4.03
val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

  • since 4.12
type statistics = Hashtbl.statistics = {
  1. num_bindings : int;
    (*

    Number of bindings present in the table. Same value as returned by length.

    *)
  2. num_buckets : int;
    (*

    Number of buckets in the table.

    *)
  3. max_bucket_length : int;
    (*

    Maximal number of bindings per bucket.

    *)
  4. bucket_histogram : int array;
    (*

    Histogram of bucket sizes. This array histo has length max_bucket_length + 1. The value of histo.(i) is the number of buckets whose size is i.

    *)
}
  • since 4.00
val stats : ('a, 'b) t -> statistics

Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

  • since 4.00

Hash tables and Sequences

val to_seq : ('a, 'b) t -> ('a * 'b) Seq.t

Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

The behavior is not specified if the hash table is modified during the iteration.

  • since 4.07
val to_seq_keys : ('a, _) t -> 'a Seq.t

Same as Seq.map fst (to_seq m)

  • since 4.07
val to_seq_values : (_, 'b) t -> 'b Seq.t

Same as Seq.map snd (to_seq m)

  • since 4.07
val add_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

Add the given bindings to the table, using add

  • since 4.07
val replace_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

Add the given bindings to the table, using replace

  • since 4.07
val of_seq : ('a * 'b) Seq.t -> ('a, 'b) t

Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

  • since 4.07

Functorial interface

The functorial interface allows the use of specific comparison and hash functions, either for performance/security concerns, or because keys are not hashable/comparable with the polymorphic builtins.

For instance, one might want to specialize a table for integer keys:

module IntHash =
+  struct
+    type t = int
+    let equal i j = i=j
+    let hash i = i land max_int
+  end
+
+module IntHashtbl = Hashtbl.Make(IntHash)
+
+let h = IntHashtbl.create 17 in
+IntHashtbl.add h 12 "hello"

This creates a new module IntHashtbl, with a new type 'a + IntHashtbl.t of tables from int to 'a. In this example, h contains string values so its type is string IntHashtbl.t.

Note that the new type 'a IntHashtbl.t is not compatible with the type ('a,'b) Hashtbl.t of the generic interface. For example, Hashtbl.length h would not type-check, you must use IntHashtbl.length.

module type HashedType = sig ... end

The input signature of the functor Make.

module type S = sig ... end

The output signature of the functor Make.

module Make + (H : HashedType) : + S with type key = H.t and type 'a t = 'a Hashtbl.Make(H).t

Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

module type SeededHashedType = sig ... end

The input signature of the functor MakeSeeded.

module type SeededS = sig ... end

The output signature of the functor MakeSeeded.

module MakeSeeded + (H : SeededHashedType) : + SeededS with type key = H.t and type 'a t = 'a Hashtbl.MakeSeeded(H).t

Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

The polymorphic hash functions

val hash : 'a -> int

Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

val seeded_hash : int -> 'a -> int

A variant of hash that is further parameterized by an integer seed.

  • since 4.00
val hash_param : int -> int -> 'a -> int

Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

val seeded_hash_param : int -> int -> int -> 'a -> int

A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

  • since 4.00

Examples

Basic Example

(* 0...99 *)
+let seq = Seq.ints 0 |> Seq.take 100
+
+(* build from Seq.t *)
+# let tbl =
+    seq
+    |> Seq.map (fun x -> x, string_of_int x)
+    |> Hashtbl.of_seq
+val tbl : (int, string) Hashtbl.t = <abstr>
+
+# Hashtbl.length tbl
+- : int = 100
+
+# Hashtbl.find_opt tbl 32
+- : string option = Some "32"
+
+# Hashtbl.find_opt tbl 166
+- : string option = None
+
+# Hashtbl.replace tbl 166 "one six six"
+- : unit = ()
+
+# Hashtbl.find_opt tbl 166
+- : string option = Some "one six six"
+
+# Hashtbl.length tbl
+- : int = 101

Counting Elements

Given a sequence of elements (here, a Seq.t), we want to count how many times each distinct element occurs in the sequence. A simple way to do this, assuming the elements are comparable and hashable, is to use a hash table that maps elements to their number of occurrences.

Here we illustrate that principle using a sequence of (ascii) characters (type char). We use a custom Char_tbl specialized for char.

# module Char_tbl = Hashtbl.Make(struct
+    type t = char
+    let equal = Char.equal
+    let hash = Hashtbl.hash
+  end)
+
+(*  count distinct occurrences of chars in [seq] *)
+# let count_chars (seq : char Seq.t) : _ list =
+    let counts = Char_tbl.create 16 in
+    Seq.iter
+      (fun c ->
+        let count_c =
+          Char_tbl.find_opt counts c
+          |> Option.value ~default:0
+        in
+        Char_tbl.replace counts c (count_c + 1))
+      seq;
+    (* turn into a list *)
+    Char_tbl.fold (fun c n l -> (c,n) :: l) counts []
+      |> List.sort (fun (c1,_)(c2,_) -> Char.compare c1 c2)
+val count_chars : Char_tbl.key Seq.t -> (Char.t * int) list = <fun>
+
+(* basic seq from a string *)
+# let seq = String.to_seq "hello world, and all the camels in it!"
+val seq : char Seq.t = <fun>
+
+# count_chars seq
+- : (Char.t * int) list =
+[(' ', 7); ('!', 1); (',', 1); ('a', 3); ('c', 1); ('d', 2); ('e', 3);
+ ('h', 2); ('i', 2); ('l', 6); ('m', 1); ('n', 2); ('o', 2); ('r', 1);
+ ('s', 1); ('t', 2); ('w', 1)]
+
+(* "abcabcabc..." *)
+# let seq2 =
+    Seq.cycle (String.to_seq "abc") |> Seq.take 31
+val seq2 : char Seq.t = <fun>
+
+# String.of_seq seq2
+- : String.t = "abcabcabcabcabcabcabcabcabcabca"
+
+# count_chars seq2
+- : (Char.t * int) list = [('a', 11); ('b', 10); ('c', 10)]
diff --git a/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/module-type-HashedType/index.html b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/module-type-HashedType/index.html new file mode 100644 index 000000000..b45484f6a --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/module-type-HashedType/index.html @@ -0,0 +1,2 @@ + +HashedType (docs.findlib-1.melange.Stdlib.MoreLabels.Hashtbl.HashedType)

Module type Hashtbl.HashedType

The input signature of the functor Make.

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/module-type-S/index.html b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/module-type-S/index.html new file mode 100644 index 000000000..dabc792ac --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (docs.findlib-1.melange.Stdlib.MoreLabels.Hashtbl.S)

Module type Hashtbl.S

The output signature of the functor Make.

type key
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key:key -> data:'a -> unit
val mem : 'a t -> key -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html new file mode 100644 index 000000000..e5eb0686e --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html @@ -0,0 +1,2 @@ + +SeededHashedType (docs.findlib-1.melange.Stdlib.MoreLabels.Hashtbl.SeededHashedType)

Module type Hashtbl.SeededHashedType

The input signature of the functor MakeSeeded.

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

diff --git a/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/module-type-SeededS/index.html b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/module-type-SeededS/index.html new file mode 100644 index 000000000..b5fb7e9aa --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Hashtbl/module-type-SeededS/index.html @@ -0,0 +1,2 @@ + +SeededS (docs.findlib-1.melange.Stdlib.MoreLabels.Hashtbl.SeededS)

Module type Hashtbl.SeededS

The output signature of the functor MakeSeeded.

type key
type !'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key:key -> data:'a -> unit
val mem : 'a t -> key -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/findlib-1/melange/Stdlib/MoreLabels/Map/Make/argument-1-Ord/index.html b/findlib-1/melange/Stdlib/MoreLabels/Map/Make/argument-1-Ord/index.html new file mode 100644 index 000000000..f51192ec7 --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Map/Make/argument-1-Ord/index.html @@ -0,0 +1,2 @@ + +Ord (docs.findlib-1.melange.Stdlib.MoreLabels.Map.Make.Ord)

Parameter Make.Ord

type t

The type of the map keys.

val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/findlib-1/melange/Stdlib/MoreLabels/Map/Make/index.html b/findlib-1/melange/Stdlib/MoreLabels/Map/Make/index.html new file mode 100644 index 000000000..8e337c90d --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Map/Make/index.html @@ -0,0 +1,8 @@ + +Make (docs.findlib-1.melange.Stdlib.MoreLabels.Map.Make)

Module Map.Make

Functor building an implementation of the map structure given a totally ordered type.

Parameters

module Ord : OrderedType

Signature

Maps

type key = Ord.t

The type of the map keys.

type 'a t = 'a Map.Make(Ord).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key:key -> data:'a -> 'a t -> 'a t

add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + f:(key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge ~f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : f:(key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union ~f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : f:(key -> bool) -> 'a t -> key * 'a

find_first ~f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : f:(key -> bool) -> 'a t -> (key * 'a) option

find_first_opt ~f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : f:(key -> bool) -> 'a t -> key * 'a

find_last ~f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : f:(key -> bool) -> 'a t -> (key * 'a) option

find_last_opt ~f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit

iter ~f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc

fold ~f m ~init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : f:('a -> 'b) -> 'a t -> 'b t

map ~f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : f:(key -> 'a -> bool) -> 'a t -> 'a t

filter ~f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : f:(key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map ~f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : f:(key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition ~f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal ~cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : cmp:('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : f:(key -> 'a -> bool) -> 'a t -> bool

for_all ~f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : f:(key -> 'a -> bool) -> 'a t -> bool

exists ~f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/findlib-1/melange/Stdlib/MoreLabels/Map/index.html b/findlib-1/melange/Stdlib/MoreLabels/Map/index.html new file mode 100644 index 000000000..056336ae0 --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Map/index.html @@ -0,0 +1,15 @@ + +Map (docs.findlib-1.melange.Stdlib.MoreLabels.Map)

Module MoreLabels.Map

Association tables over ordered types.

This module implements applicative association tables, also known as finite maps or dictionaries, given a total ordering function over the keys. All operations over maps are purely applicative (no side-effects). The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

For instance:

module IntPairs =
+  struct
+    type t = int * int
+    let compare (x0,y0) (x1,y1) =
+      match Stdlib.compare x0 x1 with
+          0 -> Stdlib.compare y0 y1
+        | c -> c
+  end
+
+module PairsMap = Map.Make(IntPairs)
+
+let m = PairsMap.(empty |> add (0,1) "hello" |> add (1,0) "world")

This creates a new module PairsMap, with a new type 'a PairsMap.t of maps from int * int to 'a. In this example, m contains string values so its type is string PairsMap.t.

module type OrderedType = sig ... end

Input signature of the functor Make.

module type S = sig ... end

Output signature of the functor Make.

module Make + (Ord : OrderedType) : + S with type key = Ord.t and type 'a t = 'a Map.Make(Ord).t

Functor building an implementation of the map structure given a totally ordered type.

diff --git a/findlib-1/melange/Stdlib/MoreLabels/Map/module-type-OrderedType/index.html b/findlib-1/melange/Stdlib/MoreLabels/Map/module-type-OrderedType/index.html new file mode 100644 index 000000000..c909d1ef7 --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Map/module-type-OrderedType/index.html @@ -0,0 +1,2 @@ + +OrderedType (docs.findlib-1.melange.Stdlib.MoreLabels.Map.OrderedType)

Module type Map.OrderedType

Input signature of the functor Make.

type t

The type of the map keys.

val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/findlib-1/melange/Stdlib/MoreLabels/Map/module-type-S/index.html b/findlib-1/melange/Stdlib/MoreLabels/Map/module-type-S/index.html new file mode 100644 index 000000000..4f0293248 --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Map/module-type-S/index.html @@ -0,0 +1,8 @@ + +S (docs.findlib-1.melange.Stdlib.MoreLabels.Map.S)

Module type Map.S

Output signature of the functor Make.

Maps

type key

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key:key -> data:'a -> 'a t -> 'a t

add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + f:(key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge ~f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : f:(key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union ~f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : f:(key -> bool) -> 'a t -> key * 'a

find_first ~f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : f:(key -> bool) -> 'a t -> (key * 'a) option

find_first_opt ~f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : f:(key -> bool) -> 'a t -> key * 'a

find_last ~f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : f:(key -> bool) -> 'a t -> (key * 'a) option

find_last_opt ~f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit

iter ~f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc

fold ~f m ~init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : f:('a -> 'b) -> 'a t -> 'b t

map ~f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : f:(key -> 'a -> bool) -> 'a t -> 'a t

filter ~f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : f:(key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map ~f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : f:(key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition ~f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal ~cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : cmp:('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : f:(key -> 'a -> bool) -> 'a t -> bool

for_all ~f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : f:(key -> 'a -> bool) -> 'a t -> bool

exists ~f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/findlib-1/melange/Stdlib/MoreLabels/Set/Make/argument-1-Ord/index.html b/findlib-1/melange/Stdlib/MoreLabels/Set/Make/argument-1-Ord/index.html new file mode 100644 index 000000000..928b5509d --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Set/Make/argument-1-Ord/index.html @@ -0,0 +1,2 @@ + +Ord (docs.findlib-1.melange.Stdlib.MoreLabels.Set.Make.Ord)

Parameter Make.Ord

type t

The type of the set elements.

val compare : t -> t -> int

A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/findlib-1/melange/Stdlib/MoreLabels/Set/Make/index.html b/findlib-1/melange/Stdlib/MoreLabels/Set/Make/index.html new file mode 100644 index 000000000..05e1a0856 --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Set/Make/index.html @@ -0,0 +1,3 @@ + +Make (docs.findlib-1.melange.Stdlib.MoreLabels.Set.Make)

Module Set.Make

Functor building an implementation of the set structure given a totally ordered type.

Parameters

module Ord : OrderedType

Signature

Sets

type elt = Ord.t

The type of the set elements.

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : f:(elt -> bool) -> t -> elt

find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : f:(elt -> bool) -> t -> elt option

find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : f:(elt -> bool) -> t -> elt

find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : f:(elt -> bool) -> t -> elt option

find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : f:(elt -> unit) -> t -> unit

iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : f:(elt -> elt) -> t -> t

map ~f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : f:(elt -> bool) -> t -> t

filter ~f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : f:(elt -> elt option) -> t -> t

filter_map ~f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : f:(elt -> bool) -> t -> t * t

partition ~f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : f:(elt -> bool) -> t -> bool

for_all ~f s checks if all elements of the set satisfy the predicate f.

val exists : f:(elt -> bool) -> t -> bool

exists ~f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/findlib-1/melange/Stdlib/MoreLabels/Set/index.html b/findlib-1/melange/Stdlib/MoreLabels/Set/index.html new file mode 100644 index 000000000..c31f30e8e --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Set/index.html @@ -0,0 +1,15 @@ + +Set (docs.findlib-1.melange.Stdlib.MoreLabels.Set)

Module MoreLabels.Set

Sets over ordered types.

This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance.

The Make functor constructs implementations for any type, given a compare function. For instance:

module IntPairs =
+  struct
+    type t = int * int
+    let compare (x0,y0) (x1,y1) =
+      match Stdlib.compare x0 x1 with
+          0 -> Stdlib.compare y0 y1
+        | c -> c
+  end
+
+module PairsSet = Set.Make(IntPairs)
+
+let m = PairsSet.(empty |> add (2,3) |> add (5,7) |> add (11,13))

This creates a new module PairsSet, with a new type PairsSet.t of sets of int * int.

module type OrderedType = sig ... end

Input signature of the functor Make.

module type S = sig ... end

Output signature of the functor Make.

module Make + (Ord : OrderedType) : + S with type elt = Ord.t and type t = Set.Make(Ord).t

Functor building an implementation of the set structure given a totally ordered type.

diff --git a/findlib-1/melange/Stdlib/MoreLabels/Set/module-type-OrderedType/index.html b/findlib-1/melange/Stdlib/MoreLabels/Set/module-type-OrderedType/index.html new file mode 100644 index 000000000..5f0d763c1 --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Set/module-type-OrderedType/index.html @@ -0,0 +1,2 @@ + +OrderedType (docs.findlib-1.melange.Stdlib.MoreLabels.Set.OrderedType)

Module type Set.OrderedType

Input signature of the functor Make.

type t

The type of the set elements.

val compare : t -> t -> int

A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/findlib-1/melange/Stdlib/MoreLabels/Set/module-type-S/index.html b/findlib-1/melange/Stdlib/MoreLabels/Set/module-type-S/index.html new file mode 100644 index 000000000..d96a0ee86 --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/Set/module-type-S/index.html @@ -0,0 +1,3 @@ + +S (docs.findlib-1.melange.Stdlib.MoreLabels.Set.S)

Module type Set.S

Output signature of the functor Make.

Sets

type elt

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : f:(elt -> bool) -> t -> elt

find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : f:(elt -> bool) -> t -> elt option

find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : f:(elt -> bool) -> t -> elt

find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : f:(elt -> bool) -> t -> elt option

find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : f:(elt -> unit) -> t -> unit

iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : f:(elt -> elt) -> t -> t

map ~f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : f:(elt -> bool) -> t -> t

filter ~f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : f:(elt -> elt option) -> t -> t

filter_map ~f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : f:(elt -> bool) -> t -> t * t

partition ~f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : f:(elt -> bool) -> t -> bool

for_all ~f s checks if all elements of the set satisfy the predicate f.

val exists : f:(elt -> bool) -> t -> bool

exists ~f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/findlib-1/melange/Stdlib/MoreLabels/index.html b/findlib-1/melange/Stdlib/MoreLabels/index.html new file mode 100644 index 000000000..bdf4a1e2a --- /dev/null +++ b/findlib-1/melange/Stdlib/MoreLabels/index.html @@ -0,0 +1,4 @@ + +MoreLabels (docs.findlib-1.melange.Stdlib.MoreLabels)

Module Stdlib.MoreLabels

Extra labeled libraries.

This meta-module provides labelized versions of the Hashtbl, Map and Set modules.

This module is intended to be used through open MoreLabels which replaces Hashtbl, Map, and Set with their labeled counterparts.

For example:

open MoreLabels
+
+Hashtbl.iter ~f:(fun ~key ~data -> g key data) table
module Hashtbl : sig ... end

Hash tables and hash functions.

module Map : sig ... end

Association tables over ordered types.

module Set : sig ... end

Sets over ordered types.

diff --git a/findlib-1/melange/Stdlib/Mutex/index.html b/findlib-1/melange/Stdlib/Mutex/index.html new file mode 100644 index 000000000..ba7a96809 --- /dev/null +++ b/findlib-1/melange/Stdlib/Mutex/index.html @@ -0,0 +1,4 @@ + +Mutex (docs.findlib-1.melange.Stdlib.Mutex)

Module Stdlib.Mutex

Locks for mutual exclusion.

Mutexes (mutual-exclusion locks) are used to implement critical sections and protect shared mutable data structures against concurrent accesses. The typical use is (if m is the mutex associated with the data structure D):

Mutex.lock m;
+(* Critical section that operates over D *);
+Mutex.unlock m
type t

The type of mutexes.

val create : unit -> t

Return a new mutex.

val lock : t -> unit

Lock the given mutex. Only one thread can have the mutex locked at any time. A thread that attempts to lock a mutex already locked by another thread will suspend until the other thread unlocks the mutex.

  • before 4.12

    Sys_error was not raised for recursive locking (platform-dependent behaviour)

val try_lock : t -> bool

Same as Mutex.lock, but does not suspend the calling thread if the mutex is already locked: just return false immediately in that case. If the mutex is unlocked, lock it and return true.

val unlock : t -> unit

Unlock the given mutex. Other threads suspended trying to lock the mutex will restart. The mutex must have been previously locked by the thread that calls Mutex.unlock.

  • raises Sys_error

    if the mutex is unlocked or was locked by another thread.

  • before 4.12

    Sys_error was not raised when unlocking an unlocked mutex or when unlocking a mutex from a different thread.

val protect : t -> (unit -> 'a) -> 'a

protect mutex f runs f() in a critical section where mutex is locked (using lock); it then takes care of releasing mutex, whether f() returned a value or raised an exception.

The unlocking operation is guaranteed to always takes place, even in the event an asynchronous exception (e.g. Sys.Break) is raised in some signal handler.

  • since 5.1
diff --git a/findlib-1/melange/Stdlib/Obj/Closure/index.html b/findlib-1/melange/Stdlib/Obj/Closure/index.html new file mode 100644 index 000000000..ef379cc41 --- /dev/null +++ b/findlib-1/melange/Stdlib/Obj/Closure/index.html @@ -0,0 +1,2 @@ + +Closure (docs.findlib-1.melange.Stdlib.Obj.Closure)

Module Obj.Closure

type info = {
  1. arity : int;
  2. start_env : int;
}
val info : t -> info
diff --git a/findlib-1/melange/Stdlib/Obj/Ephemeron/index.html b/findlib-1/melange/Stdlib/Obj/Ephemeron/index.html new file mode 100644 index 000000000..6d14329d5 --- /dev/null +++ b/findlib-1/melange/Stdlib/Obj/Ephemeron/index.html @@ -0,0 +1,2 @@ + +Ephemeron (docs.findlib-1.melange.Stdlib.Obj.Ephemeron)

Module Obj.Ephemeron

Ephemeron with arbitrary arity and untyped

type obj_t = t

alias for Obj.t

type t

an ephemeron cf Ephemeron

val create : int -> t

create n returns an ephemeron with n keys. All the keys and the data are initially empty. The argument n must be between zero and max_ephe_length (limits included).

val length : t -> int

return the number of keys

val get_key : t -> int -> obj_t option
val get_key_copy : t -> int -> obj_t option
val set_key : t -> int -> obj_t -> unit
val unset_key : t -> int -> unit
val check_key : t -> int -> bool
val blit_key : t -> int -> t -> int -> int -> unit
val get_data : t -> obj_t option
val get_data_copy : t -> obj_t option
val set_data : t -> obj_t -> unit
val unset_data : t -> unit
val check_data : t -> bool
val blit_data : t -> t -> unit
val max_ephe_length : int

Maximum length of an ephemeron, ie the maximum number of keys an ephemeron could contain

diff --git a/findlib-1/melange/Stdlib/Obj/Extension_constructor/index.html b/findlib-1/melange/Stdlib/Obj/Extension_constructor/index.html new file mode 100644 index 000000000..4b596f066 --- /dev/null +++ b/findlib-1/melange/Stdlib/Obj/Extension_constructor/index.html @@ -0,0 +1,2 @@ + +Extension_constructor (docs.findlib-1.melange.Stdlib.Obj.Extension_constructor)

Module Obj.Extension_constructor

type t = extension_constructor
val of_val : 'a -> t
val name : t -> string
val id : t -> int
diff --git a/findlib-1/melange/Stdlib/Obj/index.html b/findlib-1/melange/Stdlib/Obj/index.html new file mode 100644 index 000000000..c67c3a0fa --- /dev/null +++ b/findlib-1/melange/Stdlib/Obj/index.html @@ -0,0 +1,2 @@ + +Obj (docs.findlib-1.melange.Stdlib.Obj)

Module Stdlib.Obj

Operations on internal representations of values.

Not for the casual user.

type t
type raw_data = nativeint
val repr : 'a -> t
val obj : t -> 'a
val magic : 'a -> 'b
val is_block : t -> bool
val is_int : t -> bool
val tag : t -> int
val size : t -> int
val reachable_words : t -> int

Computes the total size (in words, including the headers) of all heap blocks accessible from the argument. Statically allocated blocks are included.

  • since 4.04
val field : t -> int -> t
val set_field : t -> int -> t -> unit

When using flambda:

set_field MUST NOT be called on immutable blocks. (Blocks allocated in C stubs, or with new_block below, are always considered mutable.)

The same goes for set_double_field.

For experts only: set_field et al can be made safe by first wrapping the block in Sys.opaque_identity, so any information about its contents will not be propagated.

val double_field : t -> int -> float
val set_double_field : t -> int -> float -> unit
val raw_field : t -> int -> raw_data
val set_raw_field : t -> int -> raw_data -> unit
val new_block : int -> int -> t
val dup : t -> t
val add_offset : t -> Int32.t -> t
val with_tag : int -> t -> t
val first_non_constant_constructor_tag : int
val last_non_constant_constructor_tag : int
val forcing_tag : int
val cont_tag : int
val lazy_tag : int
val closure_tag : int
val object_tag : int
val infix_tag : int
val forward_tag : int
val no_scan_tag : int
val abstract_tag : int
val string_tag : int
val double_tag : int
val double_array_tag : int
val custom_tag : int
val int_tag : int
val out_of_heap_tag : int
val unaligned_tag : int
module Closure : sig ... end
module Extension_constructor : sig ... end
module Ephemeron : sig ... end

Ephemeron with arbitrary arity and untyped

diff --git a/findlib-1/melange/Stdlib/Oo/index.html b/findlib-1/melange/Stdlib/Oo/index.html new file mode 100644 index 000000000..c20ac1d71 --- /dev/null +++ b/findlib-1/melange/Stdlib/Oo/index.html @@ -0,0 +1,2 @@ + +Oo (docs.findlib-1.melange.Stdlib.Oo)

Module Stdlib.Oo

Operations on objects

val copy : < .. > as 'a -> 'a

Oo.copy o returns a copy of object o, that is a fresh object with the same methods and instance variables as o.

  • alert unsynchronized_access Unsynchronized accesses to mutable objects are a programming error.
val id : < .. > -> int

Return an integer identifying this object, unique for the current execution of the program. The generic comparison and hashing functions are based on this integer. When an object is obtained by unmarshaling, the id is refreshed, and thus different from the original object. As a consequence, the internal invariants of data structures such as hash table or sets containing objects are broken after unmarshaling the data structures.

diff --git a/findlib-1/melange/Stdlib/Option/index.html b/findlib-1/melange/Stdlib/Option/index.html new file mode 100644 index 000000000..da85041a8 --- /dev/null +++ b/findlib-1/melange/Stdlib/Option/index.html @@ -0,0 +1,2 @@ + +Option (docs.findlib-1.melange.Stdlib.Option)

Module Stdlib.Option

Option values.

Option values explicitly indicate the presence or absence of a value.

Options

type 'a t = 'a option =
  1. | None
  2. | Some of 'a

The type for option values. Either None or a value Some v.

val none : 'a option

none is None.

val some : 'a -> 'a option

some v is Some v.

val value : 'a option -> default:'a -> 'a

value o ~default is v if o is Some v and default otherwise.

val get : 'a option -> 'a

get o is v if o is Some v and raise otherwise.

val bind : 'a option -> ('a -> 'b option) -> 'b option

bind o f is f v if o is Some v and None if o is None.

val join : 'a option option -> 'a option

join oo is Some v if oo is Some (Some v) and None otherwise.

val map : ('a -> 'b) -> 'a option -> 'b option

map f o is None if o is None and Some (f v) if o is Some v.

val fold : none:'a -> some:('b -> 'a) -> 'b option -> 'a

fold ~none ~some o is none if o is None and some v if o is Some v.

val iter : ('a -> unit) -> 'a option -> unit

iter f o is f v if o is Some v and () otherwise.

Predicates and comparisons

val is_none : 'a option -> bool

is_none o is true if and only if o is None.

val is_some : 'a option -> bool

is_some o is true if and only if o is Some o.

val equal : ('a -> 'a -> bool) -> 'a option -> 'a option -> bool

equal eq o0 o1 is true if and only if o0 and o1 are both None or if they are Some v0 and Some v1 and eq v0 v1 is true.

val compare : ('a -> 'a -> int) -> 'a option -> 'a option -> int

compare cmp o0 o1 is a total order on options using cmp to compare values wrapped by Some _. None is smaller than Some _ values.

Converting

val to_result : none:'e -> 'a option -> ('a, 'e) result

to_result ~none o is Ok v if o is Some v and Error none otherwise.

val to_list : 'a option -> 'a list

to_list o is [] if o is None and [v] if o is Some v.

val to_seq : 'a option -> 'a Seq.t

to_seq o is o as a sequence. None is the empty sequence and Some v is the singleton sequence containing v.

diff --git a/findlib-1/melange/Stdlib/Out_channel/index.html b/findlib-1/melange/Stdlib/Out_channel/index.html new file mode 100644 index 000000000..c2475f876 --- /dev/null +++ b/findlib-1/melange/Stdlib/Out_channel/index.html @@ -0,0 +1,5 @@ + +Out_channel (docs.findlib-1.melange.Stdlib.Out_channel)

Module Stdlib.Out_channel

Output channels.

This module provides functions for working with output channels.

See the example section below.

Channels

type t = out_channel

The type of output channel.

type open_flag = open_flag =
  1. | Open_rdonly
    (*

    open for reading.

    *)
  2. | Open_wronly
    (*

    open for writing.

    *)
  3. | Open_append
    (*

    open for appending: always write at end of file.

    *)
  4. | Open_creat
    (*

    create the file if it does not exist.

    *)
  5. | Open_trunc
    (*

    empty the file if it already exists.

    *)
  6. | Open_excl
    (*

    fail if Open_creat and the file already exists.

    *)
  7. | Open_binary
    (*

    open in binary mode (no conversion).

    *)
  8. | Open_text
    (*

    open in text mode (may perform conversions).

    *)
  9. | Open_nonblock
    (*

    open in non-blocking mode.

    *)

Opening modes for open_gen.

val stdout : t

The standard output for the process.

val stderr : t

The standard error output for the process.

val open_bin : string -> t

Open the named file for writing, and return a new output channel on that file, positioned at the beginning of the file. The file is truncated to zero length if it already exists. It is created if it does not already exists.

val open_text : string -> t

Same as open_bin, but the file is opened in text mode, so that newline translation takes place during writes. On operating systems that do not distinguish between text mode and binary mode, this function behaves like open_bin.

val open_gen : open_flag list -> int -> string -> t

open_gen mode perm filename opens the named file for writing, as described above. The extra argument mode specifies the opening mode. The extra argument perm specifies the file permissions, in case the file must be created. open_text and open_bin are special cases of this function.

val with_open_bin : string -> (t -> 'a) -> 'a

with_open_bin fn f opens a channel oc on file fn and returns f + oc. After f returns, either with a value or by raising an exception, oc is guaranteed to be closed.

val with_open_text : string -> (t -> 'a) -> 'a

Like with_open_bin, but the channel is opened in text mode (see open_text).

val with_open_gen : open_flag list -> int -> string -> (t -> 'a) -> 'a

Like with_open_bin, but can specify the opening mode and file permission, in case the file must be created (see open_gen).

val close : t -> unit

Close the given channel, flushing all buffered write operations. Output functions raise a Sys_error exception when they are applied to a closed output channel, except close and flush, which do nothing when applied to an already closed channel. Note that close may raise Sys_error if the operating system signals an error when flushing or closing.

val close_noerr : t -> unit

Same as close, but ignore all errors.

Output

val output_char : t -> char -> unit

Write the character on the given output channel.

val output_byte : t -> int -> unit

Write one 8-bit integer (as the single character with that code) on the given output channel. The given integer is taken modulo 256.

val output_string : t -> string -> unit

Write the string on the given output channel.

val output_bytes : t -> bytes -> unit

Write the byte sequence on the given output channel.

Advanced output

val output : t -> bytes -> int -> int -> unit

output oc buf pos len writes len characters from byte sequence buf, starting at offset pos, to the given output channel oc.

val output_substring : t -> string -> int -> int -> unit

Same as output but take a string as argument instead of a byte sequence.

Flushing

val flush : t -> unit

Flush the buffer associated with the given output channel, performing all pending writes on that channel. Interactive programs must be careful about flushing standard output and standard error at the right time.

val flush_all : unit -> unit

Flush all open output channels; ignore errors.

Seeking

val seek : t -> int64 -> unit

seek chan pos sets the current writing position to pos for channel chan. This works only for regular files. On files of other kinds (such as terminals, pipes and sockets), the behavior is unspecified.

val pos : t -> int64

Return the current writing position for the given channel. Does not work on channels opened with the Open_append flag (returns unspecified results).

For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos, then going back to this position using seek will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

Attributes

val length : t -> int64

Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless.

val set_binary_mode : t -> bool -> unit

set_binary_mode oc true sets the channel oc to binary mode: no translations take place during output.

set_binary_mode oc false sets the channel oc to text mode: depending on the operating system, some translations may take place during output. For instance, under Windows, end-of-lines will be translated from \n to \r\n.

This function has no effect under operating systems that do not distinguish between text mode and binary mode.

val set_buffered : t -> bool -> unit

set_buffered oc true sets the channel oc to buffered mode. In this mode, data output on oc will be buffered until either the internal buffer is full or the function flush or flush_all is called, at which point it will be sent to the output device.

set_buffered oc false sets the channel oc to unbuffered mode. In this mode, data output on oc will be sent to the output device immediately.

All channels are open in buffered mode by default.

val is_buffered : t -> bool

is_buffered oc returns whether the channel oc is buffered (see set_buffered).

val isatty : t -> bool

isatty oc is true if oc refers to a terminal or console window, false otherwise.

  • since 5.1

Examples

Writing the contents of a file:

let write_file file s =
+  Out_channel.with_open_bin file
+    (fun oc -> Out_channel.output_string oc s))
diff --git a/findlib-1/melange/Stdlib/Parsing/index.html b/findlib-1/melange/Stdlib/Parsing/index.html new file mode 100644 index 000000000..ad34ff0d0 --- /dev/null +++ b/findlib-1/melange/Stdlib/Parsing/index.html @@ -0,0 +1,2 @@ + +Parsing (docs.findlib-1.melange.Stdlib.Parsing)

Module Stdlib.Parsing

The run-time library for parsers generated by ocamlyacc.

val symbol_start : unit -> int

symbol_start and Parsing.symbol_end are to be called in the action part of a grammar rule only. They return the offset of the string that matches the left-hand side of the rule: symbol_start() returns the offset of the first character; symbol_end() returns the offset after the last character. The first character in a file is at offset 0.

val symbol_end : unit -> int
val rhs_start : int -> int

Same as Parsing.symbol_start and Parsing.symbol_end, but return the offset of the string matching the nth item on the right-hand side of the rule, where n is the integer parameter to rhs_start and rhs_end. n is 1 for the leftmost item.

val rhs_end : int -> int
val symbol_start_pos : unit -> Lexing.position

Same as symbol_start, but return a position instead of an offset.

val symbol_end_pos : unit -> Lexing.position

Same as symbol_end, but return a position instead of an offset.

val rhs_start_pos : int -> Lexing.position

Same as rhs_start, but return a position instead of an offset.

val rhs_end_pos : int -> Lexing.position

Same as rhs_end, but return a position instead of an offset.

val clear_parser : unit -> unit

Empty the parser stack. Call it just after a parsing function has returned, to remove all pointers from the parser stack to structures that were built by semantic actions during parsing. This is optional, but lowers the memory requirements of the programs.

exception Parse_error

Raised when a parser encounters a syntax error. Can also be raised from the action part of a grammar rule, to initiate error recovery.

val set_trace : bool -> bool

Control debugging support for ocamlyacc-generated parsers. After Parsing.set_trace true, the pushdown automaton that executes the parsers prints a trace of its actions (reading a token, shifting a state, reducing by a rule) on standard output. Parsing.set_trace false turns this debugging trace off. The boolean returned is the previous state of the trace flag.

  • since 3.11
diff --git a/findlib-1/melange/Stdlib/Printexc/Slot/index.html b/findlib-1/melange/Stdlib/Printexc/Slot/index.html new file mode 100644 index 000000000..c20d0893c --- /dev/null +++ b/findlib-1/melange/Stdlib/Printexc/Slot/index.html @@ -0,0 +1,2 @@ + +Slot (docs.findlib-1.melange.Stdlib.Printexc.Slot)

Module Printexc.Slot

val is_raise : t -> bool

is_raise slot is true when slot refers to a raising point in the code, and false when it comes from a simple function call.

  • since 4.02
val is_inline : t -> bool

is_inline slot is true when slot refers to a call that got inlined by the compiler, and false when it comes from any other context.

  • since 4.04
val location : t -> location option

location slot returns the location information of the slot, if available, and None otherwise.

Some possible reasons for failing to return a location are as follow:

  • the slot corresponds to a compiler-inserted raise
  • the slot corresponds to a part of the program that has not been compiled with debug information (-g)
  • since 4.02
val name : t -> string option

name slot returns the name of the function or definition enclosing the location referred to by the slot.

name slot returns None if the name is unavailable, which may happen for the same reasons as location returning None.

  • since 4.11
val format : int -> t -> string option

format pos slot returns the string representation of slot as raw_backtrace_to_string would format it, assuming it is the pos-th element of the backtrace: the 0-th element is pretty-printed differently than the others.

Whole-backtrace printing functions also skip some uninformative slots; in that case, format pos slot returns None.

  • since 4.02
diff --git a/findlib-1/melange/Stdlib/Printexc/index.html b/findlib-1/melange/Stdlib/Printexc/index.html new file mode 100644 index 000000000..72643d5e2 --- /dev/null +++ b/findlib-1/melange/Stdlib/Printexc/index.html @@ -0,0 +1,18 @@ + +Printexc (docs.findlib-1.melange.Stdlib.Printexc)

Module Stdlib.Printexc

Facilities for printing exceptions and inspecting current call stack.

type t = exn = ..

The type of exception values.

val to_string : exn -> string

Printexc.to_string e returns a string representation of the exception e.

val to_string_default : exn -> string

Printexc.to_string_default e returns a string representation of the exception e, ignoring all registered exception printers.

  • since 4.09
val print : ('a -> 'b) -> 'a -> 'b

Printexc.print fn x applies fn to x and returns the result. If the evaluation of fn x raises any exception, the name of the exception is printed on standard error output, and the exception is raised again. The typical use is to catch and report exceptions that escape a function application.

val catch : ('a -> 'b) -> 'a -> 'b

Printexc.catch fn x is similar to Printexc.print, but aborts the program with exit code 2 after printing the uncaught exception. This function is deprecated: the runtime system is now able to print uncaught exceptions as precisely as Printexc.catch does. Moreover, calling Printexc.catch makes it harder to track the location of the exception using the debugger or the stack backtrace facility. So, do not use Printexc.catch in new code.

  • deprecated This function is no longer needed.
val print_backtrace : out_channel -> unit

Printexc.print_backtrace oc prints an exception backtrace on the output channel oc. The backtrace lists the program locations where the most-recently raised exception was raised and where it was propagated through function calls.

If the call is not inside an exception handler, the returned backtrace is unspecified. If the call is after some exception-catching code (before in the handler, or in a when-guard during the matching of the exception handler), the backtrace may correspond to a later exception than the handled one.

  • since 3.11
val get_backtrace : unit -> string

Printexc.get_backtrace () returns a string containing the same exception backtrace that Printexc.print_backtrace would print. Same restriction usage than print_backtrace.

  • since 3.11
val record_backtrace : bool -> unit

Printexc.record_backtrace b turns recording of exception backtraces on (if b = true) or off (if b = false). Initially, backtraces are not recorded, unless the b flag is given to the program through the OCAMLRUNPARAM variable.

  • since 3.11
val backtrace_status : unit -> bool

Printexc.backtrace_status() returns true if exception backtraces are currently recorded, false if not.

  • since 3.11
val register_printer : (exn -> string option) -> unit

Printexc.register_printer fn registers fn as an exception printer. The printer should return None or raise an exception if it does not know how to convert the passed exception, and Some + s with s the resulting string if it can convert the passed exception. Exceptions raised by the printer are ignored.

When converting an exception into a string, the printers will be invoked in the reverse order of their registrations, until a printer returns a Some s value (if no such printer exists, the runtime will use a generic printer).

When using this mechanism, one should be aware that an exception backtrace is attached to the thread that saw it raised, rather than to the exception itself. Practically, it means that the code related to fn should not use the backtrace if it has itself raised an exception before.

  • since 3.11.2
val use_printers : exn -> string option

Printexc.use_printers e returns None if there are no registered printers and Some s with else as the resulting string otherwise.

  • since 4.09

Raw backtraces

type raw_backtrace

The type raw_backtrace stores a backtrace in a low-level format, which can be converted to usable form using raw_backtrace_entries and backtrace_slots_of_raw_entry below.

Converting backtraces to backtrace_slots is slower than capturing the backtraces. If an application processes many backtraces, it can be useful to use raw_backtrace to avoid or delay conversion.

Raw backtraces cannot be marshalled. If you need marshalling, you should use the array returned by the backtrace_slots function of the next section.

  • since 4.01
type raw_backtrace_entry = private int

A raw_backtrace_entry is an element of a raw_backtrace.

Each raw_backtrace_entry is an opaque integer, whose value is not stable between different programs, or even between different runs of the same binary.

A raw_backtrace_entry can be converted to a usable form using backtrace_slots_of_raw_entry below. Note that, due to inlining, a single raw_backtrace_entry may convert to several backtrace_slots. Since the values of a raw_backtrace_entry are not stable, they cannot be marshalled. If they are to be converted, the conversion must be done by the process that generated them.

Again due to inlining, there may be multiple distinct raw_backtrace_entry values that convert to equal backtrace_slots. However, if two raw_backtrace_entrys are equal as integers, then they represent the same backtrace_slots.

  • since 4.12
val raw_backtrace_entries : raw_backtrace -> raw_backtrace_entry array
  • since 4.12
val get_raw_backtrace : unit -> raw_backtrace

Printexc.get_raw_backtrace () returns the same exception backtrace that Printexc.print_backtrace would print, but in a raw format. Same restriction usage than print_backtrace.

  • since 4.01
val print_raw_backtrace : out_channel -> raw_backtrace -> unit

Print a raw backtrace in the same format Printexc.print_backtrace uses.

  • since 4.01
val raw_backtrace_to_string : raw_backtrace -> string

Return a string from a raw backtrace, in the same format Printexc.get_backtrace uses.

  • since 4.01
val raise_with_backtrace : exn -> raw_backtrace -> 'a

Reraise the exception using the given raw_backtrace for the origin of the exception

  • since 4.05

Current call stack

val get_callstack : int -> raw_backtrace

Printexc.get_callstack n returns a description of the top of the call stack on the current program point (for the current thread), with at most n entries. (Note: this function is not related to exceptions at all, despite being part of the Printexc module.)

  • since 4.01

Uncaught exceptions

val default_uncaught_exception_handler : exn -> raw_backtrace -> unit

Printexc.default_uncaught_exception_handler prints the exception and backtrace on standard error output.

  • since 4.11
val set_uncaught_exception_handler : (exn -> raw_backtrace -> unit) -> unit

Printexc.set_uncaught_exception_handler fn registers fn as the handler for uncaught exceptions. The default handler is Printexc.default_uncaught_exception_handler.

Note that when fn is called all the functions registered with Stdlib.at_exit have already been called. Because of this you must make sure any output channel fn writes on is flushed.

Also note that exceptions raised by user code in the interactive toplevel are not passed to this function as they are caught by the toplevel itself.

If fn raises an exception, both the exceptions passed to fn and raised by fn will be printed with their respective backtrace.

  • since 4.02

Manipulation of backtrace information

These functions are used to traverse the slots of a raw backtrace and extract information from them in a programmer-friendly format.

type backtrace_slot

The abstract type backtrace_slot represents a single slot of a backtrace.

  • since 4.02
val backtrace_slots : raw_backtrace -> backtrace_slot array option

Returns the slots of a raw backtrace, or None if none of them contain useful information.

In the return array, the slot at index 0 corresponds to the most recent function call, raise, or primitive get_backtrace call in the trace.

Some possible reasons for returning None are as follow:

  • none of the slots in the trace come from modules compiled with debug information (-g)
  • the program is a bytecode program that has not been linked with debug information enabled (ocamlc -g)
  • since 4.02
val backtrace_slots_of_raw_entry : + raw_backtrace_entry -> + backtrace_slot array option

Returns the slots of a single raw backtrace entry, or None if this entry lacks debug information.

Slots are returned in the same order as backtrace_slots: the slot at index 0 is the most recent call, raise, or primitive, and subsequent slots represent callers.

  • since 4.12
type location = {
  1. filename : string;
  2. line_number : int;
  3. start_char : int;
  4. end_char : int;
}

The type of location information found in backtraces. start_char and end_char are positions relative to the beginning of the line.

  • since 4.02
module Slot : sig ... end

Raw backtrace slots

type raw_backtrace_slot

This type is used to iterate over the slots of a raw_backtrace. For most purposes, backtrace_slots_of_raw_entry is easier to use.

Like raw_backtrace_entry, values of this type are process-specific and must absolutely not be marshalled, and are unsafe to use for this reason (marshalling them may not fail, but un-marshalling and using the result will result in undefined behavior).

Elements of this type can still be compared and hashed: when two elements are equal, then they represent the same source location (the converse is not necessarily true in presence of inlining, for example).

  • since 4.02
val raw_backtrace_length : raw_backtrace -> int

raw_backtrace_length bckt returns the number of slots in the backtrace bckt.

  • since 4.02
val get_raw_backtrace_slot : raw_backtrace -> int -> raw_backtrace_slot

get_raw_backtrace_slot bckt pos returns the slot in position pos in the backtrace bckt.

  • since 4.02
val convert_raw_backtrace_slot : raw_backtrace_slot -> backtrace_slot

Extracts the user-friendly backtrace_slot from a low-level raw_backtrace_slot.

  • since 4.02
val get_raw_backtrace_next_slot : + raw_backtrace_slot -> + raw_backtrace_slot option

get_raw_backtrace_next_slot slot returns the next slot inlined, if any.

Sample code to iterate over all frames (inlined and non-inlined):

(* Iterate over inlined frames *)
+let rec iter_raw_backtrace_slot f slot =
+  f slot;
+  match get_raw_backtrace_next_slot slot with
+  | None -> ()
+  | Some slot' -> iter_raw_backtrace_slot f slot'
+
+(* Iterate over stack frames *)
+let iter_raw_backtrace f bt =
+  for i = 0 to raw_backtrace_length bt - 1 do
+    iter_raw_backtrace_slot f (get_raw_backtrace_slot bt i)
+  done
  • since 4.04

Exception slots

val exn_slot_id : exn -> int

Printexc.exn_slot_id returns an integer which uniquely identifies the constructor used to create the exception value exn (in the current runtime).

  • since 4.02
val exn_slot_name : exn -> string

Printexc.exn_slot_name exn returns the internal name of the constructor used to create the exception value exn.

  • since 4.02
diff --git a/findlib-1/melange/Stdlib/Printf/index.html b/findlib-1/melange/Stdlib/Printf/index.html new file mode 100644 index 000000000..255c153a0 --- /dev/null +++ b/findlib-1/melange/Stdlib/Printf/index.html @@ -0,0 +1,14 @@ + +Printf (docs.findlib-1.melange.Stdlib.Printf)

Module Stdlib.Printf

Formatted output functions.

val fprintf : out_channel -> ('a, out_channel, unit) format -> 'a

fprintf outchan format arg1 ... argN formats the arguments arg1 to argN according to the format string format, and outputs the resulting string on the channel outchan.

The format string is a character string which contains two types of objects: plain characters, which are simply copied to the output channel, and conversion specifications, each of which causes conversion and printing of arguments.

Conversion specifications have the following form:

% [flags] [width] [.precision] type

In short, a conversion specification consists in the % character, followed by optional modifiers and a type which is made of one or two characters.

The types and their meanings are:

  • d, i: convert an integer argument to signed decimal. The flag # adds underscores to large values for readability.
  • u, n, l, L, or N: convert an integer argument to unsigned decimal. Warning: n, l, L, and N are used for scanf, and should not be used for printf. The flag # adds underscores to large values for readability.
  • x: convert an integer argument to unsigned hexadecimal, using lowercase letters. The flag # adds a 0x prefix to non zero values.
  • X: convert an integer argument to unsigned hexadecimal, using uppercase letters. The flag # adds a 0X prefix to non zero values.
  • o: convert an integer argument to unsigned octal. The flag # adds a 0 prefix to non zero values.
  • s: insert a string argument.
  • S: convert a string argument to OCaml syntax (double quotes, escapes).
  • c: insert a character argument.
  • C: convert a character argument to OCaml syntax (single quotes, escapes).
  • f: convert a floating-point argument to decimal notation, in the style dddd.ddd.
  • F: convert a floating-point argument to OCaml syntax (dddd. or dddd.ddd or d.ddd e+-dd). Converts to hexadecimal with the # flag (see h).
  • e or E: convert a floating-point argument to decimal notation, in the style d.ddd e+-dd (mantissa and exponent).
  • g or G: convert a floating-point argument to decimal notation, in style f or e, E (whichever is more compact). Moreover, any trailing zeros are removed from the fractional part of the result and the decimal-point character is removed if there is no fractional part remaining.
  • h or H: convert a floating-point argument to hexadecimal notation, in the style 0xh.hhhh p+-dd (hexadecimal mantissa, exponent in decimal and denotes a power of 2).
  • B: convert a boolean argument to the string true or false
  • b: convert a boolean argument (deprecated; do not use in new programs).
  • ld, li, lu, lx, lX, lo: convert an int32 argument to the format specified by the second letter (decimal, hexadecimal, etc).
  • nd, ni, nu, nx, nX, no: convert a nativeint argument to the format specified by the second letter.
  • Ld, Li, Lu, Lx, LX, Lo: convert an int64 argument to the format specified by the second letter.
  • a: user-defined printer. Take two arguments and apply the first one to outchan (the current output channel) and to the second argument. The first argument must therefore have type out_channel -> 'b -> unit and the second 'b. The output produced by the function is inserted in the output of fprintf at the current point.
  • t: same as %a, but take only one argument (with type out_channel -> unit) and apply it to outchan.
  • \{ fmt %\}: convert a format string argument to its type digest. The argument must have the same type as the internal format string fmt.
  • ( fmt %): format string substitution. Take a format string argument and substitute it to the internal format string fmt to print following arguments. The argument must have the same type as the internal format string fmt.
  • !: take no argument and flush the output.
  • %: take no argument and output one % character.
  • \@: take no argument and output one \@ character.
  • ,: take no argument and output nothing: a no-op delimiter for conversion specifications.

The optional flags are:

  • -: left-justify the output (default is right justification).
  • 0: for numerical conversions, pad with zeroes instead of spaces.
  • +: for signed numerical conversions, prefix number with a + sign if positive.
  • space: for signed numerical conversions, prefix number with a space if positive.
  • #: request an alternate formatting style for the integer types and the floating-point type F.

The optional width is an integer indicating the minimal width of the result. For instance, %6d prints an integer, prefixing it with spaces to fill at least 6 characters.

The optional precision is a dot . followed by an integer indicating how many digits follow the decimal point in the %f, %e, %E, %h, and %H conversions or the maximum number of significant digits to appear for the %F, %g and %G conversions. For instance, %.4f prints a float with 4 fractional digits.

The integer in a width or precision can also be specified as *, in which case an extra integer argument is taken to specify the corresponding width or precision. This integer argument precedes immediately the argument to print. For instance, %.*f prints a float with as many fractional digits as the value of the argument given before the float.

val printf : ('a, out_channel, unit) format -> 'a

Same as Printf.fprintf, but output on stdout.

val eprintf : ('a, out_channel, unit) format -> 'a

Same as Printf.fprintf, but output on stderr.

val sprintf : ('a, unit, string) format -> 'a

Same as Printf.fprintf, but instead of printing on an output channel, return a string containing the result of formatting the arguments.

val bprintf : Buffer.t -> ('a, Buffer.t, unit) format -> 'a

Same as Printf.fprintf, but instead of printing on an output channel, append the formatted arguments to the given extensible buffer (see module Buffer).

val ifprintf : 'b -> ('a, 'b, 'c, unit) format4 -> 'a

Same as Printf.fprintf, but does not print anything. Useful to ignore some material when conditionally printing.

  • since 3.10
val ibprintf : Buffer.t -> ('a, Buffer.t, unit) format -> 'a

Same as Printf.bprintf, but does not print anything. Useful to ignore some material when conditionally printing.

  • since 4.11

Formatted output functions with continuations.

val kfprintf : + (out_channel -> 'd) -> + out_channel -> + ('a, out_channel, unit, 'd) format4 -> + 'a

Same as fprintf, but instead of returning immediately, passes the out channel to its first argument at the end of printing.

  • since 3.09
val ikfprintf : ('b -> 'd) -> 'b -> ('a, 'b, 'c, 'd) format4 -> 'a

Same as kfprintf above, but does not print anything. Useful to ignore some material when conditionally printing.

  • since 4.01
val ksprintf : (string -> 'd) -> ('a, unit, string, 'd) format4 -> 'a

Same as sprintf above, but instead of returning the string, passes it to the first argument.

  • since 3.09
val kbprintf : + (Buffer.t -> 'd) -> + Buffer.t -> + ('a, Buffer.t, unit, 'd) format4 -> + 'a

Same as bprintf, but instead of returning immediately, passes the buffer to its first argument at the end of printing.

  • since 3.10
val ikbprintf : + (Buffer.t -> 'd) -> + Buffer.t -> + ('a, Buffer.t, unit, 'd) format4 -> + 'a

Same as kbprintf above, but does not print anything. Useful to ignore some material when conditionally printing.

  • since 4.11

Deprecated

val kprintf : (string -> 'b) -> ('a, unit, string, 'b) format4 -> 'a

A deprecated synonym for ksprintf.

  • deprecated Use Printf.ksprintf instead.
diff --git a/findlib-1/melange/Stdlib/Queue/index.html b/findlib-1/melange/Stdlib/Queue/index.html new file mode 100644 index 000000000..1902e6d8f --- /dev/null +++ b/findlib-1/melange/Stdlib/Queue/index.html @@ -0,0 +1,78 @@ + +Queue (docs.findlib-1.melange.Stdlib.Queue)

Module Stdlib.Queue

First-in first-out queues.

This module implements queues (FIFOs), with in-place modification. See the example section below.

Unsynchronized accesses

Unsynchronized accesses to a queue may lead to an invalid queue state. Thus, concurrent accesses to queues must be synchronized (for instance with a Mutex.t).

type !'a t

The type of queues containing elements of type 'a.

exception Empty

Raised when Queue.take or Queue.peek is applied to an empty queue.

val create : unit -> 'a t

Return a new queue, initially empty.

val add : 'a -> 'a t -> unit

add x q adds the element x at the end of the queue q.

val push : 'a -> 'a t -> unit

push is a synonym for add.

val take : 'a t -> 'a

take q removes and returns the first element in queue q, or raises Empty if the queue is empty.

val take_opt : 'a t -> 'a option

take_opt q removes and returns the first element in queue q, or returns None if the queue is empty.

  • since 4.08
val pop : 'a t -> 'a

pop is a synonym for take.

val peek : 'a t -> 'a

peek q returns the first element in queue q, without removing it from the queue, or raises Empty if the queue is empty.

val peek_opt : 'a t -> 'a option

peek_opt q returns the first element in queue q, without removing it from the queue, or returns None if the queue is empty.

  • since 4.08
val top : 'a t -> 'a

top is a synonym for peek.

val clear : 'a t -> unit

Discard all elements from a queue.

val copy : 'a t -> 'a t

Return a copy of the given queue.

val is_empty : 'a t -> bool

Return true if the given queue is empty, false otherwise.

val length : 'a t -> int

Return the number of elements in a queue.

val iter : ('a -> unit) -> 'a t -> unit

iter f q applies f in turn to all elements of q, from the least recently entered to the most recently entered. The queue itself is unchanged.

val fold : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

fold f accu q is equivalent to List.fold_left f accu l, where l is the list of q's elements. The queue remains unchanged.

val transfer : 'a t -> 'a t -> unit

transfer q1 q2 adds all of q1's elements at the end of the queue q2, then clears q1. It is equivalent to the sequence iter (fun x -> add x q2) q1; clear q1, but runs in constant time.

Iterators

val to_seq : 'a t -> 'a Seq.t

Iterate on the queue, in front-to-back order. The behavior is not specified if the queue is modified during the iteration.

  • since 4.07
val add_seq : 'a t -> 'a Seq.t -> unit

Add the elements from a sequence to the end of the queue.

  • since 4.07
val of_seq : 'a Seq.t -> 'a t

Create a queue from a sequence.

  • since 4.07

Examples

Basic Example

A basic example:

# let q = Queue.create ()
+val q : '_weak1 Queue.t = <abstr>
+
+
+# Queue.push 1 q; Queue.push 2 q; Queue.push 3 q
+- : unit = ()
+
+# Queue.length q
+- : int = 3
+
+# Queue.pop q
+- : int = 1
+
+# Queue.pop q
+- : int = 2
+
+# Queue.pop q
+- : int = 3
+
+# Queue.pop q
+Exception: Stdlib.Queue.Empty.

Search Through a Graph

For a more elaborate example, a classic algorithmic use of queues is to implement a BFS (breadth-first search) through a graph.

 type graph = {
+   edges: (int, int list) Hashtbl.t
+ }
+
+(* Search in graph [g] using BFS, starting from node [start].
+   It returns the first node that satisfies [p], or [None] if
+   no node reachable from [start] satisfies [p].
+*)
+let search_for ~(g:graph) ~(start:int) (p:int -> bool) : int option =
+  let to_explore = Queue.create() in
+  let explored = Hashtbl.create 16 in
+
+  Queue.push start to_explore;
+  let rec loop () =
+    if Queue.is_empty to_explore then None
+    else
+      (* node to explore *)
+      let node = Queue.pop to_explore in
+      explore_node node
+
+  and explore_node node =
+    if not (Hashtbl.mem explored node) then (
+      if p node then Some node (* found *)
+      else (
+        Hashtbl.add explored node ();
+        let children =
+          Hashtbl.find_opt g.edges node
+          |> Option.value ~default:[]
+        in
+        List.iter (fun child -> Queue.push child to_explore) children;
+        loop()
+      )
+    ) else loop()
+  in
+  loop()
+
+(* a sample graph *)
+let my_graph: graph =
+  let edges =
+    List.to_seq [
+      1, [2;3];
+      2, [10; 11];
+      3, [4;5];
+      5, [100];
+      11, [0; 20];
+    ]
+    |> Hashtbl.of_seq
+  in {edges}
+
+# search_for ~g:my_graph ~start:1 (fun x -> x = 30)
+- : int option = None
+
+# search_for ~g:my_graph ~start:1 (fun x -> x >= 15)
+- : int option = Some 20
+
+# search_for ~g:my_graph ~start:1 (fun x -> x >= 50)
+- : int option = Some 100
diff --git a/findlib-1/melange/Stdlib/Random/State/index.html b/findlib-1/melange/Stdlib/Random/State/index.html new file mode 100644 index 000000000..568b616af --- /dev/null +++ b/findlib-1/melange/Stdlib/Random/State/index.html @@ -0,0 +1,2 @@ + +State (docs.findlib-1.melange.Stdlib.Random.State)

Module Random.State

type t

The type of PRNG states.

val make : int array -> t

Create a new state and initialize it with the given seed.

val make_self_init : unit -> t

Create a new state and initialize it with a random seed chosen in a system-dependent way. The seed is obtained as described in Random.self_init.

val copy : t -> t

Return a copy of the given state.

val bits : t -> int
val int : t -> int -> int
val full_int : t -> int -> int
val int32 : t -> Int32.t -> Int32.t
val nativeint : t -> Nativeint.t -> Nativeint.t
val int64 : t -> Int64.t -> Int64.t
val float : t -> float -> float
val bool : t -> bool
val bits32 : t -> Int32.t
val bits64 : t -> Int64.t
val nativebits : t -> Nativeint.t

These functions are the same as the basic functions, except that they use (and update) the given PRNG state instead of the default one.

val split : t -> t

Draw a fresh PRNG state from the given PRNG state. (The given PRNG state is modified.) The new PRNG is statistically independent from the given PRNG. Data can be drawn from both PRNGs, in any order, without risk of correlation. Both PRNGs can be split later, arbitrarily many times.

  • since 5.0
val to_binary_string : t -> string

Serializes the PRNG state into an immutable sequence of bytes. See of_binary_string for deserialization.

The string type is intended here for serialization only, the encoding is not human-readable and may not be printable.

Note that the serialization format may differ across OCaml versions.

  • since 5.1
val of_binary_string : string -> t

Deserializes a byte sequence obtained by calling to_binary_string. The resulting PRNG state will produce the same random numbers as the state that was passed as input to to_binary_string.

  • raises Failure

    if the input is not in the expected format.

    Note that the serialization format may differ across OCaml versions.

    Unlike the functions provided by the Marshal module, this function either produces a valid state or fails cleanly with a Failure exception. It can be safely used on user-provided, untrusted inputs.

  • since 5.1
diff --git a/findlib-1/melange/Stdlib/Random/index.html b/findlib-1/melange/Stdlib/Random/index.html new file mode 100644 index 000000000..d4474fc69 --- /dev/null +++ b/findlib-1/melange/Stdlib/Random/index.html @@ -0,0 +1,2 @@ + +Random (docs.findlib-1.melange.Stdlib.Random)

Module Stdlib.Random

Pseudo-random number generators (PRNG).

With multiple domains, each domain has its own generator that evolves independently of the generators of other domains. When a domain is created, its generator is initialized by splitting the state of the generator associated with the parent domain.

In contrast, all threads within a domain share the same domain-local generator. Independent generators can be created with the Random.split function and used with the functions from the Random.State module.

Basic functions

val init : int -> unit

Initialize the domain-local generator, using the argument as a seed. The same seed will always yield the same sequence of numbers.

val full_init : int array -> unit

Same as Random.init but takes more data as seed.

val self_init : unit -> unit

Initialize the domain-local generator with a random seed chosen in a system-dependent way. If /dev/urandom is available on the host machine, it is used to provide a highly random initial seed. Otherwise, a less random seed is computed from system parameters (current time, process IDs, domain-local state).

val bits : unit -> int

Return 30 random bits in a nonnegative integer.

  • before 5.0

    used a different algorithm (affects all the following functions)

val int : int -> int

Random.int bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0 and less than 230.

val full_int : int -> int

Random.full_int bound returns a random integer between 0 (inclusive) and bound (exclusive). bound may be any positive integer.

If bound is less than 230, Random.full_int bound is equal to Random.int bound. If bound is greater than 230 (on 64-bit systems or non-standard environments, such as JavaScript), Random.full_int returns a value, where Random.int raises Stdlib.Invalid_argument.

  • since 4.13
val int32 : Int32.t -> Int32.t

Random.int32 bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

val nativeint : Nativeint.t -> Nativeint.t

Random.nativeint bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

val int64 : Int64.t -> Int64.t

Random.int64 bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

val float : float -> float

Random.float bound returns a random floating-point number between 0 and bound (inclusive). If bound is negative, the result is negative or zero. If bound is 0, the result is 0.

val bool : unit -> bool

Random.bool () returns true or false with probability 0.5 each.

val bits32 : unit -> Int32.t

Random.bits32 () returns 32 random bits as an integer between Int32.min_int and Int32.max_int.

  • since 4.14
val bits64 : unit -> Int64.t

Random.bits64 () returns 64 random bits as an integer between Int64.min_int and Int64.max_int.

  • since 4.14
val nativebits : unit -> Nativeint.t

Random.nativebits () returns 32 or 64 random bits (depending on the bit width of the platform) as an integer between Nativeint.min_int and Nativeint.max_int.

  • since 4.14

Advanced functions

The functions from module State manipulate the current state of the random generator explicitly. This allows using one or several deterministic PRNGs, even in a multi-threaded program, without interference from other parts of the program.

module State : sig ... end
val get_state : unit -> State.t

get_state() returns a fresh copy of the current state of the domain-local generator (which is used by the basic functions).

val set_state : State.t -> unit

set_state s updates the current state of the domain-local generator (which is used by the basic functions) by copying the state s into it.

val split : unit -> State.t

Draw a fresh PRNG state from the current state of the domain-local generator used by the default functions. (The state of the domain-local generator is modified.) See Random.State.split.

  • since 5.0
diff --git a/findlib-1/melange/Stdlib/Result/index.html b/findlib-1/melange/Stdlib/Result/index.html new file mode 100644 index 000000000..343d26678 --- /dev/null +++ b/findlib-1/melange/Stdlib/Result/index.html @@ -0,0 +1,12 @@ + +Result (docs.findlib-1.melange.Stdlib.Result)

Module Stdlib.Result

Result values.

Result values handle computation results and errors in an explicit and declarative manner without resorting to exceptions.

Results

type ('a, 'e) t = ('a, 'e) result =
  1. | Ok of 'a
  2. | Error of 'e

The type for result values. Either a value Ok v or an error Error e.

val ok : 'a -> ('a, 'e) result

ok v is Ok v.

val error : 'e -> ('a, 'e) result

error e is Error e.

val value : ('a, 'e) result -> default:'a -> 'a

value r ~default is v if r is Ok v and default otherwise.

val get_ok : ('a, 'e) result -> 'a

get_ok r is v if r is Ok v and raise otherwise.

val get_error : ('a, 'e) result -> 'e

get_error r is e if r is Error e and raise otherwise.

val bind : ('a, 'e) result -> ('a -> ('b, 'e) result) -> ('b, 'e) result

bind r f is f v if r is Ok v and r if r is Error _.

val join : (('a, 'e) result, 'e) result -> ('a, 'e) result

join rr is r if rr is Ok r and rr if rr is Error _.

val map : ('a -> 'b) -> ('a, 'e) result -> ('b, 'e) result

map f r is Ok (f v) if r is Ok v and r if r is Error _.

val map_error : ('e -> 'f) -> ('a, 'e) result -> ('a, 'f) result

map_error f r is Error (f e) if r is Error e and r if r is Ok _.

val fold : ok:('a -> 'c) -> error:('e -> 'c) -> ('a, 'e) result -> 'c

fold ~ok ~error r is ok v if r is Ok v and error e if r is Error e.

val iter : ('a -> unit) -> ('a, 'e) result -> unit

iter f r is f v if r is Ok v and () otherwise.

val iter_error : ('e -> unit) -> ('a, 'e) result -> unit

iter_error f r is f e if r is Error e and () otherwise.

Predicates and comparisons

val is_ok : ('a, 'e) result -> bool

is_ok r is true if and only if r is Ok _.

val is_error : ('a, 'e) result -> bool

is_error r is true if and only if r is Error _.

val equal : + ok:('a -> 'a -> bool) -> + error:('e -> 'e -> bool) -> + ('a, 'e) result -> + ('a, 'e) result -> + bool

equal ~ok ~error r0 r1 tests equality of r0 and r1 using ok and error to respectively compare values wrapped by Ok _ and Error _.

val compare : + ok:('a -> 'a -> int) -> + error:('e -> 'e -> int) -> + ('a, 'e) result -> + ('a, 'e) result -> + int

compare ~ok ~error r0 r1 totally orders r0 and r1 using ok and error to respectively compare values wrapped by Ok _ and Error _. Ok _ values are smaller than Error _ values.

Converting

val to_option : ('a, 'e) result -> 'a option

to_option r is r as an option, mapping Ok v to Some v and Error _ to None.

val to_list : ('a, 'e) result -> 'a list

to_list r is [v] if r is Ok v and [] otherwise.

val to_seq : ('a, 'e) result -> 'a Seq.t

to_seq r is r as a sequence. Ok v is the singleton sequence containing v and Error _ is the empty sequence.

diff --git a/findlib-1/melange/Stdlib/Scanf/Scanning/index.html b/findlib-1/melange/Stdlib/Scanf/Scanning/index.html new file mode 100644 index 000000000..6aa5c377d --- /dev/null +++ b/findlib-1/melange/Stdlib/Scanf/Scanning/index.html @@ -0,0 +1,2 @@ + +Scanning (docs.findlib-1.melange.Stdlib.Scanf.Scanning)

Module Scanf.Scanning

type in_channel

The notion of input channel for the Scanf module: those channels provide all the machinery necessary to read from any source of characters, including a Stdlib.in_channel value. A Scanf.Scanning.in_channel value is also called a formatted input channel or equivalently a scanning buffer. The type Scanning.scanbuf below is an alias for Scanning.in_channel. Note that a Scanning.in_channel is not concurrency-safe: concurrent use may produce arbitrary values or exceptions.

  • since 3.12
type scanbuf = in_channel

The type of scanning buffers. A scanning buffer is the source from which a formatted input function gets characters. The scanning buffer holds the current state of the scan, plus a function to get the next char from the input, and a token buffer to store the string matched so far.

Note: a scanning action may often require to examine one character in advance; when this 'lookahead' character does not belong to the token read, it is stored back in the scanning buffer and becomes the next character yet to be read.

val stdin : in_channel

The standard input notion for the Scanf module. Scanning.stdin is the Scanning.in_channel formatted input channel attached to Stdlib.stdin.

Note: in the interactive system, when input is read from Stdlib.stdin, the newline character that triggers evaluation is part of the input; thus, the scanning specifications must properly skip this additional newline character (for instance, simply add a '\n' as the last character of the format string).

  • since 3.12
type file_name = string

A convenient alias to designate a file name.

  • since 4.00
val open_in : file_name -> in_channel

Scanning.open_in fname returns a Scanning.in_channel formatted input channel for bufferized reading in text mode from file fname.

Note: open_in returns a formatted input channel that efficiently reads characters in large chunks; in contrast, from_channel below returns formatted input channels that must read one character at a time, leading to a much slower scanning rate.

  • since 3.12
val open_in_bin : file_name -> in_channel

Scanning.open_in_bin fname returns a Scanning.in_channel formatted input channel for bufferized reading in binary mode from file fname.

  • since 3.12
val close_in : in_channel -> unit

Closes the Stdlib.in_channel associated with the given Scanning.in_channel formatted input channel.

  • since 3.12
val from_file : file_name -> in_channel

An alias for Scanning.open_in above.

val from_file_bin : string -> in_channel

An alias for Scanning.open_in_bin above.

val from_string : string -> in_channel

Scanning.from_string s returns a Scanning.in_channel formatted input channel which reads from the given string. Reading starts from the first character in the string. The end-of-input condition is set when the end of the string is reached.

val from_function : (unit -> char) -> in_channel

Scanning.from_function f returns a Scanning.in_channel formatted input channel with the given function as its reading method.

When scanning needs one more character, the given function is called.

When the function has no more character to provide, it must signal an end-of-input condition by raising the exception End_of_file.

val from_channel : in_channel -> in_channel

Scanning.from_channel ic returns a Scanning.in_channel formatted input channel which reads from the regular Stdlib.in_channel input channel ic argument. Reading starts at current reading position of ic.

val end_of_input : in_channel -> bool

Scanning.end_of_input ic tests the end-of-input condition of the given Scanning.in_channel formatted input channel.

val beginning_of_input : in_channel -> bool

Scanning.beginning_of_input ic tests the beginning of input condition of the given Scanning.in_channel formatted input channel.

val name_of_input : in_channel -> string

Scanning.name_of_input ic returns the name of the character source for the given Scanning.in_channel formatted input channel.

  • since 3.09
diff --git a/findlib-1/melange/Stdlib/Scanf/index.html b/findlib-1/melange/Stdlib/Scanf/index.html new file mode 100644 index 000000000..61e33ac11 --- /dev/null +++ b/findlib-1/melange/Stdlib/Scanf/index.html @@ -0,0 +1,26 @@ + +Scanf (docs.findlib-1.melange.Stdlib.Scanf)

Module Stdlib.Scanf

Formatted input functions.

Introduction

Functional input with format strings

The module Scanf provides formatted input functions or scanners.

The formatted input functions can read from any kind of input, including strings, files, or anything that can return characters. The more general source of characters is named a formatted input channel (or scanning buffer) and has type Scanning.in_channel. The more general formatted input function reads from any scanning buffer and is named bscanf.

Generally speaking, the formatted input functions have 3 arguments:

Hence, a typical call to the formatted input function Scanf.bscanf is bscanf ic fmt f, where:

A simple example

As suggested above, the expression bscanf ic "%d" f reads a decimal integer n from the source of characters ic and returns f n.

For instance,

then bscanf Scanning.stdin "%d" f reads an integer n from the standard input and returns f n (that is n + 1). Thus, if we evaluate bscanf stdin "%d" f, and then enter 41 at the keyboard, the result we get is 42.

Formatted input as a functional feature

The OCaml scanning facility is reminiscent of the corresponding C feature. However, it is also largely different, simpler, and yet more powerful: the formatted input functions are higher-order functionals and the parameter passing mechanism is just the regular function application not the variable assignment based mechanism which is typical for formatted input in imperative languages; the OCaml format strings also feature useful additions to easily define complex tokens; as expected within a functional programming language, the formatted input functions also support polymorphism, in particular arbitrary interaction with polymorphic user-defined scanners. Furthermore, the OCaml formatted input facility is fully type-checked at compile time.

Unsynchronized accesses

Unsynchronized accesses to a Scanning.in_channel may lead to an invalid Scanning.in_channel state. Thus, concurrent accesses to Scanning.in_channels must be synchronized (for instance with a Mutex.t).

Formatted input channel

module Scanning : sig ... end

Type of formatted input functions

type ('a, 'b, 'c, 'd) scanner = + ('a, Scanning.in_channel, 'b, 'c, 'a -> 'd, 'd) format6 -> + 'c

The type of formatted input scanners: ('a, 'b, 'c, 'd) scanner is the type of a formatted input function that reads from some formatted input channel according to some format string; more precisely, if scan is some formatted input function, then scan + ic fmt f applies f to all the arguments specified by format string fmt, when scan has read those arguments from the Scanning.in_channel formatted input channel ic.

For instance, the Scanf.scanf function below has type ('a, 'b, 'c, 'd) scanner, since it is a formatted input function that reads from Scanning.stdin: scanf fmt f applies f to the arguments specified by fmt, reading those arguments from Stdlib.stdin as expected.

If the format fmt has some %r indications, the corresponding formatted input functions must be provided before receiver function f. For instance, if read_elem is an input function for values of type t, then bscanf ic "%r;" read_elem f reads a value v of type t followed by a ';' character, and returns f v.

  • since 3.10
type ('a, 'b, 'c, 'd) scanner_opt = + ('a, Scanning.in_channel, 'b, 'c, 'a -> 'd option, 'd) format6 -> + 'c
exception Scan_failure of string

When the input can not be read according to the format string specification, formatted input functions typically raise exception Scan_failure.

The general formatted input function

val bscanf : Scanning.in_channel -> ('a, 'b, 'c, 'd) scanner

bscanf ic fmt r1 ... rN f reads characters from the Scanning.in_channel formatted input channel ic and converts them to values according to format string fmt. As a final step, receiver function f is applied to the values read and gives the result of the bscanf call.

For instance, if f is the function fun s i -> i + 1, then Scanf.sscanf "x = 1" "%s = %i" f returns 2.

Arguments r1 to rN are user-defined input functions that read the argument corresponding to the %r conversions specified in the format string.

val bscanf_opt : Scanning.in_channel -> ('a, 'b, 'c, 'd) scanner_opt

Same as Scanf.bscanf, but returns None in case of scanning failure.

  • since 5.0

Format string description

The format string is a character string which contains three types of objects:

The space character in format strings

As mentioned above, a plain character in the format string is just matched with the next character of the input; however, two characters are special exceptions to this rule: the space character (' ' or ASCII code 32) and the line feed character ('\n' or ASCII code 10). A space does not match a single space character, but any amount of 'whitespace' in the input. More precisely, a space inside the format string matches any number of tab, space, line feed and carriage return characters. Similarly, a line feed character in the format string matches either a single line feed or a carriage return followed by a line feed.

Matching any amount of whitespace, a space in the format string also matches no amount of whitespace at all; hence, the call bscanf ib + "Price = %d $" (fun p -> p) succeeds and returns 1 when reading an input with various whitespace in it, such as Price = 1 $, Price = 1 $, or even Price=1$.

Conversion specifications in format strings

Conversion specifications consist in the % character, followed by an optional flag, an optional field width, and followed by one or two conversion characters.

The conversion characters and their meanings are:

Following the % character that introduces a conversion, there may be the special flag _: the conversion that follows occurs as usual, but the resulting value is discarded. For instance, if f is the function fun i -> i + 1, and s is the string "x = 1", then Scanf.sscanf s "%_s = %i" f returns 2.

The field width is composed of an optional integer literal indicating the maximal width of the token to read. For instance, %6d reads an integer, having at most 6 decimal digits; %4f reads a float with at most 4 characters; and %8[\000-\255] returns the next 8 characters (or all the characters still available, if fewer than 8 characters are available in the input).

Notes:

Scanning indications in format strings

Scanning indications appear just after the string conversions %s and %[ range ] to delimit the end of the token. A scanning indication is introduced by a @ character, followed by some plain character c. It means that the string token should end just before the next matching c (which is skipped). If no c character is encountered, the string token spreads as much as possible. For instance, "%s@\t" reads a string up to the next tab character or to the end of input. If a @ character appears anywhere else in the format string, it is treated as a plain character.

Note:

Exceptions during scanning

Scanners may raise the following exceptions when the input cannot be read according to the format string:

Note:

Specialised formatted input functions

val sscanf : string -> ('a, 'b, 'c, 'd) scanner

Same as Scanf.bscanf, but reads from the given string.

val sscanf_opt : string -> ('a, 'b, 'c, 'd) scanner_opt

Same as Scanf.sscanf, but returns None in case of scanning failure.

  • since 5.0
val scanf : ('a, 'b, 'c, 'd) scanner

Same as Scanf.bscanf, but reads from the predefined formatted input channel Scanf.Scanning.stdin that is connected to Stdlib.stdin.

val scanf_opt : ('a, 'b, 'c, 'd) scanner_opt

Same as Scanf.scanf, but returns None in case of scanning failure.

  • since 5.0
val kscanf : + Scanning.in_channel -> + (Scanning.in_channel -> exn -> 'd) -> + ('a, 'b, 'c, 'd) scanner

Same as Scanf.bscanf, but takes an additional function argument ef that is called in case of error: if the scanning process or some conversion fails, the scanning function aborts and calls the error handling function ef with the formatted input channel and the exception that aborted the scanning process as arguments.

val ksscanf : + string -> + (Scanning.in_channel -> exn -> 'd) -> + ('a, 'b, 'c, 'd) scanner

Same as Scanf.kscanf but reads from the given string.

  • since 4.02

Reading format strings from input

val bscanf_format : + Scanning.in_channel -> + ('a, 'b, 'c, 'd, 'e, 'f) format6 -> + (('a, 'b, 'c, 'd, 'e, 'f) format6 -> 'g) -> + 'g

bscanf_format ic fmt f reads a format string token from the formatted input channel ic, according to the given format string fmt, and applies f to the resulting format string value.

  • raises Scan_failure

    if the format string value read does not have the same type as fmt.

  • since 3.09
val sscanf_format : + string -> + ('a, 'b, 'c, 'd, 'e, 'f) format6 -> + (('a, 'b, 'c, 'd, 'e, 'f) format6 -> 'g) -> + 'g

Same as Scanf.bscanf_format, but reads from the given string.

  • since 3.09
val format_from_string : + string -> + ('a, 'b, 'c, 'd, 'e, 'f) format6 -> + ('a, 'b, 'c, 'd, 'e, 'f) format6

format_from_string s fmt converts a string argument to a format string, according to the given format string fmt.

  • raises Scan_failure

    if s, considered as a format string, does not have the same type as fmt.

  • since 3.10
val unescaped : string -> string

unescaped s return a copy of s with escape sequences (according to the lexical conventions of OCaml) replaced by their corresponding special characters. More precisely, Scanf.unescaped has the following property: for all string s, Scanf.unescaped (String.escaped s) = s.

Always return a copy of the argument, even if there is no escape sequence in the argument.

  • raises Scan_failure

    if s is not properly escaped (i.e. s has invalid escape sequences or special characters that are not properly escaped). For instance, Scanf.unescaped "\"" will fail.

  • since 4.00
diff --git a/findlib-1/melange/Stdlib/Seq/index.html b/findlib-1/melange/Stdlib/Seq/index.html new file mode 100644 index 000000000..146f88967 --- /dev/null +++ b/findlib-1/melange/Stdlib/Seq/index.html @@ -0,0 +1,2 @@ + +Seq (docs.findlib-1.melange.Stdlib.Seq)

Module Stdlib.Seq

Sequences.

A sequence of type 'a Seq.t can be thought of as a delayed list, that is, a list whose elements are computed only when they are demanded by a consumer. This allows sequences to be produced and transformed lazily (one element at a time) rather than eagerly (all elements at once). This also allows constructing conceptually infinite sequences.

The type 'a Seq.t is defined as a synonym for unit -> 'a Seq.node. This is a function type: therefore, it is opaque. The consumer can query a sequence in order to request the next element (if there is one), but cannot otherwise inspect the sequence in any way.

Because it is opaque, the type 'a Seq.t does not reveal whether a sequence is:

It also does not reveal whether the elements of the sequence are:

It is up to the programmer to keep these distinctions in mind so as to understand the time and space requirements of sequences.

For the sake of simplicity, most of the documentation that follows is written under the implicit assumption that the sequences at hand are persistent. We normally do not point out when or how many times each function is invoked, because that would be too verbose. For instance, in the description of map, we write: "if xs is the sequence x0; x1; ... then map f xs is the sequence f x0; f x1; ...". If we wished to be more explicit, we could point out that the transformation takes place on demand: that is, the elements of map f xs are computed only when they are demanded. In other words, the definition let ys = map f xs terminates immediately and does not invoke f. The function call f x0 takes place only when the first element of ys is demanded, via the function call ys(). Furthermore, calling ys() twice causes f x0 to be called twice as well. If one wishes for f to be applied at most once to each element of xs, even in scenarios where ys is queried more than once, then one should use let ys = memoize (map f xs).

As a general rule, the functions that build sequences, such as map, filter, scan, take, etc., produce sequences whose elements are computed only on demand. The functions that eagerly consume sequences, such as is_empty, find, length, iter, fold_left, etc., are the functions that force computation to take place.

When possible, we recommend using sequences rather than dispensers (functions of type unit -> 'a option that produce elements upon demand). Whereas sequences can be persistent or ephemeral, dispensers are always ephemeral, and are typically more difficult to work with than sequences. Two conversion functions, to_dispenser and of_dispenser, are provided.

type 'a t = unit -> 'a node

A sequence xs of type 'a t is a delayed list of elements of type 'a. Such a sequence is queried by performing a function application xs(). This function application returns a node, allowing the caller to determine whether the sequence is empty or nonempty, and in the latter case, to obtain its head and tail.

and +'a node =
  1. | Nil
  2. | Cons of 'a * 'a t

A node is either Nil, which means that the sequence is empty, or Cons (x, xs), which means that x is the first element of the sequence and that xs is the remainder of the sequence.

Consuming sequences

The functions in this section consume their argument, a sequence, either partially or completely:

Similarly, among the functions that consume two sequences, one can distinguish two groups:

The functions that consume two sequences can be applied to two sequences of distinct lengths: in that case, the excess elements in the longer sequence are ignored. (It may be the case that one excess element is demanded, even though this element is not used.)

None of the functions in this section is lazy. These functions are consumers: they force some computation to take place.

val is_empty : 'a t -> bool

is_empty xs determines whether the sequence xs is empty.

It is recommended that the sequence xs be persistent. Indeed, is_empty xs demands the head of the sequence xs, so, if xs is ephemeral, it may be the case that xs cannot be used any more after this call has taken place.

  • since 4.14
val uncons : 'a t -> ('a * 'a t) option

If xs is empty, then uncons xs is None.

If xs is nonempty, then uncons xs is Some (x, ys) where x is the head of the sequence and ys its tail.

  • since 4.14
val length : 'a t -> int

length xs is the length of the sequence xs.

The sequence xs must be finite.

  • since 4.14
val iter : ('a -> unit) -> 'a t -> unit

iter f xs invokes f x successively for every element x of the sequence xs, from left to right.

It terminates only if the sequence xs is finite.

val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

fold_left f _ xs invokes f _ x successively for every element x of the sequence xs, from left to right.

An accumulator of type 'a is threaded through the calls to f.

It terminates only if the sequence xs is finite.

val iteri : (int -> 'a -> unit) -> 'a t -> unit

iteri f xs invokes f i x successively for every element x located at index i in the sequence xs.

It terminates only if the sequence xs is finite.

iteri f xs is equivalent to iter (fun (i, x) -> f i x) (zip (ints 0) xs).

  • since 4.14
val fold_lefti : ('acc -> int -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

fold_lefti f _ xs invokes f _ i x successively for every element x located at index i of the sequence xs.

An accumulator of type 'b is threaded through the calls to f.

It terminates only if the sequence xs is finite.

fold_lefti f accu xs is equivalent to fold_left (fun accu (i, x) -> f accu i x) accu (zip (ints 0) xs).

  • since 4.14
val for_all : ('a -> bool) -> 'a t -> bool

for_all p xs determines whether all elements x of the sequence xs satisfy p x.

The sequence xs must be finite.

  • since 4.14
val exists : ('a -> bool) -> 'a t -> bool

exists xs p determines whether at least one element x of the sequence xs satisfies p x.

The sequence xs must be finite.

  • since 4.14
val find : ('a -> bool) -> 'a t -> 'a option

find p xs returns Some x, where x is the first element of the sequence xs that satisfies p x, if there is such an element.

It returns None if there is no such element.

The sequence xs must be finite.

  • since 4.14
val find_index : ('a -> bool) -> 'a t -> int option

find_index p xs returns Some i, where i is the index of the first element of the sequence xs that satisfies p x, if there is such an element.

It returns None if there is no such element.

The sequence xs must be finite.

  • since 5.1
val find_map : ('a -> 'b option) -> 'a t -> 'b option

find_map f xs returns Some y, where x is the first element of the sequence xs such that f x = Some _, if there is such an element, and where y is defined by f x = Some y.

It returns None if there is no such element.

The sequence xs must be finite.

  • since 4.14
val find_mapi : (int -> 'a -> 'b option) -> 'a t -> 'b option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

The sequence xs must be finite.

  • since 5.1
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit

iter2 f xs ys invokes f x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

Iteration terminates only if at least one of the sequences xs and ys is finite.

iter2 f xs ys is equivalent to iter (fun (x, y) -> f x y) (zip xs ys).

  • since 4.14
val fold_left2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc

fold_left2 f _ xs ys invokes f _ x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

An accumulator of type 'a is threaded through the calls to f.

If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

Iteration terminates only if at least one of the sequences xs and ys is finite.

fold_left2 f accu xs ys is equivalent to fold_left (fun accu (x, y) -> f accu x y) (zip xs ys).

  • since 4.14
val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

for_all2 p xs ys determines whether all pairs (x, y) of elements drawn synchronously from the sequences xs and ys satisfy p x y.

If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored. In particular, if xs or ys is empty, then for_all2 p xs ys is true. This is where for_all2 and equal differ: equal eq xs ys can be true only if xs and ys have the same length.

At least one of the sequences xs and ys must be finite.

for_all2 p xs ys is equivalent to for_all (fun b -> b) (map2 p xs ys).

  • since 4.14
val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

exists2 p xs ys determines whether some pair (x, y) of elements drawn synchronously from the sequences xs and ys satisfies p x y.

If the sequences xs and ys have different lengths, then iteration must stop as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

At least one of the sequences xs and ys must be finite.

exists2 p xs ys is equivalent to exists (fun b -> b) (map2 p xs ys).

  • since 4.14
val equal : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

Provided the function eq defines an equality on elements, equal eq xs ys determines whether the sequences xs and ys are pointwise equal.

At least one of the sequences xs and ys must be finite.

  • since 4.14
val compare : ('a -> 'b -> int) -> 'a t -> 'b t -> int

Provided the function cmp defines a preorder on elements, compare cmp xs ys compares the sequences xs and ys according to the lexicographic preorder.

For more details on comparison functions, see Array.sort.

At least one of the sequences xs and ys must be finite.

  • since 4.14

Constructing sequences

The functions in this section are lazy: that is, they return sequences whose elements are computed only when demanded.

val empty : 'a t

empty is the empty sequence. It has no elements. Its length is 0.

val return : 'a -> 'a t

return x is the sequence whose sole element is x. Its length is 1.

val cons : 'a -> 'a t -> 'a t

cons x xs is the sequence that begins with the element x, followed with the sequence xs.

Writing cons (f()) xs causes the function call f() to take place immediately. For this call to be delayed until the sequence is queried, one must instead write (fun () -> Cons(f(), xs)).

  • since 4.11
val init : int -> (int -> 'a) -> 'a t

init n f is the sequence f 0; f 1; ...; f (n-1).

n must be nonnegative.

If desired, the infinite sequence f 0; f 1; ... can be defined as map f (ints 0).

  • since 4.14
val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t

unfold constructs a sequence out of a step function and an initial state.

If f u is None then unfold f u is the empty sequence. If f u is Some (x, u') then unfold f u is the nonempty sequence cons x (unfold f u').

For example, unfold (function [] -> None | h :: t -> Some (h, t)) l is equivalent to List.to_seq l.

  • since 4.11
val repeat : 'a -> 'a t

repeat x is the infinite sequence where the element x is repeated indefinitely.

repeat x is equivalent to cycle (return x).

  • since 4.14
val forever : (unit -> 'a) -> 'a t

forever f is an infinite sequence where every element is produced (on demand) by the function call f().

For instance, forever Random.bool is an infinite sequence of random bits.

forever f is equivalent to map f (repeat ()).

  • since 4.14
val cycle : 'a t -> 'a t

cycle xs is the infinite sequence that consists of an infinite number of repetitions of the sequence xs.

If xs is an empty sequence, then cycle xs is empty as well.

Consuming (a prefix of) the sequence cycle xs once can cause the sequence xs to be consumed more than once. Therefore, xs must be persistent.

  • since 4.14
val iterate : ('a -> 'a) -> 'a -> 'a t

iterate f x is the infinite sequence whose elements are x, f x, f (f x), and so on.

In other words, it is the orbit of the function f, starting at x.

  • since 4.14

Transforming sequences

The functions in this section are lazy: that is, they return sequences whose elements are computed only when demanded.

val map : ('a -> 'b) -> 'a t -> 'b t

map f xs is the image of the sequence xs through the transformation f.

If xs is the sequence x0; x1; ... then map f xs is the sequence f x0; f x1; ....

val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t

mapi is analogous to map, but applies the function f to an index and an element.

mapi f xs is equivalent to map2 f (ints 0) xs.

  • since 4.14
val filter : ('a -> bool) -> 'a t -> 'a t

filter p xs is the sequence of the elements x of xs that satisfy p x.

In other words, filter p xs is the sequence xs, deprived of the elements x such that p x is false.

val filter_map : ('a -> 'b option) -> 'a t -> 'b t

filter_map f xs is the sequence of the elements y such that f x = Some y, where x ranges over xs.

filter_map f xs is equivalent to map Option.get (filter Option.is_some (map f xs)).

val scan : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t

If xs is a sequence [x0; x1; x2; ...], then scan f a0 xs is a sequence of accumulators [a0; a1; a2; ...] where a1 is f a0 x0, a2 is f a1 x1, and so on.

Thus, scan f a0 xs is conceptually related to fold_left f a0 xs. However, instead of performing an eager iteration and immediately returning the final accumulator, it returns a sequence of accumulators.

For instance, scan (+) 0 transforms a sequence of integers into the sequence of its partial sums.

If xs has length n then scan f a0 xs has length n+1.

  • since 4.14
val take : int -> 'a t -> 'a t

take n xs is the sequence of the first n elements of xs.

If xs has fewer than n elements, then take n xs is equivalent to xs.

n must be nonnegative.

  • since 4.14
val drop : int -> 'a t -> 'a t

drop n xs is the sequence xs, deprived of its first n elements.

If xs has fewer than n elements, then drop n xs is empty.

n must be nonnegative.

drop is lazy: the first n+1 elements of the sequence xs are demanded only when the first element of drop n xs is demanded. For this reason, drop 1 xs is not equivalent to tail xs, which queries xs immediately.

  • since 4.14
val take_while : ('a -> bool) -> 'a t -> 'a t

take_while p xs is the longest prefix of the sequence xs where every element x satisfies p x.

  • since 4.14
val drop_while : ('a -> bool) -> 'a t -> 'a t

drop_while p xs is the sequence xs, deprived of the prefix take_while p xs.

  • since 4.14
val group : ('a -> 'a -> bool) -> 'a t -> 'a t t

Provided the function eq defines an equality on elements, group eq xs is the sequence of the maximal runs of adjacent duplicate elements of the sequence xs.

Every element of group eq xs is a nonempty sequence of equal elements.

The concatenation concat (group eq xs) is equal to xs.

Consuming group eq xs, and consuming the sequences that it contains, can cause xs to be consumed more than once. Therefore, xs must be persistent.

  • since 4.14
val memoize : 'a t -> 'a t

The sequence memoize xs has the same elements as the sequence xs.

Regardless of whether xs is ephemeral or persistent, memoize xs is persistent: even if it is queried several times, xs is queried at most once.

The construction of the sequence memoize xs internally relies on suspensions provided by the module Lazy. These suspensions are not thread-safe. Therefore, the sequence memoize xs must not be queried by multiple threads concurrently.

  • since 4.14
exception Forced_twice

This exception is raised when a sequence returned by once (or a suffix of it) is queried more than once.

  • since 4.14
val once : 'a t -> 'a t

The sequence once xs has the same elements as the sequence xs.

Regardless of whether xs is ephemeral or persistent, once xs is an ephemeral sequence: it can be queried at most once. If it (or a suffix of it) is queried more than once, then the exception Forced_twice is raised. This can be useful, while debugging or testing, to ensure that a sequence is consumed at most once.

  • raises Forced_twice

    if once xs, or a suffix of it, is queried more than once.

  • since 4.14
val transpose : 'a t t -> 'a t t

If xss is a matrix (a sequence of rows), then transpose xss is the sequence of the columns of the matrix xss.

The rows of the matrix xss are not required to have the same length.

The matrix xss is not required to be finite (in either direction).

The matrix xss must be persistent.

  • since 4.14

Combining sequences

val append : 'a t -> 'a t -> 'a t

append xs ys is the concatenation of the sequences xs and ys.

Its elements are the elements of xs, followed by the elements of ys.

  • since 4.11
val concat : 'a t t -> 'a t

If xss is a sequence of sequences, then concat xss is its concatenation.

If xss is the sequence xs0; xs1; ... then concat xss is the sequence xs0 @ xs1 @ ....

  • since 4.13
val flat_map : ('a -> 'b t) -> 'a t -> 'b t

flat_map f xs is equivalent to concat (map f xs).

val concat_map : ('a -> 'b t) -> 'a t -> 'b t

concat_map f xs is equivalent to concat (map f xs).

concat_map is an alias for flat_map.

  • since 4.13
val zip : 'a t -> 'b t -> ('a * 'b) t

zip xs ys is the sequence of pairs (x, y) drawn synchronously from the sequences xs and ys.

If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

zip xs ys is equivalent to map2 (fun a b -> (a, b)) xs ys.

  • since 4.14
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

map2 f xs ys is the sequence of the elements f x y, where the pairs (x, y) are drawn synchronously from the sequences xs and ys.

If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

map2 f xs ys is equivalent to map (fun (x, y) -> f x y) (zip xs ys).

  • since 4.14
val interleave : 'a t -> 'a t -> 'a t

interleave xs ys is the sequence that begins with the first element of xs, continues with the first element of ys, and so on.

When one of the sequences xs and ys is exhausted, interleave xs ys continues with the rest of the other sequence.

  • since 4.14
val sorted_merge : ('a -> 'a -> int) -> 'a t -> 'a t -> 'a t

If the sequences xs and ys are sorted according to the total preorder cmp, then sorted_merge cmp xs ys is the sorted sequence obtained by merging the sequences xs and ys.

For more details on comparison functions, see Array.sort.

  • since 4.14
val product : 'a t -> 'b t -> ('a * 'b) t

product xs ys is the Cartesian product of the sequences xs and ys.

For every element x of xs and for every element y of ys, the pair (x, y) appears once as an element of product xs ys.

The order in which the pairs appear is unspecified.

The sequences xs and ys are not required to be finite.

The sequences xs and ys must be persistent.

  • since 4.14
val map_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

The sequence map_product f xs ys is the image through f of the Cartesian product of the sequences xs and ys.

For every element x of xs and for every element y of ys, the element f x y appears once as an element of map_product f xs ys.

The order in which these elements appear is unspecified.

The sequences xs and ys are not required to be finite.

The sequences xs and ys must be persistent.

map_product f xs ys is equivalent to map (fun (x, y) -> f x y) (product xs ys).

  • since 4.14

Splitting a sequence into two sequences

val unzip : ('a * 'b) t -> 'a t * 'b t

unzip transforms a sequence of pairs into a pair of sequences.

unzip xs is equivalent to (map fst xs, map snd xs).

Querying either of the sequences returned by unzip xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use unzip (memoize xs).

  • since 4.14
val split : ('a * 'b) t -> 'a t * 'b t

split is an alias for unzip.

  • since 4.14
val partition_map : ('a -> ('b, 'c) Either.t) -> 'a t -> 'b t * 'c t

partition_map f xs returns a pair of sequences (ys, zs), where:

  • ys is the sequence of the elements y such that f x = Left y, where x ranges over xs;
  • zs is the sequence of the elements z such that f x = Right z, where x ranges over xs.

partition_map f xs is equivalent to a pair of filter_map Either.find_left (map f xs) and filter_map Either.find_right (map f xs).

Querying either of the sequences returned by partition_map f xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use partition_map f (memoize xs).

  • since 4.14
val partition : ('a -> bool) -> 'a t -> 'a t * 'a t

partition p xs returns a pair of the subsequence of the elements of xs that satisfy p and the subsequence of the elements of xs that do not satisfy p.

partition p xs is equivalent to filter p xs, filter (fun x -> not (p x)) xs.

Consuming both of the sequences returned by partition p xs causes xs to be consumed twice and causes the function f to be applied twice to each element of the list. Therefore, f should be pure and cheap. Furthermore, xs should be persistent and cheap. If that is not the case, use partition p (memoize xs).

  • since 4.14

Converting between sequences and dispensers

A dispenser is a representation of a sequence as a function of type unit -> 'a option. Every time this function is invoked, it returns the next element of the sequence. When there are no more elements, it returns None. A dispenser has mutable internal state, therefore is ephemeral: the sequence that it represents can be consumed at most once.

val of_dispenser : (unit -> 'a option) -> 'a t

of_dispenser it is the sequence of the elements produced by the dispenser it. It is an ephemeral sequence: it can be consumed at most once. If a persistent sequence is needed, use memoize (of_dispenser it).

  • since 4.14
val to_dispenser : 'a t -> unit -> 'a option

to_dispenser xs is a fresh dispenser on the sequence xs.

This dispenser has mutable internal state, which is not protected by a lock; so, it must not be used by several threads concurrently.

  • since 4.14

Sequences of integers

val ints : int -> int t

ints i is the infinite sequence of the integers beginning at i and counting up.

  • since 4.14
diff --git a/findlib-1/melange/Stdlib/Set/Make/argument-1-Ord/index.html b/findlib-1/melange/Stdlib/Set/Make/argument-1-Ord/index.html new file mode 100644 index 000000000..4705515b3 --- /dev/null +++ b/findlib-1/melange/Stdlib/Set/Make/argument-1-Ord/index.html @@ -0,0 +1,2 @@ + +Ord (docs.findlib-1.melange.Stdlib.Set.Make.Ord)

Parameter Make.Ord

type t

The type of the set elements.

val compare : t -> t -> int

A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/findlib-1/melange/Stdlib/Set/Make/index.html b/findlib-1/melange/Stdlib/Set/Make/index.html new file mode 100644 index 000000000..1a69df00e --- /dev/null +++ b/findlib-1/melange/Stdlib/Set/Make/index.html @@ -0,0 +1,3 @@ + +Make (docs.findlib-1.melange.Stdlib.Set.Make)

Module Set.Make

Functor building an implementation of the set structure given a totally ordered type.

Parameters

module Ord : OrderedType

Signature

Sets

type elt = Ord.t

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/findlib-1/melange/Stdlib/Set/index.html b/findlib-1/melange/Stdlib/Set/index.html new file mode 100644 index 000000000..d63c85479 --- /dev/null +++ b/findlib-1/melange/Stdlib/Set/index.html @@ -0,0 +1,13 @@ + +Set (docs.findlib-1.melange.Stdlib.Set)

Module Stdlib.Set

Sets over ordered types.

This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance.

The Make functor constructs implementations for any type, given a compare function. For instance:

module IntPairs =
+  struct
+    type t = int * int
+    let compare (x0,y0) (x1,y1) =
+      match Stdlib.compare x0 x1 with
+          0 -> Stdlib.compare y0 y1
+        | c -> c
+  end
+
+module PairsSet = Set.Make(IntPairs)
+
+let m = PairsSet.(empty |> add (2,3) |> add (5,7) |> add (11,13))

This creates a new module PairsSet, with a new type PairsSet.t of sets of int * int.

module type OrderedType = sig ... end

Input signature of the functor Make.

module type S = sig ... end

Output signature of the functor Make.

module Make (Ord : OrderedType) : S with type elt = Ord.t

Functor building an implementation of the set structure given a totally ordered type.

diff --git a/findlib-1/melange/Stdlib/Set/module-type-OrderedType/index.html b/findlib-1/melange/Stdlib/Set/module-type-OrderedType/index.html new file mode 100644 index 000000000..dbcc9cc8c --- /dev/null +++ b/findlib-1/melange/Stdlib/Set/module-type-OrderedType/index.html @@ -0,0 +1,2 @@ + +OrderedType (docs.findlib-1.melange.Stdlib.Set.OrderedType)

Module type Set.OrderedType

Input signature of the functor Make.

type t

The type of the set elements.

val compare : t -> t -> int

A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/findlib-1/melange/Stdlib/Set/module-type-S/index.html b/findlib-1/melange/Stdlib/Set/module-type-S/index.html new file mode 100644 index 000000000..9983142db --- /dev/null +++ b/findlib-1/melange/Stdlib/Set/module-type-S/index.html @@ -0,0 +1,3 @@ + +S (docs.findlib-1.melange.Stdlib.Set.S)

Module type Set.S

Output signature of the functor Make.

Sets

type elt

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/findlib-1/melange/Stdlib/Stack/index.html b/findlib-1/melange/Stdlib/Stack/index.html new file mode 100644 index 000000000..a5d74f91d --- /dev/null +++ b/findlib-1/melange/Stdlib/Stack/index.html @@ -0,0 +1,2 @@ + +Stack (docs.findlib-1.melange.Stdlib.Stack)

Module Stdlib.Stack

Last-in first-out stacks.

This module implements stacks (LIFOs), with in-place modification.

Unsynchronized accesses

Unsynchronized accesses to a stack may lead to an invalid queue state. Thus, concurrent accesses to stacks must be synchronized (for instance with a Mutex.t).

type !'a t

The type of stacks containing elements of type 'a.

exception Empty

Raised when Stack.pop or Stack.top is applied to an empty stack.

val create : unit -> 'a t

Return a new stack, initially empty.

val push : 'a -> 'a t -> unit

push x s adds the element x at the top of stack s.

val pop : 'a t -> 'a

pop s removes and returns the topmost element in stack s, or raises Empty if the stack is empty.

val pop_opt : 'a t -> 'a option

pop_opt s removes and returns the topmost element in stack s, or returns None if the stack is empty.

  • since 4.08
val drop : 'a t -> unit

drop s removes the topmost element in stack s, or raises Empty if the stack is empty.

  • since 5.1
val top : 'a t -> 'a

top s returns the topmost element in stack s, or raises Empty if the stack is empty.

val top_opt : 'a t -> 'a option

top_opt s returns the topmost element in stack s, or None if the stack is empty.

  • since 4.08
val clear : 'a t -> unit

Discard all elements from a stack.

val copy : 'a t -> 'a t

Return a copy of the given stack.

val is_empty : 'a t -> bool

Return true if the given stack is empty, false otherwise.

val length : 'a t -> int

Return the number of elements in a stack. Time complexity O(1)

val iter : ('a -> unit) -> 'a t -> unit

iter f s applies f in turn to all elements of s, from the element at the top of the stack to the element at the bottom of the stack. The stack itself is unchanged.

val fold : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

fold f accu s is (f (... (f (f accu x1) x2) ...) xn) where x1 is the top of the stack, x2 the second element, and xn the bottom element. The stack is unchanged.

  • since 4.03

Stacks and Sequences

val to_seq : 'a t -> 'a Seq.t

Iterate on the stack, top to bottom. It is safe to modify the stack during iteration.

  • since 4.07
val add_seq : 'a t -> 'a Seq.t -> unit

Add the elements from the sequence on the top of the stack.

  • since 4.07
val of_seq : 'a Seq.t -> 'a t

Create a stack from the sequence.

  • since 4.07
diff --git a/findlib-1/melange/Stdlib/StdLabels/index.html b/findlib-1/melange/Stdlib/StdLabels/index.html new file mode 100644 index 000000000..8fe08d99a --- /dev/null +++ b/findlib-1/melange/Stdlib/StdLabels/index.html @@ -0,0 +1,6 @@ + +StdLabels (docs.findlib-1.melange.Stdlib.StdLabels)

Module Stdlib.StdLabels

Standard labeled libraries.

This meta-module provides versions of the Array, Bytes, List and String modules where function arguments are systematically labeled. It is intended to be opened at the top of source files, as shown below.

open StdLabels
+
+let to_upper = String.map ~f:Char.uppercase_ascii
+let seq len = List.init ~f:(fun i -> i) ~len
+let everything = Array.create_matrix ~dimx:42 ~dimy:42 42
module Array = ArrayLabels
module Bytes = BytesLabels
module List = ListLabels
module String = StringLabels
diff --git a/findlib-1/melange/Stdlib/String/index.html b/findlib-1/melange/Stdlib/String/index.html new file mode 100644 index 000000000..9fc56188d --- /dev/null +++ b/findlib-1/melange/Stdlib/String/index.html @@ -0,0 +1,6 @@ + +String (docs.findlib-1.melange.Stdlib.String)

Module Stdlib.String

Strings.

A string s of length n is an indexable and immutable sequence of n bytes. For historical reasons these bytes are referred to as characters.

The semantics of string functions is defined in terms of indices and positions. These are depicted and described as follows.

positions  0   1   2   3   4    n-1    n
+           +---+---+---+---+     +-----+
+  indices  | 0 | 1 | 2 | 3 | ... | n-1 |
+           +---+---+---+---+     +-----+

Two integers start and len are said to define a valid substring of s if len >= 0 and start, start+len are positions of s.

Unicode text. Strings being arbitrary sequences of bytes, they can hold any kind of textual encoding. However the recommended encoding for storing Unicode text in OCaml strings is UTF-8. This is the encoding used by Unicode escapes in string literals. For example the string "\u{1F42B}" is the UTF-8 encoding of the Unicode character U+1F42B.

Past mutability. Before OCaml 4.02, strings used to be modifiable in place like Bytes.t mutable sequences of bytes. OCaml 4 had various compiler flags and configuration options to support the transition period from mutable to immutable strings. Those options are no longer available, and strings are now always immutable.

The labeled version of this module can be used as described in the StdLabels module.

Strings

type t = string

The type for strings.

val make : int -> char -> string

make n c is a string of length n with each index holding the character c.

val init : int -> (int -> char) -> string

init n f is a string of length n with index i holding the character f i (called in increasing index order).

  • since 4.02
val empty : string

The empty string.

  • since 4.13
val length : string -> int

length s is the length (number of bytes/characters) of s.

val get : string -> int -> char

get s i is the character at index i in s. This is the same as writing s.[i].

val of_bytes : bytes -> string

Return a new string that contains the same bytes as the given byte sequence.

  • since 4.13
val to_bytes : string -> bytes

Return a new byte sequence that contains the same bytes as the given string.

  • since 4.13
val blit : string -> int -> bytes -> int -> int -> unit

Same as Bytes.blit_string which should be preferred.

Concatenating

Note. The Stdlib.(^) binary operator concatenates two strings.

val concat : string -> string list -> string

concat sep ss concatenates the list of strings ss, inserting the separator string sep between each.

val cat : string -> string -> string

cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

  • since 4.13

Predicates and comparisons

val equal : t -> t -> bool

equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

  • since 4.03 (4.05 in StringLabels)
val compare : t -> t -> int

compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

val starts_with : prefix:string -> string -> bool

starts_with ~prefix s is true if and only if s starts with prefix.

  • since 4.13
val ends_with : suffix:string -> string -> bool

ends_with ~suffix s is true if and only if s ends with suffix.

  • since 4.13
val contains_from : string -> int -> char -> bool

contains_from s start c is true if and only if c appears in s after position start.

val rcontains_from : string -> int -> char -> bool

rcontains_from s stop c is true if and only if c appears in s before position stop+1.

val contains : string -> char -> bool

contains s c is String.contains_from s 0 c.

Extracting substrings

val sub : string -> int -> int -> string

sub s pos len is a string of length len, containing the substring of s that starts at position pos and has length len.

val split_on_char : char -> string -> string list

split_on_char sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

The function's result is specified by the following invariants:

  • The list is not empty.
  • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) + (split_on_char sep s) = s).
  • No string in the result contains the sep character.
  • since 4.04 (4.05 in StringLabels)

Transforming

val map : (char -> char) -> string -> string

map f s is the string resulting from applying f to all the characters of s in increasing order.

  • since 4.00
val mapi : (int -> char -> char) -> string -> string

mapi f s is like map but the index of the character is also passed to f.

  • since 4.02
val fold_left : ('acc -> char -> 'acc) -> 'acc -> string -> 'acc

fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

  • since 4.13
val fold_right : (char -> 'acc -> 'acc) -> string -> 'acc -> 'acc

fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

  • since 4.13
val for_all : (char -> bool) -> string -> bool

for_all p s checks if all characters in s satisfy the predicate p.

  • since 4.13
val exists : (char -> bool) -> string -> bool

exists p s checks if at least one character of s satisfies the predicate p.

  • since 4.13
val trim : string -> string

trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

  • since 4.00
val escaped : string -> string

escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

val uppercase_ascii : string -> string

uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

  • since 4.03 (4.05 in StringLabels)
val lowercase_ascii : string -> string

lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

  • since 4.03 (4.05 in StringLabels)
val capitalize_ascii : string -> string

capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

  • since 4.03 (4.05 in StringLabels)
val uncapitalize_ascii : string -> string

uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

  • since 4.03 (4.05 in StringLabels)

Traversing

val iter : (char -> unit) -> string -> unit

iter f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

val iteri : (int -> char -> unit) -> string -> unit

iteri is like iter, but the function is also given the corresponding character index.

  • since 4.00

Searching

val index_from : string -> int -> char -> int

index_from s i c is the index of the first occurrence of c in s after position i.

  • raises Not_found

    if c does not occur in s after position i.

val index_from_opt : string -> int -> char -> int option

index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

  • since 4.05
val rindex_from : string -> int -> char -> int

rindex_from s i c is the index of the last occurrence of c in s before position i+1.

  • raises Not_found

    if c does not occur in s before position i+1.

val rindex_from_opt : string -> int -> char -> int option

rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

  • since 4.05
val index : string -> char -> int

index s c is String.index_from s 0 c.

val index_opt : string -> char -> int option

index_opt s c is String.index_from_opt s 0 c.

  • since 4.05
val rindex : string -> char -> int

rindex s c is String.rindex_from s (length s - 1) c.

val rindex_opt : string -> char -> int option

rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

  • since 4.05

Strings and Sequences

val to_seq : t -> char Seq.t

to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

  • since 4.07
val to_seqi : t -> (int * char) Seq.t

to_seqi s is like to_seq but also tuples the corresponding index.

  • since 4.07
val of_seq : char Seq.t -> t

of_seq s is a string made of the sequence's characters.

  • since 4.07

UTF decoding and validations

UTF-8

val get_utf_8_uchar : t -> int -> Uchar.utf_decode

get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

val is_valid_utf_8 : t -> bool

is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

UTF-16BE

val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

val is_valid_utf_16be : t -> bool

is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

UTF-16LE

val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

val is_valid_utf_16le : t -> bool

is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

Binary decoding of integers

The functions in this section binary decode integers from strings.

All following functions raise Invalid_argument if the characters needed at index i to decode the integer are not available.

Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are sign-extended (or zero-extended) for functions which decode 8-bit or 16-bit integers and represented them with int values.

val get_uint8 : string -> int -> int

get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

  • since 4.13
val get_int8 : string -> int -> int

get_int8 b i is b's signed 8-bit integer starting at character index i.

  • since 4.13
val get_uint16_ne : string -> int -> int

get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_uint16_be : string -> int -> int

get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_uint16_le : string -> int -> int

get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_int16_ne : string -> int -> int

get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int16_be : string -> int -> int

get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int16_le : string -> int -> int

get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int32_ne : string -> int -> int32

get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

  • since 4.13
val hash : t -> int

An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.0
val seeded_hash : int -> t -> int

A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.0
val get_int32_be : string -> int -> int32

get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

  • since 4.13
val get_int32_le : string -> int -> int32

get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

  • since 4.13
val get_int64_ne : string -> int -> int64

get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

  • since 4.13
val get_int64_be : string -> int -> int64

get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

  • since 4.13
val get_int64_le : string -> int -> int64

get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

  • since 4.13
diff --git a/findlib-1/melange/Stdlib/StringLabels/index.html b/findlib-1/melange/Stdlib/StringLabels/index.html new file mode 100644 index 000000000..f3afb1beb --- /dev/null +++ b/findlib-1/melange/Stdlib/StringLabels/index.html @@ -0,0 +1,12 @@ + +StringLabels (docs.findlib-1.melange.Stdlib.StringLabels)

Module Stdlib.StringLabels

Strings.

A string s of length n is an indexable and immutable sequence of n bytes. For historical reasons these bytes are referred to as characters.

The semantics of string functions is defined in terms of indices and positions. These are depicted and described as follows.

positions  0   1   2   3   4    n-1    n
+           +---+---+---+---+     +-----+
+  indices  | 0 | 1 | 2 | 3 | ... | n-1 |
+           +---+---+---+---+     +-----+

Two integers start and len are said to define a valid substring of s if len >= 0 and start, start+len are positions of s.

Unicode text. Strings being arbitrary sequences of bytes, they can hold any kind of textual encoding. However the recommended encoding for storing Unicode text in OCaml strings is UTF-8. This is the encoding used by Unicode escapes in string literals. For example the string "\u{1F42B}" is the UTF-8 encoding of the Unicode character U+1F42B.

Past mutability. Before OCaml 4.02, strings used to be modifiable in place like Bytes.t mutable sequences of bytes. OCaml 4 had various compiler flags and configuration options to support the transition period from mutable to immutable strings. Those options are no longer available, and strings are now always immutable.

The labeled version of this module can be used as described in the StdLabels module.

Strings

type t = string

The type for strings.

val make : int -> char -> string

make n c is a string of length n with each index holding the character c.

val init : int -> f:(int -> char) -> string

init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

  • since 4.02
val empty : string

The empty string.

  • since 4.13
val length : string -> int

length s is the length (number of bytes/characters) of s.

val get : string -> int -> char

get s i is the character at index i in s. This is the same as writing s.[i].

val of_bytes : bytes -> string

Return a new string that contains the same bytes as the given byte sequence.

  • since 4.13
val to_bytes : string -> bytes

Return a new byte sequence that contains the same bytes as the given string.

  • since 4.13
val blit : + src:string -> + src_pos:int -> + dst:bytes -> + dst_pos:int -> + len:int -> + unit

Same as Bytes.blit_string which should be preferred.

Concatenating

Note. The Stdlib.(^) binary operator concatenates two strings.

val concat : sep:string -> string list -> string

concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

val cat : string -> string -> string

cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

  • since 4.13

Predicates and comparisons

val equal : t -> t -> bool

equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

  • since 4.05
val compare : t -> t -> int

compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

val starts_with : prefix:string -> string -> bool

starts_with ~prefix s is true if and only if s starts with prefix.

  • since 4.13
val ends_with : suffix:string -> string -> bool

ends_with ~suffix s is true if and only if s ends with suffix.

  • since 4.13
val contains_from : string -> int -> char -> bool

contains_from s start c is true if and only if c appears in s after position start.

val rcontains_from : string -> int -> char -> bool

rcontains_from s stop c is true if and only if c appears in s before position stop+1.

val contains : string -> char -> bool

contains s c is String.contains_from s 0 c.

Extracting substrings

val sub : string -> pos:int -> len:int -> string

sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

val split_on_char : sep:char -> string -> string list

split_on_char ~sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

The function's result is specified by the following invariants:

  • The list is not empty.
  • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) + (split_on_char sep s) = s).
  • No string in the result contains the sep character.
  • since 4.05

Transforming

val map : f:(char -> char) -> string -> string

map f s is the string resulting from applying f to all the characters of s in increasing order.

  • since 4.00
val mapi : f:(int -> char -> char) -> string -> string

mapi ~f s is like map but the index of the character is also passed to f.

  • since 4.02
val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> string -> 'acc

fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

  • since 4.13
val fold_right : f:(char -> 'acc -> 'acc) -> string -> init:'acc -> 'acc

fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

  • since 4.13
val for_all : f:(char -> bool) -> string -> bool

for_all p s checks if all characters in s satisfy the predicate p.

  • since 4.13
val exists : f:(char -> bool) -> string -> bool

exists p s checks if at least one character of s satisfies the predicate p.

  • since 4.13
val trim : string -> string

trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

  • since 4.00
val escaped : string -> string

escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

val uppercase_ascii : string -> string

uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

  • since 4.05
val lowercase_ascii : string -> string

lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

  • since 4.05
val capitalize_ascii : string -> string

capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

  • since 4.05
val uncapitalize_ascii : string -> string

uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

  • since 4.05

Traversing

val iter : f:(char -> unit) -> string -> unit

iter ~f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

val iteri : f:(int -> char -> unit) -> string -> unit

iteri is like iter, but the function is also given the corresponding character index.

  • since 4.00

Searching

val index_from : string -> int -> char -> int

index_from s i c is the index of the first occurrence of c in s after position i.

  • raises Not_found

    if c does not occur in s after position i.

val index_from_opt : string -> int -> char -> int option

index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

  • since 4.05
val rindex_from : string -> int -> char -> int

rindex_from s i c is the index of the last occurrence of c in s before position i+1.

  • raises Not_found

    if c does not occur in s before position i+1.

val rindex_from_opt : string -> int -> char -> int option

rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

  • since 4.05
val index : string -> char -> int

index s c is String.index_from s 0 c.

val index_opt : string -> char -> int option

index_opt s c is String.index_from_opt s 0 c.

  • since 4.05
val rindex : string -> char -> int

rindex s c is String.rindex_from s (length s - 1) c.

val rindex_opt : string -> char -> int option

rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

  • since 4.05

Strings and Sequences

val to_seq : t -> char Seq.t

to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

  • since 4.07
val to_seqi : t -> (int * char) Seq.t

to_seqi s is like to_seq but also tuples the corresponding index.

  • since 4.07
val of_seq : char Seq.t -> t

of_seq s is a string made of the sequence's characters.

  • since 4.07

UTF decoding and validations

UTF-8

val get_utf_8_uchar : t -> int -> Uchar.utf_decode

get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

val is_valid_utf_8 : t -> bool

is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

UTF-16BE

val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

val is_valid_utf_16be : t -> bool

is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

UTF-16LE

val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

val is_valid_utf_16le : t -> bool

is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

Binary decoding of integers

The functions in this section binary decode integers from strings.

All following functions raise Invalid_argument if the characters needed at index i to decode the integer are not available.

Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are sign-extended (or zero-extended) for functions which decode 8-bit or 16-bit integers and represented them with int values.

val get_uint8 : string -> int -> int

get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

  • since 4.13
val get_int8 : string -> int -> int

get_int8 b i is b's signed 8-bit integer starting at character index i.

  • since 4.13
val get_uint16_ne : string -> int -> int

get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_uint16_be : string -> int -> int

get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_uint16_le : string -> int -> int

get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_int16_ne : string -> int -> int

get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int16_be : string -> int -> int

get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int16_le : string -> int -> int

get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int32_ne : string -> int -> int32

get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

  • since 4.13
val hash : t -> int

An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.0
val seeded_hash : int -> t -> int

A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.0
val get_int32_be : string -> int -> int32

get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

  • since 4.13
val get_int32_le : string -> int -> int32

get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

  • since 4.13
val get_int64_ne : string -> int -> int64

get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

  • since 4.13
val get_int64_be : string -> int -> int64

get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

  • since 4.13
val get_int64_le : string -> int -> int64

get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

  • since 4.13
diff --git a/findlib-1/melange/Stdlib/Sys/Immediate64/Make/argument-1-Immediate/index.html b/findlib-1/melange/Stdlib/Sys/Immediate64/Make/argument-1-Immediate/index.html new file mode 100644 index 000000000..d082139d4 --- /dev/null +++ b/findlib-1/melange/Stdlib/Sys/Immediate64/Make/argument-1-Immediate/index.html @@ -0,0 +1,2 @@ + +Immediate (docs.findlib-1.melange.Stdlib.Sys.Immediate64.Make.Immediate)

Parameter Make.Immediate

type t
diff --git a/findlib-1/melange/Stdlib/Sys/Immediate64/Make/argument-2-Non_immediate/index.html b/findlib-1/melange/Stdlib/Sys/Immediate64/Make/argument-2-Non_immediate/index.html new file mode 100644 index 000000000..2c5474236 --- /dev/null +++ b/findlib-1/melange/Stdlib/Sys/Immediate64/Make/argument-2-Non_immediate/index.html @@ -0,0 +1,2 @@ + +Non_immediate (docs.findlib-1.melange.Stdlib.Sys.Immediate64.Make.Non_immediate)

Parameter Make.Non_immediate

type t
diff --git a/findlib-1/melange/Stdlib/Sys/Immediate64/Make/index.html b/findlib-1/melange/Stdlib/Sys/Immediate64/Make/index.html new file mode 100644 index 000000000..8afe53236 --- /dev/null +++ b/findlib-1/melange/Stdlib/Sys/Immediate64/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.findlib-1.melange.Stdlib.Sys.Immediate64.Make)

Module Immediate64.Make

Parameters

Signature

type t
type 'a repr =
  1. | Immediate : Immediate.t repr
  2. | Non_immediate : Non_immediate.t repr
val repr : t repr
diff --git a/findlib-1/melange/Stdlib/Sys/Immediate64/index.html b/findlib-1/melange/Stdlib/Sys/Immediate64/index.html new file mode 100644 index 000000000..f6a5beb20 --- /dev/null +++ b/findlib-1/melange/Stdlib/Sys/Immediate64/index.html @@ -0,0 +1,5 @@ + +Immediate64 (docs.findlib-1.melange.Stdlib.Sys.Immediate64)

Module Sys.Immediate64

This module allows to define a type t with the immediate64 attribute. This attribute means that the type is immediate on 64 bit architectures. On other architectures, it might or might not be immediate.

module type Non_immediate = sig ... end
module type Immediate = sig ... end
module Make + (Immediate : Immediate) + (Non_immediate : Non_immediate) : + sig ... end
diff --git a/findlib-1/melange/Stdlib/Sys/Immediate64/module-type-Immediate/index.html b/findlib-1/melange/Stdlib/Sys/Immediate64/module-type-Immediate/index.html new file mode 100644 index 000000000..9dafc41ec --- /dev/null +++ b/findlib-1/melange/Stdlib/Sys/Immediate64/module-type-Immediate/index.html @@ -0,0 +1,2 @@ + +Immediate (docs.findlib-1.melange.Stdlib.Sys.Immediate64.Immediate)

Module type Immediate64.Immediate

type t
diff --git a/findlib-1/melange/Stdlib/Sys/Immediate64/module-type-Non_immediate/index.html b/findlib-1/melange/Stdlib/Sys/Immediate64/module-type-Non_immediate/index.html new file mode 100644 index 000000000..6131a2e2d --- /dev/null +++ b/findlib-1/melange/Stdlib/Sys/Immediate64/module-type-Non_immediate/index.html @@ -0,0 +1,2 @@ + +Non_immediate (docs.findlib-1.melange.Stdlib.Sys.Immediate64.Non_immediate)

Module type Immediate64.Non_immediate

type t
diff --git a/findlib-1/melange/Stdlib/Sys/index.html b/findlib-1/melange/Stdlib/Sys/index.html new file mode 100644 index 000000000..cf62f9e89 --- /dev/null +++ b/findlib-1/melange/Stdlib/Sys/index.html @@ -0,0 +1,4 @@ + +Sys (docs.findlib-1.melange.Stdlib.Sys)

Module Stdlib.Sys

System interface.

Every function in this module raises Sys_error with an informative message when the underlying system call signal an error.

val argv : string array

The command line arguments given to the process. The first element is the command name used to invoke the program. The following elements are the command-line arguments given to the program.

val executable_name : string

The name of the file containing the executable currently running. This name may be absolute or relative to the current directory, depending on the platform and whether the program was compiled to bytecode or a native executable.

val file_exists : string -> bool

Test if a file with the given name exists.

val is_directory : string -> bool

Returns true if the given name refers to a directory, false if it refers to another kind of file.

  • raises Sys_error

    if no file exists with the given name.

  • since 3.10
val is_regular_file : string -> bool

Returns true if the given name refers to a regular file, false if it refers to another kind of file.

  • raises Sys_error

    if no file exists with the given name.

  • since 5.1
val remove : string -> unit

Remove the given file name from the file system.

val rename : string -> string -> unit

Rename a file or directory. rename oldpath newpath renames the file or directory called oldpath, giving it newpath as its new name, moving it between (parent) directories if needed. If a file named newpath already exists, its contents will be replaced with those of oldpath. Depending on the operating system, the metadata (permissions, owner, etc) of newpath can either be preserved or be replaced by those of oldpath.

  • since 4.06 concerning the "replace existing file" behavior
val getenv : string -> string

Return the value associated to a variable in the process environment.

val getenv_opt : string -> string option

Return the value associated to a variable in the process environment or None if the variable is unbound.

  • since 4.05
val command : string -> int

Execute the given shell command and return its exit code.

The argument of Sys.command is generally the name of a command followed by zero, one or several arguments, separated by whitespace. The given argument is interpreted by a shell: either the Windows shell cmd.exe for the Win32 ports of OCaml, or the POSIX shell sh for other ports. It can contain shell builtin commands such as echo, and also special characters such as file redirections > and <, which will be honored by the shell.

Conversely, whitespace or special shell characters occurring in command names or in their arguments must be quoted or escaped so that the shell does not interpret them. The quoting rules vary between the POSIX shell and the Windows shell. The Filename.quote_command performs the appropriate quoting given a command name, a list of arguments, and optional file redirections.

val time : unit -> float

Return the processor time, in seconds, used by the program since the beginning of execution.

val chdir : string -> unit

Change the current working directory of the process.

val mkdir : string -> int -> unit

Create a directory with the given permissions.

  • since 4.12
val rmdir : string -> unit

Remove an empty directory.

  • since 4.12
val getcwd : unit -> string

Return the current working directory of the process.

val readdir : string -> string array

Return the names of all files present in the given directory. Names denoting the current directory and the parent directory ("." and ".." in Unix) are not returned. Each string in the result is a file name rather than a complete path. There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order.

val interactive : bool ref

This reference is initially set to false in standalone programs and to true if the code is being executed under the interactive toplevel system ocaml.

  • alert unsynchronized_access The interactive status is a mutable global state.
val os_type : string

Operating system currently executing the OCaml program. One of

  • "Unix" (for all Unix versions, including Linux and Mac OS X),
  • "Win32" (for MS-Windows, OCaml compiled with MSVC++ or MinGW-w64),
  • "Cygwin" (for MS-Windows, OCaml compiled with Cygwin).
type backend_type =
  1. | Native
  2. | Bytecode
  3. | Other of string

Currently, the official distribution only supports Native and Bytecode, but it can be other backends with alternative compilers, for example, javascript.

  • since 4.04
val backend_type : backend_type

Backend type currently executing the OCaml program.

  • since 4.04
val unix : bool

True if Sys.os_type = "Unix".

  • since 4.01
val win32 : bool

True if Sys.os_type = "Win32".

  • since 4.01
val cygwin : bool

True if Sys.os_type = "Cygwin".

  • since 4.01
val word_size : int

Size of one word on the machine currently executing the OCaml program, in bits: 32 or 64.

val int_size : int

Size of int, in bits. It is 31 (resp. 63) when using OCaml on a 32-bit (resp. 64-bit) platform. It may differ for other implementations, e.g. it can be 32 bits when compiling to JavaScript.

  • since 4.03
val big_endian : bool

Whether the machine currently executing the Caml program is big-endian.

  • since 4.00
val max_string_length : int

Maximum length of strings and byte sequences.

val max_array_length : int

Maximum length of a normal array (i.e. any array whose elements are not of type float). The maximum length of a float array is max_floatarray_length if OCaml was configured with --enable-flat-float-array and max_array_length if configured with --disable-flat-float-array.

val max_floatarray_length : int

Maximum length of a floatarray. This is also the maximum length of a float array when OCaml is configured with --enable-flat-float-array.

val runtime_variant : unit -> string

Return the name of the runtime variant the program is running on. This is normally the argument given to -runtime-variant at compile time, but for byte-code it can be changed after compilation.

  • since 4.03
val runtime_parameters : unit -> string

Return the value of the runtime parameters, in the same format as the contents of the OCAMLRUNPARAM environment variable.

  • since 4.03

Signal handling

type signal_behavior =
  1. | Signal_default
  2. | Signal_ignore
  3. | Signal_handle of int -> unit

What to do when receiving a signal:

  • Signal_default: take the default behavior (usually: abort the program)
  • Signal_ignore: ignore the signal
  • Signal_handle f: call function f, giving it the signal number as argument.
val signal : int -> signal_behavior -> signal_behavior

Set the behavior of the system on receipt of a given signal. The first argument is the signal number. Return the behavior previously associated with the signal. If the signal number is invalid (or not available on your system), an Invalid_argument exception is raised.

val set_signal : int -> signal_behavior -> unit

Same as Sys.signal but return value is ignored.

Signal numbers for the standard POSIX signals.

val sigabrt : int

Abnormal termination

val sigalrm : int

Timeout

val sigfpe : int

Arithmetic exception

val sighup : int

Hangup on controlling terminal

val sigill : int

Invalid hardware instruction

val sigint : int

Interactive interrupt (ctrl-C)

val sigkill : int

Termination (cannot be ignored)

val sigpipe : int

Broken pipe

val sigquit : int

Interactive termination

val sigsegv : int

Invalid memory reference

val sigterm : int

Termination

val sigusr1 : int

Application-defined signal 1

val sigusr2 : int

Application-defined signal 2

val sigchld : int

Child process terminated

val sigcont : int

Continue

val sigstop : int

Stop

val sigtstp : int

Interactive stop

val sigttin : int

Terminal read from background process

val sigttou : int

Terminal write from background process

val sigvtalrm : int

Timeout in virtual time

val sigprof : int

Profiling interrupt

val sigbus : int

Bus error

  • since 4.03
val sigpoll : int

Pollable event

  • since 4.03
val sigsys : int

Bad argument to routine

  • since 4.03
val sigtrap : int

Trace/breakpoint trap

  • since 4.03
val sigurg : int

Urgent condition on socket

  • since 4.03
val sigxcpu : int

Timeout in cpu time

  • since 4.03
val sigxfsz : int

File size limit exceeded

  • since 4.03
exception Break

Exception raised on interactive interrupt if Sys.catch_break is on.

val catch_break : bool -> unit

catch_break governs whether interactive interrupt (ctrl-C) terminates the program or raises the Break exception. Call catch_break true to enable raising Break, and catch_break false to let the system terminate the program on user interrupt.

val ocaml_version : string

ocaml_version is the version of OCaml. It is a string of the form "major.minor[.patchlevel][(+|~)additional-info]", where major, minor, and patchlevel are integers, and additional-info is an arbitrary string. The [.patchlevel] part was absent before version 3.08.0 and became mandatory from 3.08.0 onwards. The [(+|~)additional-info] part may be absent.

val development_version : bool

true if this is a development version, false otherwise.

  • since 4.14
type extra_prefix =
  1. | Plus
  2. | Tilde
    (*
    • since 4.14
    *)
type extra_info = extra_prefix * string
  • since 4.14
type ocaml_release_info = {
  1. major : int;
  2. minor : int;
  3. patchlevel : int;
  4. extra : extra_info option;
}
  • since 4.14
val ocaml_release : ocaml_release_info

ocaml_release is the version of OCaml.

  • since 4.14
val enable_runtime_warnings : bool -> unit

Control whether the OCaml runtime system can emit warnings on stderr. Currently, the only supported warning is triggered when a channel created by open_* functions is finalized without being closed. Runtime warnings are disabled by default.

  • since 4.03
  • alert unsynchronized_access The status of runtime warnings is a mutable global state.
val runtime_warnings_enabled : unit -> bool

Return whether runtime warnings are currently enabled.

  • since 4.03
  • alert unsynchronized_access The status of runtime warnings is a mutable global state.

Optimization

val opaque_identity : 'a -> 'a

For the purposes of optimization, opaque_identity behaves like an unknown (and thus possibly side-effecting) function.

At runtime, opaque_identity disappears altogether.

A typical use of this function is to prevent pure computations from being optimized away in benchmarking loops. For example:

for _round = 1 to 100_000 do
+  ignore (Sys.opaque_identity (my_pure_computation ()))
+done
  • since 4.03
module Immediate64 : sig ... end

This module allows to define a type t with the immediate64 attribute. This attribute means that the type is immediate on 64 bit architectures. On other architectures, it might or might not be immediate.

diff --git a/findlib-1/melange/Stdlib/Type/Id/index.html b/findlib-1/melange/Stdlib/Type/Id/index.html new file mode 100644 index 000000000..c2e21db03 --- /dev/null +++ b/findlib-1/melange/Stdlib/Type/Id/index.html @@ -0,0 +1,40 @@ + +Id (docs.findlib-1.melange.Stdlib.Type.Id)

Module Type.Id

Type identifiers.

A type identifier is a value that denotes a type. Given two type identifiers, they can be tested for equality to prove they denote the same type. Note that:

See an example of use.

Type identifiers

type !'a t

The type for identifiers for type 'a.

val make : unit -> 'a t

make () is a new type identifier.

val uid : 'a t -> int

uid id is a runtime unique identifier for id.

val provably_equal : 'a t -> 'b t -> ('a, 'b) eq option

provably_equal i0 i1 is Some Equal if identifier i0 is equal to i1 and None otherwise.

Example

The following shows how type identifiers can be used to implement a simple heterogeneous key-value dictionary. In contrast to Stdlib.Map values whose keys map to a single, homogeneous type of values, this dictionary can associate a different type of value to each key.

(** Heterogeneous dictionaries. *)
+module Dict : sig
+  type t
+  (** The type for dictionaries. *)
+
+  type 'a key
+  (** The type for keys binding values of type ['a]. *)
+
+  val key : unit -> 'a key
+  (** [key ()] is a new dictionary key. *)
+
+  val empty : t
+  (** [empty] is the empty dictionary. *)
+
+  val add : 'a key -> 'a -> t -> t
+  (** [add k v d] is [d] with [k] bound to [v]. *)
+
+  val remove : 'a key -> t -> t
+  (** [remove k d] is [d] with the last binding of [k] removed. *)
+
+  val find : 'a key -> t -> 'a option
+  (** [find k d] is the binding of [k] in [d], if any. *)
+end = struct
+  type 'a key = 'a Type.Id.t
+  type binding = B : 'a key * 'a -> binding
+  type t = (int * binding) list
+
+  let key () = Type.Id.make ()
+  let empty = []
+  let add k v d = (Type.Id.uid k, B (k, v)) :: d
+  let remove k d = List.remove_assoc (Type.Id.uid k) d
+  let find : type a. a key -> t -> a option = fun k d ->
+    match List.assoc_opt (Type.Id.uid k) d with
+    | None -> None
+    | Some (B (k', v)) ->
+        match Type.Id.provably_equal k k' with
+        | Some Type.Equal -> Some v
+        | None -> assert false
+end
diff --git a/findlib-1/melange/Stdlib/Type/index.html b/findlib-1/melange/Stdlib/Type/index.html new file mode 100644 index 000000000..365694bd6 --- /dev/null +++ b/findlib-1/melange/Stdlib/Type/index.html @@ -0,0 +1,2 @@ + +Type (docs.findlib-1.melange.Stdlib.Type)

Module Stdlib.Type

Type introspection.

Type equality witness

type (_, _) eq =
  1. | Equal : ('a, 'a) eq

The purpose of eq is to represent type equalities that may not otherwise be known by the type checker (e.g. because they may depend on dynamic data).

A value of type (a, b) eq represents the fact that types a and b are equal.

If one has a value eq : (a, b) eq that proves types a and b are equal, one can use it to convert a value of type a to a value of type b by pattern matching on Equal:

let cast (type a) (type b) (Equal : (a, b) Type.eq) (a : a) : b = a

At runtime, this function simply returns its second argument unchanged.

Type identifiers

module Id : sig ... end

Type identifiers.

diff --git a/findlib-1/melange/Stdlib/Uchar/index.html b/findlib-1/melange/Stdlib/Uchar/index.html new file mode 100644 index 000000000..b00a41f9e --- /dev/null +++ b/findlib-1/melange/Stdlib/Uchar/index.html @@ -0,0 +1,2 @@ + +Uchar (docs.findlib-1.melange.Stdlib.Uchar)

Module Stdlib.Uchar

Unicode characters.

type t

The type for Unicode characters.

A value of this type represents a Unicode scalar value which is an integer in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF.

val min : t

min is U+0000.

val max : t

max is U+10FFFF.

val bom : t

bom is U+FEFF, the byte order mark (BOM) character.

  • since 4.06
val rep : t

rep is U+FFFD, the replacement character.

  • since 4.06
val succ : t -> t

succ u is the scalar value after u in the set of Unicode scalar values.

val pred : t -> t

pred u is the scalar value before u in the set of Unicode scalar values.

val is_valid : int -> bool

is_valid n is true if and only if n is a Unicode scalar value (i.e. in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF).

val of_int : int -> t

of_int i is i as a Unicode character.

val to_int : t -> int

to_int u is u as an integer.

val is_char : t -> bool

is_char u is true if and only if u is a latin1 OCaml character.

val of_char : char -> t

of_char c is c as a Unicode character.

val to_char : t -> char

to_char u is u as an OCaml latin1 character.

val equal : t -> t -> bool

equal u u' is u = u'.

val compare : t -> t -> int

compare u u' is Stdlib.compare u u'.

val hash : t -> int

hash u associates a non-negative integer to u.

UTF codecs tools

type utf_decode

The type for UTF decode results. Values of this type represent the result of a Unicode Transformation Format decoding attempt.

val utf_decode_is_valid : utf_decode -> bool

utf_decode_is_valid d is true if and only if d holds a valid decode.

val utf_decode_uchar : utf_decode -> t

utf_decode_uchar d is the Unicode character decoded by d if utf_decode_is_valid d is true and Uchar.rep otherwise.

val utf_decode_length : utf_decode -> int

utf_decode_length d is the number of elements from the source that were consumed by the decode d. This is always strictly positive and smaller or equal to 4. The kind of source elements depends on the actual decoder; for the decoders of the standard library this function always returns a length in bytes.

val utf_decode : int -> t -> utf_decode

utf_decode n u is a valid UTF decode for u that consumed n elements from the source for decoding. n must be positive and smaller or equal to 4 (this is not checked by the module).

val utf_decode_invalid : int -> utf_decode

utf_decode_invalid n is an invalid UTF decode that consumed n elements from the source to error. n must be positive and smaller or equal to 4 (this is not checked by the module). The resulting decode has rep as the decoded Unicode character.

val utf_8_byte_length : t -> int

utf_8_byte_length u is the number of bytes needed to encode u in UTF-8.

val utf_16_byte_length : t -> int

utf_16_byte_length u is the number of bytes needed to encode u in UTF-16.

diff --git a/findlib-1/melange/Stdlib/Unit/index.html b/findlib-1/melange/Stdlib/Unit/index.html new file mode 100644 index 000000000..f71facebd --- /dev/null +++ b/findlib-1/melange/Stdlib/Unit/index.html @@ -0,0 +1,2 @@ + +Unit (docs.findlib-1.melange.Stdlib.Unit)

Module Stdlib.Unit

Unit values.

The unit type

type t = unit =
  1. | ()

The unit type.

The constructor () is included here so that it has a path, but it is not intended to be used in user-defined data types.

val equal : t -> t -> bool

equal u1 u2 is true.

val compare : t -> t -> int

compare u1 u2 is 0.

val to_string : t -> string

to_string b is "()".

diff --git a/findlib-1/melange/Stdlib/Weak/Make/argument-1-H/index.html b/findlib-1/melange/Stdlib/Weak/Make/argument-1-H/index.html new file mode 100644 index 000000000..f3ef91d26 --- /dev/null +++ b/findlib-1/melange/Stdlib/Weak/Make/argument-1-H/index.html @@ -0,0 +1,2 @@ + +H (docs.findlib-1.melange.Stdlib.Weak.Make.H)

Parameter Make.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/findlib-1/melange/Stdlib/Weak/Make/index.html b/findlib-1/melange/Stdlib/Weak/Make/index.html new file mode 100644 index 000000000..9eb6bf41a --- /dev/null +++ b/findlib-1/melange/Stdlib/Weak/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.findlib-1.melange.Stdlib.Weak.Make)

Module Weak.Make

Functor building an implementation of the weak hash set structure. H.equal can't be the physical equality, since only shallow copies of the elements in the set are given to it.

Parameters

Signature

type data = H.t

The type of the elements stored in the table.

type t

The type of tables that contain elements of type data. Note that weak hash sets cannot be marshaled using Stdlib.output_value or the functions of the Marshal module.

val create : int -> t

create n creates a new empty weak hash set, of initial size n. The table will grow as needed.

val clear : t -> unit

Remove all elements from the table.

val merge : t -> data -> data

merge t x returns an instance of x found in t if any, or else adds x to t and return x.

val add : t -> data -> unit

add t x adds x to t. If there is already an instance of x in t, it is unspecified which one will be returned by subsequent calls to find and merge.

val remove : t -> data -> unit

remove t x removes from t one instance of x. Does nothing if there is no instance of x in t.

val find : t -> data -> data

find t x returns an instance of x found in t.

  • raises Not_found

    if there is no such element.

val find_opt : t -> data -> data option

find_opt t x returns an instance of x found in t or None if there is no such element.

  • since 4.05
val find_all : t -> data -> data list

find_all t x returns a list of all the instances of x found in t.

val mem : t -> data -> bool

mem t x returns true if there is at least one instance of x in t, false otherwise.

val iter : (data -> unit) -> t -> unit

iter f t calls f on each element of t, in some unspecified order. It is not specified what happens if f tries to change t itself.

val fold : (data -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f t init computes (f d1 (... (f dN init))) where d1 ... dN are the elements of t in some unspecified order. It is not specified what happens if f tries to change t itself.

val count : t -> int

Count the number of elements in the table. count t gives the same result as fold (fun _ n -> n+1) t 0 but does not delay the deallocation of the dead elements.

val stats : t -> int * int * int * int * int * int

Return statistics on the table. The numbers are, in order: table length, number of entries, sum of bucket lengths, smallest bucket length, median bucket length, biggest bucket length.

diff --git a/findlib-1/melange/Stdlib/Weak/index.html b/findlib-1/melange/Stdlib/Weak/index.html new file mode 100644 index 000000000..bd84afbe2 --- /dev/null +++ b/findlib-1/melange/Stdlib/Weak/index.html @@ -0,0 +1,2 @@ + +Weak (docs.findlib-1.melange.Stdlib.Weak)

Module Stdlib.Weak

Arrays of weak pointers and hash sets of weak pointers.

Low-level functions

type !'a t

The type of arrays of weak pointers (weak arrays). A weak pointer is a value that the garbage collector may erase whenever the value is not used any more (through normal pointers) by the program. Note that finalisation functions are run before the weak pointers are erased, because the finalisation functions can make values alive again (before 4.03 the finalisation functions were run after).

A weak pointer is said to be full if it points to a value, empty if the value was erased by the GC.

Notes:

  • Integers are not allocated and cannot be stored in weak arrays.
  • Weak arrays cannot be marshaled using Stdlib.output_value nor the functions of the Marshal module.
val create : int -> 'a t

Weak.create n returns a new weak array of length n. All the pointers are initially empty.

val length : 'a t -> int

Weak.length ar returns the length (number of elements) of ar.

val set : 'a t -> int -> 'a option -> unit

Weak.set ar n (Some el) sets the nth cell of ar to be a (full) pointer to el; Weak.set ar n None sets the nth cell of ar to empty.

val get : 'a t -> int -> 'a option

Weak.get ar n returns None if the nth cell of ar is empty, Some x (where x is the value) if it is full.

val get_copy : 'a t -> int -> 'a option

Weak.get_copy ar n returns None if the nth cell of ar is empty, Some x (where x is a (shallow) copy of the value) if it is full. In addition to pitfalls with mutable values, the interesting difference with get is that get_copy does not prevent the incremental GC from erasing the value in its current cycle (get may delay the erasure to the next GC cycle).

val check : 'a t -> int -> bool

Weak.check ar n returns true if the nth cell of ar is full, false if it is empty. Note that even if Weak.check ar n returns true, a subsequent Weak.get ar n can return None.

val fill : 'a t -> int -> int -> 'a option -> unit

Weak.fill ar ofs len el sets to el all pointers of ar from ofs to ofs + len - 1.

val blit : 'a t -> int -> 'a t -> int -> int -> unit

Weak.blit ar1 off1 ar2 off2 len copies len weak pointers from ar1 (starting at off1) to ar2 (starting at off2). It works correctly even if ar1 and ar2 are the same.

  • raises Invalid_argument

    if off1 and len do not designate a valid subarray of ar1, or if off2 and len do not designate a valid subarray of ar2.

Weak hash sets

A weak hash set is a hashed set of values. Each value may magically disappear from the set when it is not used by the rest of the program any more. This is normally used to share data structures without inducing memory leaks. Weak hash sets are defined on values from a Hashtbl.HashedType module; the equal relation and hash function are taken from that module. We will say that v is an instance of x if equal x v is true.

The equal relation must be able to work on a shallow copy of the values and give the same result as with the values themselves.

Unsynchronized accesses

Unsynchronized accesses to weak hash sets are a programming error. Unsynchronized accesses to a weak hash set may lead to an invalid weak hash set state. Thus, concurrent accesses to weak hash sets must be synchronized (for instance with a Mutex.t).

module type S = sig ... end

The output signature of the functor Weak.Make.

module Make (H : Hashtbl.HashedType) : S with type data = H.t

Functor building an implementation of the weak hash set structure. H.equal can't be the physical equality, since only shallow copies of the elements in the set are given to it.

diff --git a/findlib-1/melange/Stdlib/Weak/module-type-S/index.html b/findlib-1/melange/Stdlib/Weak/module-type-S/index.html new file mode 100644 index 000000000..2ee322751 --- /dev/null +++ b/findlib-1/melange/Stdlib/Weak/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (docs.findlib-1.melange.Stdlib.Weak.S)

Module type Weak.S

The output signature of the functor Weak.Make.

type data

The type of the elements stored in the table.

type t

The type of tables that contain elements of type data. Note that weak hash sets cannot be marshaled using Stdlib.output_value or the functions of the Marshal module.

val create : int -> t

create n creates a new empty weak hash set, of initial size n. The table will grow as needed.

val clear : t -> unit

Remove all elements from the table.

val merge : t -> data -> data

merge t x returns an instance of x found in t if any, or else adds x to t and return x.

val add : t -> data -> unit

add t x adds x to t. If there is already an instance of x in t, it is unspecified which one will be returned by subsequent calls to find and merge.

val remove : t -> data -> unit

remove t x removes from t one instance of x. Does nothing if there is no instance of x in t.

val find : t -> data -> data

find t x returns an instance of x found in t.

  • raises Not_found

    if there is no such element.

val find_opt : t -> data -> data option

find_opt t x returns an instance of x found in t or None if there is no such element.

  • since 4.05
val find_all : t -> data -> data list

find_all t x returns a list of all the instances of x found in t.

val mem : t -> data -> bool

mem t x returns true if there is at least one instance of x in t, false otherwise.

val iter : (data -> unit) -> t -> unit

iter f t calls f on each element of t, in some unspecified order. It is not specified what happens if f tries to change t itself.

val fold : (data -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f t init computes (f d1 (... (f dN init))) where d1 ... dN are the elements of t in some unspecified order. It is not specified what happens if f tries to change t itself.

val count : t -> int

Count the number of elements in the table. count t gives the same result as fold (fun _ n -> n+1) t 0 but does not delay the deallocation of the dead elements.

val stats : t -> int * int * int * int * int * int

Return statistics on the table. The numbers are, in order: table length, number of entries, sum of bucket lengths, smallest bucket length, median bucket length, biggest bucket length.

diff --git a/findlib-1/melange/Stdlib/index.html b/findlib-1/melange/Stdlib/index.html new file mode 100644 index 000000000..b28a3cf6e --- /dev/null +++ b/findlib-1/melange/Stdlib/index.html @@ -0,0 +1,8 @@ + +Stdlib (docs.findlib-1.melange.Stdlib)

Module Stdlib

The OCaml Standard library.

This module is automatically opened at the beginning of each compilation. All components of this module can therefore be referred by their short name, without prefixing them by Stdlib.

In particular, it provides the basic operations over the built-in types (numbers, booleans, byte sequences, strings, exceptions, references, lists, arrays, input-output channels, ...) and the standard library modules.

Exceptions

val raise : exn -> 'a

Raise the given exception value

val raise_notrace : exn -> 'a

A faster version raise which does not record the backtrace.

  • since 4.02
val invalid_arg : string -> 'a

Raise exception Invalid_argument with the given string.

val failwith : string -> 'a

Raise exception Failure with the given string.

exception Exit

The Exit exception is not raised by any library function. It is provided for use in your programs.

exception Match_failure of string * int * int

Exception raised when none of the cases of a pattern-matching apply. The arguments are the location of the match keyword in the source code (file name, line number, column number).

exception Assert_failure of string * int * int

Exception raised when an assertion fails. The arguments are the location of the assert keyword in the source code (file name, line number, column number).

exception Invalid_argument of string

Exception raised by library functions to signal that the given arguments do not make sense. The string gives some information to the programmer. As a general rule, this exception should not be caught, it denotes a programming error and the code should be modified not to trigger it.

exception Failure of string

Exception raised by library functions to signal that they are undefined on the given arguments. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Failure _ instead).

exception Not_found

Exception raised by search functions when the desired object could not be found.

exception Out_of_memory

Exception raised by the garbage collector when there is insufficient memory to complete the computation. (Not reliable for allocations on the minor heap.)

exception Stack_overflow

Exception raised by the bytecode interpreter when the evaluation stack reaches its maximal size. This often indicates infinite or excessively deep recursion in the user's program.

Before 4.10, it was not fully implemented by the native-code compiler.

exception Sys_error of string

Exception raised by the input/output functions to report an operating system error. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Sys_error _ instead).

exception End_of_file

Exception raised by input functions to signal that the end of file has been reached.

exception Division_by_zero

Exception raised by integer division and remainder operations when their second argument is zero.

exception Sys_blocked_io

A special case of Sys_error raised when no I/O is possible on a non-blocking I/O channel.

exception Undefined_recursive_module of string * int * int

Exception raised when an ill-founded recursive module definition is evaluated. The arguments are the location of the definition in the source code (file name, line number, column number).

Comparisons

val (=) : 'a -> 'a -> bool

e1 = e2 tests for structural equality of e1 and e2. Mutable structures (e.g. references and arrays) are equal if and only if their current contents are structurally equal, even if the two mutable objects are not the same physical object. Equality between functional values raises Invalid_argument. Equality between cyclic data structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

val (<>) : 'a -> 'a -> bool

Negation of Stdlib.(=). Left-associative operator, see Ocaml_operators for more information.

val (<) : 'a -> 'a -> bool

See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

val (>) : 'a -> 'a -> bool

See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

val (<=) : 'a -> 'a -> bool

See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

val (>=) : 'a -> 'a -> bool

Structural ordering functions. These functions coincide with the usual orderings over integers, characters, strings, byte sequences and floating-point numbers, and extend them to a total ordering over all types. The ordering is compatible with ( = ). As in the case of ( = ), mutable structures are compared by contents. Comparison between functional values raises Invalid_argument. Comparison between cyclic structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

val compare : 'a -> 'a -> int

compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. The ordering implemented by compare is compatible with the comparison predicates =, < and > defined above, with one difference on the treatment of the float value Stdlib.nan. Namely, the comparison predicates treat nan as different from any other float value, including itself; while compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

compare applied to functional values may raise Invalid_argument. compare applied to cyclic structures may not terminate.

The compare function can be used as the comparison function required by the Set.Make and Map.Make functors, as well as the List.sort and Array.sort functions.

val min : 'a -> 'a -> 'a
val max : 'a -> 'a -> 'a
val (==) : 'a -> 'a -> bool

e1 == e2 tests for physical equality of e1 and e2. On mutable types such as references, arrays, byte sequences, records with mutable fields and objects with mutable instance variables, e1 == e2 is true if and only if physical modification of e1 also affects e2. On non-mutable types, the behavior of ( == ) is implementation-dependent; however, it is guaranteed that e1 == e2 implies compare e1 e2 = 0. Left-associative operator, see Ocaml_operators for more information.

val (!=) : 'a -> 'a -> bool

Negation of Stdlib.(==). Left-associative operator, see Ocaml_operators for more information.

Boolean operations

val not : bool -> bool

The boolean negation.

val (&&) : bool -> bool -> bool

The boolean 'and'. Evaluation is sequential, left-to-right: in e1 && e2, e1 is evaluated first, and if it returns false, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

val (||) : bool -> bool -> bool

The boolean 'or'. Evaluation is sequential, left-to-right: in e1 || e2, e1 is evaluated first, and if it returns true, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

Debugging

val __LOC__ : string

__LOC__ returns the location at which this expression appears in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

  • since 4.02
val __FILE__ : string

__FILE__ returns the name of the file currently being parsed by the compiler.

  • since 4.02
val __LINE__ : int

__LINE__ returns the line number at which this expression appears in the file currently being parsed by the compiler.

  • since 4.02
val __MODULE__ : string

__MODULE__ returns the module name of the file being parsed by the compiler.

  • since 4.02
val __POS__ : string * int * int * int

__POS__ returns a tuple (file,lnum,cnum,enum), corresponding to the location at which this expression appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

  • since 4.02
val __FUNCTION__ : string

__FUNCTION__ returns the name of the current function or method, including any enclosing modules or classes.

  • since 4.12
val __LOC_OF__ : 'a -> string * 'a

__LOC_OF__ expr returns a pair (loc, expr) where loc is the location of expr in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

  • since 4.02
val __LINE_OF__ : 'a -> int * 'a

__LINE_OF__ expr returns a pair (line, expr), where line is the line number at which the expression expr appears in the file currently being parsed by the compiler.

  • since 4.02
val __POS_OF__ : 'a -> (string * int * int * int) * 'a

__POS_OF__ expr returns a pair (loc,expr), where loc is a tuple (file,lnum,cnum,enum) corresponding to the location at which the expression expr appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

  • since 4.02

Composition operators

val (|>) : 'a -> ('a -> 'b) -> 'b

Reverse-application operator: x |> f |> g is exactly equivalent to g (f (x)). Left-associative operator, see Ocaml_operators for more information.

  • since 4.01
val (@@) : ('a -> 'b) -> 'a -> 'b

Application operator: g @@ f @@ x is exactly equivalent to g (f (x)). Right-associative operator, see Ocaml_operators for more information.

  • since 4.01

Integer arithmetic

Integers are Sys.int_size bits wide. All operations are taken modulo 2Sys.int_size. They do not fail on overflow.

val (~-) : int -> int

Unary negation. You can also write - e instead of ~- e. Unary operator, see Ocaml_operators for more information.

val (~+) : int -> int

Unary addition. You can also write + e instead of ~+ e. Unary operator, see Ocaml_operators for more information.

  • since 3.12
val succ : int -> int

succ x is x + 1.

val pred : int -> int

pred x is x - 1.

val (+) : int -> int -> int

Integer addition. Left-associative operator, see Ocaml_operators for more information.

val (-) : int -> int -> int

Integer subtraction. Left-associative operator, , see Ocaml_operators for more information.

val (*) : int -> int -> int

Integer multiplication. Left-associative operator, see Ocaml_operators for more information.

val (/) : int -> int -> int

Integer division. Integer division rounds the real quotient of its arguments towards zero. More precisely, if x >= 0 and y > 0, x / y is the greatest integer less than or equal to the real quotient of x by y. Moreover, (- x) / y = x / (- y) = - (x / y). Left-associative operator, see Ocaml_operators for more information.

val (mod) : int -> int -> int

Integer remainder. If y is not zero, the result of x mod y satisfies the following properties: x = (x / y) * y + x mod y and abs(x mod y) <= abs(y) - 1. If y = 0, x mod y raises Division_by_zero. Note that x mod y is negative only if x < 0. Left-associative operator, see Ocaml_operators for more information.

val abs : int -> int

abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

val max_int : int

The greatest representable integer.

val min_int : int

The smallest representable integer.

Bitwise operations

val (land) : int -> int -> int

Bitwise logical and. Left-associative operator, see Ocaml_operators for more information.

val (lor) : int -> int -> int

Bitwise logical or. Left-associative operator, see Ocaml_operators for more information.

val (lxor) : int -> int -> int

Bitwise logical exclusive or. Left-associative operator, see Ocaml_operators for more information.

val lnot : int -> int

Bitwise logical negation.

val (lsl) : int -> int -> int

n lsl m shifts n to the left by m bits. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

val (lsr) : int -> int -> int

n lsr m shifts n to the right by m bits. This is a logical shift: zeroes are inserted regardless of the sign of n. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

val (asr) : int -> int -> int

n asr m shifts n to the right by m bits. This is an arithmetic shift: the sign bit of n is replicated. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

Floating-point arithmetic

OCaml's floating-point numbers follow the IEEE 754 standard, using double precision (64 bits) numbers. Floating-point operations never raise an exception on overflow, underflow, division by zero, etc. Instead, special IEEE numbers are returned as appropriate, such as infinity for 1.0 /. 0.0, neg_infinity for -1.0 /. 0.0, and nan ('not a number') for 0.0 /. 0.0. These special numbers then propagate through floating-point computations as expected: for instance, 1.0 /. infinity is 0.0, basic arithmetic operations (+., -., *., /.) with nan as an argument return nan, ...

val (~-.) : float -> float

Unary negation. You can also write -. e instead of ~-. e. Unary operator, see Ocaml_operators for more information.

val (~+.) : float -> float

Unary addition. You can also write +. e instead of ~+. e. Unary operator, see Ocaml_operators for more information.

  • since 3.12
val (+.) : float -> float -> float

Floating-point addition. Left-associative operator, see Ocaml_operators for more information.

val (-.) : float -> float -> float

Floating-point subtraction. Left-associative operator, see Ocaml_operators for more information.

val (*.) : float -> float -> float

Floating-point multiplication. Left-associative operator, see Ocaml_operators for more information.

val (/.) : float -> float -> float

Floating-point division. Left-associative operator, see Ocaml_operators for more information.

val (**) : float -> float -> float

Exponentiation.

val sqrt : float -> float

Square root.

val exp : float -> float

Exponential.

val log : float -> float

Natural logarithm.

val log10 : float -> float

Base 10 logarithm.

val expm1 : float -> float

expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

  • since 3.12.0
val log1p : float -> float

log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

  • since 3.12.0
val cos : float -> float

Cosine. Argument is in radians.

val sin : float -> float

Sine. Argument is in radians.

val tan : float -> float

Tangent. Argument is in radians.

val acos : float -> float

Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

val asin : float -> float

Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

val atan : float -> float

Arc tangent. Result is in radians and is between -pi/2 and pi/2.

val atan2 : float -> float -> float

atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

val hypot : float -> float -> float

hypot x y returns sqrt(x *. x + y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin.

  • since 4.00.0
val cosh : float -> float

Hyperbolic cosine. Argument is in radians.

val sinh : float -> float

Hyperbolic sine. Argument is in radians.

val tanh : float -> float

Hyperbolic tangent. Argument is in radians.

val acosh : float -> float

Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

  • since 4.13.0
val asinh : float -> float

Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

  • since 4.13.0
val atanh : float -> float

Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

  • since 4.13.0
val ceil : float -> float

Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

val floor : float -> float

Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

val abs_float : float -> float

abs_float f returns the absolute value of f.

val copysign : float -> float -> float

copysign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

  • since 4.00
val mod_float : float -> float -> float

mod_float a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

val frexp : float -> float * int

frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

val ldexp : float -> int -> float

ldexp x n returns x *. 2 ** n.

val modf : float -> float * float

modf f returns the pair of the fractional and integral part of f.

val float : int -> float
val float_of_int : int -> float

Convert an integer to floating-point.

val truncate : float -> int
val int_of_float : float -> int

Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

val infinity : float

Positive infinity.

val neg_infinity : float

Negative infinity.

val nan : float
val max_float : float

The largest positive finite value of type float.

val min_float : float

The smallest positive, non-zero, non-denormalized value of type float.

val epsilon_float : float

The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

type fpclass =
  1. | FP_normal
    (*

    Normal number, none of the below

    *)
  2. | FP_subnormal
    (*

    Number very close to 0.0, has reduced precision

    *)
  3. | FP_zero
    (*

    Number is 0.0 or -0.0

    *)
  4. | FP_infinite
    (*

    Number is positive or negative infinity

    *)
  5. | FP_nan
    (*

    Not a number: result of an undefined operation

    *)

The five classes of floating-point numbers, as determined by the Stdlib.classify_float function.

val classify_float : float -> fpclass

String operations

More string operations are provided in module String.

val (^) : string -> string -> string

String concatenation. Right-associative operator, see Ocaml_operators for more information.

Character operations

More character operations are provided in module Char.

val int_of_char : char -> int

Return the ASCII code of the argument.

val char_of_int : int -> char

Return the character with the given ASCII code.

Unit operations

val ignore : 'a -> unit

Discard the value of its argument and return (). For instance, ignore(f x) discards the result of the side-effecting function f. It is equivalent to f x; (), except that the latter may generate a compiler warning; writing ignore(f x) instead avoids the warning.

String conversion functions

val string_of_bool : bool -> string

Return the string representation of a boolean. As the returned values may be shared, the user should not modify them directly.

val bool_of_string_opt : string -> bool option

Convert the given string to a boolean.

Return None if the string is not "true" or "false".

  • since 4.05
val bool_of_string : string -> bool

Same as Stdlib.bool_of_string_opt, but raise Invalid_argument "bool_of_string" instead of returning None.

val string_of_int : int -> string

Return the string representation of an integer, in decimal.

val int_of_string_opt : string -> int option

Convert the given string to an integer. The string is read in decimal (by default, or if the string begins with 0u), in hexadecimal (if it begins with 0x or 0X), in octal (if it begins with 0o or 0O), or in binary (if it begins with 0b or 0B).

The 0u prefix reads the input as an unsigned integer in the range [0, 2*max_int+1]. If the input exceeds max_int it is converted to the signed integer min_int + input - max_int - 1.

The _ (underscore) character can appear anywhere in the string and is ignored.

Return None if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int.

  • since 4.05
val int_of_string : string -> int

Same as Stdlib.int_of_string_opt, but raise Failure "int_of_string" instead of returning None.

val string_of_float : float -> string

Return a string representation of a floating-point number.

This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

val float_of_string_opt : string -> float option

Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X).

The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit.

The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit.

In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional.

The _ (underscore) character can appear anywhere in the string and is ignored.

Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

Return None if the given string is not a valid representation of a float.

  • since 4.05
val float_of_string : string -> float

Same as Stdlib.float_of_string_opt, but raise Failure "float_of_string" instead of returning None.

Pair operations

val fst : ('a * 'b) -> 'a

Return the first component of a pair.

val snd : ('a * 'b) -> 'b

Return the second component of a pair.

List operations

More list operations are provided in module List.

val (@) : 'a list -> 'a list -> 'a list

l0 @ l1 appends l1 to l0. Same function as List.append. Right-associative operator, see Ocaml_operators for more information.

  • since 5.1 this function is tail-recursive.

Input/output

Note: all input/output functions can raise Sys_error when the system calls they invoke fail.

type in_channel

The type of input channel.

type out_channel

The type of output channel.

val stdin : in_channel

The standard input for the process.

val stdout : out_channel

The standard output for the process.

val stderr : out_channel

The standard error output for the process.

Output functions on standard output

val print_char : char -> unit

Print a character on standard output.

val print_string : string -> unit

Print a string on standard output.

val print_bytes : bytes -> unit

Print a byte sequence on standard output.

  • since 4.02
val print_int : int -> unit

Print an integer, in decimal, on standard output.

val print_float : float -> unit

Print a floating-point number, in decimal, on standard output.

The conversion of the number to a string uses string_of_float and can involve a loss of precision.

val print_endline : string -> unit

Print a string, followed by a newline character, on standard output and flush standard output.

val print_newline : unit -> unit

Print a newline character on standard output, and flush standard output. This can be used to simulate line buffering of standard output.

Output functions on standard error

val prerr_char : char -> unit

Print a character on standard error.

val prerr_string : string -> unit

Print a string on standard error.

val prerr_bytes : bytes -> unit

Print a byte sequence on standard error.

  • since 4.02
val prerr_int : int -> unit

Print an integer, in decimal, on standard error.

val prerr_float : float -> unit

Print a floating-point number, in decimal, on standard error.

The conversion of the number to a string uses string_of_float and can involve a loss of precision.

val prerr_endline : string -> unit

Print a string, followed by a newline character on standard error and flush standard error.

val prerr_newline : unit -> unit

Print a newline character on standard error, and flush standard error.

Input functions on standard input

val read_line : unit -> string

Flush standard output, then read characters from standard input until a newline character is encountered.

Return the string of all characters read, without the newline character at the end.

  • raises End_of_file

    if the end of the file is reached at the beginning of line.

val read_int_opt : unit -> int option

Flush standard output, then read one line from standard input and convert it to an integer.

Return None if the line read is not a valid representation of an integer.

  • since 4.05
val read_int : unit -> int

Same as Stdlib.read_int_opt, but raise Failure "int_of_string" instead of returning None.

val read_float_opt : unit -> float option

Flush standard output, then read one line from standard input and convert it to a floating-point number.

Return None if the line read is not a valid representation of a floating-point number.

  • since 4.05
val read_float : unit -> float

Same as Stdlib.read_float_opt, but raise Failure "float_of_string" instead of returning None.

General output functions

type open_flag =
  1. | Open_rdonly
    (*

    open for reading.

    *)
  2. | Open_wronly
    (*

    open for writing.

    *)
  3. | Open_append
    (*

    open for appending: always write at end of file.

    *)
  4. | Open_creat
    (*

    create the file if it does not exist.

    *)
  5. | Open_trunc
    (*

    empty the file if it already exists.

    *)
  6. | Open_excl
    (*

    fail if Open_creat and the file already exists.

    *)
  7. | Open_binary
    (*

    open in binary mode (no conversion).

    *)
  8. | Open_text
    (*

    open in text mode (may perform conversions).

    *)
  9. | Open_nonblock
    (*

    open in non-blocking mode.

    *)
val open_out : string -> out_channel

Open the named file for writing, and return a new output channel on that file, positioned at the beginning of the file. The file is truncated to zero length if it already exists. It is created if it does not already exists.

val open_out_bin : string -> out_channel

Same as Stdlib.open_out, but the file is opened in binary mode, so that no translation takes place during writes. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_out.

val open_out_gen : open_flag list -> int -> string -> out_channel

open_out_gen mode perm filename opens the named file for writing, as described above. The extra argument mode specifies the opening mode. The extra argument perm specifies the file permissions, in case the file must be created. Stdlib.open_out and Stdlib.open_out_bin are special cases of this function.

val flush : out_channel -> unit

Flush the buffer associated with the given output channel, performing all pending writes on that channel. Interactive programs must be careful about flushing standard output and standard error at the right time.

val flush_all : unit -> unit

Flush all open output channels; ignore errors.

val output_char : out_channel -> char -> unit

Write the character on the given output channel.

val output_string : out_channel -> string -> unit

Write the string on the given output channel.

val output_bytes : out_channel -> bytes -> unit

Write the byte sequence on the given output channel.

  • since 4.02
val output : out_channel -> bytes -> int -> int -> unit

output oc buf pos len writes len characters from byte sequence buf, starting at offset pos, to the given output channel oc.

val output_substring : out_channel -> string -> int -> int -> unit

Same as output but take a string as argument instead of a byte sequence.

  • since 4.02
val output_byte : out_channel -> int -> unit

Write one 8-bit integer (as the single character with that code) on the given output channel. The given integer is taken modulo 256.

val output_binary_int : out_channel -> int -> unit

Write one integer in binary format (4 bytes, big-endian) on the given output channel. The given integer is taken modulo 232. The only reliable way to read it back is through the Stdlib.input_binary_int function. The format is compatible across all machines for a given version of OCaml.

val output_value : out_channel -> 'a -> unit

Write the representation of a structured value of any type to a channel. Circularities and sharing inside the value are detected and preserved. The object can be read back, by the function Stdlib.input_value. See the description of module Marshal for more information. Stdlib.output_value is equivalent to Marshal.to_channel with an empty list of flags.

val seek_out : out_channel -> int -> unit

seek_out chan pos sets the current writing position to pos for channel chan. This works only for regular files. On files of other kinds (such as terminals, pipes and sockets), the behavior is unspecified.

val pos_out : out_channel -> int

Return the current writing position for the given channel. Does not work on channels opened with the Open_append flag (returns unspecified results). For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_out, then going back to this position using seek_out will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

val out_channel_length : out_channel -> int

Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless.

val close_out : out_channel -> unit

Close the given channel, flushing all buffered write operations. Output functions raise a Sys_error exception when they are applied to a closed output channel, except close_out and flush, which do nothing when applied to an already closed channel. Note that close_out may raise Sys_error if the operating system signals an error when flushing or closing.

val close_out_noerr : out_channel -> unit

Same as close_out, but ignore all errors.

val set_binary_mode_out : out_channel -> bool -> unit

set_binary_mode_out oc true sets the channel oc to binary mode: no translations take place during output. set_binary_mode_out oc false sets the channel oc to text mode: depending on the operating system, some translations may take place during output. For instance, under Windows, end-of-lines will be translated from \n to \r\n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

General input functions

val open_in : string -> in_channel

Open the named file for reading, and return a new input channel on that file, positioned at the beginning of the file.

val open_in_bin : string -> in_channel

Same as Stdlib.open_in, but the file is opened in binary mode, so that no translation takes place during reads. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_in.

val open_in_gen : open_flag list -> int -> string -> in_channel

open_in_gen mode perm filename opens the named file for reading, as described above. The extra arguments mode and perm specify the opening mode and file permissions. Stdlib.open_in and Stdlib.open_in_bin are special cases of this function.

val input_char : in_channel -> char

Read one character from the given input channel.

  • raises End_of_file

    if there are no more characters to read.

val input_line : in_channel -> string

Read characters from the given input channel, until a newline character is encountered. Return the string of all characters read, without the newline character at the end.

  • raises End_of_file

    if the end of the file is reached at the beginning of line.

val input : in_channel -> bytes -> int -> int -> int

input ic buf pos len reads up to len characters from the given channel ic, storing them in byte sequence buf, starting at character number pos. It returns the actual number of characters read, between 0 and len (inclusive). A return value of 0 means that the end of file was reached. A return value between 0 and len exclusive means that not all requested len characters were read, either because no more characters were available at that time, or because the implementation found it convenient to do a partial read; input must be called again to read the remaining characters, if desired. (See also Stdlib.really_input for reading exactly len characters.) Exception Invalid_argument "input" is raised if pos and len do not designate a valid range of buf.

val really_input : in_channel -> bytes -> int -> int -> unit

really_input ic buf pos len reads len characters from channel ic, storing them in byte sequence buf, starting at character number pos.

  • raises End_of_file

    if the end of file is reached before len characters have been read.

val really_input_string : in_channel -> int -> string

really_input_string ic len reads len characters from channel ic and returns them in a new string.

  • raises End_of_file

    if the end of file is reached before len characters have been read.

  • since 4.02
val input_byte : in_channel -> int

Same as Stdlib.input_char, but return the 8-bit integer representing the character.

val input_binary_int : in_channel -> int

Read an integer encoded in binary format (4 bytes, big-endian) from the given input channel. See Stdlib.output_binary_int.

  • raises End_of_file

    if the end of file was reached while reading the integer.

val input_value : in_channel -> 'a

Read the representation of a structured value, as produced by Stdlib.output_value, and return the corresponding value. This function is identical to Marshal.from_channel; see the description of module Marshal for more information, in particular concerning the lack of type safety.

val seek_in : in_channel -> int -> unit

seek_in chan pos sets the current reading position to pos for channel chan. This works only for regular files. On files of other kinds, the behavior is unspecified.

val pos_in : in_channel -> int

Return the current reading position for the given channel. For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_in, then going back to this position using seek_in will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

val in_channel_length : in_channel -> int

Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless. The returned size does not take into account the end-of-line translations that can be performed when reading from a channel opened in text mode.

val close_in : in_channel -> unit

Close the given channel. Input functions raise a Sys_error exception when they are applied to a closed input channel, except close_in, which does nothing when applied to an already closed channel.

val close_in_noerr : in_channel -> unit

Same as close_in, but ignore all errors.

val set_binary_mode_in : in_channel -> bool -> unit

set_binary_mode_in ic true sets the channel ic to binary mode: no translations take place during input. set_binary_mode_out ic false sets the channel ic to text mode: depending on the operating system, some translations may take place during input. For instance, under Windows, end-of-lines will be translated from \r\n to \n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

Operations on large files

module LargeFile : sig ... end

Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

References

type 'a ref = {
  1. mutable contents : 'a;
}

The type of references (mutable indirection cells) containing a value of type 'a.

val ref : 'a -> 'a ref

Return a fresh reference containing the given value.

val (!) : 'a ref -> 'a

!r returns the current contents of reference r. Equivalent to fun r -> r.contents. Unary operator, see Ocaml_operators for more information.

val (:=) : 'a ref -> 'a -> unit

r := a stores the value of a in reference r. Equivalent to fun r v -> r.contents <- v. Right-associative operator, see Ocaml_operators for more information.

val incr : int ref -> unit

Increment the integer contained in the given reference. Equivalent to fun r -> r := succ !r.

val decr : int ref -> unit

Decrement the integer contained in the given reference. Equivalent to fun r -> r := pred !r.

Result type

type ('a, 'b) result =
  1. | Ok of 'a
  2. | Error of 'b
  • since 4.03

Operations on format strings

Format strings are character strings with special lexical conventions that defines the functionality of formatted input/output functions. Format strings are used to read data with formatted input functions from module Scanf and to print data with formatted output functions from modules Printf and Format.

Format strings are made of three kinds of entities:

There is an additional lexical rule to escape the special characters '%' and '@' in format strings: if a special character follows a '%' character, it is treated as a plain character. In other words, "%%" is considered as a plain '%' and "%@" as a plain '@'.

For more information about conversion specifications and formatting indications available, read the documentation of modules Scanf, Printf and Format.

Format strings have a general and highly polymorphic type ('a, 'b, 'c, 'd, 'e, 'f) format6. The two simplified types, format and format4 below are included for backward compatibility with earlier releases of OCaml.

The meaning of format string type parameters is as follows:

Type argument 'b is also the type of the first argument given to user's defined printing functions for %a and %t conversions, and user's defined reading functions for %r conversion.

type ('a, 'b, 'c, 'd, 'e, 'f) format6 = + ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.format6
type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6
type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4
val string_of_format : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> string

Converts a format string into a string.

val format_of_string : + ('a, 'b, 'c, 'd, 'e, 'f) format6 -> + ('a, 'b, 'c, 'd, 'e, 'f) format6

format_of_string s returns a format string read from the string literal s. Note: format_of_string can not convert a string argument that is not a literal. If you need this functionality, use the more general Scanf.format_from_string function.

val (^^) : + ('a, 'b, 'c, 'd, 'e, 'f) format6 -> + ('f, 'b, 'c, 'e, 'g, 'h) format6 -> + ('a, 'b, 'c, 'd, 'g, 'h) format6

f1 ^^ f2 catenates format strings f1 and f2. The result is a format string that behaves as the concatenation of format strings f1 and f2: in case of formatted output, it accepts arguments from f1, then arguments from f2; in case of formatted input, it returns results from f1, then results from f2. Right-associative operator, see Ocaml_operators for more information.

Program termination

val exit : int -> 'a

Terminate the process, returning the given status code to the operating system: usually 0 to indicate no errors, and a small positive integer to indicate failure. All open output channels are flushed with flush_all. The callbacks registered with Domain.at_exit are called followed by those registered with Stdlib.at_exit.

An implicit exit 0 is performed each time a program terminates normally. An implicit exit 2 is performed if the program terminates early because of an uncaught exception.

val at_exit : (unit -> unit) -> unit

Register the given function to be called at program termination time. The functions registered with at_exit will be called when the program does any of the following:

  • executes Stdlib.exit
  • terminates, either normally or because of an uncaught exception
  • executes the C function caml_shutdown. The functions are called in 'last in, first out' order: the function most recently added with at_exit is called first.

Standard library modules

module Arg : sig ... end

Parsing of command line arguments.

module Array : sig ... end

Array operations.

module ArrayLabels : sig ... end

Array operations.

module Atomic : sig ... end

Atomic references.

module Bool : sig ... end

Boolean values.

module Buffer : sig ... end

Extensible buffers.

module Bytes : sig ... end

Byte sequence operations.

module BytesLabels : sig ... end

Byte sequence operations.

module Char : sig ... end

Character operations.

module Complex : sig ... end

Complex numbers.

module Digest : sig ... end

MD5 message digest.

module Domain : sig ... end

Domains.

module Dynarray : sig ... end
module Effect : sig ... end
module Either : sig ... end

Either type.

module Filename : sig ... end

Operations on file names.

module Float : sig ... end

Floating-point arithmetic.

module Format : sig ... end

Pretty-printing.

module Fun : sig ... end

Function manipulation.

module Gc : sig ... end

Memory management control and statistics; finalised values.

module Hashtbl : sig ... end

Hash tables and hash functions.

module In_channel : sig ... end

Input channels.

module Int : sig ... end

Integer values.

module Int32 : sig ... end

32-bit integers.

module Int64 : sig ... end

64-bit integers.

module Lazy : sig ... end

Deferred computations.

module Lexing : sig ... end

The run-time library for lexers generated by ocamllex.

module List : sig ... end

List operations.

module ListLabels : sig ... end

List operations.

module Map : sig ... end

Association tables over ordered types.

module Marshal : sig ... end

Marshaling of data structures.

module MoreLabels : sig ... end

Extra labeled libraries.

module Mutex : sig ... end

Locks for mutual exclusion.

module Obj : sig ... end

Operations on internal representations of values.

module Oo : sig ... end

Operations on objects

module Option : sig ... end

Option values.

module Out_channel : sig ... end

Output channels.

module Parsing : sig ... end

The run-time library for parsers generated by ocamlyacc.

module Printexc : sig ... end

Facilities for printing exceptions and inspecting current call stack.

module Printf : sig ... end

Formatted output functions.

module Queue : sig ... end

First-in first-out queues.

module Random : sig ... end

Pseudo-random number generators (PRNG).

module Result : sig ... end

Result values.

module Scanf : sig ... end

Formatted input functions.

module Seq : sig ... end

Sequences.

module Set : sig ... end

Sets over ordered types.

module Stack : sig ... end

Last-in first-out stacks.

module StdLabels : sig ... end

Standard labeled libraries.

module String : sig ... end

Strings.

module StringLabels : sig ... end

Strings.

module Sys : sig ... end

System interface.

module Type : sig ... end

Type introspection.

module Uchar : sig ... end

Unicode characters.

module Unit : sig ... end

Unit values.

module Weak : sig ... end

Arrays of weak pointers and hash sets of weak pointers.

diff --git a/findlib-1/melange/__private__/index.html b/findlib-1/melange/__private__/index.html new file mode 100644 index 000000000..775958ddb --- /dev/null +++ b/findlib-1/melange/__private__/index.html @@ -0,0 +1,2 @@ + +__private__ (docs.findlib-1.melange.__private__)

Package melange.__private__

Sub-indexes

diff --git a/findlib-1/melange/__private__/melange_mini_stdlib/Melange_mini_stdlib/Obj/index.html b/findlib-1/melange/__private__/melange_mini_stdlib/Melange_mini_stdlib/Obj/index.html new file mode 100644 index 000000000..407908336 --- /dev/null +++ b/findlib-1/melange/__private__/melange_mini_stdlib/Melange_mini_stdlib/Obj/index.html @@ -0,0 +1,2 @@ + +Obj (docs.findlib-1.melange.__private__.melange_mini_stdlib.Melange_mini_stdlib.Obj)

Module Melange_mini_stdlib.Obj

type t
val field : t -> int -> t
val set_field : t -> int -> t -> unit
val tag : t -> int
val set_tag : t -> int -> unit
val repr : 'a -> t
val obj : t -> 'a
val magic : 'a -> 'b
val size : t -> int
diff --git a/findlib-1/melange/__private__/melange_mini_stdlib/Melange_mini_stdlib/Stdlib/index.html b/findlib-1/melange/__private__/melange_mini_stdlib/Melange_mini_stdlib/Stdlib/index.html new file mode 100644 index 000000000..1d0d514b9 --- /dev/null +++ b/findlib-1/melange/__private__/melange_mini_stdlib/Melange_mini_stdlib/Stdlib/index.html @@ -0,0 +1,2 @@ + +Stdlib (docs.findlib-1.melange.__private__.melange_mini_stdlib.Melange_mini_stdlib.Stdlib)

Module Melange_mini_stdlib.Stdlib

val compare : 'a -> 'a -> int
val not : bool -> bool
val min : 'a -> 'a -> 'a
val max : 'a -> 'a -> 'a
val (=) : 'a -> 'a -> bool
diff --git a/findlib-1/melange/__private__/melange_mini_stdlib/Melange_mini_stdlib/index.html b/findlib-1/melange/__private__/melange_mini_stdlib/Melange_mini_stdlib/index.html new file mode 100644 index 000000000..e190e503e --- /dev/null +++ b/findlib-1/melange/__private__/melange_mini_stdlib/Melange_mini_stdlib/index.html @@ -0,0 +1,2 @@ + +Melange_mini_stdlib (docs.findlib-1.melange.__private__.melange_mini_stdlib.Melange_mini_stdlib)

Module Melange_mini_stdlib

Since others depend on this file, its public mli files **should not export types** introduced here, otherwise it would cause conflicts here.

If the type exported here is also exported in modules from others, you will get a type not equivalent.

Types defined here but should not export:

val (^) : string -> string -> string
val (=) : 'a -> 'a -> bool
val (<>) : 'a -> 'a -> bool
val (==) : 'a -> 'a -> bool
val (!=) : 'a -> 'a -> bool
val (<) : 'a -> 'a -> bool
val (>) : 'a -> 'a -> bool
val (<=) : 'a -> 'a -> bool
val (>=) : 'a -> 'a -> bool
val (+) : int -> int -> int
val (-) : int -> int -> int
val (~-) : int -> int
val (*) : int -> int -> int
val (/) : int -> int -> int
val (lsl) : int -> int -> int
val (lor) : int -> int -> int
val (land) : int -> int -> int
val (mod) : int -> int -> int
val (lsr) : int -> int -> int
val (lxor) : int -> int -> int
val (asr) : int -> int -> int
type 'a ref = {
  1. mutable contents : 'a;
}
val ref : 'a -> 'a ref
val (||) : bool -> bool -> bool
val (&&) : bool -> bool -> bool
val not : bool -> bool
val raise : exn -> 'a
val ignore : 'a -> unit
val (|>) : 'a -> ('a -> 'b) -> 'b
val (@@) : ('a -> 'b) -> 'a -> 'b
val (**) : float -> float -> float
val (~-.) : float -> float
val (+.) : float -> float -> float
val (-.) : float -> float -> float
val (*.) : float -> float -> float
val (/.) : float -> float -> float
module Obj : sig ... end
module Stdlib : sig ... end
diff --git a/findlib-1/melange/__private__/melange_mini_stdlib/index.html b/findlib-1/melange/__private__/melange_mini_stdlib/index.html new file mode 100644 index 000000000..c14368e95 --- /dev/null +++ b/findlib-1/melange/__private__/melange_mini_stdlib/index.html @@ -0,0 +1,2 @@ + +melange_mini_stdlib (docs.findlib-1.melange.__private__.melange_mini_stdlib)

Package melange.__private__.melange_mini_stdlib

Library melange.__private__.melange_mini_stdlib

The entry point of this library is the module: Melange_mini_stdlib.

diff --git a/findlib-1/melange/belt/Belt/Array/index.html b/findlib-1/melange/belt/Belt/Array/index.html new file mode 100644 index 000000000..70cc0dbac --- /dev/null +++ b/findlib-1/melange/belt/Belt/Array/index.html @@ -0,0 +1,85 @@ + +Array (docs.findlib-1.melange.belt.Belt.Array)

Module Belt.Array

Belt.Array

mutable array: Utilities functions

Belt.Array Utililites for Array functions

type 'a t = 'a array
val length : 'a t -> int

length xs return the size of the array

val size : 'a t -> int

See length

val get : 'a t -> int -> 'a option

get arr i

If i <= 0 <= length arr;returns Some value where value is the item at index i If i is out of range;returns None

Belt.Array.get [|"a";"b";"c"|] 0 = Some "a";;
+Belt.Array.get [|"a";"b";"c"|] 3 = None;;
+Belt.Array.get [|"a";"b";"c"|] (-1) = None;;
val getExn : 'a t -> int -> 'a

getExn arr i

raise an exception if i is out of range;otherwise return the value at index i in arr

val getUnsafe : 'a t -> int -> 'a

getUnsafe arr i

Unsafe

no bounds checking;this would cause type error if i does not stay within range

val getUndefined : 'a t -> int -> 'a Js.undefined

getUndefined arr i

It does the samething in the runtime as getUnsafe; it is type safe since the return type still track whether it is in range or not

val set : 'a t -> int -> 'a -> bool

set arr n x modifies arr in place; it replaces the nth element of arr with x

  • returns

    false means not updated due to out of range

val setExn : 'a t -> int -> 'a -> unit

setExn arr i x raise an exception if i is out of range

val setUnsafe : 'a t -> int -> 'a -> unit
val shuffleInPlace : 'a t -> unit

shuffleInPlace arr randomly re-orders the items in arr

val shuffle : 'a t -> 'a t

shuffle xs

  • returns

    a fresh array with items in original array randomly shuffled

val reverseInPlace : 'a t -> unit

reverseInPlace arr reverses items in arr in place

let arr = [|10;11;12;13;14|];;
+let () = reverseInPlace arr;;
+arr = [|14;13;12;11;10|];;
val reverse : 'a t -> 'a t

reverse arr

  • returns

    a fresh array with items in arr in reverse order

    reverse [|10;11;12;13;14|] = [|14;13;12;11;10|];;
val makeUninitialized : int -> 'a Js.undefined array

makeUninitialized n creates an array of length n filled with the undefined value. You must specify the type of data that will eventually fill the array.

let arr: string Js.undefined array = makeUninitialized 5;;
+getExn arr 0 = Js.undefined;;
val makeUninitializedUnsafe : int -> 'a t

`makeUninitializedUnsafe n`

Unsafe

let arr = Belt.Array.makeUninitializedUnsafe 5;;
+let () = Js.log(Belt.Array.getExn arr 0);; (* undefined *)
+Belt.Array.setExn arr 0 "example";;
+let () = Js.log(Belt.Array.getExn arr 0 = "example");;
val make : int -> 'a -> 'a t

make n e return an array of size n filled with value e

  • returns

    an empty array when n is negative.

val range : int -> int -> int t

range start finish create an inclusive array

range 0 3 =  [|0;1;2;3|];;
+range 3 0 =  [||] ;;
+range 3 3 = [|3|];;
val rangeBy : int -> int -> step:int -> int t

rangeBy start finish ~step

  • returns

    empty array when step is 0 or negative it also return empty array when start > finish

    rangeBy 0 10 ~step:3 = [|0;3;6;9|];;
    +rangeBy 0 12 ~step:3 = [|0;3;6;9;12|];;
    +rangeBy 33 0 ~step:1 =  [||];;
    +rangeBy 33 0 ~step:(-1) = [||];;
    +rangeBy 3 12 ~step:(-1) = [||];;
    +rangeBy 3 3 ~step:0 = [||] ;;
    +rangeBy 3 3 ~step:(1) = [|3|] ;;
val makeByU : int -> (int -> 'a) Js.Fn.arity1 -> 'a t
val makeBy : int -> (int -> 'a) -> 'a t

makeBy n f

return an empty array when n is negative return an array of size n populated by f i start from 0 to n - 1

makeBy 5 (fun i -> i) = [|0;1;2;3;4|];;
+makeBy 5 (fun i -> i * i) = [|0;1;4;9;16|]
val makeByAndShuffleU : int -> (int -> 'a) Js.Fn.arity1 -> 'a t
val makeByAndShuffle : int -> (int -> 'a) -> 'a t

makeByAndShuffle n f

Equivalent to shuffle (makeBy n f)

val zip : 'a t -> 'b array -> ('a * 'b) array

zip a b

Create an array of pairs from corresponding elements of a and b. Stop with the shorter array

zip [|1;2|] [|3;4;5|] = [|(1, 3);(2, 4)|]
val zipByU : 'a t -> 'b array -> ('a -> 'b -> 'c) Js.Fn.arity2 -> 'c array
val zipBy : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array

zipBy xs ys f

Create an array by applying f to corresponding elements of xs and ys Stops with shorter array

Equivalent to map (zip xs ys) (fun (a,b) -> f a b)

zipBy [|1;2;3|] [|4;5|] (fun a b -> 2 * a + b) = [|6;9|];;
val unzip : ('a * 'b) array -> 'a t * 'b array

unzip a takes an array of pairs and creates a pair of arrays. The first array contains all the first items of the pairs; the second array contains all the second items.

unzip [|(1,2) ; (3,4)|] = ([|1;3|], [|2;4|]);;
+unzip [|(1,2) ; (3,4) ; (5,6) ; (7,8)|] = ([|1;3;5;7|], [|2;4;6;8|]);;
val concat : 'a t -> 'a t -> 'a t

concat xs ys

  • returns

    a fresh array containing the concatenation of the arrays v1 and v2;so even if v1 or v2 is empty;it can not be shared

    concat [|1;2;3|] [|4;5|] = [|1;2;3;4;5|];;
    +concat [| |] [|"a";"b";"c"|] = [|"a";"b";"c"|];;
val concatMany : 'a t t -> 'a t

concatMany xss

  • returns

    a fresh array as the concatenation of xss (an array of arrays)

    concatMany [| [|1;2;3|]; [|4;5;6|]; [|7;8|] |] = [|1;2;3;4;5;6;7;8|];;
val slice : 'a t -> offset:int -> len:int -> 'a t

slice xs offset len creates a new array with the len elements of xs starting at offset for

offset can be negative;and is evaluated as length xs - offset slice xs -1 1 means get the last element as a singleton array

slice xs (-len) len will return a copy of the array

if the array does not have enough data;slice extracts through the end of sequence.

if len is negative;returns the empty array.

slice [|10;11;12;13;14;15;16|] ~offset: 2 ~len: 3 = [|12;13;14|];;
+slice [|10;11;12;13;14;15;16|] ~offset: (-4) ~len: 3 = [|13;14;15|];;
+slice [|10;11;12;13;14;15;16|] ~offset:4  ~len:9 = [|14;15;16|];;
val sliceToEnd : 'a t -> int -> 'a t

sliceToEnd xs offset creates a new array with the elements of xs starting at offset

offset can be negative;and is evaluated as length xs - offset sliceToEnd xs -1 means get the last element as a singleton array

sliceToEnd xs 0 will return a copy of the array

sliceToEnd [|10;11;12;13;14;15;16|] 2 = [|12;13;14;15;16|];;
+sliceToEnd [|10;11;12;13;14;15;16|] (-4) = [|13;14;15;16|];;
val copy : 'a t -> 'a t

copy a

  • returns

    a copy of a;that is;a fresh array containing the same elements as a.

val fill : 'a t -> offset:int -> len:int -> 'a -> unit

fill arr ~offset ~len x

Modifies arr in place, storing x in elements number offset to offset + len - 1.

offset can be negative;and is evaluated as length arr - offset

fill arr ~offset:(-1) ~len:1 means fill the last element, if the array does not have enough data;fill will ignore it

let arr = makeBy 5 (fun i -> i) ;;
+fill arr ~offset:2 ~len:2 9 ;;
+arr = [|0;1;9;9;4|];;
+fill arr ~offset:7 ~len:2 8;;
+arr = [|0;1;9;9;4|];;
val blit : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

blit ~src:v1 ~srcOffset:o1 ~dst:v2 ~dstOffset:o2 ~len

copies len elements from array v1;starting at element number o1;to array v2, starting at element number o2.

It works correctly even if v1 and v2 are the same array;and the source and destination chunks overlap.

offset can be negative;-1 means len - 1;if len + offset is still negative;it will be set as 0

For each of the examples;presume that v1 = [|10;11;12;13;14;15;16;17|] and v2 = [|20;21;22;23;24;25;26;27|]. The result shown is the content of the destination array.

Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v2 ~dstOffset: 2 ~len: 3 |.
+  [|20;21;14;15;16;25;26;27|]
+Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v1 ~dstOffset: 2 ~len: 3 |.
+  [|10;11;14;15;16;15;16;17|]
val blitUnsafe : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

Unsafe blit without bounds checking

val forEachU : 'a t -> ('a -> unit) Js.Fn.arity1 -> unit
val forEach : 'a t -> ('a -> unit) -> unit

forEach xs f

Call f on each element of xs from the beginning to end. f returns unit;so no new array is created. Use forEach when you are primarily concerned with repetitively creating side effects.

forEach [|"a";"b";"c"|] (fun x -> Js.log("Item: " ^ x));;
+(*  prints:
+  Item: a
+  Item: b
+  Item: c
+*)
+
+let total = ref 0;;
+forEach [|1;2;3;4|] (fun x -> total := !total + x);;
+!total  = 1 + 2 + 3 + 4;;
val mapU : 'a t -> ('a -> 'b) Js.Fn.arity1 -> 'b array
val map : 'a t -> ('a -> 'b) -> 'b array

map xs f

  • returns

    a new array by calling f for each element of xs from the beginning to end

    map [|1;2|] (fun x-> x + 10) = [|11;12|]
val flatMapU : 'a t -> ('a -> 'b t) Js.Fn.arity1 -> 'b t
val flatMap : 'a t -> ('a -> 'b t) -> 'b t

flatMap xs f **return** a new array by calling `f` for each element of `xs` from the beginning to end, and then concatenating the results ``` flatMap |1;2| (fun x-> |x + 10;x + 20|) = |11;21;12;22| ```

val getByU : 'a t -> ('a -> bool) Js.Fn.arity1 -> 'a option
val getBy : 'a t -> ('a -> bool) -> 'a option

getBy xs p returns Some value for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 4
+getBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val getIndexByU : 'a t -> ('a -> bool) Js.Fn.arity1 -> int option
val getIndexBy : 'a t -> ('a -> bool) -> int option

getIndexBy xs p returns Some index for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getIndexBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 1
+getIndexBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val keepU : 'a t -> ('a -> bool) Js.Fn.arity1 -> 'a t
val keep : 'a t -> ('a -> bool) -> 'a t

keep xs p

  • returns

    a new array that keeps all elements satisfying p

    keep [|1;2;3|] (fun x -> x mod  2 = 0) = [|2|]
val keepWithIndexU : 'a t -> ('a -> int -> bool) Js.Fn.arity2 -> 'a t
val keepWithIndex : 'a t -> ('a -> int -> bool) -> 'a t

keepWithIndex xs p

  • returns

    a new array that keeps all elements satisfying p. The predicate p takes two arguments: the element from xs and the index starting from 0.

    keepWithIndex [|1;2;3|] (fun _x i -> i = 1) = [|2|]
val keepMapU : 'a t -> ('a -> 'b option) Js.Fn.arity1 -> 'b array
val keepMap : 'a t -> ('a -> 'b option) -> 'b array

keepMap xs p

  • returns

    a new array that keeps all elements that return a non-None when applied to p

    keepMap [|1;2;3|] (fun x -> if x mod 2 = 0 then Some x else None)
    += [| 2 |]
val forEachWithIndexU : 'a t -> (int -> 'a -> unit) Js.Fn.arity2 -> unit
val forEachWithIndex : 'a t -> (int -> 'a -> unit) -> unit

forEachWithIndex xs f

The same as forEach; except that f is supplied with two arguments: the index starting from 0 and the element from xs

forEachWithIndex [|"a";"b";"c"|] (fun i x -> Js.log("Item " ^ (string_of_int i) ^ " is " ^ x));;
+(*  prints:
+  Item 0 is a
+  Item 1 is b
+  Item 2 is c
+*)
+
+let total = ref 0 ;;
+forEachWithIndex [|10;11;12;13|] (fun i x -> total := !total + x + i);;
+!total  = 0 + 10 + 1 +  11 + 2 + 12 + 3 + 13;;
val mapWithIndexU : 'a t -> (int -> 'a -> 'b) Js.Fn.arity2 -> 'b t
val mapWithIndex : 'a t -> (int -> 'a -> 'b) -> 'b t

mapWithIndex xs f applies f to each element of xs. Function f takes two arguments: the index starting from 0 and the element from xs.

mapWithIndex [|1;2;3|] (fun i x -> i + x) =
+[|0 + 1; 1 + 2; 2 + 3|]
val partitionU : 'a t -> ('a -> bool) Js.Fn.arity1 -> 'a t * 'a t
val partition : 'a t -> ('a -> bool) -> 'a t * 'a t

partition f a split array into tuple of two arrays based on predicate f; first of tuple where predicate cause true, second where predicate cause false

partition [|1;2;3;4;5|] (fun x -> x mod 2 = 0  ) = ([|2;4|], [|1;2;3|]);;
+partition [|1;2;3;4;5|] (fun x -> x mod 2 <> 0 ) = ([|1;2;3|], [|2;4|]);;
val reduceU : 'b array -> 'a -> ('a -> 'b -> 'a) Js.Fn.arity2 -> 'a
val reduce : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduce xs init f

Applies f to each element of xs from beginning to end. Function f has two parameters: the item from the list and an “accumulator”;which starts with a value of init. reduce returns the final value of the accumulator.

reduce [|2;3;4|] 1 (+) = 10;;
+reduce [|"a";"b";"c";"d"|] "" (^) = "abcd";;
val reduceReverseU : 'b array -> 'a -> ('a -> 'b -> 'a) Js.Fn.arity2 -> 'a
val reduceReverse : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduceReverse xs init f

Works like reduce;except that function f is applied to each item of xs from the last back to the first.

reduceReverse [|"a";"b";"c";"d"|] "" (^) = "dcba";;
val reduceReverse2U : + 'a t -> + 'b array -> + 'c -> + ('c -> 'a -> 'b -> 'c) Js.Fn.arity3 -> + 'c
val reduceReverse2 : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c

reduceReverse2 xs ys init f Reduces two arrays xs and ys;taking items starting at min (length xs) (length ys) down to and including zero.

reduceReverse2 [|1;2;3|] [|1;2|] 0 (fun acc x y -> acc + x + y) = 6
val reduceWithIndexU : 'a t -> 'b -> ('b -> 'a -> int -> 'b) Js.Fn.arity3 -> 'b
val reduceWithIndex : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b

reduceWithIndex xs f

Applies f to each element of xs from beginning to end. Function f has three parameters: the item from the array and an “accumulator”, which starts with a value of init and the index of each element. reduceWithIndex returns the final value of the accumulator.

reduceWithIndex [|1;2;3;4|] 0 (fun acc x i -> acc + x + i) = 16;
val joinWithU : 'a t -> string -> ('a -> string) Js.Fn.arity1 -> string
val joinWith : 'a t -> string -> ('a -> string) -> string

joinWith xs sep toString

Concatenates all the elements of xs converted to string with toString, each separated by sep, the string given as the second argument, into a single string. If the array has only one element, then that element will be returned without using the separator. If the array is empty, the empty string will be returned.

joinWith [|0; 1|] ", " string_of_int = "0, 1"
+joinWith [||] " " string_of_int = ""
+joinWith [|1|] " " string_of_int = "1"
val someU : 'a t -> ('a -> bool) Js.Fn.arity1 -> bool
val some : 'a t -> ('a -> bool) -> bool

some xs p

  • returns

    true if at least one of the elements in xs satifies p;where p is a predicate: a function taking an element and returning a bool.

    some [|2; 3; 4|] (fun x -> x mod 2 = 1) = true;;
    +some [|-1; -3; -5|] (fun x -> x > 0) = false;;
val everyU : 'a t -> ('a -> bool) Js.Fn.arity1 -> bool
val every : 'a t -> ('a -> bool) -> bool

every xs p

  • returns

    true if all elements satisfy p;where p is a predicate: a function taking an element and returning a bool.

    every [|1; 3; 5|] (fun x -> x mod 2 = 1) = true;;
    +every [|1; -3; 5|] (fun x -> x > 0) = false;;
val every2U : 'a t -> 'b t -> ('a -> 'b -> bool) Js.Fn.arity2 -> bool
val every2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

every2 xs ys p returns true if p xi yi is true for all pairs of elements up to the shorter length (i.e. min (length xs) (length ys))

every2 [|1;2;3|] [|0;1|] (>) = true;;
+every2 [||] [|1|] (fun  x y -> x > y) = true;;
+every2 [|2;3|] [|1|] (fun  x y -> x > y) = true;;
+every2 [|0;1|] [|5;0|] (fun x y -> x > y) = false;
val some2U : 'a t -> 'b t -> ('a -> 'b -> bool) Js.Fn.arity2 -> bool
val some2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

some2 xs ys p returns true if p xi yi is true for any pair of elements up to the shorter length (i.e. min (length xs) (length ys))

some2 [|0;2|] [|1;0;3|] (>) = true ;;
+(some2 [||] [|1|] (fun   x y -> x > y)) =  false;;
+(some2 [|2;3|] [|1;4|] (fun   x y -> x > y)) = true;;
val cmpU : 'a t -> 'a t -> ('a -> 'a -> int) Js.Fn.arity2 -> int
val cmp : 'a t -> 'a t -> ('a -> 'a -> int) -> int

cmp xs ys f

  • Compared by length if length xs <> length ys;returning -1 iflength xs < length ys or 1 if length xs > length ys
  • Otherwise compare one by one f x y. f returns
  • a negative number if x is “less than” y
  • zero if x is “equal to” y
  • a positive number if x is “greater than” y
  • The comparison returns the first non-zero result of f;or zero if f returns zero for all x and y.
cmp [|1; 3; 5|] [|1; 4; 2|] (fun a b -> compare a b) = -1;;
+cmp [|1; 3; 5|] [|1; 2; 3|] (fun a b -> compare a b) = 1;;
+cmp [|1; 3; 5|] [|1; 3; 5|] (fun a b -> compare a b) = 0;;
val eqU : 'a t -> 'a t -> ('a -> 'a -> bool) Js.Fn.arity2 -> bool
val eq : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool

eq xs ys

  • return false if length is not the same
  • otherwise compare items one by one using f xi yi;and return true if all results are true;false otherwise
eq [|1; 2; 3|] [|-1; -2; -3|] (fun a b -> abs a = abs b) = true
val truncateToLengthUnsafe : 'a t -> int -> unit

Unsafe truncateToLengthUnsafe xs n sets length of array xs to n.

If n is greater than the length of xs;the extra elements are set to Js.Null_undefined.null

If n is less than zero;raises a RangeError.

let arr = [|"ant";"bee";"cat";"dog";"elk"|];;
+let () = truncateToLengthUnsafe arr 3;;
+arr = [|"ant";"bee";"cat"|];;
val initU : int -> (int -> 'a) Js.Fn.arity1 -> 'a t
val init : int -> (int -> 'a) -> 'a t
val push : 'a t -> 'a -> unit

arr->push(item) push element `item` into the array

diff --git a/findlib-1/melange/belt/Belt/Float/index.html b/findlib-1/melange/belt/Belt/Float/index.html new file mode 100644 index 000000000..fa52e38c2 --- /dev/null +++ b/findlib-1/melange/belt/Belt/Float/index.html @@ -0,0 +1,2 @@ + +Float (docs.findlib-1.melange.belt.Belt.Float)

Module Belt.Float

Belt.Float Utililites for Float

val toInt : float -> int
val fromInt : int -> float
val fromString : string -> float option
val toString : float -> string
val (+) : float -> float -> float
val (-) : float -> float -> float
val (*) : float -> float -> float
val (/) : float -> float -> float
diff --git a/findlib-1/melange/belt/Belt/HashMap/Int/index.html b/findlib-1/melange/belt/Belt/HashMap/Int/index.html new file mode 100644 index 000000000..67b7eb042 --- /dev/null +++ b/findlib-1/melange/belt/Belt/HashMap/Int/index.html @@ -0,0 +1,2 @@ + +Int (docs.findlib-1.melange.belt.Belt.HashMap.Int)

Module HashMap.Int

Specalized when key type is int, more efficient than the generic type

type key = int
type 'b t
val make : hintSize:int -> 'b t
val clear : 'b t -> unit
val isEmpty : _ t -> bool
val set : 'a t -> key -> 'a -> unit

setDone tbl k v if k does not exist, add the binding k,v, otherwise, update the old value with the new v

val copy : 'a t -> 'a t
val get : 'a t -> key -> 'a option
val has : 'b t -> key -> bool
val remove : 'a t -> key -> unit
val forEachU : 'b t -> (key -> 'b -> unit) Js.Fn.arity2 -> unit
val forEach : 'b t -> (key -> 'b -> unit) -> unit
val reduceU : 'b t -> 'c -> ('c -> key -> 'b -> 'c) Js.Fn.arity3 -> 'c
val reduce : 'b t -> 'c -> ('c -> key -> 'b -> 'c) -> 'c
val keepMapInPlaceU : 'a t -> (key -> 'a -> 'a option) Js.Fn.arity2 -> unit
val keepMapInPlace : 'a t -> (key -> 'a -> 'a option) -> unit
val size : _ t -> int
val toArray : 'a t -> (key * 'a) array
val keysToArray : 'a t -> key array
val valuesToArray : 'a t -> 'a array
val fromArray : (key * 'a) array -> 'a t
val mergeMany : 'a t -> (key * 'a) array -> unit
val getBucketHistogram : _ t -> int array
val logStats : _ t -> unit
diff --git a/findlib-1/melange/belt/Belt/HashMap/String/index.html b/findlib-1/melange/belt/Belt/HashMap/String/index.html new file mode 100644 index 000000000..e0003b7bb --- /dev/null +++ b/findlib-1/melange/belt/Belt/HashMap/String/index.html @@ -0,0 +1,2 @@ + +String (docs.findlib-1.melange.belt.Belt.HashMap.String)

Module HashMap.String

Specalized when key type is string, more efficient than the generic type

type key = string
type 'b t
val make : hintSize:int -> 'b t
val clear : 'b t -> unit
val isEmpty : _ t -> bool
val set : 'a t -> key -> 'a -> unit

setDone tbl k v if k does not exist, add the binding k,v, otherwise, update the old value with the new v

val copy : 'a t -> 'a t
val get : 'a t -> key -> 'a option
val has : 'b t -> key -> bool
val remove : 'a t -> key -> unit
val forEachU : 'b t -> (key -> 'b -> unit) Js.Fn.arity2 -> unit
val forEach : 'b t -> (key -> 'b -> unit) -> unit
val reduceU : 'b t -> 'c -> ('c -> key -> 'b -> 'c) Js.Fn.arity3 -> 'c
val reduce : 'b t -> 'c -> ('c -> key -> 'b -> 'c) -> 'c
val keepMapInPlaceU : 'a t -> (key -> 'a -> 'a option) Js.Fn.arity2 -> unit
val keepMapInPlace : 'a t -> (key -> 'a -> 'a option) -> unit
val size : _ t -> int
val toArray : 'a t -> (key * 'a) array
val keysToArray : 'a t -> key array
val valuesToArray : 'a t -> 'a array
val fromArray : (key * 'a) array -> 'a t
val mergeMany : 'a t -> (key * 'a) array -> unit
val getBucketHistogram : _ t -> int array
val logStats : _ t -> unit
diff --git a/findlib-1/melange/belt/Belt/HashMap/index.html b/findlib-1/melange/belt/Belt/HashMap/index.html new file mode 100644 index 000000000..90714bed0 --- /dev/null +++ b/findlib-1/melange/belt/Belt/HashMap/index.html @@ -0,0 +1,36 @@ + +HashMap (docs.findlib-1.melange.belt.Belt.HashMap)

Module Belt.HashMap

Belt.HashMap

The top level provides generic mutable hash map operations.

It also has two specialized inner modules Belt.HashMap.Int and Belt.HashMap.String

A mutable Hash map which allows customized hash behavior.

All data are parameterized by not its only type but also a unique identity in the time of initialization, so that two HashMaps of ints initialized with different hash functions will have different type.

For example:

type t = int
+module I0 =
+  (val Belt.Id.hashableU
+      ~hash:(fun[\@u] (a : t)  -> a & 0xff_ff)
+      ~eq:(fun[\@u] a b -> a = b)
+  )
+let s0 : (_, string,_) t = make ~hintSize:40 ~id:(module I0)
+module I1 =
+  (val Belt.Id.hashableU
+      ~hash:(fun[\@u] (a : t)  -> a & 0xff)
+      ~eq:(fun[\@u] a b -> a = b)
+  )
+let s1 : (_, string,_) t  = make ~hintSize:40 ~id:(module I1)

The invariant must be held: for two elements who are equal, their hashed value should be the same

Here the compiler would infer s0 and s1 having different type so that it would not mix.

val s0 :  (int, I0.identity) t
+val s1 :  (int, I1.identity) t

We can add elements to the collection:

let () =
+  add s1 0 "3";
+  add s1 1 "3"

Since this is an mutable data strucure, s1 will contain two pairs.

module Int : sig ... end

Specalized when key type is int, more efficient than the generic type

module String : sig ... end

Specalized when key type is string, more efficient than the generic type

type ('key, 'value, 'id) t

The type of hash tables from type 'key to type 'value.

type ('a, 'id) id = + (module Belt__.Belt_Id.Hashable + with type identity = 'id + and type t = 'a)
val make : hintSize:int -> id:('key, 'id) id -> ('key, 'value, 'id) t
val clear : ('key, 'value, 'id) t -> unit

Empty a hash table.

val isEmpty : (_, _, _) t -> bool
val set : ('key, 'value, 'id) t -> 'key -> 'value -> unit

set tbl k v if k does not exist, add the binding k,v, otherwise, update the old value with the new v

val copy : ('key, 'value, 'id) t -> ('key, 'value, 'id) t
val get : ('key, 'value, 'id) t -> 'key -> 'value option
val has : ('key, 'value, 'id) t -> 'key -> bool

has tbl x checks if x is bound in tbl.

val remove : ('key, 'value, 'id) t -> 'key -> unit
val forEachU : + ('key, 'value, 'id) t -> + ('key -> 'value -> unit) Js.Fn.arity2 -> + unit
val forEach : ('key, 'value, 'id) t -> ('key -> 'value -> unit) -> unit

forEach tbl f applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

val reduceU : + ('key, 'value, 'id) t -> + 'c -> + ('c -> 'key -> 'value -> 'c) Js.Fn.arity3 -> + 'c
val reduce : ('key, 'value, 'id) t -> 'c -> ('c -> 'key -> 'value -> 'c) -> 'c

reduce tbl init f computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

val keepMapInPlaceU : + ('key, 'value, 'id) t -> + ('key -> 'value -> 'value option) Js.Fn.arity2 -> + unit
val keepMapInPlace : + ('key, 'value, 'id) t -> + ('key -> 'value -> 'value option) -> + unit
val size : (_, _, _) t -> int

size tbl returns the number of bindings in tbl. It takes constant time.

val toArray : ('key, 'value, 'id) t -> ('key * 'value) array
val keysToArray : ('key, _, _) t -> 'key array
val valuesToArray : (_, 'value, _) t -> 'value array
val fromArray : + ('key * 'value) array -> + id:('key, 'id) id -> + ('key, 'value, 'id) t
val mergeMany : ('key, 'value, 'id) t -> ('key * 'value) array -> unit
val getBucketHistogram : (_, _, _) t -> int array
val logStats : (_, _, _) t -> unit
diff --git a/findlib-1/melange/belt/Belt/HashSet/Int/index.html b/findlib-1/melange/belt/Belt/HashSet/Int/index.html new file mode 100644 index 000000000..a1a4d7bcd --- /dev/null +++ b/findlib-1/melange/belt/Belt/HashSet/Int/index.html @@ -0,0 +1,2 @@ + +Int (docs.findlib-1.melange.belt.Belt.HashSet.Int)

Module HashSet.Int

Specalized when key type is int, more efficient than the generic type

This module is Belt.HashSet specialized with key type to be a primitive type.

It is more efficient in general, the API is the same with Belt.HashSet except its key type is fixed, and identity is not needed(using the built-in one)

See Belt.HashSet

type key = int
type t
val make : hintSize:int -> t
val clear : t -> unit
val isEmpty : t -> bool
val add : t -> key -> unit
val copy : t -> t
val has : t -> key -> bool
val remove : t -> key -> unit
val forEachU : t -> (key -> unit) Js.Fn.arity1 -> unit
val forEach : t -> (key -> unit) -> unit
val reduceU : t -> 'c -> ('c -> key -> 'c) Js.Fn.arity2 -> 'c
val reduce : t -> 'c -> ('c -> key -> 'c) -> 'c
val size : t -> int
val logStats : t -> unit
val toArray : t -> key array
val fromArray : key array -> t
val mergeMany : t -> key array -> unit
val getBucketHistogram : t -> int array
diff --git a/findlib-1/melange/belt/Belt/HashSet/String/index.html b/findlib-1/melange/belt/Belt/HashSet/String/index.html new file mode 100644 index 000000000..25b390395 --- /dev/null +++ b/findlib-1/melange/belt/Belt/HashSet/String/index.html @@ -0,0 +1,2 @@ + +String (docs.findlib-1.melange.belt.Belt.HashSet.String)

Module HashSet.String

Specalized when key type is string, more efficient than the generic type

This module is Belt.HashSet specialized with key type to be a primitive type.

It is more efficient in general, the API is the same with Belt.HashSet except its key type is fixed, and identity is not needed(using the built-in one)

See Belt.HashSet

type key = string
type t
val make : hintSize:int -> t
val clear : t -> unit
val isEmpty : t -> bool
val add : t -> key -> unit
val copy : t -> t
val has : t -> key -> bool
val remove : t -> key -> unit
val forEachU : t -> (key -> unit) Js.Fn.arity1 -> unit
val forEach : t -> (key -> unit) -> unit
val reduceU : t -> 'c -> ('c -> key -> 'c) Js.Fn.arity2 -> 'c
val reduce : t -> 'c -> ('c -> key -> 'c) -> 'c
val size : t -> int
val logStats : t -> unit
val toArray : t -> key array
val fromArray : key array -> t
val mergeMany : t -> key array -> unit
val getBucketHistogram : t -> int array
diff --git a/findlib-1/melange/belt/Belt/HashSet/index.html b/findlib-1/melange/belt/Belt/HashSet/index.html new file mode 100644 index 000000000..63f1ee50c --- /dev/null +++ b/findlib-1/melange/belt/Belt/HashSet/index.html @@ -0,0 +1,20 @@ + +HashSet (docs.findlib-1.melange.belt.Belt.HashSet)

Module Belt.HashSet

Belt.HashSet

The top level provides generic mutable hash set operations.

It also has two specialized inner modules Belt.HashSet.Int and Belt.HashSet.String

A mutable Hash set which allows customized hash behavior.

All data are parameterized by not its only type but also a unique identity in the time of initialization, so that two HashSets of ints initialized with different hash functions will have different type.

For example:

type t = int
+module I0 =
+  (val Belt.Id.hashableU
+      ~hash:(fun[\@u] (a : t)  -> a & 0xff_ff)
+      ~eq:(fun[\@u] a b -> a = b)
+  )
+let s0 = make ~id:(module I0) ~hintSize:40
+module I1 =
+  (val Belt.Id.hashableU
+      ~hash:(fun[\@u] (a : t)  -> a & 0xff)
+      ~eq:(fun[\@u] a b -> a = b)
+  )
+let s1 = make ~id:(module I1) ~hintSize:40

The invariant must be held: for two elements who are equal, their hashed value should be the same

Here the compiler would infer s0 and s1 having different type so that it would not mix.

val s0 :  (int, I0.identity) t
+val s1 :  (int, I1.identity) t

We can add elements to the collection:

let () =
+  add s1 0;
+  add s1 1

Since this is an mutable data strucure, s1 will contain two pairs.

module Int : sig ... end

Specalized when key type is int, more efficient than the generic type

module String : sig ... end

Specalized when key type is string, more efficient than the generic type

type ('a, 'id) t

The type of hash tables from type 'a to type 'b.

type ('a, 'id) id = + (module Belt__.Belt_Id.Hashable + with type identity = 'id + and type t = 'a)
val make : hintSize:int -> id:('a, 'id) id -> ('a, 'id) t
val clear : ('a, 'id) t -> unit
val isEmpty : (_, _) t -> bool
val add : ('a, 'id) t -> 'a -> unit
val copy : ('a, 'id) t -> ('a, 'id) t
val has : ('a, 'id) t -> 'a -> bool
val remove : ('a, 'id) t -> 'a -> unit
val forEachU : ('a, 'id) t -> ('a -> unit) Js.Fn.arity1 -> unit
val forEach : ('a, 'id) t -> ('a -> unit) -> unit

Order unspecified.

val reduceU : ('a, 'id) t -> 'c -> ('c -> 'a -> 'c) Js.Fn.arity2 -> 'c
val reduce : ('a, 'id) t -> 'c -> ('c -> 'a -> 'c) -> 'c

Order unspecified.

val size : ('a, 'id) t -> int
val logStats : (_, _) t -> unit
val toArray : ('a, 'id) t -> 'a array
val fromArray : 'a array -> id:('a, 'id) id -> ('a, 'id) t
val mergeMany : ('a, 'id) t -> 'a array -> unit
val getBucketHistogram : (_, _) t -> int array
diff --git a/findlib-1/melange/belt/Belt/Id/MakeComparable/argument-1-M/index.html b/findlib-1/melange/belt/Belt/Id/MakeComparable/argument-1-M/index.html new file mode 100644 index 000000000..5ca980bd3 --- /dev/null +++ b/findlib-1/melange/belt/Belt/Id/MakeComparable/argument-1-M/index.html @@ -0,0 +1,2 @@ + +M (docs.findlib-1.melange.belt.Belt.Id.MakeComparable.M)

Parameter MakeComparable.M

type t
val cmp : t -> t -> int
diff --git a/findlib-1/melange/belt/Belt/Id/MakeComparable/index.html b/findlib-1/melange/belt/Belt/Id/MakeComparable/index.html new file mode 100644 index 000000000..2df838ff0 --- /dev/null +++ b/findlib-1/melange/belt/Belt/Id/MakeComparable/index.html @@ -0,0 +1,2 @@ + +MakeComparable (docs.findlib-1.melange.belt.Belt.Id.MakeComparable)

Module Id.MakeComparable

Parameters

module M : sig ... end

Signature

type identity
type t = M.t
val cmp : (t, identity) cmp
diff --git a/findlib-1/melange/belt/Belt/Id/MakeComparableU/argument-1-M/index.html b/findlib-1/melange/belt/Belt/Id/MakeComparableU/argument-1-M/index.html new file mode 100644 index 000000000..9900f4efa --- /dev/null +++ b/findlib-1/melange/belt/Belt/Id/MakeComparableU/argument-1-M/index.html @@ -0,0 +1,2 @@ + +M (docs.findlib-1.melange.belt.Belt.Id.MakeComparableU.M)

Parameter MakeComparableU.M

type t
val cmp : (t -> t -> int) Js.Fn.arity2
diff --git a/findlib-1/melange/belt/Belt/Id/MakeComparableU/index.html b/findlib-1/melange/belt/Belt/Id/MakeComparableU/index.html new file mode 100644 index 000000000..885c3d929 --- /dev/null +++ b/findlib-1/melange/belt/Belt/Id/MakeComparableU/index.html @@ -0,0 +1,2 @@ + +MakeComparableU (docs.findlib-1.melange.belt.Belt.Id.MakeComparableU)

Module Id.MakeComparableU

Parameters

module M : sig ... end

Signature

type identity
type t = M.t
val cmp : (t, identity) cmp
diff --git a/findlib-1/melange/belt/Belt/Id/MakeHashable/argument-1-M/index.html b/findlib-1/melange/belt/Belt/Id/MakeHashable/argument-1-M/index.html new file mode 100644 index 000000000..802587c56 --- /dev/null +++ b/findlib-1/melange/belt/Belt/Id/MakeHashable/argument-1-M/index.html @@ -0,0 +1,2 @@ + +M (docs.findlib-1.melange.belt.Belt.Id.MakeHashable.M)

Parameter MakeHashable.M

type t
val hash : t -> int
val eq : t -> t -> bool
diff --git a/findlib-1/melange/belt/Belt/Id/MakeHashable/index.html b/findlib-1/melange/belt/Belt/Id/MakeHashable/index.html new file mode 100644 index 000000000..825e2bfc9 --- /dev/null +++ b/findlib-1/melange/belt/Belt/Id/MakeHashable/index.html @@ -0,0 +1,2 @@ + +MakeHashable (docs.findlib-1.melange.belt.Belt.Id.MakeHashable)

Module Id.MakeHashable

Parameters

module M : sig ... end

Signature

type identity
type t = M.t
val hash : (t, identity) hash
val eq : (t, identity) eq
diff --git a/findlib-1/melange/belt/Belt/Id/MakeHashableU/argument-1-M/index.html b/findlib-1/melange/belt/Belt/Id/MakeHashableU/argument-1-M/index.html new file mode 100644 index 000000000..37e8960eb --- /dev/null +++ b/findlib-1/melange/belt/Belt/Id/MakeHashableU/argument-1-M/index.html @@ -0,0 +1,2 @@ + +M (docs.findlib-1.melange.belt.Belt.Id.MakeHashableU.M)

Parameter MakeHashableU.M

type t
val hash : (t -> int) Js.Fn.arity1
val eq : (t -> t -> bool) Js.Fn.arity2
diff --git a/findlib-1/melange/belt/Belt/Id/MakeHashableU/index.html b/findlib-1/melange/belt/Belt/Id/MakeHashableU/index.html new file mode 100644 index 000000000..4fb285ec3 --- /dev/null +++ b/findlib-1/melange/belt/Belt/Id/MakeHashableU/index.html @@ -0,0 +1,2 @@ + +MakeHashableU (docs.findlib-1.melange.belt.Belt.Id.MakeHashableU)

Module Id.MakeHashableU

Parameters

module M : sig ... end

Signature

type identity
type t = M.t
val hash : (t, identity) hash
val eq : (t, identity) eq
diff --git a/findlib-1/melange/belt/Belt/Id/index.html b/findlib-1/melange/belt/Belt/Id/index.html new file mode 100644 index 000000000..8e9f9d953 --- /dev/null +++ b/findlib-1/melange/belt/Belt/Id/index.html @@ -0,0 +1,22 @@ + +Id (docs.findlib-1.melange.belt.Belt.Id)

Module Belt.Id

Belt.Id

Provide utilities to create identified comparators or hashes for data structures used below.

It create a unique identifier per module of functions so that different data structures with slightly different comparison functions won't mix

Belt.Id

Provide utiliites to create identified comparators or hashes for data structures used below.

It create a unique identifer per module of functions so that different data structures with slightly different comparison functions won't mix.

type ('a, 'id) hash

('a, 'id) hash

Its runtime represenation is a hash function, but signed with a type parameter, so that different hash functions type mismatch

type ('a, 'id) eq

('a, 'id) eq

Its runtime represenation is an eq function, but signed with a type parameter, so that different hash functions type mismatch

type ('a, 'id) cmp

('a,'id) cmp

Its runtime representation is a cmp function, but signed with a type parameter, so that different hash functions type mismatch

module type Comparable = sig ... end
type ('key, 'id) comparable = + (module Comparable + with type identity = 'id + and type t = 'key)

('key, 'id) cmparable is a module of functions, here it only includes cmp.

Unlike normal functions, when created, it comes with a unique identity (guaranteed by the type system).

It can be created using function comparableU or comparable.

The idea of a unique identity when created is that it makes sure two sets would type mismatch if they use different comparison function

module MakeComparableU (M : sig ... end) : Comparable with type t = M.t
module MakeComparable (M : sig ... end) : Comparable with type t = M.t
val comparableU : + cmp:('a -> 'a -> int) Js.Fn.arity2 -> + (module Comparable + with type t = 'a)
val comparable : cmp:('a -> 'a -> int) -> (module Comparable with type t = 'a)
module C = (
+  val Belt.Id.comparable ~cmp:(compare : int -> int -> int)
+)
+let m = Belt.Set.make(module C)

Note that the name of C can not be ignored

module type Hashable = sig ... end
type ('key, 'id) hashable = + (module Hashable + with type identity = 'id + and type t = 'key)

('key, 'id) hashable is a module of functions, here it only includes hash, eq.

Unlike normal functions, when created, it comes with a unique identity (guaranteed by the type system).

It can be created using function hashableU or hashable.

The idea of a unique identity when created is that it makes sure two hash sets would type mismatch if they use different comparison function

module MakeHashableU (M : sig ... end) : Hashable with type t = M.t
module MakeHashable (M : sig ... end) : Hashable with type t = M.t
val hashableU : + hash:('a -> int) Js.Fn.arity1 -> + eq:('a -> 'a -> bool) Js.Fn.arity2 -> + (module Hashable + with type t = 'a)
val hashable : + hash:('a -> int) -> + eq:('a -> 'a -> bool) -> + (module Hashable + with type t = 'a)
diff --git a/findlib-1/melange/belt/Belt/Id/module-type-Comparable/index.html b/findlib-1/melange/belt/Belt/Id/module-type-Comparable/index.html new file mode 100644 index 000000000..5150fc0e2 --- /dev/null +++ b/findlib-1/melange/belt/Belt/Id/module-type-Comparable/index.html @@ -0,0 +1,2 @@ + +Comparable (docs.findlib-1.melange.belt.Belt.Id.Comparable)

Module type Id.Comparable

type identity
type t
val cmp : (t, identity) cmp
diff --git a/findlib-1/melange/belt/Belt/Id/module-type-Hashable/index.html b/findlib-1/melange/belt/Belt/Id/module-type-Hashable/index.html new file mode 100644 index 000000000..e93a5f3de --- /dev/null +++ b/findlib-1/melange/belt/Belt/Id/module-type-Hashable/index.html @@ -0,0 +1,2 @@ + +Hashable (docs.findlib-1.melange.belt.Belt.Id.Hashable)

Module type Id.Hashable

type identity
type t
val hash : (t, identity) hash
val eq : (t, identity) eq
diff --git a/findlib-1/melange/belt/Belt/Int/index.html b/findlib-1/melange/belt/Belt/Int/index.html new file mode 100644 index 000000000..3cbf35e4f --- /dev/null +++ b/findlib-1/melange/belt/Belt/Int/index.html @@ -0,0 +1,2 @@ + +Int (docs.findlib-1.melange.belt.Belt.Int)

Module Belt.Int

Belt.Int Utililites for Int

val toFloat : int -> float
val fromFloat : float -> int
val fromString : string -> int option
val toString : int -> string
val (+) : int -> int -> int
val (-) : int -> int -> int
val (*) : int -> int -> int
val (/) : int -> int -> int
diff --git a/findlib-1/melange/belt/Belt/List/index.html b/findlib-1/melange/belt/Belt/List/index.html new file mode 100644 index 000000000..30316c6d6 --- /dev/null +++ b/findlib-1/melange/belt/Belt/List/index.html @@ -0,0 +1,92 @@ + +List (docs.findlib-1.melange.belt.Belt.List)

Module Belt.List

Belt.List

Utilities for List data type

Belt.List

Utilities for List data type.

This module is compatible with original ocaml stdlib. In general, all functions comes with the original stdlib also applies to this collection, however, this module provides faster and stack safer utilities

type 'a t = 'a list

'a t is compatible with built-in list type

val length : 'a t -> int

length xs

  • returns

    the length of the list xs

val size : 'a t -> int

See length

val head : 'a t -> 'a option

head xs returns None if xs is the empty list, otherwise it returns Some value where value is the first element in the list.

head [] = None ;;
+head [1;2;3] = Some 1 ;;
val headExn : 'a t -> 'a

headExn xs

See head

raise an exception if xs is empty

val tail : 'a t -> 'a t option

tail xs returns None if xs is empty; otherwise it returns Some xs2 where xs2 is everything except the first element of xs;

tail [] = None;;
+tail [1;2;3;4] = Some [2;3;4];;
val tailExn : 'a t -> 'a t

tailExn xs

See tail

raise an exception if xs is empty

val add : 'a t -> 'a -> 'a t

add xs y adds y to the beginning of list xs

add [1] 3 = [3;1];;
val get : 'a t -> int -> 'a option

get xs n

return the nth element in xs, or None if n is larger than the length

get [0;3;32] 2 = Some 32 ;;
+get [0;3;32] 3 = None;;
val getExn : 'a t -> int -> 'a

getExn xs n

See get

raise an exception if n is larger than the length

val make : int -> 'a -> 'a t

make n v

  • return a list of length n with each element filled with value v
  • return the empty list if n is negative
make 3 1 =  [1;1;1]
val makeByU : int -> (int -> 'a) Js.Fn.arity1 -> 'a t
val makeBy : int -> (int -> 'a) -> 'a t

makeBy n f

  • return a list of length n with element i initialized with f i
  • return the empty list if n is negative
makeBy 5 (fun i -> i) = [0;1;2;3;4];;
+makeBy 5 (fun i -> i * i) = [0;1;4;9;16];;
val shuffle : 'a t -> 'a t

shuffle xs

  • returns

    a new list in random order

val drop : 'a t -> int -> 'a t option

drop xs n

return the list obtained by dropping the first n elements, or None if xs has fewer than n elements

drop [1;2;3] 2 = Some [3];;
+drop [1;2;3] 3 = Some [];;
+drop [1;2;3] 4 = None;;
val take : 'a t -> int -> 'a t option

take xs n

return a list with the first n elements from xs, or None if xs has fewer than n elements

take [1;2;3] 1 = Some [1];;
+take [1;2;3] 2 = Some [1;2];;
+take [1;2;3] 4 = None;;
val splitAt : 'a t -> int -> ('a list * 'a list) option

splitAt xs n split the list xs at position n return None when the length of xs is less than n

splitAt [0;1;2;3;4] 2 = Some ([0;1], [2;3;4])
val concat : 'a t -> 'a t -> 'a t

concat xs ys

  • returns

    the list obtained by adding ys after xs

    concat [1;2;3] [4;5] = [1;2;3;4;5]
val concatMany : 'a t array -> 'a t

concatMany a return the list obtained by concatenating in order all the lists in array a

concatMany [| [1;2;3] ; []; [3]; [4] |] = [1;2;3;3;4]
val reverseConcat : 'a t -> 'a t -> 'a t

reverseConcat xs ys is equivalent to concat (reverse xs) ys

reverseConcat [1;2] [3;4] = [2;1;3;4]
val flatten : 'a t t -> 'a t

flatten ls return the list obtained by concatenating in order all the lists in list ls

flatten [ [1;2;3] ; []; [3]; [4] ] = [1;2;3;3;4]
val mapU : 'a t -> ('a -> 'b) Js.Fn.arity1 -> 'b t
val map : 'a t -> ('a -> 'b) -> 'b t

map xs f

return the list obtained by applying f to each element of xs

map [1;2] (fun x-> x + 1) = [3;4]
val zip : 'a t -> 'b t -> ('a * 'b) t

zip xs ys

  • returns

    a list of pairs from the two lists with the length of the shorter list

    zip [1;2] [3;4;5] = [(1,3); (2,4)]
val zipByU : 'a t -> 'b t -> ('a -> 'b -> 'c) Js.Fn.arity2 -> 'c t
val zipBy : 'a t -> 'b t -> ('a -> 'b -> 'c) -> 'c t

zipBy xs ys f

See zip

Equivalent to zip xs ys |> List.map (fun (x,y) -> f x y)

zipBy [1;2;3] [4;5] (fun a b -> 2 * a + b) = [6;9];;
val mapWithIndexU : 'a t -> (int -> 'a -> 'b) Js.Fn.arity2 -> 'b t
val mapWithIndex : 'a t -> (int -> 'a -> 'b) -> 'b t

mapWithIndex xs f applies f to each element of xs. Function f takes two arguments: the index starting from 0 and the element from xs.

mapWithIndex [1;2;3] (fun i x -> i + x) =
+[0 + 1; 1 + 2; 2 + 3 ]
val fromArray : 'a array -> 'a t

fromArray arr converts the given array to a list

fromArray [|1;2;3|]  = [1;2;3]
val toArray : 'a t -> 'a array

toArray xs converts the given list to an array

toArray [1;2;3] = [|1;2;3|]
val reverse : 'a t -> 'a t

reverse xs returns a new list whose elements are those of xs in reverse order.

reverse [1;2;3] = [3;2;1]
val mapReverseU : 'a t -> ('a -> 'b) Js.Fn.arity1 -> 'b t
val mapReverse : 'a t -> ('a -> 'b) -> 'b t

mapReverse xs f

Equivalent to reverse (map xs f)

mapReverse [3;4;5] (fun x -> x * x) = [25;16;9];;
val forEachU : 'a t -> ('a -> 'b) Js.Fn.arity1 -> unit
val forEach : 'a t -> ('a -> 'b) -> unit

forEach xs f Call f on each element of xs from the beginning to end. f returns unit, so no new array is created. Use foreach when you are primarily concerned with repetitively creating side effects.

forEach ["a";"b";"c"] (fun x -> Js.log("Item: " ^ x));;
+(*  prints:
+  Item: a
+  Item: b
+  Item: c
+*)
+
+let us = ref 0;;
+forEach [1;2;3;4] (fun x -> us := !us + x);;
+!us  = 1 + 2 + 3 + 4;;
val forEachWithIndexU : 'a t -> (int -> 'a -> 'b) Js.Fn.arity2 -> unit
val forEachWithIndex : 'a t -> (int -> 'a -> 'b) -> unit

forEachWithIndex xs f

forEach ["a";"b";"c"] (fun i x -> Js.log("Item " ^ (string_of_int i) ^ " is " ^ x));;
+(*  prints:
+  Item 0 is a
+  Item 1 is b
+  Item 2 is cc
+*)
+
+let total = ref 0 ;;
+forEachWithIndex [10;11;12;13] (fun i x -> total := !total + x + i);;
+!total  = 0 + 10 + 1 +  11 + 2 + 12 + 3 + 13;;
val reduceU : 'a t -> 'b -> ('b -> 'a -> 'b) Js.Fn.arity2 -> 'b
val reduce : 'a t -> 'b -> ('b -> 'a -> 'b) -> 'b

reduce xs f

Applies f to each element of xs from beginning to end. Function f has two parameters: the item from the list and an “accumulator”, which starts with a value of init. reduce returns the final value of the accumulator.

reduce [1;2;3;4] 0 (+) = 10;;
+reduce [1;2;3;4] 10 (-) = 0;;
+reduce [1;2;3;4] [] add = [4;3;2;1];
val reduceWithIndexU : 'a t -> 'b -> ('b -> 'a -> int -> 'b) Js.Fn.arity3 -> 'b
val reduceWithIndex : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b

reduceWithIndex xs f

Applies f to each element of xs from beginning to end. Function f has three parameters: the item from the list and an “accumulator”, which starts with a value of init and the index of each element. reduceWithIndex returns the final value of the accumulator.

reduceWithIndex [1;2;3;4] 0 (fun acc x i -> acc + x + i) = 16;;
val reduceReverseU : 'a t -> 'b -> ('b -> 'a -> 'b) Js.Fn.arity2 -> 'b
val reduceReverse : 'a t -> 'b -> ('b -> 'a -> 'b) -> 'b

reduceReverse xs f

Works like reduce, except that function f is applied to each item of xs from the last back to the first.

reduceReverse [1;2;3;4] 0 (+) = 10;;
+reduceReverse [1;2;3;4] 10 (-) = 0;;
+reduceReverse [1;2;3;4] [] add = [1;2;3;4];;
val mapReverse2U : 'a t -> 'b t -> ('a -> 'b -> 'c) Js.Fn.arity2 -> 'c t
val mapReverse2 : 'a t -> 'b t -> ('a -> 'b -> 'c) -> 'c t

mapReverse2 xs ys f

equivalent to reverse (zipBy xs ys f)

mapReverse2 [1;2;3] [1;2] (+) = [4;2]
val forEach2U : 'a t -> 'b t -> ('a -> 'b -> 'c) Js.Fn.arity2 -> unit
val forEach2 : 'a t -> 'b t -> ('a -> 'b -> 'c) -> unit

forEach2 xs ys f stop with the shorter list

val reduce2U : 'b t -> 'c t -> 'a -> ('a -> 'b -> 'c -> 'a) Js.Fn.arity3 -> 'a
val reduce2 : 'b t -> 'c t -> 'a -> ('a -> 'b -> 'c -> 'a) -> 'a

reduce2 xs ys init f

Applies f to each element of xs and ys from beginning to end. Stops with the shorter list. Function f has three parameters: an “accumulator” which starts with a value of init, an item from xs, and an item from ys. reduce2 returns the final value of the accumulator.

reduce2 [1;2;3] [4;5] 0 (fun acc x y -> acc + x * x + y) =  0 + (1 * 1 + 4) + (2 * 2 + 5);;
+reduce2 [1;2;3] [4;5] [] (fun acc x y -> add acc (x + y) = [2 +5;1 + 4 ];; (*add appends at end *)
val reduceReverse2U : + 'a t -> + 'b t -> + 'c -> + ('c -> 'a -> 'b -> 'c) Js.Fn.arity3 -> + 'c
val reduceReverse2 : 'a t -> 'b t -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c

reduceReverse2 xs ys init f

Applies f to each element of xs and ys from end to beginning. Stops with the shorter list. Function f has three parameters: an “accumulator” which starts with a value of init, an item from xs, and an item from ys. reduce2 returns the final value of the accumulator.

reduceReverse2 [1;2;3] [4;5] 0 (fun acc x y -> acc + x * x + y) =  0 + (1 * 1 + 4) + (2 * 2 + 5);;
+reduceReverse2 [1;2;3] [4;5] [] (fun acc x y -> add acc (x + y) = [1 + 4;2 + 5];; (*add appends at end *)
val everyU : 'a t -> ('a -> bool) Js.Fn.arity1 -> bool
val every : 'a t -> ('a -> bool) -> bool

every xs p

  • returns

    true if all elements satisfy p, where p is a predicate: a function taking an element and returning a bool.

    every [] (fun x -> x mod 2 = 0) = true;;
    +every [2;4;6] (fun x -> x mod 2 = 0 ) = true;;
    +every [1;-3;5] (fun x -> x > 0) = false;;
val someU : 'a t -> ('a -> bool) Js.Fn.arity1 -> bool
val some : 'a t -> ('a -> bool) -> bool

some xs p

  • returns

    true if at least one of the elements in xs satifies p, where p is a predicate: a function taking an element and returning a bool.

    some [] (fun x -> x mod 2 = 0) = false ;;
    +some [1;2;4] (fun x -> x mod 2 = 0) = true;;
    +some [-1;-3;-5] (fun x -> x > 0) = false;;
val every2U : 'a t -> 'b t -> ('a -> 'b -> bool) Js.Fn.arity2 -> bool
val every2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

every2 xs ys p returns true if predicate p xi yi is true for all pairs of elements up to the shorter length (i.e. min (length xs) (length ys))

every2 [1;2;3] [0;1] (>) = true;;
+every2 [] [1] (fun  x y -> x > y) = true;;
+every2 [2;3] [1] (fun  x y -> x > y) = true;;
+every2 [0;1] [5;0] (fun x y -> x > y) = false;
val some2U : 'a t -> 'b t -> ('a -> 'b -> bool) Js.Fn.arity2 -> bool
val some2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

some2 xs ys p returns true if p xi yi is true for any pair of elements up to the shorter length (i.e. min (length xs) (length ys))

some2 [0;2] [1;0;3] (>) = true ;;
+some2 [] [1] (fun  x y -> x > y) =  false;;
+some2 [2;3] [1;4] (fun  x y -> x > y) = true;;
val cmpByLength : 'a t -> 'a t -> int

cmpByLength l1 l2

Compare two lists solely by length. Returns -1 if length l1 is less than length l2, 0 if length l1 equals length l2, and 1 if length l1 is greater than length l2.

cmpByLength [1;2] [3;4;5;6] = -1;;
+cmpByLength [1;2;3] [4;5;6] = 0;;
+cmpByLength [1;2;3;4] [5;6] = 1;;
val cmpU : 'a t -> 'a t -> ('a -> 'a -> int) Js.Fn.arity2 -> int
val cmp : 'a t -> 'a t -> ('a -> 'a -> int) -> int

Compare elements one by one f x y. f returns

  • a negative number if x is “less than” y
  • zero if x is “equal to” y
  • a positive number if x is “greater than” y The comparison returns the first non-zero result of f, or zero if f returns zero for all x and y. If all items have compared equal, but xs is exhausted first, return -1. (xs is shorter) If all items have compared equal, but ys is exhausted first, return 1 (xs is longer)
cmp [3] [3;7] (fun a b -> compare a b) = -1
+cmp [5;3] [5] (fun a b -> compare a b)  = 1
+cmp [|1; 3; 5|] [|1; 4; 2|] (fun a b -> compare a b) = -1;;
+cmp [|1; 3; 5|] [|1; 2; 3|] (fun a b -> compare a b) = 1;;
+cmp [|1; 3; 5|] [|1; 3; 5|] (fun a b -> compare a b) = 0;;

Attention: The total ordering of List is different from Array, for Array, we compare the length first and, only if the lengths are equal, elements one by one. For lists, we just compare elements one by one

val eqU : 'a t -> 'a t -> ('a -> 'a -> bool) Js.Fn.arity2 -> bool
val eq : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool

eq xs ys eqElem check equality of xs and ys using eqElem for equality on elements, where eqElem is a function that returns true if items x and y meet some criterion for equality, false otherwise. eq false if length of xs and ys are not the same.

eq [1;2;3] [1;2] (=) = false ;;
+eq [1;2] [1;2] (=) = true;;
+eq [1; 2; 3] [-1; -2; -3] (fun a b -> abs a = abs b) = true;;
val hasU : 'a t -> 'b -> ('a -> 'b -> bool) Js.Fn.arity2 -> bool
val has : 'a t -> 'b -> ('a -> 'b -> bool) -> bool

has xs eqFcn returns true if the list contains at least one element for which eqFcn x returns true

has [1;2;3] 2 (=) = true;;
+has [1;2;3] 4 (=) = false;;
+has [-1;-2;-3] 2 (fun a b -> abs a = abs b) = true;;
val getByU : 'a t -> ('a -> bool) Js.Fn.arity1 -> 'a option
val getBy : 'a t -> ('a -> bool) -> 'a option

getBy xs p returns Some value for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getBy [1;4;3;2] (fun x -> x mod 2 = 0) = Some 4
+getBy [15;13;11] (fun x -> x mod 2 = 0) = None
val keepU : 'a t -> ('a -> bool) Js.Fn.arity1 -> 'a t
val keep : 'a t -> ('a -> bool) -> 'a t

keep xs p returns a list of all elements in xs which satisfy the predicate function p

keep [1;2;3;4] (fun x -> x mod 2 = 0) =
+[2;4]
val keepWithIndexU : 'a t -> ('a -> int -> bool) Js.Fn.arity2 -> 'a t
val keepWithIndex : 'a t -> ('a -> int -> bool) -> 'a t

keepWithIndex xs p returns a list of all elements in xs which satisfy the predicate function p

keepWithIndex [1;2;3;4] (fun _x i -> i mod 2 = 0)
+=
+[1;3]
val keepMapU : 'a t -> ('a -> 'b option) Js.Fn.arity1 -> 'b t
val keepMap : 'a t -> ('a -> 'b option) -> 'b t

keepMap xs f applies f to each element of xs. If f xi returns Some value, then value is kept in the resulting list; if f xi returns None, the element is not retained in the result.

keepMap [1;2;3;4] (fun x -> if x mod 2 = 0 then Some (-x ) else None)
+=
+[-2;-4]
val partitionU : 'a t -> ('a -> bool) Js.Fn.arity1 -> 'a t * 'a t
val partition : 'a t -> ('a -> bool) -> 'a t * 'a t

partition xs p creates a pair of lists; the first list consists of all elements of xs that satisfy the predicate function p; the second list consists of all elements of xs that do not satisfy p

partition [1;2;3;4] (fun x -> x mod 2 = 0) =
+([2;4], [1;3])
val unzip : ('a * 'b) t -> 'a t * 'b t

unzip xs takes a list of pairs and creates a pair of lists. The first list contains all the first items of the pairs; the second list contains all the second items.

unzip [(1,2) ; (3,4)] = ([1;3], [2;4]);;
+unzip [(1,2) ; (3,4) ; (5,6) ; (7,8)] = ([1;3;5;7], [2;4;6;8]);;
val getAssocU : + ('a * 'c) t -> + 'b -> + ('a -> 'b -> bool) Js.Fn.arity2 -> + 'c option
val getAssoc : ('a * 'c) t -> 'b -> ('a -> 'b -> bool) -> 'c option

getAssoc xs k eq

return the second element of a pair in xs where the first element equals x as per the predicate function eq, or None if not found

getAssoc [ 1, "a"; 2, "b"; 3, "c"] 2 (=) = Some "b"
+getAssoc [9, "morning"; 15, "afternoon"; 22, "night"] 3 (fun a b -> a mod 12 = b mod 12) = Some "afternoon"
val hasAssocU : ('a * 'c) t -> 'b -> ('a -> 'b -> bool) Js.Fn.arity2 -> bool
val hasAssoc : ('a * 'c) t -> 'b -> ('a -> 'b -> bool) -> bool

hasAssoc xs k eq return true if there is a pair in xs where the first element equals k as per the predicate funtion eq

hasAssoc [1, "a"; 2, "b"; 3,"c"] 1 (=) = true;;
+hasAssoc [9, "morning"; 15, "afternoon"; 22, "night"] 3 (fun a b -> a mod 12 = b mod 12) = true;;
val removeAssocU : + ('a * 'c) t -> + 'b -> + ('a -> 'b -> bool) Js.Fn.arity2 -> + ('a * 'c) t
val removeAssoc : ('a * 'c) t -> 'b -> ('a -> 'b -> bool) -> ('a * 'c) t

removeAssoc xs k eq Return a list after removing the first pair whose first value is k per the equality predicate eq; if not found, return a new list identical to xs.

removeAssoc [1,"a"; 2, "b"; 3, "c" ] 1 (=) =
+  [2, "b"; 3, "c"]
+removeAssoc [1,"a"; 2, "b"; 3, "c" ] 99 (=) =
+  [1, "a"; 2, "b"; 3, "c"]
val setAssocU : + ('a * 'c) t -> + 'a -> + 'c -> + ('a -> 'a -> bool) Js.Fn.arity2 -> + ('a * 'c) t
val setAssoc : ('a * 'c) t -> 'a -> 'c -> ('a -> 'a -> bool) -> ('a * 'c) t

setAssoc xs k v eq if k exists in xs by satisfying the eq predicate, return a new list with the key and value replaced by the new k and v; otherwise, return a new list with the pair k, v added to the head of xs.

setAssoc [1,"a"; 2, "b"; 3, "c"] 2 "x" (=) =
+[1,"a"; 2, "x"; 3,"c"] ;;
+
+setAssoc [1,"a"; 3, "c"] 2 "b" (=) =
+[2,"b"; 1,"a"; 3, "c"]
+
+setAssoc [9, "morning"; 3, "morning?!"; 22, "night"] 15 "afternoon"
+  (fun a b -> a mod 12 = b mod 12) = [9, "morning"; 15, "afternoon"; 22, "night"]

Note carefully the last example! Since 15 mod 12 equals 3 mod 12, both the key and value are replaced in the list.

val sortU : 'a t -> ('a -> 'a -> int) Js.Fn.arity2 -> 'a t
val sort : 'a t -> ('a -> 'a -> int) -> 'a t

sort xs Returns a sorted list.

sort [5; 4; 9; 3; 7] (fun a b -> a - b) = [3; 4; 5; 7; 9]
diff --git a/findlib-1/melange/belt/Belt/Map/Dict/index.html b/findlib-1/melange/belt/Belt/Map/Dict/index.html new file mode 100644 index 000000000..a419b94c4 --- /dev/null +++ b/findlib-1/melange/belt/Belt/Map/Dict/index.html @@ -0,0 +1,78 @@ + +Dict (docs.findlib-1.melange.belt.Belt.Map.Dict)

Module Map.Dict

This module seprate identity from data, it is a bit more verboe but slightly more efficient due to the fact that there is no need to pack identity and data back after each operation

Advanced usage only

type ('key, 'value, 'id) t
type ('key, 'id) cmp
val empty : ('k, 'v, 'id) t
val isEmpty : ('k, 'v, 'id) t -> bool
val has : ('k, 'a, 'id) t -> 'k -> cmp:('k, 'id) cmp -> bool
val cmpU : + ('k, 'v, 'id) t -> + ('k, 'v, 'id) t -> + kcmp:('k, 'id) cmp -> + vcmp:('v -> 'v -> int) Js.Fn.arity2 -> + int
val cmp : + ('k, 'v, 'id) t -> + ('k, 'v, 'id) t -> + kcmp:('k, 'id) cmp -> + vcmp:('v -> 'v -> int) -> + int
val eqU : + ('k, 'a, 'id) t -> + ('k, 'a, 'id) t -> + kcmp:('k, 'id) cmp -> + veq:('a -> 'a -> bool) Js.Fn.arity2 -> + bool
val eq : + ('k, 'a, 'id) t -> + ('k, 'a, 'id) t -> + kcmp:('k, 'id) cmp -> + veq:('a -> 'a -> bool) -> + bool

eq m1 m2 cmp tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val findFirstByU : + ('k, 'v, 'id) t -> + ('k -> 'v -> bool) Js.Fn.arity2 -> + ('k * 'v) option
val findFirstBy : ('k, 'v, 'id) t -> ('k -> 'v -> bool) -> ('k * 'v) option

findFirstBy m p uses funcion f to find the first key value pair to match predicate p.

let s0 = fromArray ~id:(module IntCmp) [|4,"4";1,"1";2,"2,"3""|];;
+findFirstBy s0 (fun k v -> k = 4 ) = option (4, "4");;
val forEachU : ('k, 'a, 'id) t -> ('k -> 'a -> unit) Js.Fn.arity2 -> unit
val forEach : ('k, 'a, 'id) t -> ('k -> 'a -> unit) -> unit

forEach m f applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val reduceU : + ('k, 'a, 'id) t -> + 'b -> + ('b -> 'k -> 'a -> 'b) Js.Fn.arity3 -> + 'b
val reduce : ('k, 'a, 'id) t -> 'b -> ('b -> 'k -> 'a -> 'b) -> 'b

reduce m a f computes (f kN dN ... (f k1 d1 a)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

val everyU : ('k, 'a, 'id) t -> ('k -> 'a -> bool) Js.Fn.arity2 -> bool
val every : ('k, 'a, 'id) t -> ('k -> 'a -> bool) -> bool

every m p checks if all the bindings of the map satisfy the predicate p. Order unspecified

val someU : ('k, 'a, 'id) t -> ('k -> 'a -> bool) Js.Fn.arity2 -> bool
val some : ('k, 'a, 'id) t -> ('k -> 'a -> bool) -> bool

some m p checks if at least one binding of the map satisfy the predicate p. Order unspecified

val size : ('k, 'a, 'id) t -> int
val toList : ('k, 'a, 'id) t -> ('k * 'a) list

In increasing order.

val toArray : ('k, 'a, 'id) t -> ('k * 'a) array
val fromArray : ('k * 'a) array -> cmp:('k, 'id) cmp -> ('k, 'a, 'id) t
val keysToArray : ('k, 'a, 'id) t -> 'k array
val valuesToArray : ('k, 'a, 'id) t -> 'a array
val minKey : ('k, _, _) t -> 'k option
val minKeyUndefined : ('k, _, _) t -> 'k Js.undefined
val maxKey : ('k, _, _) t -> 'k option
val maxKeyUndefined : ('k, _, _) t -> 'k Js.undefined
val minimum : ('k, 'a, _) t -> ('k * 'a) option
val minUndefined : ('k, 'a, _) t -> ('k * 'a) Js.undefined
val maximum : ('k, 'a, _) t -> ('k * 'a) option
val maxUndefined : ('k, 'a, _) t -> ('k * 'a) Js.undefined
val get : ('k, 'a, 'id) t -> 'k -> cmp:('k, 'id) cmp -> 'a option
val getUndefined : + ('k, 'a, 'id) t -> + 'k -> + cmp:('k, 'id) cmp -> + 'a Js.undefined
val getWithDefault : ('k, 'a, 'id) t -> 'k -> 'a -> cmp:('k, 'id) cmp -> 'a
val getExn : ('k, 'a, 'id) t -> 'k -> cmp:('k, 'id) cmp -> 'a
val checkInvariantInternal : (_, _, _) t -> unit

raise when invariant is not held

val remove : ('a, 'b, 'id) t -> 'a -> cmp:('a, 'id) cmp -> ('a, 'b, 'id) t

remove m x returns a map containing the same bindings as m, except for x which is unbound in the returned map.

val removeMany : + ('a, 'b, 'id) t -> + 'a array -> + cmp:('a, 'id) cmp -> + ('a, 'b, 'id) t
val set : ('a, 'b, 'id) t -> 'a -> 'b -> cmp:('a, 'id) cmp -> ('a, 'b, 'id) t

set m x y returns a map containing the same bindings as m, plus a binding of x to y. If x was already bound in m, its previous binding disappears.

val updateU : + ('a, 'b, 'id) t -> + 'a -> + ('b option -> 'b option) Js.Fn.arity1 -> + cmp:('a, 'id) cmp -> + ('a, 'b, 'id) t
val update : + ('a, 'b, 'id) t -> + 'a -> + ('b option -> 'b option) -> + cmp:('a, 'id) cmp -> + ('a, 'b, 'id) t
val mergeU : + ('a, 'b, 'id) t -> + ('a, 'c, 'id) t -> + ('a -> 'b option -> 'c option -> 'd option) Js.Fn.arity3 -> + cmp:('a, 'id) cmp -> + ('a, 'd, 'id) t
val merge : + ('a, 'b, 'id) t -> + ('a, 'c, 'id) t -> + ('a -> 'b option -> 'c option -> 'd option) -> + cmp:('a, 'id) cmp -> + ('a, 'd, 'id) t

merge m1 m2 f computes a map whose keys is a subset of keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f.

val mergeMany : + ('a, 'b, 'id) t -> + ('a * 'b) array -> + cmp:('a, 'id) cmp -> + ('a, 'b, 'id) t
val keepU : + ('k, 'a, 'id) t -> + ('k -> 'a -> bool) Js.Fn.arity2 -> + ('k, 'a, 'id) t
val keep : ('k, 'a, 'id) t -> ('k -> 'a -> bool) -> ('k, 'a, 'id) t

keep m p returns the map with all the bindings in m that satisfy predicate p.

val partitionU : + ('k, 'a, 'id) t -> + ('k -> 'a -> bool) Js.Fn.arity2 -> + ('k, 'a, 'id) t * ('k, 'a, 'id) t
val partition : + ('k, 'a, 'id) t -> + ('k -> 'a -> bool) -> + ('k, 'a, 'id) t * ('k, 'a, 'id) t

partition m p returns a pair of maps (m1, m2), where m1 contains all the bindings of s that satisfy the predicate p, and m2 is the map with all the bindings of s that do not satisfy p.

val split : + ('a, 'b, 'id) t -> + 'a -> + cmp:('a, 'id) cmp -> + (('a, 'b, 'id) t * ('a, 'b, 'id) t) * 'b option

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

val mapU : ('k, 'a, 'id) t -> ('a -> 'b) Js.Fn.arity1 -> ('k, 'b, 'id) t
val map : ('k, 'a, 'id) t -> ('a -> 'b) -> ('k, 'b, 'id) t

map m f returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapWithKeyU : + ('k, 'a, 'id) t -> + ('k -> 'a -> 'b) Js.Fn.arity2 -> + ('k, 'b, 'id) t
val mapWithKey : ('k, 'a, 'id) t -> ('k -> 'a -> 'b) -> ('k, 'b, 'id) t
diff --git a/findlib-1/melange/belt/Belt/Map/Int/index.html b/findlib-1/melange/belt/Belt/Map/Int/index.html new file mode 100644 index 000000000..74718bf2b --- /dev/null +++ b/findlib-1/melange/belt/Belt/Map/Int/index.html @@ -0,0 +1,14 @@ + +Int (docs.findlib-1.melange.belt.Belt.Map.Int)

Module Map.Int

Specalized when key type is int, more efficient than the generic type, its compare behavior is fixed using the built-in comparison

type key = int
type 'value t

The type of maps from type key to type 'value.

val empty : 'v t
val isEmpty : 'v t -> bool
val has : 'v t -> key -> bool
val cmpU : 'v t -> 'v t -> ('v -> 'v -> int) Js.Fn.arity2 -> int
val cmp : 'v t -> 'v t -> ('v -> 'v -> int) -> int
val eqU : 'v t -> 'v t -> ('v -> 'v -> bool) Js.Fn.arity2 -> bool
val eq : 'v t -> 'v t -> ('v -> 'v -> bool) -> bool

eq m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data.

val findFirstByU : + 'v t -> + (key -> 'v -> bool) Js.Fn.arity2 -> + (key * 'v) option
val findFirstBy : 'v t -> (key -> 'v -> bool) -> (key * 'v) option

findFirstBy m p uses funcion f to find the first key value pair to match predicate p.

let s0 = fromArray ~id:(module IntCmp) [|4,"4";1,"1";2,"2,"3""|];;
+findFirstBy s0 (fun k v -> k = 4 ) = option (4, "4");;
val forEachU : 'v t -> (key -> 'v -> unit) Js.Fn.arity2 -> unit
val forEach : 'v t -> (key -> 'v -> unit) -> unit

forEach m f applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val reduceU : 'v t -> 'v2 -> ('v2 -> key -> 'v -> 'v2) Js.Fn.arity3 -> 'v2
val reduce : 'v t -> 'v2 -> ('v2 -> key -> 'v -> 'v2) -> 'v2

reduce m a f computes (f kN dN ... (f k1 d1 a)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

val everyU : 'v t -> (key -> 'v -> bool) Js.Fn.arity2 -> bool
val every : 'v t -> (key -> 'v -> bool) -> bool

every m p checks if all the bindings of the map satisfy the predicate p. Order unspecified

val someU : 'v t -> (key -> 'v -> bool) Js.Fn.arity2 -> bool
val some : 'v t -> (key -> 'v -> bool) -> bool

some m p checks if at least one binding of the map satisfy the predicate p. Order unspecified

val size : 'v t -> int
val toList : 'v t -> (key * 'v) list

In increasing order.

val toArray : 'v t -> (key * 'v) array
val fromArray : (key * 'v) array -> 'v t
val keysToArray : 'v t -> key array
val valuesToArray : 'v t -> 'v array
val minKey : _ t -> key option
val minKeyUndefined : _ t -> key Js.undefined
val maxKey : _ t -> key option
val maxKeyUndefined : _ t -> key Js.undefined
val minimum : 'v t -> (key * 'v) option
val minUndefined : 'v t -> (key * 'v) Js.undefined
val maximum : 'v t -> (key * 'v) option
val maxUndefined : 'v t -> (key * 'v) Js.undefined
val get : 'v t -> key -> 'v option
val getUndefined : 'v t -> key -> 'v Js.undefined
val getWithDefault : 'v t -> key -> 'v -> 'v
val getExn : 'v t -> key -> 'v
val checkInvariantInternal : _ t -> unit

raise when invariant is not held

val remove : 'v t -> key -> 'v t

remove m x returns a map containing the same bindings as m, except for x which is unbound in the returned map.

val removeMany : 'v t -> key array -> 'v t
val set : 'v t -> key -> 'v -> 'v t

set m x y returns a map containing the same bindings as m, plus a binding of x to y. If x was already bound in m, its previous binding disappears.

val updateU : 'v t -> key -> ('v option -> 'v option) Js.Fn.arity1 -> 'v t
val update : 'v t -> key -> ('v option -> 'v option) -> 'v t
val mergeU : + 'v t -> + 'v2 t -> + (key -> 'v option -> 'v2 option -> 'c option) Js.Fn.arity3 -> + 'c t
val merge : + 'v t -> + 'v2 t -> + (key -> 'v option -> 'v2 option -> 'c option) -> + 'c t

merge m1 m2 f computes a map whose keys is a subset of keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f.

val mergeMany : 'v t -> (key * 'v) array -> 'v t
val keepU : 'v t -> (key -> 'v -> bool) Js.Fn.arity2 -> 'v t
val keep : 'v t -> (key -> 'v -> bool) -> 'v t

keep m p returns the map with all the bindings in m that satisfy predicate p.

val partitionU : 'v t -> (key -> 'v -> bool) Js.Fn.arity2 -> 'v t * 'v t
val partition : 'v t -> (key -> 'v -> bool) -> 'v t * 'v t

partition m p returns a pair of maps (m1, m2), where m1 contains all the bindings of s that satisfy the predicate p, and m2 is the map with all the bindings of s that do not satisfy p.

val split : key -> 'v t -> 'v t * 'v option * 'v t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

val mapU : 'v t -> ('v -> 'v2) Js.Fn.arity1 -> 'v2 t
val map : 'v t -> ('v -> 'v2) -> 'v2 t

map m f returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapWithKeyU : 'v t -> (key -> 'v -> 'v2) Js.Fn.arity2 -> 'v2 t
val mapWithKey : 'v t -> (key -> 'v -> 'v2) -> 'v2 t
diff --git a/findlib-1/melange/belt/Belt/Map/String/index.html b/findlib-1/melange/belt/Belt/Map/String/index.html new file mode 100644 index 000000000..6208a0131 --- /dev/null +++ b/findlib-1/melange/belt/Belt/Map/String/index.html @@ -0,0 +1,14 @@ + +String (docs.findlib-1.melange.belt.Belt.Map.String)

Module Map.String

specalized when key type is string, more efficient than the generic type, its compare behavior is fixed using the built-in comparison

type key = string
type 'value t

The type of maps from type key to type 'value.

val empty : 'v t
val isEmpty : 'v t -> bool
val has : 'v t -> key -> bool
val cmpU : 'v t -> 'v t -> ('v -> 'v -> int) Js.Fn.arity2 -> int
val cmp : 'v t -> 'v t -> ('v -> 'v -> int) -> int
val eqU : 'v t -> 'v t -> ('v -> 'v -> bool) Js.Fn.arity2 -> bool
val eq : 'v t -> 'v t -> ('v -> 'v -> bool) -> bool

eq m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data.

val findFirstByU : + 'v t -> + (key -> 'v -> bool) Js.Fn.arity2 -> + (key * 'v) option
val findFirstBy : 'v t -> (key -> 'v -> bool) -> (key * 'v) option

findFirstBy m p uses funcion f to find the first key value pair to match predicate p.

let s0 = fromArray ~id:(module IntCmp) [|4,"4";1,"1";2,"2,"3""|];;
+findFirstBy s0 (fun k v -> k = 4 ) = option (4, "4");;
val forEachU : 'v t -> (key -> 'v -> unit) Js.Fn.arity2 -> unit
val forEach : 'v t -> (key -> 'v -> unit) -> unit

forEach m f applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val reduceU : 'v t -> 'v2 -> ('v2 -> key -> 'v -> 'v2) Js.Fn.arity3 -> 'v2
val reduce : 'v t -> 'v2 -> ('v2 -> key -> 'v -> 'v2) -> 'v2

reduce m a f computes (f kN dN ... (f k1 d1 a)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

val everyU : 'v t -> (key -> 'v -> bool) Js.Fn.arity2 -> bool
val every : 'v t -> (key -> 'v -> bool) -> bool

every m p checks if all the bindings of the map satisfy the predicate p. Order unspecified

val someU : 'v t -> (key -> 'v -> bool) Js.Fn.arity2 -> bool
val some : 'v t -> (key -> 'v -> bool) -> bool

some m p checks if at least one binding of the map satisfy the predicate p. Order unspecified

val size : 'v t -> int
val toList : 'v t -> (key * 'v) list

In increasing order.

val toArray : 'v t -> (key * 'v) array
val fromArray : (key * 'v) array -> 'v t
val keysToArray : 'v t -> key array
val valuesToArray : 'v t -> 'v array
val minKey : _ t -> key option
val minKeyUndefined : _ t -> key Js.undefined
val maxKey : _ t -> key option
val maxKeyUndefined : _ t -> key Js.undefined
val minimum : 'v t -> (key * 'v) option
val minUndefined : 'v t -> (key * 'v) Js.undefined
val maximum : 'v t -> (key * 'v) option
val maxUndefined : 'v t -> (key * 'v) Js.undefined
val get : 'v t -> key -> 'v option
val getUndefined : 'v t -> key -> 'v Js.undefined
val getWithDefault : 'v t -> key -> 'v -> 'v
val getExn : 'v t -> key -> 'v
val checkInvariantInternal : _ t -> unit

raise when invariant is not held

val remove : 'v t -> key -> 'v t

remove m x returns a map containing the same bindings as m, except for x which is unbound in the returned map.

val removeMany : 'v t -> key array -> 'v t
val set : 'v t -> key -> 'v -> 'v t

set m x y returns a map containing the same bindings as m, plus a binding of x to y. If x was already bound in m, its previous binding disappears.

val updateU : 'v t -> key -> ('v option -> 'v option) Js.Fn.arity1 -> 'v t
val update : 'v t -> key -> ('v option -> 'v option) -> 'v t
val mergeU : + 'v t -> + 'v2 t -> + (key -> 'v option -> 'v2 option -> 'c option) Js.Fn.arity3 -> + 'c t
val merge : + 'v t -> + 'v2 t -> + (key -> 'v option -> 'v2 option -> 'c option) -> + 'c t

merge m1 m2 f computes a map whose keys is a subset of keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f.

val mergeMany : 'v t -> (key * 'v) array -> 'v t
val keepU : 'v t -> (key -> 'v -> bool) Js.Fn.arity2 -> 'v t
val keep : 'v t -> (key -> 'v -> bool) -> 'v t

keep m p returns the map with all the bindings in m that satisfy predicate p.

val partitionU : 'v t -> (key -> 'v -> bool) Js.Fn.arity2 -> 'v t * 'v t
val partition : 'v t -> (key -> 'v -> bool) -> 'v t * 'v t

partition m p returns a pair of maps (m1, m2), where m1 contains all the bindings of s that satisfy the predicate p, and m2 is the map with all the bindings of s that do not satisfy p.

val split : key -> 'v t -> 'v t * 'v option * 'v t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

val mapU : 'v t -> ('v -> 'v2) Js.Fn.arity1 -> 'v2 t
val map : 'v t -> ('v -> 'v2) -> 'v2 t

map m f returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapWithKeyU : 'v t -> (key -> 'v -> 'v2) Js.Fn.arity2 -> 'v2 t
val mapWithKey : 'v t -> (key -> 'v -> 'v2) -> 'v2 t
diff --git a/findlib-1/melange/belt/Belt/Map/index.html b/findlib-1/melange/belt/Belt/Map/index.html new file mode 100644 index 000000000..58801ce96 --- /dev/null +++ b/findlib-1/melange/belt/Belt/Map/index.html @@ -0,0 +1,83 @@ + +Map (docs.findlib-1.melange.belt.Belt.Map)

Module Belt.Map

Belt.Map,

The top level provides generic immutable map operations.

It also has three specialized inner modules Belt.Map.Int, Belt.Map.String and

Belt.Map.Dict: This module separates data from function which is more verbose but slightly more efficient

A immutable sorted map module which allows customize compare behavior.

The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

For more info on this module's usage of identity, `make` and others, please see the top level documentation of Belt, A special encoding for collection safety.

Example usage:

module PairComparator = Belt.Id.MakeComparable(struct
+  type t = int * int
+  let cmp (a0, a1) (b0, b1) =
+    match Pervasives.compare a0 b0 with
+    | 0 -> Pervasives.compare a1 b1
+    | c -> c
+end)
+
+let myMap = Belt.Map.make ~id:(module PairComparator)
+let myMap2 = Belt.Map.set myMap (1, 2) "myValue"

The API documentation below will assume a predeclared comparator module for integers, IntCmp

module Int : sig ... end

Specalized when key type is int, more efficient than the generic type, its compare behavior is fixed using the built-in comparison

module String : sig ... end

specalized when key type is string, more efficient than the generic type, its compare behavior is fixed using the built-in comparison

module Dict : sig ... end

This module seprate identity from data, it is a bit more verboe but slightly more efficient due to the fact that there is no need to pack identity and data back after each operation

type ('key, 'value, 'identity) t

('key, 'identity) t

'key is the field type

'value is the element type

'identity the identity of the collection

type ('key, 'id) id = + (module Belt__.Belt_Id.Comparable + with type identity = 'id + and type t = 'key)

The identity needed for making an empty map

val make : id:('k, 'id) id -> ('k, 'v, 'id) t

make ~id creates a new map by taking in the comparator

let m = Belt.Map.make ~id:(module IntCmp)
val isEmpty : (_, _, _) t -> bool

isEmpty m checks whether a map m is empty

isEmpty (fromArray [|1,"1"|] ~id:(module IntCmp)) = false
val has : ('k, 'v, 'id) t -> 'k -> bool

has m k checks whether m has the key k

has (fromArray [|1,"1"|] ~id:(module IntCmp)) 1 = true
val cmpU : + ('k, 'v, 'id) t -> + ('k, 'v, 'id) t -> + ('v -> 'v -> int) Js.Fn.arity2 -> + int
val cmp : ('k, 'v, 'id) t -> ('k, 'v, 'id) t -> ('v -> 'v -> int) -> int

cmp m0 m1 vcmp

Total ordering of map given total ordering of value function.

It will compare size first and each element following the order one by one.

val eqU : + ('k, 'v, 'id) t -> + ('k, 'v, 'id) t -> + ('v -> 'v -> bool) Js.Fn.arity2 -> + bool
val eq : ('k, 'v, 'id) t -> ('k, 'v, 'id) t -> ('v -> 'v -> bool) -> bool

eq m1 m2 veq tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. veq is the equality predicate used to compare the data associated with the keys.

val findFirstByU : + ('k, 'v, 'id) t -> + ('k -> 'v -> bool) Js.Fn.arity2 -> + ('k * 'v) option
val findFirstBy : ('k, 'v, 'id) t -> ('k -> 'v -> bool) -> ('k * 'v) option

findFirstBy m p uses funcion f to find the first key value pair to match predicate p.

let s0 = fromArray ~id:(module IntCmp) [|4,"4";1,"1";2,"2,"3""|];;
+findFirstBy s0 (fun k v -> k = 4 ) = option (4, "4");;
val forEachU : ('k, 'v, 'id) t -> ('k -> 'v -> unit) Js.Fn.arity2 -> unit
val forEach : ('k, 'v, 'id) t -> ('k -> 'v -> unit) -> unit

forEach m f applies f to all bindings in map m. f receives the 'k as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

let s0 = fromArray ~id:(module IntCmp) [|4,"4";1,"1";2,"2,"3""|];;
+let acc = ref [] ;;
+forEach s0 (fun k v -> acc := (k,v) :: !acc);;
+
+!acc = [4,"4"; 3,"3"; 2,"2"; 1,"1"]
val reduceU : + ('k, 'v, 'id) t -> + 'acc -> + ('acc -> 'k -> 'v -> 'acc) Js.Fn.arity3 -> + 'acc
val reduce : ('k, 'v, 'id) t -> 'acc -> ('acc -> 'k -> 'v -> 'acc) -> 'acc

reduce m a f computes (f kN dN ... (f k1 d1 a)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

let s0 = fromArray ~id:(module IntCmp) [|4,"4";1,"1";2,"2,"3""|];;
+reduce s0 [] (fun acc k v -> (k,v) acc ) = [4,"4";3,"3";2,"2";1,"1"];;
val everyU : ('k, 'v, 'id) t -> ('k -> 'v -> bool) Js.Fn.arity2 -> bool
val every : ('k, 'v, 'id) t -> ('k -> 'v -> bool) -> bool

every m p checks if all the bindings of the map satisfy the predicate p. Order unspecified

val someU : ('k, 'v, 'id) t -> ('k -> 'v -> bool) Js.Fn.arity2 -> bool
val some : ('k, 'v, 'id) t -> ('k -> 'v -> bool) -> bool

some m p checks if at least one binding of the map satisfy the predicate p. Order unspecified

val size : ('k, 'v, 'id) t -> int

size s

size (fromArray [2,"2"; 2,"1"; 3,"3"] ~id:(module IntCmp)) = 2 ;;
val toArray : ('k, 'v, 'id) t -> ('k * 'v) array

toArray s

toArray (fromArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) = [1,"1";2,"2";3,"3"]
val toList : ('k, 'v, 'id) t -> ('k * 'v) list

In increasing order

See toArray

val fromArray : ('k * 'v) array -> id:('k, 'id) id -> ('k, 'v, 'id) t

fromArray kvs ~id

toArray (fromArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) = [1,"1";2,"2";3,"3"]
val keysToArray : ('k, 'v, 'id) t -> 'k array

keysToArray s

keysToArray (fromArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) =
+[|1;2;3|];;
val valuesToArray : ('k, 'v, 'id) t -> 'v array

valuesToArray s

valuesToArray (fromArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) =
+[|"1";"2";"3"|];;
val minKey : ('k, _, _) t -> 'k option

minKey s

  • returns

    the minimum key, None if not exist

val minKeyUndefined : ('k, _, _) t -> 'k Js.undefined

See minKey

val maxKey : ('k, _, _) t -> 'k option

maxKey s

  • returns

    the maximum key, None if not exist

val maxKeyUndefined : ('k, _, _) t -> 'k Js.undefined

See maxKey

val minimum : ('k, 'v, _) t -> ('k * 'v) option

minimum s

  • returns

    the minimum key value pair, None if not exist

val minUndefined : ('k, 'v, _) t -> ('k * 'v) Js.undefined
val maximum : ('k, 'v, _) t -> ('k * 'v) option

maximum s

  • returns

    the maximum key value pair, None if not exist

val maxUndefined : ('k, 'v, _) t -> ('k * 'v) Js.undefined
val get : ('k, 'v, 'id) t -> 'k -> 'v option

get s k

get (fromArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) 2 =
+Some "2";;
+get (fromArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) 2 =
+None;;
val getUndefined : ('k, 'v, 'id) t -> 'k -> 'v Js.undefined

See get

  • returns

    undefined when not found

val getWithDefault : ('k, 'v, 'id) t -> 'k -> 'v -> 'v

getWithDefault s k default

See get

  • returns

    default when k is not found

val getExn : ('k, 'v, 'id) t -> 'k -> 'v

getExn s k

See getExn

raise when k not exist

val remove : ('k, 'v, 'id) t -> 'k -> ('k, 'v, 'id) t

remove m x when x is not in m, m is returned reference unchanged.

let s0 =  (fromArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp));;
+
+let s1 = remove s0 1;;
+let s2 = remove s1 1;;
+s1 == s2 ;;
+keysToArray s1 = [|2;3|];;
val removeMany : ('k, 'v, 'id) t -> 'k array -> ('k, 'v, 'id) t

removeMany s xs

Removing each of xs to s, note unlike remove, the reference of return value might be changed even if none in xs exists s

val set : ('k, 'v, 'id) t -> 'k -> 'v -> ('k, 'v, 'id) t

set m x y returns a map containing the same bindings as m, with a new binding of x to y. If x was already bound in m, its previous binding disappears.

let s0 =  (fromArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp));;
+
+let s1 = set s0 2 "3";;
+
+valuesToArray s1 =  ["1";"3";"3"];;
val updateU : + ('k, 'v, 'id) t -> + 'k -> + ('v option -> 'v option) Js.Fn.arity1 -> + ('k, 'v, 'id) t
val update : + ('k, 'v, 'id) t -> + 'k -> + ('v option -> 'v option) -> + ('k, 'v, 'id) t

update m x f returns a map containing the same bindings as m, except for the binding of x. Depending on the value of y where y is f (get x m), the binding of x is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then x is associated to z in the resulting map.

val mergeMany : ('k, 'v, 'id) t -> ('k * 'v) array -> ('k, 'v, 'id) t

mergeMany s xs

Add each of xs to s, note unlike set, the reference of return value might be changed even if all values in xs exist s

val mergeU : + ('k, 'v, 'id) t -> + ('k, 'v2, 'id) t -> + ('k -> 'v option -> 'v2 option -> 'v3 option) Js.Fn.arity3 -> + ('k, 'v3, 'id) t
val merge : + ('k, 'v, 'id) t -> + ('k, 'v2, 'id) t -> + ('k -> 'v option -> 'v2 option -> 'v3 option) -> + ('k, 'v3, 'id) t

merge m1 m2 f computes a map whose keys is a subset of keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f.

val keepU : + ('k, 'v, 'id) t -> + ('k -> 'v -> bool) Js.Fn.arity2 -> + ('k, 'v, 'id) t
val keep : ('k, 'v, 'id) t -> ('k -> 'v -> bool) -> ('k, 'v, 'id) t

keep m p returns the map with all the bindings in m that satisfy predicate p.

val partitionU : + ('k, 'v, 'id) t -> + ('k -> 'v -> bool) Js.Fn.arity2 -> + ('k, 'v, 'id) t * ('k, 'v, 'id) t
val partition : + ('k, 'v, 'id) t -> + ('k -> 'v -> bool) -> + ('k, 'v, 'id) t * ('k, 'v, 'id) t

partition m p returns a pair of maps (m1, m2), where m1 contains all the bindings of s that satisfy the predicate p, and m2 is the map with all the bindings of s that do not satisfy p.

val split : + ('k, 'v, 'id) t -> + 'k -> + (('k, 'v, 'id) t * ('k, 'v, 'id) t) * 'v option

split x m returns a tuple (l r), data, where l is the map with all the bindings of m whose 'k is strictly less than x; r is the map with all the bindings of m whose 'k is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

val mapU : ('k, 'v, 'id) t -> ('v -> 'v2) Js.Fn.arity1 -> ('k, 'v2, 'id) t
val map : ('k, 'v, 'id) t -> ('v -> 'v2) -> ('k, 'v2, 'id) t

map m f returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapWithKeyU : + ('k, 'v, 'id) t -> + ('k -> 'v -> 'v2) Js.Fn.arity2 -> + ('k, 'v2, 'id) t
val mapWithKey : ('k, 'v, 'id) t -> ('k -> 'v -> 'v2) -> ('k, 'v2, 'id) t

mapWithKey m f

The same as map except that f is supplied with one more argument: the key

val getData : ('k, 'v, 'id) t -> ('k, 'v, 'id) Belt__.Belt_MapDict.t

getData s0

Advanced usage only

  • returns

    the raw data (detached from comparator), but its type is still manifested, so that user can pass identity directly without boxing

val getId : ('k, 'v, 'id) t -> ('k, 'id) id

getId s0

Advanced usage only

  • returns

    the identity of s0

val packIdData : + id:('k, 'id) id -> + data:('k, 'v, 'id) Belt__.Belt_MapDict.t -> + ('k, 'v, 'id) t

packIdData ~id ~data

Advanced usage only

  • returns

    the packed collection

diff --git a/findlib-1/melange/belt/Belt/MutableMap/Int/index.html b/findlib-1/melange/belt/Belt/MutableMap/Int/index.html new file mode 100644 index 000000000..ebcd8da44 --- /dev/null +++ b/findlib-1/melange/belt/Belt/MutableMap/Int/index.html @@ -0,0 +1,2 @@ + +Int (docs.findlib-1.melange.belt.Belt.MutableMap.Int)

Module MutableMap.Int

type key = int
type 'a t
val make : unit -> 'a t
val clear : 'a t -> unit
val isEmpty : 'a t -> bool
val has : 'a t -> key -> bool
val cmpU : 'a t -> 'a t -> ('a -> 'a -> int) Js.Fn.arity2 -> int
val cmp : 'a t -> 'a t -> ('a -> 'a -> int) -> int

cmp m1 m2 cmp First compare by size, if size is the same, compare by key, value pair

val eqU : 'a t -> 'a t -> ('a -> 'a -> bool) Js.Fn.arity2 -> bool
val eq : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool

eq m1 m2 cmp

val forEachU : 'a t -> (key -> 'a -> unit) Js.Fn.arity2 -> unit
val forEach : 'a t -> (key -> 'a -> unit) -> unit

forEach m f applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The application order of f is in increasing order.

val reduceU : 'a t -> 'b -> ('b -> key -> 'a -> 'b) Js.Fn.arity3 -> 'b
val reduce : 'a t -> 'b -> ('b -> key -> 'a -> 'b) -> 'b

reduce m a f computes (f kN dN ... (f k1 d1 a)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

val everyU : 'a t -> (key -> 'a -> bool) Js.Fn.arity2 -> bool
val every : 'a t -> (key -> 'a -> bool) -> bool

every m p checks if all the bindings of the map satisfy the predicate p. The application order of p is unspecified.

val someU : 'a t -> (key -> 'a -> bool) Js.Fn.arity2 -> bool
val some : 'a t -> (key -> 'a -> bool) -> bool

some m p checks if at least one binding of the map satisfy the predicate p. The application order of p is unspecified.

val size : 'a t -> int
val toList : 'a t -> (key * 'a) list

In increasing order

val toArray : 'a t -> (key * 'a) array

In increasing order

val fromArray : (key * 'a) array -> 'a t
val keysToArray : 'a t -> key array
val valuesToArray : 'a t -> 'a array
val minKey : _ t -> key option
val minKeyUndefined : _ t -> key Js.undefined
val maxKey : _ t -> key option
val maxKeyUndefined : _ t -> key Js.undefined
val minimum : 'a t -> (key * 'a) option
val minUndefined : 'a t -> (key * 'a) Js.undefined
val maximum : 'a t -> (key * 'a) option
val maxUndefined : 'a t -> (key * 'a) Js.undefined
val get : 'a t -> key -> 'a option
val getUndefined : 'a t -> key -> 'a Js.undefined
val getWithDefault : 'a t -> key -> 'a -> 'a
val getExn : 'a t -> key -> 'a
val checkInvariantInternal : _ t -> unit

raise when invariant is not held

val remove : 'a t -> key -> unit

remove m x do the in-place modification

val removeMany : 'a t -> key array -> unit
val set : 'a t -> key -> 'a -> unit

set m x y do the in-place modification, return m for chaining. If x was already bound in m, its previous binding disappears.

val updateU : 'a t -> key -> ('a option -> 'a option) Js.Fn.arity1 -> unit
val update : 'a t -> key -> ('a option -> 'a option) -> unit
val mapU : 'a t -> ('a -> 'b) Js.Fn.arity1 -> 'b t
val map : 'a t -> ('a -> 'b) -> 'b t

map m f returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapWithKeyU : 'a t -> (key -> 'a -> 'b) Js.Fn.arity2 -> 'b t
val mapWithKey : 'a t -> (key -> 'a -> 'b) -> 'b t
diff --git a/findlib-1/melange/belt/Belt/MutableMap/String/index.html b/findlib-1/melange/belt/Belt/MutableMap/String/index.html new file mode 100644 index 000000000..bf819e357 --- /dev/null +++ b/findlib-1/melange/belt/Belt/MutableMap/String/index.html @@ -0,0 +1,2 @@ + +String (docs.findlib-1.melange.belt.Belt.MutableMap.String)

Module MutableMap.String

type key = string
type 'a t
val make : unit -> 'a t
val clear : 'a t -> unit
val isEmpty : 'a t -> bool
val has : 'a t -> key -> bool
val cmpU : 'a t -> 'a t -> ('a -> 'a -> int) Js.Fn.arity2 -> int
val cmp : 'a t -> 'a t -> ('a -> 'a -> int) -> int

cmp m1 m2 cmp First compare by size, if size is the same, compare by key, value pair

val eqU : 'a t -> 'a t -> ('a -> 'a -> bool) Js.Fn.arity2 -> bool
val eq : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool

eq m1 m2 cmp

val forEachU : 'a t -> (key -> 'a -> unit) Js.Fn.arity2 -> unit
val forEach : 'a t -> (key -> 'a -> unit) -> unit

forEach m f applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The application order of f is in increasing order.

val reduceU : 'a t -> 'b -> ('b -> key -> 'a -> 'b) Js.Fn.arity3 -> 'b
val reduce : 'a t -> 'b -> ('b -> key -> 'a -> 'b) -> 'b

reduce m a f computes (f kN dN ... (f k1 d1 a)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

val everyU : 'a t -> (key -> 'a -> bool) Js.Fn.arity2 -> bool
val every : 'a t -> (key -> 'a -> bool) -> bool

every m p checks if all the bindings of the map satisfy the predicate p. The application order of p is unspecified.

val someU : 'a t -> (key -> 'a -> bool) Js.Fn.arity2 -> bool
val some : 'a t -> (key -> 'a -> bool) -> bool

some m p checks if at least one binding of the map satisfy the predicate p. The application order of p is unspecified.

val size : 'a t -> int
val toList : 'a t -> (key * 'a) list

In increasing order

val toArray : 'a t -> (key * 'a) array

In increasing order

val fromArray : (key * 'a) array -> 'a t
val keysToArray : 'a t -> key array
val valuesToArray : 'a t -> 'a array
val minKey : _ t -> key option
val minKeyUndefined : _ t -> key Js.undefined
val maxKey : _ t -> key option
val maxKeyUndefined : _ t -> key Js.undefined
val minimum : 'a t -> (key * 'a) option
val minUndefined : 'a t -> (key * 'a) Js.undefined
val maximum : 'a t -> (key * 'a) option
val maxUndefined : 'a t -> (key * 'a) Js.undefined
val get : 'a t -> key -> 'a option
val getUndefined : 'a t -> key -> 'a Js.undefined
val getWithDefault : 'a t -> key -> 'a -> 'a
val getExn : 'a t -> key -> 'a
val checkInvariantInternal : _ t -> unit

raise when invariant is not held

val remove : 'a t -> key -> unit

remove m x do the in-place modification

val removeMany : 'a t -> key array -> unit
val set : 'a t -> key -> 'a -> unit

set m x y do the in-place modification, return m for chaining. If x was already bound in m, its previous binding disappears.

val updateU : 'a t -> key -> ('a option -> 'a option) Js.Fn.arity1 -> unit
val update : 'a t -> key -> ('a option -> 'a option) -> unit
val mapU : 'a t -> ('a -> 'b) Js.Fn.arity1 -> 'b t
val map : 'a t -> ('a -> 'b) -> 'b t

map m f returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapWithKeyU : 'a t -> (key -> 'a -> 'b) Js.Fn.arity2 -> 'b t
val mapWithKey : 'a t -> (key -> 'a -> 'b) -> 'b t
diff --git a/findlib-1/melange/belt/Belt/MutableMap/index.html b/findlib-1/melange/belt/Belt/MutableMap/index.html new file mode 100644 index 000000000..bcfafd1b9 --- /dev/null +++ b/findlib-1/melange/belt/Belt/MutableMap/index.html @@ -0,0 +1,24 @@ + +MutableMap (docs.findlib-1.melange.belt.Belt.MutableMap)

Module Belt.MutableMap

Belt.MutableMap

The top level provides generic mutable map operations.

It also has two specialized inner modules Belt.MutableMap.Int and Belt.MutableMap.String

module Int : sig ... end
module String : sig ... end

A mutable sorted map module which allows customize compare behavior.

Same as Belt.Map, but mutable.

type ('k, 'v, 'id) t
type ('key, 'id) id = + (module Belt__.Belt_Id.Comparable + with type identity = 'id + and type t = 'key)
val make : id:('k, 'id) id -> ('k, 'a, 'id) t
val clear : (_, _, _) t -> unit
val isEmpty : (_, _, _) t -> bool
val has : ('k, _, _) t -> 'k -> bool
val cmpU : + ('k, 'a, 'id) t -> + ('k, 'a, 'id) t -> + ('a -> 'a -> int) Js.Fn.arity2 -> + int
val cmp : ('k, 'a, 'id) t -> ('k, 'a, 'id) t -> ('a -> 'a -> int) -> int

cmp m1 m2 cmp First compare by size, if size is the same, compare by key, value pair

val eqU : + ('k, 'a, 'id) t -> + ('k, 'a, 'id) t -> + ('a -> 'a -> bool) Js.Fn.arity2 -> + bool
val eq : ('k, 'a, 'id) t -> ('k, 'a, 'id) t -> ('a -> 'a -> bool) -> bool

eq m1 m2 eqf tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. eqf is the equality predicate used to compare the data associated with the keys.

val forEachU : ('k, 'a, 'id) t -> ('k -> 'a -> unit) Js.Fn.arity2 -> unit
val forEach : ('k, 'a, 'id) t -> ('k -> 'a -> unit) -> unit

forEach m f applies f to all bindings in map m. f receives the 'k as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val reduceU : + ('k, 'a, 'id) t -> + 'b -> + ('b -> 'k -> 'a -> 'b) Js.Fn.arity3 -> + 'b
val reduce : ('k, 'a, 'id) t -> 'b -> ('b -> 'k -> 'a -> 'b) -> 'b

reduce m a f computes (f kN dN ... (f k1 d1 a)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

val everyU : ('k, 'a, 'id) t -> ('k -> 'a -> bool) Js.Fn.arity2 -> bool
val every : ('k, 'a, 'id) t -> ('k -> 'a -> bool) -> bool

every m p checks if all the bindings of the map satisfy the predicate p.

val someU : ('k, 'a, 'id) t -> ('k -> 'a -> bool) Js.Fn.arity2 -> bool
val some : ('k, 'a, 'id) t -> ('k -> 'a -> bool) -> bool

some m p checks if at least one binding of the map satisfy the predicate p.

val size : ('k, 'a, 'id) t -> int
val toList : ('k, 'a, 'id) t -> ('k * 'a) list

In increasing order

val toArray : ('k, 'a, 'id) t -> ('k * 'a) array

In increasing order

val fromArray : ('k * 'a) array -> id:('k, 'id) id -> ('k, 'a, 'id) t
val keysToArray : ('k, _, _) t -> 'k array
val valuesToArray : (_, 'a, _) t -> 'a array
val minKey : ('k, _, _) t -> 'k option
val minKeyUndefined : ('k, _, _) t -> 'k Js.undefined
val maxKey : ('k, _, _) t -> 'k option
val maxKeyUndefined : ('k, _, _) t -> 'k Js.undefined
val minimum : ('k, 'a, _) t -> ('k * 'a) option
val minUndefined : ('k, 'a, _) t -> ('k * 'a) Js.undefined
val maximum : ('k, 'a, _) t -> ('k * 'a) option
val maxUndefined : ('k, 'a, _) t -> ('k * 'a) Js.undefined
val get : ('k, 'a, 'id) t -> 'k -> 'a option
val getUndefined : ('k, 'a, 'id) t -> 'k -> 'a Js.undefined
val getWithDefault : ('k, 'a, 'id) t -> 'k -> 'a -> 'a
val getExn : ('k, 'a, 'id) t -> 'k -> 'a
val checkInvariantInternal : (_, _, _) t -> unit

raise when invariant is not held

val remove : ('k, 'a, 'id) t -> 'k -> unit

remove m x do the in-place modification,

val removeMany : ('k, 'a, 'id) t -> 'k array -> unit
val set : ('k, 'a, 'id) t -> 'k -> 'a -> unit

set m x y do the in-place modification

val updateU : + ('k, 'a, 'id) t -> + 'k -> + ('a option -> 'a option) Js.Fn.arity1 -> + unit
val update : ('k, 'a, 'id) t -> 'k -> ('a option -> 'a option) -> unit
val mergeMany : ('k, 'a, 'id) t -> ('k * 'a) array -> unit
val mapU : ('k, 'a, 'id) t -> ('a -> 'b) Js.Fn.arity1 -> ('k, 'b, 'id) t
val map : ('k, 'a, 'id) t -> ('a -> 'b) -> ('k, 'b, 'id) t

map m f returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapWithKeyU : + ('k, 'a, 'id) t -> + ('k -> 'a -> 'b) Js.Fn.arity2 -> + ('k, 'b, 'id) t
val mapWithKey : ('k, 'a, 'id) t -> ('k -> 'a -> 'b) -> ('k, 'b, 'id) t
diff --git a/findlib-1/melange/belt/Belt/MutableQueue/index.html b/findlib-1/melange/belt/Belt/MutableQueue/index.html new file mode 100644 index 000000000..6bd91f86e --- /dev/null +++ b/findlib-1/melange/belt/Belt/MutableQueue/index.html @@ -0,0 +1,2 @@ + +MutableQueue (docs.findlib-1.melange.belt.Belt.MutableQueue)

Module Belt.MutableQueue

Belt.MutableQueue

An FIFO(first in first out) queue data structure

First-in first-out queues.

This module implements queues (FIFOs), with in-place modification.

type 'a t

The type of queues containing elements of type 'a.

val make : unit -> 'a t
  • returns

    a new queue, initially empty.

val clear : 'a t -> unit

Discard all elements from the queue.

val isEmpty : 'a t -> bool
  • returns

    true if the given queue is empty, false otherwise.

val fromArray : 'a array -> 'a t

fromArray a is equivalent to Array.forEach a (add q a)

val add : 'a t -> 'a -> unit

add q x adds the element x at the end of the queue q.

val peek : 'a t -> 'a option

peekOpt q returns the first element in queue q, without removing it from the queue.

val peekUndefined : 'a t -> 'a Js.undefined

peekUndefined q returns undefined if not found

val peekExn : 'a t -> 'a

peekExn q

raise an exception if q is empty

val pop : 'a t -> 'a option

pop q removes and returns the first element in queue q.

val popUndefined : 'a t -> 'a Js.undefined

popUndefined q removes and returns the first element in queue q. it will return undefined if it is already empty

val popExn : 'a t -> 'a

popExn q

raise an exception if q is empty

val copy : 'a t -> 'a t

copy q

  • returns

    a fresh queue

val size : 'a t -> int
  • returns

    the number of elements in a queue.

val mapU : 'a t -> ('a -> 'b) Js.Fn.arity1 -> 'b t
val map : 'a t -> ('a -> 'b) -> 'b t
val forEachU : 'a t -> ('a -> unit) Js.Fn.arity1 -> unit
val forEach : 'a t -> ('a -> unit) -> unit

forEach q f applies f in turn to all elements of q, from the least recently entered to the most recently entered. The queue itself is unchanged.

val reduceU : 'a t -> 'b -> ('b -> 'a -> 'b) Js.Fn.arity2 -> 'b
val reduce : 'a t -> 'b -> ('b -> 'a -> 'b) -> 'b

reduce q accu f is equivalent to List.reduce l accu f, where l is the list of q's elements. The queue remains unchanged.

val transfer : 'a t -> 'a t -> unit

transfer q1 q2 adds all of q1's elements at the end of the queue q2, then clears q1. It is equivalent to the sequence forEach (fun x -> add x q2) q1; clear q1, but runs in constant time.

val toArray : 'a t -> 'a array

First added will be in the beginning of the array

diff --git a/findlib-1/melange/belt/Belt/MutableSet/Int/index.html b/findlib-1/melange/belt/Belt/MutableSet/Int/index.html new file mode 100644 index 000000000..5cf83f79b --- /dev/null +++ b/findlib-1/melange/belt/Belt/MutableSet/Int/index.html @@ -0,0 +1,2 @@ + +Int (docs.findlib-1.melange.belt.Belt.MutableSet.Int)

Module MutableSet.Int

Specalized when key type is int, more efficient than the generic type

This module is Belt.MutableSet specialized with key type to be a primitive type.

It is more efficient in general, the API is the same with Belt.MutableSet except its key type is fixed, and identity is not needed(using the built-in one)

See Belt.MutableSet

type value = int

The type of the set elements.

type t

The type of sets.

val make : unit -> t
val fromArray : value array -> t
val fromSortedArrayUnsafe : value array -> t
val copy : t -> t
val isEmpty : t -> bool
val has : t -> value -> bool
val add : t -> value -> unit
val addCheck : t -> value -> bool
val mergeMany : t -> value array -> unit
val remove : t -> value -> unit
val removeCheck : t -> value -> bool
val removeMany : t -> value array -> unit
val union : t -> t -> t
val intersect : t -> t -> t
val diff : t -> t -> t
val subset : t -> t -> bool
val cmp : t -> t -> int
val eq : t -> t -> bool
val forEachU : t -> (value -> unit) Js.Fn.arity1 -> unit
val forEach : t -> (value -> unit) -> unit

In increasing order

val reduceU : t -> 'a -> ('a -> value -> 'a) Js.Fn.arity2 -> 'a
val reduce : t -> 'a -> ('a -> value -> 'a) -> 'a

Iterate in increasing order.

val everyU : t -> (value -> bool) Js.Fn.arity1 -> bool
val every : t -> (value -> bool) -> bool

every p s checks if all elements of the set satisfy the predicate p. Order unspecified.

val someU : t -> (value -> bool) Js.Fn.arity1 -> bool
val some : t -> (value -> bool) -> bool

some p s checks if at least one element of the set satisfies the predicate p. Oder unspecified.

val keepU : t -> (value -> bool) Js.Fn.arity1 -> t
val keep : t -> (value -> bool) -> t

keep s p returns a fresh copy of the set of all elements in s that satisfy predicate p.

val partitionU : t -> (value -> bool) Js.Fn.arity1 -> t * t
val partition : t -> (value -> bool) -> t * t

partition s p returns a fresh copy pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate p, and s2 is the set of all the elements of s that do not satisfy p.

val size : t -> int
val toList : t -> value list

In increasing order with respect

val toArray : t -> value array

In increasing order with respect

val minimum : t -> value option
val minUndefined : t -> value Js.undefined
val maximum : t -> value option
val maxUndefined : t -> value Js.undefined
val get : t -> value -> value option
val getUndefined : t -> value -> value Js.undefined
val getExn : t -> value -> value
val split : t -> value -> (t * t) * bool

split s key return a fresh copy of each

val checkInvariantInternal : t -> unit

raise when invariant is not held

diff --git a/findlib-1/melange/belt/Belt/MutableSet/String/index.html b/findlib-1/melange/belt/Belt/MutableSet/String/index.html new file mode 100644 index 000000000..a828a2517 --- /dev/null +++ b/findlib-1/melange/belt/Belt/MutableSet/String/index.html @@ -0,0 +1,2 @@ + +String (docs.findlib-1.melange.belt.Belt.MutableSet.String)

Module MutableSet.String

Specalized when key type is string, more efficient than the generic type

This module is Belt.MutableSet specialized with key type to be a primitive type.

It is more efficient in general, the API is the same with Belt.MutableSet except its key type is fixed, and identity is not needed(using the built-in one)

See Belt.MutableSet

type value = string

The type of the set elements.

type t

The type of sets.

val make : unit -> t
val fromArray : value array -> t
val fromSortedArrayUnsafe : value array -> t
val copy : t -> t
val isEmpty : t -> bool
val has : t -> value -> bool
val add : t -> value -> unit
val addCheck : t -> value -> bool
val mergeMany : t -> value array -> unit
val remove : t -> value -> unit
val removeCheck : t -> value -> bool
val removeMany : t -> value array -> unit
val union : t -> t -> t
val intersect : t -> t -> t
val diff : t -> t -> t
val subset : t -> t -> bool
val cmp : t -> t -> int
val eq : t -> t -> bool
val forEachU : t -> (value -> unit) Js.Fn.arity1 -> unit
val forEach : t -> (value -> unit) -> unit

In increasing order

val reduceU : t -> 'a -> ('a -> value -> 'a) Js.Fn.arity2 -> 'a
val reduce : t -> 'a -> ('a -> value -> 'a) -> 'a

Iterate in increasing order.

val everyU : t -> (value -> bool) Js.Fn.arity1 -> bool
val every : t -> (value -> bool) -> bool

every p s checks if all elements of the set satisfy the predicate p. Order unspecified.

val someU : t -> (value -> bool) Js.Fn.arity1 -> bool
val some : t -> (value -> bool) -> bool

some p s checks if at least one element of the set satisfies the predicate p. Oder unspecified.

val keepU : t -> (value -> bool) Js.Fn.arity1 -> t
val keep : t -> (value -> bool) -> t

keep s p returns a fresh copy of the set of all elements in s that satisfy predicate p.

val partitionU : t -> (value -> bool) Js.Fn.arity1 -> t * t
val partition : t -> (value -> bool) -> t * t

partition s p returns a fresh copy pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate p, and s2 is the set of all the elements of s that do not satisfy p.

val size : t -> int
val toList : t -> value list

In increasing order with respect

val toArray : t -> value array

In increasing order with respect

val minimum : t -> value option
val minUndefined : t -> value Js.undefined
val maximum : t -> value option
val maxUndefined : t -> value Js.undefined
val get : t -> value -> value option
val getUndefined : t -> value -> value Js.undefined
val getExn : t -> value -> value
val split : t -> value -> (t * t) * bool

split s key return a fresh copy of each

val checkInvariantInternal : t -> unit

raise when invariant is not held

diff --git a/findlib-1/melange/belt/Belt/MutableSet/index.html b/findlib-1/melange/belt/Belt/MutableSet/index.html new file mode 100644 index 000000000..81cebe7d1 --- /dev/null +++ b/findlib-1/melange/belt/Belt/MutableSet/index.html @@ -0,0 +1,17 @@ + +MutableSet (docs.findlib-1.melange.belt.Belt.MutableSet)

Module Belt.MutableSet

Belt.MutableSet

The top level provides generic mutable set operations.

It also has two specialized inner modules Belt.MutableSet.Int and Belt.MutableSet.String

A mutable sorted set module which allows customize compare behavior.

Same as Belt.Set, but mutable.

module Int : sig ... end

Specalized when key type is int, more efficient than the generic type

module String : sig ... end

Specalized when key type is string, more efficient than the generic type

type ('k, 'id) t
type ('k, 'id) id = + (module Belt__.Belt_Id.Comparable + with type identity = 'id + and type t = 'k)
val make : id:('value, 'id) id -> ('value, 'id) t
val fromArray : 'k array -> id:('k, 'id) id -> ('k, 'id) t
val fromSortedArrayUnsafe : + 'value array -> + id:('value, 'id) id -> + ('value, 'id) t
val copy : ('k, 'id) t -> ('k, 'id) t
val isEmpty : (_, _) t -> bool
val has : ('value, _) t -> 'value -> bool
val add : ('value, 'id) t -> 'value -> unit
val addCheck : ('value, 'id) t -> 'value -> bool
val mergeMany : ('value, 'id) t -> 'value array -> unit
val remove : ('value, 'id) t -> 'value -> unit
val removeCheck : ('value, 'id) t -> 'value -> bool
val removeMany : ('value, 'id) t -> 'value array -> unit
val union : ('value, 'id) t -> ('value, 'id) t -> ('value, 'id) t
val intersect : ('value, 'id) t -> ('value, 'id) t -> ('value, 'id) t
val diff : ('value, 'id) t -> ('value, 'id) t -> ('value, 'id) t
val subset : ('value, 'id) t -> ('value, 'id) t -> bool
val cmp : ('value, 'id) t -> ('value, 'id) t -> int
val eq : ('value, 'id) t -> ('value, 'id) t -> bool
val forEachU : ('value, 'id) t -> ('value -> unit) Js.Fn.arity1 -> unit
val forEach : ('value, 'id) t -> ('value -> unit) -> unit

forEach m f applies f in turn to all elements of m. In increasing order

val reduceU : ('value, 'id) t -> 'a -> ('a -> 'value -> 'a) Js.Fn.arity2 -> 'a
val reduce : ('value, 'id) t -> 'a -> ('a -> 'value -> 'a) -> 'a

In increasing order.

val everyU : ('value, 'id) t -> ('value -> bool) Js.Fn.arity1 -> bool
val every : ('value, 'id) t -> ('value -> bool) -> bool

every s p checks if all elements of the set satisfy the predicate p. Order unspecified

val someU : ('value, 'id) t -> ('value -> bool) Js.Fn.arity1 -> bool
val some : ('value, 'id) t -> ('value -> bool) -> bool

some p s checks if at least one element of the set satisfies the predicate p.

val keepU : ('value, 'id) t -> ('value -> bool) Js.Fn.arity1 -> ('value, 'id) t
val keep : ('value, 'id) t -> ('value -> bool) -> ('value, 'id) t

keep s p returns the set of all elements in s that satisfy predicate p.

val partitionU : + ('value, 'id) t -> + ('value -> bool) Js.Fn.arity1 -> + ('value, 'id) t * ('value, 'id) t
val partition : + ('value, 'id) t -> + ('value -> bool) -> + ('value, 'id) t * ('value, 'id) t

partition p s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate p, and s2 is the set of all the elements of s that do not satisfy p.

val size : ('value, 'id) t -> int
val toList : ('value, 'id) t -> 'value list

In increasing order

val toArray : ('value, 'id) t -> 'value array

In increasing order

val minimum : ('value, 'id) t -> 'value option
val minUndefined : ('value, 'id) t -> 'value Js.undefined
val maximum : ('value, 'id) t -> 'value option
val maxUndefined : ('value, 'id) t -> 'value Js.undefined
val get : ('value, 'id) t -> 'value -> 'value option
val getUndefined : ('value, 'id) t -> 'value -> 'value Js.undefined
val getExn : ('value, 'id) t -> 'value -> 'value
val split : + ('value, 'id) t -> + 'value -> + (('value, 'id) t * ('value, 'id) t) * bool

split s x returns a triple ((l, r), present), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x. l,r are freshly made, no sharing with s

val checkInvariantInternal : (_, _) t -> unit

raise when invariant is not held

diff --git a/findlib-1/melange/belt/Belt/MutableStack/index.html b/findlib-1/melange/belt/Belt/MutableStack/index.html new file mode 100644 index 000000000..169c11925 --- /dev/null +++ b/findlib-1/melange/belt/Belt/MutableStack/index.html @@ -0,0 +1,2 @@ + +MutableStack (docs.findlib-1.melange.belt.Belt.MutableStack)

Module Belt.MutableStack

Belt.MutableStack

An FILO(first in last out) stack data structure

First in last out stack.

This module implements stacks, with in-place modification.

type 'a t
val make : unit -> 'a t
  • returns

    a new stack, initially empty.

val clear : 'a t -> unit

Discard all elements from the stack.

val copy : 'a t -> 'a t

copy x O(1) operation, return a new stack

val push : 'a t -> 'a -> unit
val popUndefined : 'a t -> 'a Js.undefined
val pop : 'a t -> 'a option
val topUndefined : 'a t -> 'a Js.undefined
val top : 'a t -> 'a option
val isEmpty : 'a t -> bool
val size : 'a t -> int
val forEachU : 'a t -> ('a -> unit) Js.Fn.arity1 -> unit
val forEach : 'a t -> ('a -> unit) -> unit
val dynamicPopIterU : 'a t -> ('a -> unit) Js.Fn.arity1 -> unit
val dynamicPopIter : 'a t -> ('a -> unit) -> unit

dynamicPopIter s f apply f to each element of s. The item is poped before applying f, s will be empty after this opeartion. This function is useful for worklist algorithm

diff --git a/findlib-1/melange/belt/Belt/Option/index.html b/findlib-1/melange/belt/Belt/Option/index.html new file mode 100644 index 000000000..149f64161 --- /dev/null +++ b/findlib-1/melange/belt/Belt/Option/index.html @@ -0,0 +1,29 @@ + +Option (docs.findlib-1.melange.belt.Belt.Option)

Module Belt.Option

Belt.Option

Utilities for option data type.

Belt.Option

Utilities for option data type

val keepU : 'a option -> ('a -> bool) Js.Fn.arity1 -> 'a option

Uncurried version of keep

val keep : 'a option -> ('a -> bool) -> 'a option

keep optionValue p

If optionValue is Some value and p value = true, it returns Some value; otherwise returns None

keep (Some 10)(fun x -> x > 5);; (* returns [Some 10] *)
+keep (Some 4)(fun x -> x > 5);; (* returns [None] *)
+keep None (fun x -> x > 5);; (* returns [None] *)
val forEachU : 'a option -> ('a -> unit) Js.Fn.arity1 -> unit

Uncurried version of forEach

val forEach : 'a option -> ('a -> unit) -> unit

forEach optionValue f

If optionValue is Some value, it calls f value; otherwise returns ()

forEach (Some "thing")(fun x -> Js.log x);; (* logs "thing" *)
+forEach None (fun x -> Js.log x);; (* returns () *)
val getExn : 'a option -> 'a

getExn optionalValue Returns value if optionalValue is Some value, otherwise raises getExn

getExn (Some 3) = 3;;
+getExn None (* Raises getExn error *)
val getUnsafe : 'a option -> 'a

getUnsafe x returns x This is an unsafe operation, it assumes x is neither not None or (Some (None .. ))

val mapWithDefaultU : 'a option -> 'b -> ('a -> 'b) Js.Fn.arity1 -> 'b

Uncurried version of mapWithDefault

val mapWithDefault : 'a option -> 'b -> ('a -> 'b) -> 'b

mapWithDefault optionValue default f

If optionValue is Some value, returns f value; otherwise returns default

mapWithDefault (Some 3) 0 (fun x -> x + 5) = 8;;
+mapWithDefault None 0 (fun x -> x + 5) = 0;;
val mapU : 'a option -> ('a -> 'b) Js.Fn.arity1 -> 'b option

Uncurried version of map

val map : 'a option -> ('a -> 'b) -> 'b option

map optionValue f

If optionValue is Some value, returns Some (f value); otherwise returns None

map (Some 3) (fun x -> x * x) = (Some 9);;
+map None (fun x -> x * x) = None;;
val flatMapU : 'a option -> ('a -> 'b option) Js.Fn.arity1 -> 'b option

Uncurried version of flatMap

val flatMap : 'a option -> ('a -> 'b option) -> 'b option

flatMap optionValue f

If optionValue is Some value, returns f value; otherwise returns None The function f must have a return type of 'a option

let f (x : float) =
+    if x >= 0.0 then
+      Some (sqrt x)
+    else
+      None;;
+
+flatMap (Some 4.0) f = Some 2.0;;
+flatMap (Some (-4.0)) f = None;;
+flatMap None f = None;;
val getWithDefault : 'a option -> 'a -> 'a

getWithDefault optionalValue default

If optionalValue is Some value, returns value, otherwise default

getWithDefault (Some 1812) 1066 = 1812;;
+getWithDefault None 1066 = 1066;;
val orElse : 'a option -> 'a option -> 'a option

orElse optionalValue otherOptional

If optionalValue is Some value, returns Some value, otherwise otherOptional

orElse (Some 1812) (Some 1066) = Some 1812;;
+orElse None (Some 1066) = Some 1066;;
+orElse None None = None;;
val isSome : 'a option -> bool

Returns true if the argument is Some value, false otherwise

val isNone : 'a option -> bool

Returns true if the argument is None, false otherwise

val eqU : 'a option -> 'b option -> ('a -> 'b -> bool) Js.Fn.arity2 -> bool

Uncurried version of eq

val eq : 'a option -> 'b option -> ('a -> 'b -> bool) -> bool

eq optValue1 optvalue2 predicate

Evaluates two optional values for equality with respect to a predicate function.

If both optValue1 and optValue2 are None, returns true.

If one of the arguments is Some value and the other is None, returns false

If arguments are Some value1 and Some value2, returns the result of predicate value1 value2; the predicate function must return a bool

let clockEqual = (fun a b -> a mod 12 = b mod 12);;
+eq (Some 3) (Some 15) clockEqual = true;;
+eq (Some 3) None clockEqual = false;;
+eq None (Some 3) clockEqual = false;;
+eq None None clockEqual = true;;
val cmpU : 'a option -> 'b option -> ('a -> 'b -> int) Js.Fn.arity2 -> int

Uncurried version of cmp

val cmp : 'a option -> 'b option -> ('a -> 'b -> int) -> int

cmp optValue1 optvalue2 comparisonFcn

Compares two optional values with respect to a comparison function

If both optValue1 and optValue2 are None, returns 0.

If the first argument is Some value1 and the second is None, returns 1 (something is greater than nothing)

If the first argument is None and the second is Some value2, returns -1 (nothing is less than something)

If the arguments are Some value1 and Some value2, returns the result of comparisonFcn value1 value2; comparisonFcn takes two arguments and returns -1 if the first argument is less than the second, 0 if the arguments are equal, and 1 if the first argument is greater than the second.

let clockCompare = fun a b -> compare (a mod 12) (b mod 12);;
+cmp (Some 3) (Some 15) clockCompare = 0;;
+cmp (Some 3) (Some 14) clockCompare = 1;;
+cmp (Some 2) (Some 15) clockCompare = -1;;
+cmp None (Some 15) clockCompare = -1;;
+cmp (Some 14) None clockCompare = 1;;
+cmp None None clockCompare = 0;;
diff --git a/findlib-1/melange/belt/Belt/Range/index.html b/findlib-1/melange/belt/Belt/Range/index.html new file mode 100644 index 000000000..885552eb7 --- /dev/null +++ b/findlib-1/melange/belt/Belt/Range/index.html @@ -0,0 +1,2 @@ + +Range (docs.findlib-1.melange.belt.Belt.Range)

Module Belt.Range

Belt.Range

Utilities for a closed range (from, start)

A small module to provide a inclusive range operations [start, finsish], it use a for-loop internally instead of creating an array

val forEachU : int -> int -> (int -> unit) Js.Fn.arity1 -> unit
val forEach : int -> int -> (int -> unit) -> unit

forEach start finish action

equivalent to Belt.Array.(forEach (range start finish) action)

val everyU : int -> int -> (int -> bool) Js.Fn.arity1 -> bool
val every : int -> int -> (int -> bool) -> bool

every start finish p

equivalent to Belt.Array.(every (range start finish) p )

val everyByU : int -> int -> step:int -> (int -> bool) Js.Fn.arity1 -> bool
val everyBy : int -> int -> step:int -> (int -> bool) -> bool

everyBy start finish ~step p

See Belt.Array.rangeBy

equivalent to Belt.Array.(every (rangeBy start finish ~step) p)

val someU : int -> int -> (int -> bool) Js.Fn.arity1 -> bool
val some : int -> int -> (int -> bool) -> bool

some start finish p

equivalent to Belt.Array.(some (range start finish) p)

val someByU : int -> int -> step:int -> (int -> bool) Js.Fn.arity1 -> bool
val someBy : int -> int -> step:int -> (int -> bool) -> bool

someBy start finish ~step p

See Belt.Array.rangeBy

equivalent to Belt.Array.(some (rangeBy start finish ~step) p)

diff --git a/findlib-1/melange/belt/Belt/Result/index.html b/findlib-1/melange/belt/Belt/Result/index.html new file mode 100644 index 000000000..be404ccac --- /dev/null +++ b/findlib-1/melange/belt/Belt/Result/index.html @@ -0,0 +1,40 @@ + +Result (docs.findlib-1.melange.belt.Belt.Result)

Module Belt.Result

Belt.Result

Utilities for result data type.

Belt.Result is a data type with two variants: Ok and Error. Each of these variants can contain data, and those two pieces of data need not have the same data type. Belt.Result is useful when you need to not only determine whether some data is valid or not (use Belt.Option for that), but also keep information about the invalid data.

In the examples, we presume the existence of two variables:

let good = Ok 42
+let bad = Error "Invalid data"
type ('a, 'b) t = ('a, 'b) result =
  1. | Ok of 'a
  2. | Error of 'b
val getExn : ('a, 'b) t -> 'a

getExn res

when res is Ok n, returns n when res is Error m, raise an exception

getExn good = 42;;
+getExn bad;; (* raises exception *)
val mapWithDefaultU : ('a, 'c) t -> 'b -> ('a -> 'b) Js.Fn.arity1 -> 'b
val mapWithDefault : ('a, 'c) t -> 'b -> ('a -> 'b) -> 'b

mapWithDefault res default f

When res is Ok n, returns f n, otherwise default.

mapWithDefault good 0 (fun x -> x / 2) = 21
+mapWithDefault bad 0 (fun x -> x / 2) = 0
val mapU : ('a, 'c) t -> ('a -> 'b) Js.Fn.arity1 -> ('b, 'c) t
val map : ('a, 'c) t -> ('a -> 'b) -> ('b, 'c) t

map res f

When res is Ok n, returns Ok (f n). Otherwise returns res unchanged. Function f takes a value of the same type as n and returns an ordinary value.

let f x = sqrt (float_of_int x)
+map (Ok 64) f = Ok 8.0
+map (Error "Invalid data") f = Error "Invalid data"
val flatMapU : ('a, 'c) t -> ('a -> ('b, 'c) t) Js.Fn.arity1 -> ('b, 'c) t
val flatMap : ('a, 'c) t -> ('a -> ('b, 'c) t) -> ('b, 'c) t

flatMap res f

When res is Ok n, returns f n. Otherwise, returns res unchanged. Function f takes a value of the same type as n and returns a Belt.Result.

let recip x =
+  if x != 0.0
+  then
+    Ok (1.0 /. x)
+  else
+    Error "Divide by zero"
+
+    flatMap (Ok 2.0) recip = Ok 0.5
+    flatMap (Ok 0.0) recip = Error "Divide by zero"
+    flatMap (Error "Already bad") recip = Error "Already bad"
val getWithDefault : ('a, 'b) t -> 'a -> 'a

getWithDefault res defaultValue

if res is Ok n, returns n, otherwise default

getWithDefault (Ok 42) 0 = 42
+getWithDefault (Error "Invalid Data") = 0
val isOk : ('a, 'b) t -> bool

isOk res

Returns true if res is of the form Ok n, false if it is the Error e variant.

val isError : ('a, 'b) t -> bool

isError res

Returns true if res is of the form Error e, false if it is the Ok n variant.

val eqU : ('a, 'c) t -> ('b, 'd) t -> ('a -> 'b -> bool) Js.Fn.arity2 -> bool
val eq : ('a, 'c) t -> ('b, 'd) t -> ('a -> 'b -> bool) -> bool

eq res1 res2 f

Determine if two Belt.Result variables are equal with respect to an equality function. If res1 and res2 are of the form Ok n and Ok m, return the result of f n m. If one of res1 and res2 are of the form Error e, return false If both res1 and res2 are of the form Error e, return true

let good1 = Ok 42
+let good2 = Ok 32
+let bad1 = Error "invalid"
+let bad2 = Error "really invalid"
+
+let mod10equal a b =
+  a mod 10 == b mod 10
+
+eq good1 good2 mod10equal = true
+eq good1 bad1 mod10equal = false
+eq bad2 good2 mod10equal = false
+eq bad1 bad2 mod10equal = true
val cmpU : ('a, 'c) t -> ('b, 'd) t -> ('a -> 'b -> int) Js.Fn.arity2 -> int
val cmp : ('a, 'c) t -> ('b, 'd) t -> ('a -> 'b -> int) -> int

cmp res1 res2 f

Compare two Belt.Result variables with respect to a comparison function. The comparison function returns -1 if the first variable is "less than" the second, 0 if the two variables are equal, and 1 if the first is "greater than" the second.

If res1 and res2 are of the form Ok n and Ok m, return the result of f n m. If res1 is of the form Error e and res2 of the form Ok n, return -1 (nothing is less than something) If res1 is of the form Ok n and res2 of the form Error e, return 1 (something is greater than nothing) If both res1 and res2 are of the form Error e, return 0 (equal)

let good1 = Ok 59
+let good2 = Ok 37
+let bad1 = Error "invalid"
+let bad2 = Error "really invalid"
+
+let mod10cmp a b =
+  Pervasives.compare (a mod 10) (b mod 10)
+
+cmp (Ok 39) (Ok 57) mod10cmp = 1
+cmp (Ok 57) (Ok 39) mod10cmp = -1
+cmp (Ok 39) (Error "y") mod10cmp = 1
+cmp (Error "x") (Ok 57) mod10cmp = -1
+cmp (Error "x") (Error "y") mod10cmp = 0
diff --git a/findlib-1/melange/belt/Belt/Set/Dict/index.html b/findlib-1/melange/belt/Belt/Set/Dict/index.html new file mode 100644 index 000000000..b03958e06 --- /dev/null +++ b/findlib-1/melange/belt/Belt/Set/Dict/index.html @@ -0,0 +1,44 @@ + +Dict (docs.findlib-1.melange.belt.Belt.Set.Dict)

Module Set.Dict

This module seprate identity from data, it is a bit more verboe but slightly more efficient due to the fact that there is no need to pack identity and data back after each operation

type ('value, 'identity) t
type ('value, 'id) cmp
val empty : ('value, 'id) t
val fromArray : 'value array -> cmp:('value, 'id) cmp -> ('value, 'id) t
val fromSortedArrayUnsafe : 'value array -> ('value, 'id) t
val isEmpty : (_, _) t -> bool
val has : ('value, 'id) t -> 'value -> cmp:('value, 'id) cmp -> bool
val add : ('value, 'id) t -> 'value -> cmp:('value, 'id) cmp -> ('value, 'id) t

add s x If x was already in s, s is returned unchanged.

val mergeMany : + ('value, 'id) t -> + 'value array -> + cmp:('value, 'id) cmp -> + ('value, 'id) t
val remove : + ('value, 'id) t -> + 'value -> + cmp:('value, 'id) cmp -> + ('value, 'id) t

remove m x If x was not in m, m is returned reference unchanged.

val removeMany : + ('value, 'id) t -> + 'value array -> + cmp:('value, 'id) cmp -> + ('value, 'id) t
val union : + ('value, 'id) t -> + ('value, 'id) t -> + cmp:('value, 'id) cmp -> + ('value, 'id) t
val intersect : + ('value, 'id) t -> + ('value, 'id) t -> + cmp:('value, 'id) cmp -> + ('value, 'id) t
val diff : + ('value, 'id) t -> + ('value, 'id) t -> + cmp:('value, 'id) cmp -> + ('value, 'id) t
val subset : + ('value, 'id) t -> + ('value, 'id) t -> + cmp:('value, 'id) cmp -> + bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val cmp : ('value, 'id) t -> ('value, 'id) t -> cmp:('value, 'id) cmp -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val eq : ('value, 'id) t -> ('value, 'id) t -> cmp:('value, 'id) cmp -> bool

eq s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val forEachU : ('value, 'id) t -> ('value -> unit) Js.Fn.arity1 -> unit
val forEach : ('value, 'id) t -> ('value -> unit) -> unit

forEach s f applies f in turn to all elements of s. In increasing order

val reduceU : ('value, 'id) t -> 'a -> ('a -> 'value -> 'a) Js.Fn.arity2 -> 'a
val reduce : ('value, 'id) t -> 'a -> ('a -> 'value -> 'a) -> 'a

Iterate in increasing order.

val everyU : ('value, 'id) t -> ('value -> bool) Js.Fn.arity1 -> bool
val every : ('value, 'id) t -> ('value -> bool) -> bool

every p s checks if all elements of the set satisfy the predicate p. Order unspecified.

val someU : ('value, 'id) t -> ('value -> bool) Js.Fn.arity1 -> bool
val some : ('value, 'id) t -> ('value -> bool) -> bool

some p s checks if at least one element of the set satisfies the predicate p. Oder unspecified.

val keepU : ('value, 'id) t -> ('value -> bool) Js.Fn.arity1 -> ('value, 'id) t
val keep : ('value, 'id) t -> ('value -> bool) -> ('value, 'id) t

keep p s returns the set of all elements in s that satisfy predicate p.

val partitionU : + ('value, 'id) t -> + ('value -> bool) Js.Fn.arity1 -> + ('value, 'id) t * ('value, 'id) t
val partition : + ('value, 'id) t -> + ('value -> bool) -> + ('value, 'id) t * ('value, 'id) t

partition p s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate p, and s2 is the set of all the elements of s that do not satisfy p.

val size : ('value, 'id) t -> int
val toList : ('value, 'id) t -> 'value list

In increasing order

val toArray : ('value, 'id) t -> 'value array
val minimum : ('value, 'id) t -> 'value option
val minUndefined : ('value, 'id) t -> 'value Js.undefined
val maximum : ('value, 'id) t -> 'value option
val maxUndefined : ('value, 'id) t -> 'value Js.undefined
val get : ('value, 'id) t -> 'value -> cmp:('value, 'id) cmp -> 'value option
val getUndefined : + ('value, 'id) t -> + 'value -> + cmp:('value, 'id) cmp -> + 'value Js.undefined
val getExn : ('value, 'id) t -> 'value -> cmp:('value, 'id) cmp -> 'value
val split : + ('value, 'id) t -> + 'value -> + cmp:('value, 'id) cmp -> + (('value, 'id) t * ('value, 'id) t) * bool

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

val checkInvariantInternal : (_, _) t -> unit

raise when invariant is not held

diff --git a/findlib-1/melange/belt/Belt/Set/Int/index.html b/findlib-1/melange/belt/Belt/Set/Int/index.html new file mode 100644 index 000000000..fb3b0ccfd --- /dev/null +++ b/findlib-1/melange/belt/Belt/Set/Int/index.html @@ -0,0 +1,2 @@ + +Int (docs.findlib-1.melange.belt.Belt.Set.Int)

Module Set.Int

Specalized when value type is int, more efficient than the generic type, its compare behavior is fixed using the built-in comparison

This module is Belt.Set specialized with value type to be a primitive type. It is more efficient in general, the API is the same with Belt.Set except its value type is fixed, and identity is not needed(using the built-in one)

See Belt.Set

type value = int

The type of the set elements.

type t

The type of sets.

val empty : t
val fromArray : value array -> t
val fromSortedArrayUnsafe : value array -> t
val isEmpty : t -> bool
val has : t -> value -> bool
val add : t -> value -> t

add s x If x was already in s, s is returned unchanged.

val mergeMany : t -> value array -> t
val remove : t -> value -> t

remove m x If x was not in m, m is returned reference unchanged.

val removeMany : t -> value array -> t
val union : t -> t -> t
val intersect : t -> t -> t
val diff : t -> t -> t
val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val cmp : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val eq : t -> t -> bool

eq s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val forEachU : t -> (value -> unit) Js.Fn.arity1 -> unit
val forEach : t -> (value -> unit) -> unit

forEach s f applies f in turn to all elements of s. In increasing order

val reduceU : t -> 'a -> ('a -> value -> 'a) Js.Fn.arity2 -> 'a
val reduce : t -> 'a -> ('a -> value -> 'a) -> 'a

Iterate in increasing order.

val everyU : t -> (value -> bool) Js.Fn.arity1 -> bool
val every : t -> (value -> bool) -> bool

every p s checks if all elements of the set satisfy the predicate p. Order unspecified.

val someU : t -> (value -> bool) Js.Fn.arity1 -> bool
val some : t -> (value -> bool) -> bool

some p s checks if at least one element of the set satisfies the predicate p. Oder unspecified.

val keepU : t -> (value -> bool) Js.Fn.arity1 -> t
val keep : t -> (value -> bool) -> t

keep p s returns the set of all elements in s that satisfy predicate p.

val partitionU : t -> (value -> bool) Js.Fn.arity1 -> t * t
val partition : t -> (value -> bool) -> t * t

partition p s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate p, and s2 is the set of all the elements of s that do not satisfy p.

val size : t -> int
val toList : t -> value list

In increasing order

val toArray : t -> value array
val minimum : t -> value option
val minUndefined : t -> value Js.undefined
val maximum : t -> value option
val maxUndefined : t -> value Js.undefined
val get : t -> value -> value option
val getUndefined : t -> value -> value Js.undefined
val getExn : t -> value -> value
val split : t -> value -> (t * t) * bool

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

val checkInvariantInternal : t -> unit

raise when invariant is not held

diff --git a/findlib-1/melange/belt/Belt/Set/String/index.html b/findlib-1/melange/belt/Belt/Set/String/index.html new file mode 100644 index 000000000..0d81b2168 --- /dev/null +++ b/findlib-1/melange/belt/Belt/Set/String/index.html @@ -0,0 +1,2 @@ + +String (docs.findlib-1.melange.belt.Belt.Set.String)

Module Set.String

Specalized when value type is string, more efficient than the generic type, its compare behavior is fixed using the built-in comparison

This module is Belt.Set specialized with value type to be a primitive type. It is more efficient in general, the API is the same with Belt.Set except its value type is fixed, and identity is not needed(using the built-in one)

See Belt.Set

type value = string

The type of the set elements.

type t

The type of sets.

val empty : t
val fromArray : value array -> t
val fromSortedArrayUnsafe : value array -> t
val isEmpty : t -> bool
val has : t -> value -> bool
val add : t -> value -> t

add s x If x was already in s, s is returned unchanged.

val mergeMany : t -> value array -> t
val remove : t -> value -> t

remove m x If x was not in m, m is returned reference unchanged.

val removeMany : t -> value array -> t
val union : t -> t -> t
val intersect : t -> t -> t
val diff : t -> t -> t
val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val cmp : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val eq : t -> t -> bool

eq s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val forEachU : t -> (value -> unit) Js.Fn.arity1 -> unit
val forEach : t -> (value -> unit) -> unit

forEach s f applies f in turn to all elements of s. In increasing order

val reduceU : t -> 'a -> ('a -> value -> 'a) Js.Fn.arity2 -> 'a
val reduce : t -> 'a -> ('a -> value -> 'a) -> 'a

Iterate in increasing order.

val everyU : t -> (value -> bool) Js.Fn.arity1 -> bool
val every : t -> (value -> bool) -> bool

every p s checks if all elements of the set satisfy the predicate p. Order unspecified.

val someU : t -> (value -> bool) Js.Fn.arity1 -> bool
val some : t -> (value -> bool) -> bool

some p s checks if at least one element of the set satisfies the predicate p. Oder unspecified.

val keepU : t -> (value -> bool) Js.Fn.arity1 -> t
val keep : t -> (value -> bool) -> t

keep p s returns the set of all elements in s that satisfy predicate p.

val partitionU : t -> (value -> bool) Js.Fn.arity1 -> t * t
val partition : t -> (value -> bool) -> t * t

partition p s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate p, and s2 is the set of all the elements of s that do not satisfy p.

val size : t -> int
val toList : t -> value list

In increasing order

val toArray : t -> value array
val minimum : t -> value option
val minUndefined : t -> value Js.undefined
val maximum : t -> value option
val maxUndefined : t -> value Js.undefined
val get : t -> value -> value option
val getUndefined : t -> value -> value Js.undefined
val getExn : t -> value -> value
val split : t -> value -> (t * t) * bool

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

val checkInvariantInternal : t -> unit

raise when invariant is not held

diff --git a/findlib-1/melange/belt/Belt/Set/index.html b/findlib-1/melange/belt/Belt/Set/index.html new file mode 100644 index 000000000..b0871a5bf --- /dev/null +++ b/findlib-1/melange/belt/Belt/Set/index.html @@ -0,0 +1,65 @@ + +Set (docs.findlib-1.melange.belt.Belt.Set)

Module Belt.Set

Belt.Set

The top level provides generic immutable set operations.

It also has three specialized inner modules Belt.Set.Int, Belt.Set.String and

Belt.Set.Dict: This module separates data from function which is more verbose but slightly more efficient

A immutable sorted set module which allows customize compare behavior.

The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

For more info on this module's usage of identity, `make` and others, please see the top level documentation of Belt, A special encoding for collection safety.

Example usage:

module PairComparator = Belt.Id.MakeComparable(struct
+  type t = int * int
+  let cmp (a0, a1) (b0, b1) =
+    match Pervasives.compare a0 b0 with
+    | 0 -> Pervasives.compare a1 b1
+    | c -> c
+end)
+
+let mySet = Belt.Set.make ~id:(module PairComparator)
+let mySet2 = Belt.Set.add mySet (1, 2)

The API documentation below will assume a predeclared comparator module for integers, IntCmp

module Int : sig ... end

Specalized when value type is int, more efficient than the generic type, its compare behavior is fixed using the built-in comparison

module String : sig ... end

Specalized when value type is string, more efficient than the generic type, its compare behavior is fixed using the built-in comparison

module Dict : sig ... end

This module seprate identity from data, it is a bit more verboe but slightly more efficient due to the fact that there is no need to pack identity and data back after each operation

type ('value, 'identity) t

('value, 'identity) t

'value is the element type

'identity the identity of the collection

type ('value, 'id) id = + (module Belt__.Belt_Id.Comparable + with type identity = 'id + and type t = 'value)

The identity needed for making a set from scratch

val make : id:('value, 'id) id -> ('value, 'id) t

make ~id creates a new set by taking in the comparator

let s = make ~id:(module IntCmp)
val fromArray : 'value array -> id:('value, 'id) id -> ('value, 'id) t

fromArray xs ~id

toArray (fromArray [1;3;2;4] (module IntCmp)) = [1;2;3;4]
val fromSortedArrayUnsafe : + 'value array -> + id:('value, 'id) id -> + ('value, 'id) t

fromSortedArrayUnsafe xs ~id

The same as fromArray except it is after assuming the input array x is already sorted

Unsafe

val isEmpty : (_, _) t -> bool
isEmpty (fromArray [||] ~id:(module IntCmp)) = true;;
+isEmpty (fromArray [|1|] ~id:(module IntCmp)) = true;;
val has : ('value, 'id) t -> 'value -> bool
let v = fromArray [|1;4;2;5|] ~id:(module IntCmp);;
+has v 3 = false;;
+has v 1 = true;;
val add : ('value, 'id) t -> 'value -> ('value, 'id) t

add s x If x was already in s, s is returned unchanged.

let s0 = make ~id:(module IntCmp);;
+let s1 = add s0 1 ;;
+let s2 = add s1 2;;
+let s3 = add s2 2;;
+toArray s0 = [||];;
+toArray s1 = [|1|];;
+toArray s2 = [|1;2|];;
+toArray s3 = [|1;2|];;
+s2 == s3;;
val mergeMany : ('value, 'id) t -> 'value array -> ('value, 'id) t

mergeMany s xs

Adding each of xs to s, note unlike add, the reference of return value might be changed even if all values in xs exist s

val remove : ('value, 'id) t -> 'value -> ('value, 'id) t

remove m x If x was not in m, m is returned reference unchanged.

let s0 = fromArray ~id:(module IntCmp) [|2;3;1;4;5|];;
+let s1 = remove s0 1 ;;
+let s2 = remove s1 3 ;;
+let s3 = remove s2 3 ;;
+
+toArray s1 = [|2;3;4;5|];;
+toArray s2 = [|2;4;5|];;
+s2 == s3;;
val removeMany : ('value, 'id) t -> 'value array -> ('value, 'id) t

removeMany s xs

Removing each of xs to s, note unlike remove, the reference of return value might be changed even if none in xs exists s

val union : ('value, 'id) t -> ('value, 'id) t -> ('value, 'id) t

union s0 s1

let s0 = fromArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
+let s1 = fromArray ~id:(module IntCmp) [|5;2;3;1;5;4;|];;
+toArray (union s0 s1) =  [|1;2;3;4;5;6|]
val intersect : ('value, 'id) t -> ('value, 'id) t -> ('value, 'id) t

intersect s0 s1

let s0 = fromArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
+let s1 = fromArray ~id:(module IntCmp) [|5;2;3;1;5;4;|];;
+toArray (intersect s0 s1) =  [|2;3;5|]
val diff : ('value, 'id) t -> ('value, 'id) t -> ('value, 'id) t

diff s0 s1

let s0 = fromArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
+let s1 = fromArray ~id:(module IntCmp) [|5;2;3;1;5;4;|];;
+toArray (diff s0 s1) = [|6|];;
+toArray (diff s1 s0) = [|1;4|];;
val subset : ('value, 'id) t -> ('value, 'id) t -> bool

subset s0 s1

let s0 = fromArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
+let s1 = fromArray ~id:(module IntCmp) [|5;2;3;1;5;4;|];;
+let s2 = intersect s0 s1;;
+subset s2 s0 = true;;
+subset s2 s1 = true;;
+subset s1 s0 = false;;
val cmp : ('value, 'id) t -> ('value, 'id) t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets. It compare size first and then iterate over each element following the order of elements

val eq : ('value, 'id) t -> ('value, 'id) t -> bool

eq s0 s1

  • returns

    true if toArray s0 = toArray s1

val forEachU : ('value, 'id) t -> ('value -> unit) Js.Fn.arity1 -> unit
val forEach : ('value, 'id) t -> ('value -> unit) -> unit

forEach s f applies f in turn to all elements of s. In increasing order

let s0 = fromArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
+let acc = ref [] ;;
+forEach s0 (fun x -> acc := x !acc);;
+!acc = [6;5;3;2];;
val reduceU : ('value, 'id) t -> 'a -> ('a -> 'value -> 'a) Js.Fn.arity2 -> 'a
val reduce : ('value, 'id) t -> 'a -> ('a -> 'value -> 'a) -> 'a

In increasing order.

let s0 = fromArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
+reduce s0 [] Belt.List.add = [6;5;3;2];;
val everyU : ('value, 'id) t -> ('value -> bool) Js.Fn.arity1 -> bool
val every : ('value, 'id) t -> ('value -> bool) -> bool

every p s checks if all elements of the set satisfy the predicate p. Order unspecified.

val someU : ('value, 'id) t -> ('value -> bool) Js.Fn.arity1 -> bool
val some : ('value, 'id) t -> ('value -> bool) -> bool

some p s checks if at least one element of the set satisfies the predicate p.

val keepU : ('value, 'id) t -> ('value -> bool) Js.Fn.arity1 -> ('value, 'id) t
val keep : ('value, 'id) t -> ('value -> bool) -> ('value, 'id) t

keep m p returns the set of all elements in s that satisfy predicate p.

val partitionU : + ('value, 'id) t -> + ('value -> bool) Js.Fn.arity1 -> + ('value, 'id) t * ('value, 'id) t
val partition : + ('value, 'id) t -> + ('value -> bool) -> + ('value, 'id) t * ('value, 'id) t

partition m p returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate p, and s2 is the set of all the elements of s that do not satisfy p.

val size : ('value, 'id) t -> int

size s

let s0 = fromArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
+size s0 = 4;;
val toArray : ('value, 'id) t -> 'value array

toArray s0

let s0 = fromArray ~id:(module IntCmp) [|5;2;3;5;6|]];;
+toArray s0 = [|2;3;5;6|];;
val toList : ('value, 'id) t -> 'value list

In increasing order

See toArray

val minimum : ('value, 'id) t -> 'value option

minimum s0

  • returns

    the minimum element of the collection, None if it is empty

val minUndefined : ('value, 'id) t -> 'value Js.undefined

minUndefined s0

  • returns

    the minimum element of the collection, undefined if it is empty

val maximum : ('value, 'id) t -> 'value option

maximum s0

  • returns

    the maximum element of the collection, None if it is empty

val maxUndefined : ('value, 'id) t -> 'value Js.undefined

maxUndefined s0

  • returns

    the maximum element of the collection, undefined if it is empty

val get : ('value, 'id) t -> 'value -> 'value option

get s0 k

  • returns

    the reference of the value k' which is equivalent to k using the comparator specifiecd by this collection, None if it does not exist

val getUndefined : ('value, 'id) t -> 'value -> 'value Js.undefined

See get

val getExn : ('value, 'id) t -> 'value -> 'value

See get

raise if not exist

val split : + ('value, 'id) t -> + 'value -> + (('value, 'id) t * ('value, 'id) t) * bool

split set ele

  • returns

    a tuple ((smaller, larger), present), present is true when ele exist in set

Below are operations only when better performance needed, it is still safe API but more verbose. More API will be exposed by needs

val getData : ('value, 'id) t -> ('value, 'id) Belt__.Belt_SetDict.t

getData s0

Advanced usage only

  • returns

    the raw data (detached from comparator), but its type is still manifested, so that user can pass identity directly without boxing

val getId : ('value, 'id) t -> ('value, 'id) id

getId s0

Advanced usage only

  • returns

    the identity of s0

val packIdData : + id:('value, 'id) id -> + data:('value, 'id) Belt__.Belt_SetDict.t -> + ('value, 'id) t

packIdData ~id ~data

Advanced usage only

  • returns

    the packed collection

diff --git a/findlib-1/melange/belt/Belt/SortArray/Int/index.html b/findlib-1/melange/belt/Belt/SortArray/Int/index.html new file mode 100644 index 000000000..605170413 --- /dev/null +++ b/findlib-1/melange/belt/Belt/SortArray/Int/index.html @@ -0,0 +1,2 @@ + +Int (docs.findlib-1.melange.belt.Belt.SortArray.Int)

Module SortArray.Int

Specalized when key type is int, more efficient than the generic type

This is a specialized module for Belt.SortArray, the docs in that module also applies here, except the comparator is fixed and inlined

type element = int
val strictlySortedLength : element array -> int

The same as Belt.SortArray.strictlySortedLength except the comparator is fixed

  • returns

    +n means increasing order -n means negative order

val isSorted : element array -> bool

sorted xs return true if xs is in non strict increasing order

val stableSortInPlace : element array -> unit

The same as Belt.SortArray.stableSortInPlaceBy except the comparator is fixed

val stableSort : element array -> element array

The same as Belt.SortArray.stableSortBy except the comparator is fixed

val binarySearch : element array -> element -> int

If value is not found and value is less than one or more elements in array, the negative number returned is the bitwise complement of the index of the first element that is larger than value.

If value is not found and value is greater than all elements in array, the negative number returned is the bitwise complement of (the index of the last element plus 1)

for example, if key is smaller than all elements return -1 since lnot (-1) = 0 if key is larger than all elements return - (len + 1) since lnot (-(len+1)) = len

diff --git a/findlib-1/melange/belt/Belt/SortArray/String/index.html b/findlib-1/melange/belt/Belt/SortArray/String/index.html new file mode 100644 index 000000000..b0667c4f6 --- /dev/null +++ b/findlib-1/melange/belt/Belt/SortArray/String/index.html @@ -0,0 +1,2 @@ + +String (docs.findlib-1.melange.belt.Belt.SortArray.String)

Module SortArray.String

Specalized when key type is string, more efficient than the generic type

This is a specialized module for Belt.SortArray, the docs in that module also applies here, except the comparator is fixed and inlined

type element = string
val strictlySortedLength : element array -> int

The same as Belt.SortArray.strictlySortedLength except the comparator is fixed

  • returns

    +n means increasing order -n means negative order

val isSorted : element array -> bool

sorted xs return true if xs is in non strict increasing order

val stableSortInPlace : element array -> unit

The same as Belt.SortArray.stableSortInPlaceBy except the comparator is fixed

val stableSort : element array -> element array

The same as Belt.SortArray.stableSortBy except the comparator is fixed

val binarySearch : element array -> element -> int

If value is not found and value is less than one or more elements in array, the negative number returned is the bitwise complement of the index of the first element that is larger than value.

If value is not found and value is greater than all elements in array, the negative number returned is the bitwise complement of (the index of the last element plus 1)

for example, if key is smaller than all elements return -1 since lnot (-1) = 0 if key is larger than all elements return - (len + 1) since lnot (-(len+1)) = len

diff --git a/findlib-1/melange/belt/Belt/SortArray/index.html b/findlib-1/melange/belt/Belt/SortArray/index.html new file mode 100644 index 000000000..1e91b6188 --- /dev/null +++ b/findlib-1/melange/belt/Belt/SortArray/index.html @@ -0,0 +1,6 @@ + +SortArray (docs.findlib-1.melange.belt.Belt.SortArray)

Module Belt.SortArray

Belt.SortArray

The top level provides some generic sort related utilities.

It also has two specialized inner modules Belt.SortArray.Int and Belt.SortArray.String

A module for Array sort relevant utiliites

module Int : sig ... end

Specalized when key type is int, more efficient than the generic type

module String : sig ... end

Specalized when key type is string, more efficient than the generic type

val strictlySortedLengthU : 'a array -> ('a -> 'a -> bool) Js.Fn.arity2 -> int
val strictlySortedLength : 'a array -> ('a -> 'a -> bool) -> int

strictlySortedLenght xs cmp return +n means increasing order -n means negative order

strictlySortedLength [|1;2;3;4;3|] (fun x y -> x < y) = 4;;
+strictlySortedLength [||] (fun x y -> x < y) = 0;;
+strictlySortedLength [|1|] (fun x y -> x < y) = 1;;
+strictlySortedLength [|4;3;2;1|] (fun x y -> x < y) = -4;;
val isSortedU : 'a array -> ('a -> 'a -> int) Js.Fn.arity2 -> bool
val isSorted : 'a array -> ('a -> 'a -> int) -> bool

isSorted arr cmp

  • returns

    true if array is increasingly sorted (equal is okay )

    isSorted [|1;1;2;3;4|] (fun x y -> compare x y) = true
val stableSortInPlaceByU : 'a array -> ('a -> 'a -> int) Js.Fn.arity2 -> unit
val stableSortInPlaceBy : 'a array -> ('a -> 'a -> int) -> unit

stableSortBy xs cmp

Sort xs in place using comparator cmp, the stable means if the elements are equal, their order will be preserved

val stableSortByU : 'a array -> ('a -> 'a -> int) Js.Fn.arity2 -> 'a array
val stableSortBy : 'a array -> ('a -> 'a -> int) -> 'a array

stableSort xs cmp

val binarySearchByU : 'a array -> 'a -> ('a -> 'a -> int) Js.Fn.arity2 -> int
val binarySearchBy : 'a array -> 'a -> ('a -> 'a -> int) -> int

If value is not found and value is less than one or more elements in array, the negative number returned is the bitwise complement of the index of the first element that is larger than value.

If value is not found and value is greater than all elements in array, the negative number returned is the bitwise complement of (the index of the last element plus 1)

for example, if key is smaller than all elements return -1 since lnot (-1) = 0 if key is larger than all elements return - (len + 1) since lnot (-(len+1)) = len

binarySearchBy [|1;2;3;4;33;35;36|] 33 = 4;;
+lnot (binarySearchBy [|1;3;5;7|] 4) = 2;;
diff --git a/findlib-1/melange/belt/Belt/index.html b/findlib-1/melange/belt/Belt/index.html new file mode 100644 index 000000000..aba37238d --- /dev/null +++ b/findlib-1/melange/belt/Belt/index.html @@ -0,0 +1,24 @@ + +Belt (docs.findlib-1.melange.belt.Belt)

Module Belt

A stdlib shipped with Melange

This stdlib is still in beta but we encourage you to try it out and give us feedback.

Motivation

The motivation for creating such library is to provide Melange users a better end-to-end user experience, since the original OCaml stdlib was not written with JS in mind. Below is a list of areas this lib aims to improve:

  1. Consistency in name convention: camlCase, and arguments order
  2. Exception thrown functions are all suffixed with Exn, e.g, getExn
  3. Better performance and smaller code size running on JS platform

Name Convention

For higher order functions, it will be suffixed U if it takes uncurried callback.

val forEach  : 'a t -> ('a -> unit) -> unit
+val forEachU : 'a t -> ('a -> unit [\@u]) -> unit

In general, uncurried version will be faster, but it may be less familiar to people who have a background in functional programming.

A special encoding for collection safety

When we create a collection library for a custom data type we need a way to provide a comparator function. Take Set for example, suppose its element type is a pair of ints, it needs a custom compare function that takes two tuples and returns their order. The Set could not just be typed as Set.t (int * int) , its customized compare function needs to manifest itself in the signature, otherwise, if the user creates another customized compare function, the two collection could mix which would result in runtime error.

The original OCaml stdlib solved the problem using functor which creates a big closure at runtime and makes dead code elimination much harder. We use a phantom type to solve the problem:

  module Comparable1 = Belt.Id.MakeComparable(struct
+    type t = int * int
+    let cmp (a0, a1) (b0, b1) =
+      match Pervasives.compare a0 b0 with
+      | 0 -> Pervasives.compare a1 b1
+      | c -> c
+  end)
+
+let mySet1 = Belt.Set.make ~id:(module Comparable1)
+
+module Comparable2 = Belt.Id.MakeComparable(struct
+  type t = int * int
+  let cmp (a0, a1) (b0, b1) =
+    match Pervasives.compare a0 b0 with
+    | 0 -> Pervasives.compare a1 b1
+    | c -> c
+end)
+
+let mySet2 = Belt.Set.make ~id:(module Comparable2)

Here, the compiler would infer mySet1 and mySet2 having different type, so e.g. a `merge` operation that tries to merge these two sets will correctly fail.

val mySet1 : ((int * int), Comparable1.identity) t
+val mySet2 : ((int * int), Comparable2.identity) t

Comparable1.identity and Comparable2.identity are not the same using our encoding scheme.

Collection Hierarchy

In general, we provide a generic collection module, but also create specialized modules for commonly used data type. Take Belt.Set for example, we provide:

Belt.Set
+Belt.Set.Int
+Belt.Set.String

The specialized modules Belt.Set.Int, Belt.Set.String are in general more efficient.

Currently, both Belt_Set and Belt.Set are accessible to users for some technical reasons, we strongly recommend users stick to qualified import, Belt.Set, we may hide the internal, i.e, Belt_Set in the future

module Id : sig ... end
module Array : sig ... end
module SortArray : sig ... end
module MutableQueue : sig ... end
module MutableStack : sig ... end
module List : sig ... end
module Range : sig ... end
module Set : sig ... end
module Map : sig ... end
module MutableSet : sig ... end
module MutableMap : sig ... end
module HashSet : sig ... end
module HashMap : sig ... end
module Option : sig ... end

Belt.Result

Utilities for result data type.

module Result : sig ... end

Belt.Int

Utilities for Int.

module Int : sig ... end

Belt.Int Utililites for Int

Belt.Float

Utilities for Float.

module Float : sig ... end

Belt.Float Utililites for Float

diff --git a/findlib-1/melange/belt/index.html b/findlib-1/melange/belt/index.html new file mode 100644 index 000000000..bc8afc88f --- /dev/null +++ b/findlib-1/melange/belt/index.html @@ -0,0 +1,2 @@ + +belt (docs.findlib-1.melange.belt)

Package melange.belt

Library melange.belt

The entry point of this library is the module: Belt.

diff --git a/findlib-1/melange/dom/Dom/Storage/index.html b/findlib-1/melange/dom/Dom/Storage/index.html new file mode 100644 index 000000000..c12303512 --- /dev/null +++ b/findlib-1/melange/dom/Dom/Storage/index.html @@ -0,0 +1,2 @@ + +Storage (docs.findlib-1.melange.dom.Dom.Storage)

Module Dom.Storage

type t
val getItem : string -> t -> string option
val setItem : string -> string -> t -> unit
val removeItem : string -> t -> unit
val clear : t -> unit
val key : int -> t -> string option
val length : t -> int
val localStorage : t
val sessionStorage : t
diff --git a/findlib-1/melange/dom/Dom/index.html b/findlib-1/melange/dom/Dom/index.html new file mode 100644 index 000000000..972c8b7c0 --- /dev/null +++ b/findlib-1/melange/dom/Dom/index.html @@ -0,0 +1,2 @@ + +Dom (docs.findlib-1.melange.dom.Dom)

Module Dom

type _baseClass
type animation
type cssStyleDeclaration
type cssStyleSheet
type 'a eventTarget_like
type eventTarget = _baseClass eventTarget_like
type 'a _node
type 'a node_like = 'a _node eventTarget_like
type node = _baseClass node_like
type _attr
type attr = _attr node_like
type 'a _characterData
type 'a characterData_like = 'a _characterData node_like
type characterData = _baseClass characterData_like
type _cdataSection
type cdataSection = _cdataSection characterData_like
type _comment
type 'a _document
type 'a document_like = 'a _document node_like
type document = _baseClass document_like
type _documentFragment
type documentFragment = _documentFragment node_like
type _documentType
type documentType = _documentType node_like
type domImplementation
type 'a _element
type 'a element_like = 'a _element node_like
type element = _baseClass element_like
type htmlCollection
type htmlFormControlsCollection
type htmlOptionsCollection
type intersectionObserver
type intersectionObserverEntry
type mutationObserver
type mutationRecord
type performanceObserver
type performanceObserverEntryList
type reportingObserver
type reportingObserverOptions
type resizeObserver
type resizeObserverEntry
type namedNodeMap
type nodeList
type radioNodeList
type processingInstruction
type _shadowRoot
type shadowRoot = _shadowRoot node_like
type _text
type domRect
type dataTransfer
type domStringMap
type history
type _htmlDocument
type htmlDocument = _htmlDocument document_like
type 'a _htmlElement
type 'a htmlElement_like = 'a _htmlElement element_like
type htmlElement = _baseClass htmlElement_like
type _htmlAnchorElement
type htmlAnchorElement = _htmlAnchorElement htmlElement_like
type _htmlAreaElement
type htmlAreaElement = _htmlAreaElement htmlElement_like
type _htmlAudioElement
type htmlAudioElement = _htmlAudioElement htmlElement_like
type _htmlBaseElement
type htmlBaseElement = _htmlBaseElement htmlElement_like
type _htmlBodyElement
type htmlBodyElement = _htmlBodyElement htmlElement_like
type _htmlBrElement
type htmlBrElement = _htmlBrElement htmlElement_like
type _htmlButtonElement
type htmlButtonElement = _htmlButtonElement htmlElement_like
type _htmlCanvasElement
type htmlCanvasElement = _htmlCanvasElement htmlElement_like
type _htmlDataElement
type htmlDataElement = _htmlDataElement htmlElement_like
type _htmlDataListElement
type htmlDataListElement = _htmlDataListElement htmlElement_like
type _htmlDialogElement
type htmlDialogElement = _htmlDialogElement htmlElement_like
type _htmlDivElement
type htmlDivElement = _htmlDivElement htmlElement_like
type _htmlDlistElement
type htmlDlistElement = _htmlDlistElement htmlElement_like
type _htmlEmbedElement
type htmlEmbedElement = _htmlEmbedElement htmlElement_like
type _htmlFieldSetElement
type htmlFieldSetElement = _htmlFieldSetElement htmlElement_like
type _htmlFormElement
type htmlFormElement = _htmlFormElement htmlElement_like
type _htmlHeadElement
type htmlHeadElement = _htmlHeadElement htmlElement_like
type _htmlHeadingElement
type htmlHeadingElement = _htmlHeadingElement htmlElement_like
type _htmlHrElement
type htmlHrElement = _htmlHrElement htmlElement_like
type _htmlHtmlElement
type htmlHtmlElement = _htmlHtmlElement htmlElement_like
type _htmlIframeElement
type htmlIframeElement = _htmlIframeElement htmlElement_like
type _htmlImageElement
type htmlImageElement = _htmlImageElement htmlElement_like
type _htmlInputElement
type htmlInputElement = _htmlInputElement htmlElement_like
type _htmlLabelElement
type htmlLabelElement = _htmlLabelElement htmlElement_like
type _htmlLegendElement
type htmlLegendElement = _htmlLegendElement htmlElement_like
type _htmlLiElement
type htmlLiElement = _htmlLiElement htmlElement_like
type _htmlLinkElement
type htmlLinkElement = _htmlLinkElement htmlElement_like
type _htmlMapElement
type htmlMapElement = _htmlMapElement htmlElement_like
type _htmlMediaElement
type htmlMediaElement = _htmlMediaElement htmlElement_like
type _htmlMenuElement
type htmlMenuElement = _htmlMenuElement htmlElement_like
type _htmlMetaElement
type htmlMetaElement = _htmlMetaElement htmlElement_like
type _htmlMeterElement
type htmlMeterElement = _htmlMeterElement htmlElement_like
type _htmlModElement
type htmlModElement = _htmlModElement htmlElement_like
type _htmlOListElement
type htmlOListElement = _htmlOListElement htmlElement_like
type _htmlObjectElement
type htmlObjectElement = _htmlObjectElement htmlElement_like
type _htmlOptGroupElement
type htmlOptGroupElement = _htmlOptGroupElement htmlElement_like
type _htmlOptionElement
type htmlOptionElement = _htmlOptionElement htmlElement_like
type _htmlOutputElement
type htmlOutputElement = _htmlOutputElement htmlElement_like
type _htmlParagraphElement
type htmlParagraphElement = _htmlParagraphElement htmlElement_like
type _htmlParamElement
type htmlParamElement = _htmlParamElement htmlElement_like
type _htmlPreElement
type htmlPreElement = _htmlPreElement htmlElement_like
type _htmlProgressElement
type htmlProgressElement = _htmlProgressElement htmlElement_like
type _htmlQuoteElement
type htmlQuoteElement = _htmlQuoteElement htmlElement_like
type _htmlScriptElement
type htmlScriptElement = _htmlScriptElement htmlElement_like
type _htmlSelectElement
type htmlSelectElement = _htmlSelectElement htmlElement_like
type _htmlSlotElement
type htmlSlotElement = _htmlSlotElement htmlElement_like
type _htmlSourceElement
type htmlSourceElement = _htmlSourceElement htmlElement_like
type _htmlSpanElement
type htmlSpanElement = _htmlSpanElement htmlElement_like
type _htmlStyleElement
type htmlStyleElement = _htmlStyleElement htmlElement_like
type _htmlTableCaptionElement
type htmlTableCaptionElement = _htmlTableCaptionElement htmlElement_like
type _htmlTableCellElement
type htmlTableCellElement = _htmlTableCellElement htmlElement_like
type _htmlTableColElement
type htmlTableColElement = _htmlTableColElement htmlElement_like
type _htmlTableDataCellElement
type htmlTableDataCellElement = _htmlTableDataCellElement htmlElement_like
type _htmlTableElement
type htmlTableElement = _htmlTableElement htmlElement_like
type _htmlTableHeaderCellElement
type htmlTableHeaderCellElement = _htmlTableHeaderCellElement htmlElement_like
type _htmlTableRowElement
type htmlTableRowElement = _htmlTableRowElement htmlElement_like
type _htmlTableSectionElement
type htmlTableSectionElement = _htmlTableSectionElement htmlElement_like
type _htmlTextAreaElement
type htmlTextAreaElement = _htmlTextAreaElement htmlElement_like
type _htmlTimeElement
type htmlTimeElement = _htmlTimeElement htmlElement_like
type _htmlTitleElement
type htmlTitleElement = _htmlTitleElement htmlElement_like
type _htmlTrackElement
type htmlTrackElement = _htmlTrackElement htmlElement_like
type _htmlUlistElement
type htmlUlistElement = _htmlUlistElement htmlElement_like
type _htmlUnknownElement
type htmlUnknownElement = _htmlUnknownElement htmlElement_like
type _htmlVideoElement
type htmlVideoElement = _htmlVideoElement htmlElement_like
type location
type window
type _xmlDocument
type xmlDocument = _xmlDocument document_like
type 'a event_like
type event = _baseClass event_like
type 'a _uiEvent
type 'a uiEvent_like = 'a _uiEvent event_like
type uiEvent = _baseClass uiEvent_like
type _animationEvent
type animationEvent = _animationEvent event_like
type _beforeUnloadEvent
type beforeUnloadEvent = _beforeUnloadEvent event_like
type _clipboardEvent
type clipboardEvent = _clipboardEvent event_like
type _closeEvent
type closeEvent = _closeEvent event_like
type _compositionEvent
type compositionEvent = _compositionEvent uiEvent_like
type _customEvent
type customEvent = _customEvent event_like
type _dragEvent
type dragEvent = _dragEvent event_like
type _errorEvent
type errorEvent = _errorEvent event_like
type _focusEvent
type focusEvent = _focusEvent uiEvent_like
type _idbVersionChangeEvent
type idbVersionChangeEvent = _idbVersionChangeEvent event_like
type _inputEvent
type inputEvent = _inputEvent uiEvent_like
type _keyboardEvent
type keyboardEvent = _keyboardEvent uiEvent_like
type 'a _mouseEvent
type 'a mouseEvent_like = 'a _mouseEvent uiEvent_like
type mouseEvent = _baseClass mouseEvent_like
type _pageTransitionEvent
type pageTransitionEvent = _pageTransitionEvent event_like
type _pointerEvent
type pointerEvent = _pointerEvent mouseEvent_like
type _popStateEvent
type popStateEvent = _popStateEvent event_like
type _progressEvent
type progressEvent = _progressEvent event_like
type _relatedEvent
type relatedEvent = _relatedEvent event_like
type _storageEvent
type storageEvent = _storageEvent event_like
type _svgZoomEvent
type svgZoomEvent = _svgZoomEvent event_like
type _timeEvent
type timeEvent = _timeEvent event_like
type _touchEvent
type touchEvent = _touchEvent uiEvent_like
type _trackEvent
type trackEvent = _trackEvent event_like
type _transitionEvent
type transitionEvent = _transitionEvent event_like
type _webGlContextEvent
type webGlContextEvent = _webGlContextEvent event_like
type _wheelEvent
type wheelEvent = _wheelEvent uiEvent_like
type range
type selection
type domTokenList
type domSettableTokenList
type nodeFilter = {
  1. acceptNode : element -> int;
}
type nodeIterator
type treeWalker
type svgRect
type svgPoint
type eventPointerId
module Storage : sig ... end
diff --git a/findlib-1/melange/dom/index.html b/findlib-1/melange/dom/index.html new file mode 100644 index 000000000..2f80c5347 --- /dev/null +++ b/findlib-1/melange/dom/index.html @@ -0,0 +1,2 @@ + +dom (docs.findlib-1.melange.dom)

Package melange.dom

Library melange.dom

The entry point of this library is the module: Dom.

diff --git a/findlib-1/melange/index.html b/findlib-1/melange/index.html new file mode 100644 index 000000000..7096646a9 --- /dev/null +++ b/findlib-1/melange/index.html @@ -0,0 +1,2 @@ + +melange (docs.findlib-1.melange)

Package melange

Sub-indexes

Library melange

The entry point of this library is the module: Stdlib.

Library melange.__private__.melange_mini_stdlib

The entry point of this library is the module: Melange_mini_stdlib.

Library melange.belt

The entry point of this library is the module: Belt.

Library melange.dom

The entry point of this library is the module: Dom.

Library melange.js

The entry point of this library is the module: Js.

diff --git a/findlib-1/melange/js/Js/Array/index.html b/findlib-1/melange/js/Js/Array/index.html new file mode 100644 index 000000000..c16152427 --- /dev/null +++ b/findlib-1/melange/js/Js/Array/index.html @@ -0,0 +1,2 @@ + +Array (docs.findlib-1.melange.js.Js.Array)

Module Js.Array

Bindings to the functions in Array.prototype

JavaScript Array API

type 'a t = 'a array
type 'a array_like = 'a Js.array_like
val from : 'a array_like -> 'a array
val fromMap : 'a array_like -> f:('a -> 'b) -> 'b array
val isArray : 'a -> bool
val length : 'a array -> int

Mutating functions

val copyWithin : to_:int -> ?start:int -> ?end_:int -> 'a t -> 'a t
val fill : value:'a -> ?start:int -> ?end_:int -> 'a t -> 'a t
val pop : 'a t -> 'a option

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push

val push : value:'a -> 'a t -> int
val pushMany : values:'a array -> 'a t -> int
val reverseInPlace : 'a t -> 'a t
val shift : 'a t -> 'a option
val sortInPlace : 'a t -> 'a t
val sortInPlaceWith : f:('a -> 'a -> int) -> 'a t -> 'a t
val spliceInPlace : start:int -> remove:int -> add:'a array -> 'a t -> 'a t
val removeFromInPlace : start:int -> 'a t -> 'a t
val removeCountInPlace : start:int -> count:int -> 'a t -> 'a t
val unshift : value:'a -> 'a t -> int
val unshiftMany : values:'a array -> 'a t -> int
val concat : other:'a t -> 'a t -> 'a t
val concatMany : arrays:'a t array -> 'a t -> 'a t
val includes : value:'a -> 'a t -> bool

ES2015

val join : ?sep:string -> 'a t -> string

Accessor functions

val indexOf : value:'a -> ?start:int -> 'a t -> int
val lastIndexOf : value:'a -> 'a t -> int
val lastIndexOfFrom : value:'a -> start:int -> 'a t -> int
val copy : 'a t -> 'a t
val slice : ?start:int -> ?end_:int -> 'a t -> 'a t
val toString : 'a t -> string
val toLocaleString : 'a t -> string

Iteration functions

val entries : 'a t -> (int * 'a) Js.iterator
val every : f:('a -> bool) -> 'a t -> bool
val everyi : f:('a -> int -> bool) -> 'a t -> bool
val filter : f:('a -> bool) -> 'a t -> 'a t
val filteri : f:('a -> int -> bool) -> 'a t -> 'a t
val find : f:('a -> bool) -> 'a t -> 'a option
val findi : f:('a -> int -> bool) -> 'a t -> 'a option
val findIndex : f:('a -> bool) -> 'a t -> int
val findIndexi : f:('a -> int -> bool) -> 'a t -> int
val forEach : f:('a -> unit) -> 'a t -> unit
val forEachi : f:('a -> int -> unit) -> 'a t -> unit
val keys : 'a t -> int Js.iterator
val map : f:('a -> 'b) -> 'a t -> 'b t
val mapi : f:('a -> int -> 'b) -> 'a t -> 'b t
val reduce : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b
val reducei : f:('b -> 'a -> int -> 'b) -> init:'b -> 'a t -> 'b
val reduceRight : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b
val reduceRighti : f:('b -> 'a -> int -> 'b) -> init:'b -> 'a t -> 'b
val some : f:('a -> bool) -> 'a t -> bool
val somei : f:('a -> int -> bool) -> 'a t -> bool
val values : 'a t -> 'a Js.iterator
val unsafe_get : 'a array -> int -> 'a
val unsafe_set : 'a array -> int -> 'a -> unit
diff --git a/findlib-1/melange/js/Js/Bigint/index.html b/findlib-1/melange/js/Js/Bigint/index.html new file mode 100644 index 000000000..f5257d267 --- /dev/null +++ b/findlib-1/melange/js/Js/Bigint/index.html @@ -0,0 +1,6 @@ + +Bigint (docs.findlib-1.melange.js.Js.Bigint)

Module Js.Bigint

Bindings to functions in JavaScript's BigInt

JavaScript BigInt API

type t = Js.bigint
val make : 'a -> t

make repr creates a new BigInt from the representation repr. repr can be a number, a string, boolean, etc.

val asIntN : precision:int -> t -> t

asIntN ~precision bigint truncates the BigInt value of bigint to the given number of least significant bits specified by precision and returns that value as a signed integer.

val asUintN : precision:int -> t -> t

asUintN ~precision bigint truncates the BigInt value of bigint to the given number of least significant bits specified by precision and returns that value as an unsigned integer.

type toLocaleStringOptions = {
  1. style : string;
  2. currency : string;
}
val toLocaleString : + locale:string -> + ?options:toLocaleStringOptions -> + t -> + string

toLocaleString bigint returns a string with a language-sensitive representation of this BigInt.

val toString : t -> string

toString bigint returns a string representing the specified BigInt value.

val neg : t -> t
val add : t -> t -> t
val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division.

val rem : t -> t -> t
diff --git a/findlib-1/melange/js/Js/Console/index.html b/findlib-1/melange/js/Js/Console/index.html new file mode 100644 index 000000000..d86095193 --- /dev/null +++ b/findlib-1/melange/js/Js/Console/index.html @@ -0,0 +1,2 @@ + +Console (docs.findlib-1.melange.js.Js.Console)

Module Js.Console

val log : 'a -> unit
val log2 : 'a -> 'b -> unit
val log3 : 'a -> 'b -> 'c -> unit
val log4 : 'a -> 'b -> 'c -> 'd -> unit
val logMany : 'a array -> unit
val info : 'a -> unit
val info2 : 'a -> 'b -> unit
val info3 : 'a -> 'b -> 'c -> unit
val info4 : 'a -> 'b -> 'c -> 'd -> unit
val infoMany : 'a array -> unit
val warn : 'a -> unit
val warn2 : 'a -> 'b -> unit
val warn3 : 'a -> 'b -> 'c -> unit
val warn4 : 'a -> 'b -> 'c -> 'd -> unit
val warnMany : 'a array -> unit
val error : 'a -> unit
val error2 : 'a -> 'b -> unit
val error3 : 'a -> 'b -> 'c -> unit
val error4 : 'a -> 'b -> 'c -> 'd -> unit
val errorMany : 'a array -> unit
val trace : unit -> unit
val timeStart : string -> unit
val timeEnd : string -> unit
diff --git a/findlib-1/melange/js/Js/Date/index.html b/findlib-1/melange/js/Js/Date/index.html new file mode 100644 index 000000000..7803af3b1 --- /dev/null +++ b/findlib-1/melange/js/Js/Date/index.html @@ -0,0 +1,55 @@ + +Date (docs.findlib-1.melange.js.Js.Date)

Module Js.Date

Bindings to the functions in JS's Date.prototype

JavaScript Date API

type t
val valueOf : t -> float

returns the primitive value of this date, equivalent to getTime

val make : unit -> t

returns a date representing the current time

val fromFloat : float -> t
val fromString : string -> t
val makeWithYM : year:float -> month:float -> t
val makeWithYMD : year:float -> month:float -> date:float -> t
val makeWithYMDH : year:float -> month:float -> date:float -> hours:float -> t
val makeWithYMDHM : + year:float -> + month:float -> + date:float -> + hours:float -> + minutes:float -> + t
val makeWithYMDHMS : + year:float -> + month:float -> + date:float -> + hours:float -> + minutes:float -> + seconds:float -> + t
val utcWithYM : year:float -> month:float -> float
val utcWithYMD : year:float -> month:float -> date:float -> float
val utcWithYMDH : + year:float -> + month:float -> + date:float -> + hours:float -> + float
val utcWithYMDHM : + year:float -> + month:float -> + date:float -> + hours:float -> + minutes:float -> + float
val utcWithYMDHMS : + year:float -> + month:float -> + date:float -> + hours:float -> + minutes:float -> + seconds:float -> + float
val now : unit -> float

returns the number of milliseconds since Unix epoch

val parseAsFloat : string -> float

returns NaN if passed invalid date string

val getDate : t -> float

return the day of the month (1-31)

val getDay : t -> float

returns the day of the week (0-6)

val getFullYear : t -> float
val getHours : t -> float
val getMilliseconds : t -> float
val getMinutes : t -> float
val getMonth : t -> float

returns the month (0-11)

val getSeconds : t -> float
val getTime : t -> float

returns the number of milliseconds since Unix epoch

val getTimezoneOffset : t -> float
val getUTCDate : t -> float

return the day of the month (1-31)

val getUTCDay : t -> float

returns the day of the week (0-6)

val getUTCFullYear : t -> float
val getUTCHours : t -> float
val getUTCMilliseconds : t -> float
val getUTCMinutes : t -> float
val getUTCMonth : t -> float

returns the month (0-11)

val getUTCSeconds : t -> float
val setDate : float -> t -> float
val setFullYear : float -> t -> float
val setFullYearM : year:float -> month:float -> t -> float
val setFullYearMD : year:float -> month:float -> date:float -> t -> float
val setHours : float -> t -> float
val setHoursM : hours:float -> minutes:float -> t -> float
val setHoursMS : hours:float -> minutes:float -> seconds:float -> t -> float
val setHoursMSMs : + hours:float -> + minutes:float -> + seconds:float -> + milliseconds:float -> + t -> + float
val setMilliseconds : float -> t -> float
val setMinutes : float -> t -> float
val setMinutesS : minutes:float -> seconds:float -> t -> float
val setMinutesSMs : + minutes:float -> + seconds:float -> + milliseconds:float -> + t -> + float
val setMonth : float -> t -> float
val setMonthD : month:float -> date:float -> t -> float
val setSeconds : float -> t -> float
val setSecondsMs : seconds:float -> milliseconds:float -> t -> float
val setTime : float -> t -> float
val setUTCDate : float -> t -> float
val setUTCFullYear : float -> t -> float
val setUTCFullYearM : year:float -> month:float -> t -> float
val setUTCFullYearMD : year:float -> month:float -> date:float -> t -> float
val setUTCHours : float -> t -> float
val setUTCHoursM : hours:float -> minutes:float -> t -> float
val setUTCHoursMS : hours:float -> minutes:float -> seconds:float -> t -> float
val setUTCHoursMSMs : + hours:float -> + minutes:float -> + seconds:float -> + milliseconds:float -> + t -> + float
val setUTCMilliseconds : float -> t -> float
val setUTCMinutes : float -> t -> float
val setUTCMinutesS : minutes:float -> seconds:float -> t -> float
val setUTCMinutesSMs : + minutes:float -> + seconds:float -> + milliseconds:float -> + t -> + float
val setUTCMonth : float -> t -> float
val setUTCMonthD : month:float -> date:float -> t -> float
val setUTCSeconds : float -> t -> float
val setUTCSecondsMs : seconds:float -> milliseconds:float -> t -> float
val setUTCTime : float -> t -> float
val toDateString : t -> string
val toISOString : t -> string
val toJSON : t -> string option
val toJSONUnsafe : t -> string
val toLocaleDateString : t -> string
val toLocaleString : t -> string
val toLocaleTimeString : t -> string
val toString : t -> string
val toTimeString : t -> string
val toUTCString : t -> string
diff --git a/findlib-1/melange/js/Js/Dict/index.html b/findlib-1/melange/js/Js/Dict/index.html new file mode 100644 index 000000000..d513f5a5e --- /dev/null +++ b/findlib-1/melange/js/Js/Dict/index.html @@ -0,0 +1,2 @@ + +Dict (docs.findlib-1.melange.js.Js.Dict)

Module Js.Dict

Utility functions to treat a JS object as a dictionary

type 'a t = 'a Js.dict

Dictionary type (ie an '{ }' JS object). However it is restricted to hold a single type; therefore values must have the same type.

This Dictionary type is mostly used with the Js_json.t type.

type key = string

Key type

val get : 'a t -> key -> 'a option

get dict key returns None if the key is not found in the dictionary, Some value otherwise

val unsafeGet : 'a t -> key -> 'a

unsafeGet dict key return the value if the key exists, otherwise an undefined value is returned. Must be used only when the existence of a key is certain. (i.e. when having called keys function previously.

Array.iter (fun key -> Js.log (Js_dict.unsafeGet dic key)) (Js_dict.keys dict)
val set : 'a t -> key -> 'a -> unit

set dict key value sets the key/value in dict

val keys : 'a t -> string array

keys dict returns all the keys in the dictionary dict

val empty : unit -> 'a t

empty () returns an empty dictionary

val unsafeDeleteKey : (string t -> string -> unit) Js.Fn.arity2

Experimental internal function

val entries : 'a t -> (key * 'a) array

entries dict returns the key value pairs in dict (ES2017)

val values : 'a t -> 'a array

values dict returns the values in dict (ES2017)

val fromList : (key * 'a) list -> 'a t

fromList entries creates a new dictionary containing each (key, value) pair in entries

val fromArray : (key * 'a) array -> 'a t

fromArray entries creates a new dictionary containing each (key, value) pair in entries

val map : f:('a -> 'b) Js.Fn.arity1 -> 'a t -> 'b t

map f dict maps dict to a new dictionary with the same keys, using f to map each value

diff --git a/findlib-1/melange/js/Js/Exn/index.html b/findlib-1/melange/js/Js/Exn/index.html new file mode 100644 index 000000000..4bdc58e4d --- /dev/null +++ b/findlib-1/melange/js/Js/Exn/index.html @@ -0,0 +1,8 @@ + +Exn (docs.findlib-1.melange.js.Js.Exn)

Module Js.Exn

Utilities for dealing with Js exceptions

type t
type exn += private
  1. | Error of t
val asJsExn : exn -> t option
val stack : t -> string option
val message : t -> string option
val name : t -> string option
val fileName : t -> string option
val isCamlExceptionOrOpenVariant : 'a -> bool

internal use only

val anyToExnInternal : 'a -> exn

anyToExnInternal obj will take any value obj and wrap it in a Js.Exn.Error if given value is not an exn already. If obj is an exn, it will return obj without any changes.

This function is mostly useful for cases where you want to unify a type of a value that potentially is either exn, a JS error, or any other JS value really (e.g. for a value passed to a Promise.catch callback)

IMPORTANT: This is an internal API and may be changed / removed any time in the future.

switch (Js.Exn.unsafeAnyToExn("test")) {
+| Js.Exn.Error(v) =>
+  switch (Js.Exn.message(v)) {
+  | Some(str) => Js.log("We won't end up here")
+  | None => Js.log2("We will land here: ", v)
+  }
+}
val raiseError : string -> 'a

Raise Js exception Error object with stacktrace

val raiseEvalError : string -> 'a
val raiseRangeError : string -> 'a
val raiseReferenceError : string -> 'a
val raiseSyntaxError : string -> 'a
val raiseTypeError : string -> 'a
val raiseUriError : string -> 'a
diff --git a/findlib-1/melange/js/Js/Float/index.html b/findlib-1/melange/js/Js/Float/index.html new file mode 100644 index 000000000..eb9ee9414 --- /dev/null +++ b/findlib-1/melange/js/Js/Float/index.html @@ -0,0 +1,31 @@ + +Float (docs.findlib-1.melange.js.Js.Float)

Module Js.Float

Bindings to functions in JavaScript's Number that deal with floats

Provides functions for inspecting and manipulating floats

type t = float
val _NaN : t

The special value "Not a Number"

val isNaN : t -> bool

Tests if the given value is _NaN

Note that both _NaN = _NaN and _NaN == _NaN will return false. isNaN is therefore necessary to test for _NaN.

Returns true if the given value is _NaN, false otherwise

val isFinite : t -> bool

Tests if the given value is finite

Returns true if the given value is a finite number, false otherwise

(* returns [false] *)
+let _ = Js.Float.isFinite infinity
+
+(* returns [false] *)
+let _ = Js.Float.isFinite neg_infinity
+
+(* returns [false] *)
+let _ = Js.Float.isFinite _NaN
+
+(* returns [true] *)
+let _ = Js.Float.isFinite 1234
val toExponential : ?digits:int -> t -> string

Formats a float using exponential (scientific) notation

digits specifies how many digits should appear after the decimal point. The value must be in the range [0, 20] (inclusive).

Returns a string representing the given value in exponential notation

The output will be rounded or padded with zeroes if necessary.

  • raises RangeError

    if digits is not in the range [0, 20] (inclusive)

    Js.Float.toExponential 77.1234 = "7.71234e+1"
    +Js.Float.toExponential 77. = "7.7e+1"
    +Js.Float.toExponential ~digits:2 77.1234 = "7.71e+1"
val toFixed : ?digits:int -> t -> string

Formats a float using fixed point notation

digits specifies how many digits should appear after the decimal point. The value must be in the range [0, 20] (inclusive). Defaults to 0.

Returns a string representing the given value in fixed-point notation (usually)

The output will be rounded or padded with zeroes if necessary.

  • raises RangeError

    if digits is not in the range [0, 20] (inclusive)

    Js.Float.toFixed 12345.6789 = "12346"
    +Js.Float.toFixed 1.2e21 = "1.2e+21"
    +Js.Float.toFixed ~digits:1 12345.6789 = "12345.7"
    +Js.Float.toFixed ~digits:2 0. = "0.00"
val toPrecision : ?digits:int -> t -> string

Formats a float using some fairly arbitrary rules

digits specifies how many digits should appear in total. The value must between 0 and some arbitrary number that's hopefully at least larger than 20 (for Node it's 21. Why? Who knows).

Returns a string representing the given value in fixed-point or scientific notation

The output will be rounded or padded with zeroes if necessary.

toPrecision differs from toFixed in that the former will count all digits against the precision, while the latter will count only the digits after the decimal point. toPrecision will also use scientific notation if the specified precision is less than the number for digits before the decimal point.

  • raises RangeError

    if digits is not in the range accepted by this function (what do you mean "vague"?)

    Js.Float.toPrecision 12345.6789 = "12345.6789"
    +Js.Float.toPrecision 1.2e21 = "1.2e+21"
    +Js.Float.toPrecision ~digits:1 12345.6789 = "1e+4"
    +Js.Float.toPrecision ~digits:2 0. = "0.0"
val toString : ?radix:int -> t -> string

Formats a float as a string

radix specifies the radix base to use for the formatted number. The value must be in the range [2, 36] (inclusive).

Returns a string representing the given value in fixed-point (usually)

  • raises RangeError

    if radix is not in the range [2, 36] (inclusive)

    Js.Float.toString 12345.6789 = "12345.6789"
    +Js.Float.toString ~radix:2 6. = "110"
    +Js.Float.toString ~radix:2 3.14 = "11.001000111101011100001010001111010111000010100011111"
    +Js.Float.toString ~radix:16 3735928559. = "deadbeef"
    +Js.Float.toString ~radix:36 123.456 = "3f.gez4w97ry0a18ymf6qadcxr"
val fromString : string -> t

Parses the given string into a float using JavaScript semantics

Returns the number as a float if successfully parsed, _NaN otherwise.

Js.Float.fromString "123" = 123.
+Js.Float.fromString "12.3" = 12.3
+Js.Float.fromString "" = 0.
+Js.Float.fromString "0x11" = 17.
+Js.Float.fromString "0b11" = 3.
+Js.Float.fromString "0o11" = 9.
+Js.Float.fromString "foo" = _NaN
+Js.Float.fromString "100a" = _NaN
diff --git a/findlib-1/melange/js/Js/Global/index.html b/findlib-1/melange/js/Js/Global/index.html new file mode 100644 index 000000000..7a577ad70 --- /dev/null +++ b/findlib-1/melange/js/Js/Global/index.html @@ -0,0 +1,49 @@ + +Global (docs.findlib-1.melange.js.Js.Global)

Module Js.Global

Bindings to functions in the JS global namespace

Contains functions available in the global scope (window in a browser context)

type intervalId

Identify an interval started by setInterval

type timeoutId

Identify timeout started by setTimeout

val clearInterval : intervalId -> unit

Clear an interval started by setInterval

(* API for a somewhat aggressive snoozing alarm clock *)
+
+let interval = ref Js.Nullable.null
+
+let remind () =
+  Js.log "Wake Up!";
+  IO.punchSleepyGuy ()
+
+let snooze mins =
+  interval := Js.Nullable.return (Js.Global.setInterval remind (mins * 60 * 1000))
+
+let cancel () =
+  Js.Nullable.iter !interval (fun[\@u] intervalId -> Js.Global.clearInterval intervalId)
val clearTimeout : timeoutId -> unit

Clear a timeout started by setTimeout

(* A simple model of a code monkey's brain *)
+
+let timer = ref Js.Nullable.null
+
+let work () =
+  IO.closeHackerNewsTab ()
+
+let procrastinate mins =
+  Js.Nullable.iter !timer (fun[\@u] timer -> Js.Global.clearTimeout timer);
+  timer := Js.Nullable.return (Js.Global.setTimeout work (mins * 60 * 1000))
val setInterval : f:(unit -> unit) -> int -> intervalId

Repeatedly executes a callback with a specified interval (in milliseconds) between calls

Return an intervalId that can be passed to clearInterval to cancel the timeout

val setIntervalFloat : f:(unit -> unit) -> float -> intervalId

Repeatedly executes a callback with a specified interval (in milliseconds) between calls

Return an intervalId that can be passed to clearInterval to cancel the timeout

val setTimeout : f:(unit -> unit) -> int -> timeoutId

Execute a callback after a specified delay (in milliseconds)

returns a timeoutId that can be passed to clearTimeout to cancel the timeout

val setTimeoutFloat : f:(unit -> unit) -> float -> timeoutId

Execute a callback after a specified delay (in milliseconds)

returns a timeoutId that can be passed to clearTimeout to cancel the timeout

val encodeURI : string -> string
val decodeURI : string -> string
val encodeURIComponent : string -> string

URL-encodes a string, including characters with special meaning in a URI.

val decodeURIComponent : string -> string

Decodes a URL-enmcoded string produced by encodeURIComponent

diff --git a/findlib-1/melange/js/Js/Int/index.html b/findlib-1/melange/js/Js/Int/index.html new file mode 100644 index 000000000..13a871521 --- /dev/null +++ b/findlib-1/melange/js/Js/Int/index.html @@ -0,0 +1,9 @@ + +Int (docs.findlib-1.melange.js.Js.Int)

Module Js.Int

Bindings to functions in JavaScript's Number that deal with ints

Provides functions for inspecting and manipulating ints

type t = int

If we use number, we need coerce to int32 by adding `|0`, otherwise `+0` can be wrong. Most JS API is float oriented, it may overflow int32 or comes with NAN

val toExponential : ?digits:t -> t -> string

Formats an int using exponential (scientific) notation

digits specifies how many digits should appear after the decimal point. The value must be in the range [0, 20] (inclusive).

Returns a string representing the given value in exponential notation

The output will be rounded or padded with zeroes if necessary.

  • raises RangeError

    if digits is not in the range [0, 20] (inclusive)

    Js.Int.toExponential 77 = "7.7e+1"
    +Js.Int.toExponential ~digits:2 77 = "7.70e+1"
    +Js.Int.toExponential ~digits:2 5678 = "5.68e+3"
val toPrecision : ?digits:t -> t -> string

Formats an int using some fairly arbitrary rules

digits specifies how many digits should appear in total. The value must between 1 and some 100.

Returns a string representing the given value in fixed-point or scientific notation

The output will be rounded or padded with zeroes if necessary.

toPrecision differs from Js.Float.toFixed in that the former will count all digits against the precision, while the latter will count only the digits after the decimal point. toPrecision will also use scientific notation if the specified precision is less than the number for digits before the decimal point.

  • raises RangeError

    if digits is not between 1 and 100.

    Js.Int.toPrecision 123456789 = "123456789"
    +Js.Int.toPrecision ~digits:2 123456789 = "1.2e+8"
    +Js.Int.toPrecision ~digits:2 0 = "0.0"
val toString : ?radix:t -> t -> string

Formats an int as a string

radix specifies the radix base to use for the formatted number. The value must be in the range [2, 36] (inclusive).

Returns a string representing the given value in fixed-point (usually)

  • raises RangeError

    if radix is not in the range [2, 36] (inclusive)

    Js.Int.toString 123456789 = "123456789"
    +Js.Int.toString ~radix:2 6 = "110"
    +Js.Int.toString ~radix:16 3735928559 = "deadbeef"
    +Js.Int.toString ~radix:36 123456 = "2n9c"
val toFloat : t -> float
val equal : t -> t -> bool
val max : t
val min : t
diff --git a/findlib-1/melange/js/Js/Iterator/index.html b/findlib-1/melange/js/Js/Iterator/index.html new file mode 100644 index 000000000..782a669af --- /dev/null +++ b/findlib-1/melange/js/Js/Iterator/index.html @@ -0,0 +1,2 @@ + +Iterator (docs.findlib-1.melange.js.Js.Iterator)

Module Js.Iterator

Bindings to functions on Iterator

type 'a t = 'a Js.iterator
type 'a value = {
  1. done_ : bool option;
  2. value : 'a option;
}
val next : 'a t -> 'a value
val toArray : 'a t -> 'a array
val toArrayWithMapper : 'a t -> f:('a -> 'b) -> 'b array
diff --git a/findlib-1/melange/js/Js/Json/index.html b/findlib-1/melange/js/Js/Json/index.html new file mode 100644 index 000000000..980c40095 --- /dev/null +++ b/findlib-1/melange/js/Js/Json/index.html @@ -0,0 +1,55 @@ + +Json (docs.findlib-1.melange.js.Js.Json)

Module Js.Json

Utility functions to manipulate JSON values

Efficient JSON encoding using JavaScript API @see <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON> MDN

Types

type t

The JSON data structure

type _ kind =
  1. | String : string kind
  2. | Number : float kind
  3. | Object : t Js.dict kind
  4. | Array : t array kind
  5. | Boolean : bool kind
  6. | Null : t Js.null kind

Underlying type of a JSON value

type tagged_t =
  1. | JSONFalse
  2. | JSONTrue
  3. | JSONNull
  4. | JSONString of string
  5. | JSONNumber of float
  6. | JSONObject of t Js.dict
  7. | JSONArray of t array

Accessor

val classify : t -> tagged_t
val test : 'a -> 'b kind -> bool

test v kind returns true if v is of kind

val decodeString : t -> string option

decodeString json returns Some s if json is a string, None otherwise

val decodeNumber : t -> float option

decodeNumber json returns Some n if json is a number, None otherwise

val decodeObject : t -> t Js.dict option

decodeObject json returns Some o if json is an object, None otherwise

val decodeArray : t -> t array option

decodeArray json returns Some a if json is an array, None otherwise

val decodeBoolean : t -> bool option

decodeBoolean json returns Some b if json is a boolean, None otherwise

val decodeNull : t -> 'a Js.null option

decodeNull json returns Some null if json is a null, None otherwise

Construtors

Those functions allows the construction of an arbitrary complex JSON values.

val null : t

null is the singleton null JSON value

val string : string -> t

string s makes a JSON string of the string s

val number : float -> t

number n makes a JSON number of the float n

val boolean : bool -> t

boolean b makes a JSON boolean of the bool b

val object_ : t Js.dict -> t

object_ dict makes a JSON object of the Js.dict dict

val array : t array -> t

array a makes a JSON array of the Js.Json.t array a

The functions below are specialized for specific array type which happened to be already JSON object in the Melange runtime. Therefore they are more efficient (constant time rather than linear conversion).

val stringArray : string array -> t

stringArray a makes a JSON array of the string array a

val numberArray : float array -> t

numberArray a makes a JSON array of the float array a

val booleanArray : bool array -> t

booleanArray makes a JSON array of the bool array a

val objectArray : t Js.dict array -> t

objectArray a makes a JSON array of the JsDict.t array a

String conversion

val parseExn : string -> t

parseExn s parses the string s into a JSON data structure

Returns a JSON data structure

  • raises SyntaxError

    if given string is not a valid JSON. Note SyntaxError is a JavaScript exception.

    (* parse a simple JSON string *)
    +
    +let json =
    +  try
    +    Js.Json.parseExn {| "foo" |}
    +  with
    +  | _ -> failwith "Error parsing JSON string"
    +in
    +match Js.Json.classify json with
    +| Js.Json.JSONString value -> Js.log value
    +| _ -> failwith "Expected a string"
    (* parse a complex JSON string *)
    +
    +let getIds s =
    +  let json =
    +    try
    +      Js.Json.parseExn s
    +    with
    +    | _ -> failwith "Error parsing JSON string"
    +  in
    +  match Js.Json.classify json with
    +  | Js.Json.JSONObject value ->
    +    (* In this branch, compiler infer value : Js.Json.t Js.dict *)
    +    begin match Js.Dict.get value "ids" with
    +    | Some ids ->
    +      begin match Js.Json.classify ids with
    +      | Js.Json.JSONArray ids ->
    +        (* In this branch compiler infer ids : Js.Json.t array *)
    +        ids
    +      | _ -> failwith "Expected an array"
    +      end
    +    | None -> failwith "Expected an `ids` property"
    +    end
    +  | _ -> failwith "Expected an object"
    +
    +  (* prints `1, 2, 3` *)
    +  let _ =
    +    Js.log (getIds {| { "ids" : [1, 2, 3] } |})
val stringify : t -> string

stringify json formats the JSON data structure as a string

Returns the string representation of a given JSON data structure

(* Creates and stringifies a simple JS object *)
+
+let dict = Js.Dict.empty () in
+Js.Dict.set dict "name" (Js.Json.string "John Doe");
+Js.Dict.set dict "age" (Js.Json.number 30.0);
+Js.Dict.set dict "likes"
+  (Js.Json.stringArray [|"bucklescript";"ocaml";"js"|]);
+
+Js.log (Js.Json.stringify (Js.Json.object_ dict))
val stringifyWithSpace : t -> int -> string

stringify json formats the JSON data structure as a string

Returns the string representation of a given JSON data structure

(* Creates and stringifies a simple JS object with spacing *)
+
+let dict = Js.Dict.empty () in
+Js.Dict.set dict "name" (Js.Json.string "John Doe");
+Js.Dict.set dict "age" (Js.Json.number 30.0);
+Js.Dict.set dict "likes"
+  (Js.Json.stringArray [|"bucklescript";"ocaml";"js"|]);
+
+  Js.log (Js.Json.stringifyWithSpace (Js.Json.object_ dict) 2)
val stringifyAny : 'a -> string option

stringifyAny value formats any value into a JSON string

(* prints ``"foo", "bar"`` *)
+Js.log (Js.Json.stringifyAny [| "foo"; "bar" |])

Best-effort serialization, it tries to seralize as many objects as possible and deserialize it back

val deserializeUnsafe : string -> 'a

It is unsafe in two aspects

  • It may throw during parsing
  • when you cast it to a specific type, it may have a type mismatch
val serializeExn : 'a -> string

It will raise in such situations:

  • The object can not be serlialized to a JSON
  • There are cycles
  • Some JS engines can not stringify deeply nested json objects
diff --git a/findlib-1/melange/js/Js/Map/index.html b/findlib-1/melange/js/Js/Map/index.html new file mode 100644 index 000000000..5f9d0e690 --- /dev/null +++ b/findlib-1/melange/js/Js/Map/index.html @@ -0,0 +1,2 @@ + +Map (docs.findlib-1.melange.js.Js.Map)

Module Js.Map

Bindings to functions in Map

ES6 Map API

type ('k, 'v) t
val make : unit -> ('k, 'v) t
val fromArray : ('k * 'v) array -> ('k, 'v) t
val toArray : ('k, 'v) t -> ('k * 'v) array
val size : ('k, 'v) t -> int
val has : ('k, 'v) t -> key:'k -> bool
val get : ('k, 'v) t -> key:'k -> 'v option
val set : ('k, 'v) t -> key:'k -> value:'v -> ('k, 'v) t
val clear : ('k, 'v) t -> unit
val delete : ('k, 'v) t -> key:'k -> bool
val forEach : f:('v -> 'k -> ('k, 'v) t -> unit) -> ('k, 'v) t -> unit
val keys : ('k, 'v) t -> 'k Js.iterator
val values : ('k, 'v) t -> 'v Js.iterator
val entries : ('k, 'v) t -> ('k * 'v) Js.iterator
diff --git a/findlib-1/melange/js/Js/Math/index.html b/findlib-1/melange/js/Js/Math/index.html new file mode 100644 index 000000000..2ef55d87a --- /dev/null +++ b/findlib-1/melange/js/Js/Math/index.html @@ -0,0 +1,2 @@ + +Math (docs.findlib-1.melange.js.Js.Math)

Module Js.Math

Bindings to the functions in the Math object

JavaScript Math API

val _E : float

Euler's number

val _LN2 : float

natural logarithm of 2

val _LN10 : float

natural logarithm of 10

val _LOG2E : float

base 2 logarithm of E

val _LOG10E : float

base 10 logarithm of E

val _PI : float

Pi... (ratio of the circumference and diameter of a circle)

val _SQRT1_2 : float

square root of 1/2

val _SQRT2 : float

square root of 2

val abs_int : int -> int

absolute value

val abs_float : float -> float

absolute value

val acos : float -> float

arccosine in radians, can return NaN

val acosh : float -> float

hyperbolic arccosine in raidans, can return NaN, ES2015

val asin : float -> float

arcsine in radians, can return NaN

val asinh : float -> float

hyperbolic arcsine in raidans, ES2015

val atan : float -> float

arctangent in radians

val atanh : float -> float

hyperbolic arctangent in radians, can return NaN, ES2015

val atan2 : y:float -> x:float -> float

arctangent of the quotient of x and y, mostly... this one's a bit weird

val cbrt : float -> float

cube root, can return NaN, ES2015

val unsafe_ceil_int : float -> int

may return values not representable by int

val ceil_int : float -> int

smallest int greater than or equal to the argument

val ceil_float : float -> float

smallest float greater than or equal to the argument

val clz32 : int -> int

number of leading zero bits of the argument's 32 bit int representation, ES2015

val cos : float -> float

cosine in radians

val cosh : float -> float

hyperbolic cosine in radians, ES2015

val exp : float -> float

natural exponentional

val expm1 : float -> float

natural exponential minus 1, ES2015

val unsafe_floor_int : float -> int

may return values not representable by int

val floor_int : float -> int

largest int greater than or equal to the arugment

val floor_float : float -> float
val fround : float -> float

round to nearest single precision float, ES2015

val hypot : float -> float -> float

pythagorean equation, ES2015

val hypotMany : float array -> float

generalized pythagorean equation, ES2015

val imul : int -> int -> int

32-bit integer multiplication, ES2015

val log : float -> float

natural logarithm, can return NaN

val log1p : float -> float

natural logarithm of 1 + the argument, can return NaN, ES2015

val log10 : float -> float

base 10 logarithm, can return NaN, ES2015

val log2 : float -> float

base 2 logarithm, can return NaN, ES2015

val max_int : int -> int -> int

max value

val maxMany_int : int array -> int

max value

val max_float : float -> float -> float

max value

val maxMany_float : float array -> float

max value

val min_int : int -> int -> int

min value

val minMany_int : int array -> int

min value

val min_float : float -> float -> float

min value

val minMany_float : float array -> float

min value

val pow_float : base:float -> exp:float -> float

base to the power of the exponent

val random : unit -> float

random number in [0,1)

val random_int : int -> int -> int

random number in [min,max)

val unsafe_round : float -> int

rounds to nearest integer, returns a value not representable as int if NaN

val round : float -> float

rounds to nearest integer

val sign_int : int -> int

the sign of the argument, 1, -1 or 0, ES2015

val sign_float : float -> float

the sign of the argument, 1, -1, 0, -0 or NaN, ES2015

val sin : float -> float

sine in radians

val sinh : float -> float

hyperbolic sine in radians, ES2015

val sqrt : float -> float

square root, can return NaN

val tan : float -> float

tangent in radians

val tanh : float -> float

hyperbolic tangent in radians, ES2015

val unsafe_trunc : float -> int

truncate, ie. remove fractional digits, returns a value not representable as int if NaN, ES2015

val trunc : float -> float

truncate, ie. remove fractional digits, returns a value not representable as int if NaN, ES2015

diff --git a/findlib-1/melange/js/Js/Null/index.html b/findlib-1/melange/js/Js/Null/index.html new file mode 100644 index 000000000..fff3be710 --- /dev/null +++ b/findlib-1/melange/js/Js/Null/index.html @@ -0,0 +1,15 @@ + +Null (docs.findlib-1.melange.js.Js.Null)

Module Js.Null

Utility functions on null

Provides functionality for dealing with the 'a Js.null type

type +'a t = 'a Js.null

Local alias for 'a Js.null

val return : 'a -> 'a t

Constructs a value of 'a Js.null containing a value of 'a

val empty : 'a t

The empty value, null

val getUnsafe : 'a t -> 'a
val getExn : 'a t -> 'a
val bind : f:('a -> 'b t) Js.Fn.arity1 -> 'a t -> 'b t
val map : f:('a -> 'b) Js.Fn.arity1 -> 'a t -> 'b t

Maps the contained value using the given function

If 'a Js.null contains a value, that value is unwrapped, mapped to a 'b using the given function a' -> 'b, then wrapped back up and returned as 'b +Js.null

let maybeGreetWorld (maybeGreeting: string Js.null) =
+  Js.Null.bind maybeGreeting ~f:(fun greeting -> greeting ^ " world!")
val iter : f:('a -> unit) Js.Fn.arity1 -> 'a t -> unit

Iterates over the contained value with the given function

If 'a Js.null contains a value, that value is unwrapped and applied to the given function.

let maybeSay (maybeMessage: string Js.null) =
+  Js.Null.iter maybeMessage ~f:(fun message -> Js.log message)
val fromOption : 'a option -> 'a t

Maps 'a option to 'a Js.null

+ +
Some a -> return a +
None -> empty +
+
val toOption : 'a t -> 'a option

Maps 'a Js.null to 'a option

+ +
return a -> Some a +
empty -> None +
+
diff --git a/findlib-1/melange/js/Js/Nullable/index.html b/findlib-1/melange/js/Js/Nullable/index.html new file mode 100644 index 000000000..c2d658120 --- /dev/null +++ b/findlib-1/melange/js/Js/Nullable/index.html @@ -0,0 +1,15 @@ + +Nullable (docs.findlib-1.melange.js.Js.Nullable)

Module Js.Nullable

Utility functions on nullable

Contains functionality for dealing with values that can be both null and undefined

type +'a t = 'a Js.nullable

Local alias for 'a Js.nullable

val return : 'a -> 'a t

Constructs a value of 'a Js.nullable containing a value of 'a

val isNullable : 'a t -> bool

Returns true if the given value is null or undefined, false otherwise

val null : 'a t

The null value of type 'a Js.nullable

val undefined : 'a t

The undefined value of type 'a Js.nullable

val map : f:('a -> 'b) Js.Fn.arity1 -> 'a t -> 'b t
val bind : f:('a -> 'b t) Js.Fn.arity1 -> 'a t -> 'b t

Binds the contained value using the given function

If 'a Js.nullable contains a value, that value is unwrapped, mapped to a 'b using the given function a' -> 'b, then wrapped back up and returned as 'b Js.nullable

let maybeGreetWorld (maybeGreeting: string Js.nullable) =
+  Js.Nullable.bind maybeGreeting ~f:(fun greeting -> greeting ^ " world!")
val iter : f:('a -> unit) Js.Fn.arity1 -> 'a t -> unit

Iterates over the contained value with the given function

If 'a Js.nullable contains a value, that value is unwrapped and applied to the given function.

let maybeSay (maybeMessage: string Js.nullable) =
+  Js.Nullable.iter maybeMessage ~f:(fun message -> Js.log message)
val fromOption : 'a option -> 'a t

Maps 'a option to 'a Js.nullable

+ +
Some a -> return a +
None -> undefined +
+
val toOption : 'a t -> 'a option

Maps 'a Js.nullable to 'a option

+ +
return a -> Some a +
undefined -> None +
null -> None +
+
diff --git a/findlib-1/melange/js/Js/Obj/index.html b/findlib-1/melange/js/Js/Obj/index.html new file mode 100644 index 000000000..6e9bf1ddc --- /dev/null +++ b/findlib-1/melange/js/Js/Obj/index.html @@ -0,0 +1,2 @@ + +Obj (docs.findlib-1.melange.js.Js.Obj)

Module Js.Obj

Utility functions on `Js.t` JS objects

val empty : unit -> < .. > Js.t
val assign : < .. > Js.t -> < .. > Js.t -> < .. > Js.t
val merge : < .. > Js.t -> < .. > Js.t -> < .. > Js.t

merge obj1 obj2 assigns the properties in obj2 to a copy of obj1. The function returns a new object, and both arguments are not mutated

val keys : _ Js.t -> string array
diff --git a/findlib-1/melange/js/Js/Promise/index.html b/findlib-1/melange/js/Js/Promise/index.html new file mode 100644 index 000000000..f1bf6f73e --- /dev/null +++ b/findlib-1/melange/js/Js/Promise/index.html @@ -0,0 +1,10 @@ + +Promise (docs.findlib-1.melange.js.Js.Promise)

Module Js.Promise

Bindings to JS Promise functions

Specialized bindings to Promise. Note: For simplicity, this binding does not track the error type, it treat it as an opaque type

type +'a t
type error
val make : + (resolve:('a -> unit) Js.Fn.arity1 -> + reject:(exn -> unit) Js.Fn.arity1 -> + unit) -> + 'a t
val resolve : 'a -> 'a t
val reject : exn -> 'a t
val all : 'a t array -> 'a array t
val all2 : ('a0 t * 'a1 t) -> ('a0 * 'a1) t
val all3 : ('a0 t * 'a1 t * 'a2 t) -> ('a0 * 'a1 * 'a2) t
val all4 : ('a0 t * 'a1 t * 'a2 t * 'a3 t) -> ('a0 * 'a1 * 'a2 * 'a3) t
val all5 : + ('a0 t * 'a1 t * 'a2 t * 'a3 t * 'a4 t) -> + ('a0 * 'a1 * 'a2 * 'a3 * 'a4) t
val all6 : + ('a0 t * 'a1 t * 'a2 t * 'a3 t * 'a4 t * 'a5 t) -> + ('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5) t
val race : 'a t array -> 'a t
val then_ : ('a -> 'b t) -> 'a t -> 'b t
val catch : (error -> 'a t) -> 'a t -> 'a t
diff --git a/findlib-1/melange/js/Js/Re/index.html b/findlib-1/melange/js/Js/Re/index.html new file mode 100644 index 000000000..61e484ebb --- /dev/null +++ b/findlib-1/melange/js/Js/Re/index.html @@ -0,0 +1,44 @@ + +Re (docs.findlib-1.melange.js.Js.Re)

Module Js.Re

Bindings to the functions in RegExp.prototype

Provides bindings for JavaScript Regular Expressions

Syntax sugar

Melange provides a bit of syntax sugar for regex literals: [%re "/foo/g"] will evaluate to a t that can be passed around and used like usual.

Note: This is not an immutable API. A RegExp object with the global ("g") flag set will modify the lastIndex property when the RegExp object is used, and subsequent uses will continue the search from the previous lastIndex.

let maybeMatches = Js.String.exec ~str:"banana" [\[%re "/na+/g"\]]
type t = Js.re

the RegExp object

type result

the result of a executing a RegExp on a string

val captures : result -> string Js.nullable array

an array of the match and captures, the first is the full match and the remaining are the substring captures

val index : result -> int

0-based index of the match in the input string

val input : result -> string

the original input string

val fromString : string -> t

Constructs a RegExp object (t) from a string

Regex literals ([%re "/.../"]) should generally be preferred, but fromString is very useful when you need to insert a string into a regex.

(* A function that extracts the content of the first element with the given tag *)
+
+let contentOf tag xmlString =
+  Js.Re.fromString ("<" ^ tag ^ ">(.*?)<\\/" ^ tag ^">")
+    |> Js.Re.exec ~str:xmlString
+    |> function
+      | Some result -> Js.Nullable.toOption (Js.Re.captures result).(1)
+      | None -> None
val fromStringWithFlags : string -> flags:string -> t

Constructs a RegExp object (t) from a string with the given flags

See fromString

Valid flags: + +
g global +
i ignore case +
m multiline +
u unicode (es2015) +
y sticky (es2015) +
+

val flags : t -> string

returns the enabled flags as a string

val global : t -> bool

returns a bool indicating whether the global flag is set

val ignoreCase : t -> bool

returns a bool indicating whether the ignoreCase flag is set

val lastIndex : t -> int

returns the index where the next match will start its search

This property will be modified when the RegExp object is used, if the global ("g") flag is set.

(* Finds and prints successive matches *)
+
+let re = [%re "/ab*/g"] in
+let str = "abbcdefabh" in
+
+let break = ref false in
+while not !break do
+  match re |> Js.Re.exec ~str with
+  | None -> break := true
+  | Some result ->
+    Js.Nullable.iter (Js.Re.captures result).(0) ((fun match_ ->
+      let next = string_of_int (Js.Re.lastIndex re) in
+      Js.log ("Found " ^ match_ ^ ". Next match starts at " ^ next)))
+done
val setLastIndex : t -> int -> unit

sets the index at which the next match will start its search from

val multiline : t -> bool

returns a bool indicating whether the multiline flag is set

val source : t -> string

returns the pattern as a string

val sticky : t -> bool

returns a bool indicating whether the sticky flag is set

val unicode : t -> bool

returns a bool indicating whether the unicode flag is set

val exec : str:string -> t -> result option

executes a search on a given string using the given RegExp object

returns Some result if a match is found, None otherwise

(* Match "quick brown" followed by "jumps", ignoring characters in between
+ * Remember "brown" and "jumps"
+ * Ignore case
+ *)
+
+let re = [%re "/quick\s(brown).+?(jumps)/ig"] in
+let result = re |. Js.Re.exec ~str:"The Quick Brown Fox Jumps Over The Lazy Dog"
val test : str:string -> t -> bool

tests whether the given RegExp object will match a given string

returns true if a match is found, false otherwise

(* A simple implementation of Js.String.startsWith *)
+
+let str = "hello world!"
+
+let startsWith target substring =
+  Js.Re.fromString ("^" ^ substring)
+    |. Js.Re.test ~str:target
+
+let () = Js.log (str |. startsWith "hello") (* prints "true" *)
diff --git a/findlib-1/melange/js/Js/Set/index.html b/findlib-1/melange/js/Js/Set/index.html new file mode 100644 index 000000000..a57a88958 --- /dev/null +++ b/findlib-1/melange/js/Js/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-1.melange.js.Js.Set)

Module Js.Set

Bindings to functions in Set

ES6 Set API

type 'a t
val make : unit -> 'a t
val fromArray : 'a array -> 'a t
val toArray : 'a t -> 'a array
val size : 'a t -> int
val add : value:'a -> 'a t -> 'a t
val clear : 'a t -> unit
val delete : value:'a -> 'a t -> bool
val forEach : f:('a -> unit) -> 'a t -> unit
val has : value:'a -> 'a t -> bool
val values : 'a t -> 'a Js.iterator
val entries : 'a t -> ('a * 'a) Js.iterator
diff --git a/findlib-1/melange/js/Js/String/index.html b/findlib-1/melange/js/Js/String/index.html new file mode 100644 index 000000000..6b212245e --- /dev/null +++ b/findlib-1/melange/js/Js/String/index.html @@ -0,0 +1,97 @@ + +String (docs.findlib-1.melange.js.Js.String)

Module Js.String

Bindings to the functions in String.prototype

JavaScript String API

type t = string
val make : 'a -> t

make value converts the given value to a string

make 3.5 = "3.5";;
+make [|1;2;3|]) = "1,2,3";;
val fromCharCode : int -> t

fromCharCode n creates a string containing the character corresponding to that number; n ranges from 0 to 65535. If out of range, the lower 16 bits of the value are used. Thus, fromCharCode 0x1F63A gives the same result as fromCharCode 0xF63A.

fromCharCode 65 = "A";;
+fromCharCode 0x3c8 = {js|ψ|js};;
+fromCharCode 0xd55c = {js|한|js};;
+fromCharCode -64568 = {js|ψ|js};;
val fromCharCodeMany : int array -> t

fromCharCodeMany [|n1;n2;n3|] creates a string from the characters corresponding to the given numbers, using the same rules as fromCharCode.

fromCharCodeMany([|0xd55c, 0xae00, 33|]) = {js|한글!|js};;
val fromCodePoint : int -> t

fromCodePoint n creates a string containing the character corresponding to that numeric code point. If the number is not a valid code point, raises RangeError. Thus, fromCodePoint 0x1F63A will produce a correct value, unlike fromCharCode 0x1F63A, and fromCodePoint -5 will raise a RangeError.

fromCodePoint 65 = "A";;
+fromCodePoint 0x3c8 = {js|ψ|js};;
+fromCodePoint 0xd55c = {js|한|js};;
+fromCodePoint 0x1f63a = {js|😺|js};;
val fromCodePointMany : int array -> t

fromCharCodeMany [|n1;n2;n3|] creates a string from the characters corresponding to the given code point numbers, using the same rules as fromCodePoint.

fromCodePointMany([|0xd55c; 0xae00; 0x1f63a|]) = {js|한글😺|js}
val length : t -> int

length s returns the length of the given string.

length "abcd" = 4;;
val get : t -> int -> t

get s n returns as a string the character at the given index number. If n is out of range, this function returns undefined, so at some point this function may be modified to return t option.

get "Reason" 0 = "R";;
+get "Reason" 4 = "o";;
+get {js|Rẽasöń|js} 5 = {js|ń|js};;
val charAt : index:int -> t -> t

charAt ~index s gets the character at position index within string s. If index is negative or greater than the length of s, returns the empty string. If the string contains characters outside the range \u0000-\uffff, it will return the first 16-bit value at that position in the string.

charAt ~index:0 "Reason" = "R"
+charAt ~index:12 "Reason" = "";
+charAt ~index:5 {js|Rẽasöń|js} = {js|ń|js}
val charCodeAt : index:int -> t -> float

charCodeAt s ~index returns the character code at position index in string s; the result is in the range 0-65535, unlke codePointAt, so it will not work correctly for characters with code points greater than or equal to 0x10000. The return type is float because this function returns NaN if index is less than zero or greater than the length of the string.

charCodeAt ~index:0 {js|😺|js} = 0xd83d
+codePointAt ~index:0 {js|😺|js} = Some 0x1f63a
val codePointAt : index:int -> t -> int option

codePointAt s ~index returns the code point at position index within string s as a Some value. The return value handles code points greater than or equal to 0x10000. If there is no code point at the given position, the function returns None.

codePointAt ~index:1 {js|¿😺?|js} = Some 0x1f63a
+codePointAt ~index:5 "abc" = None

ES2015

val concat : other:t -> t -> t

concat ~other:str2 str1 returns a new string with str2 added after str1.

concat ~other:"bell" "cow" = "cowbell";;
val concatMany : strings:t array -> t -> t

concatMany ~strings original returns a new string consisting of each item of the array of strings strings added to the original string.

concatMany ~strings:[|"2nd"; "3rd"; "4th"|] "1st" = "1st2nd3rd4th";;
val endsWith : suffix:t -> ?len:int -> t -> bool

endsWith ~suffix ?len str returns true if the str ends with suffix, false otherwise. If len is specified, `endsWith` only takes into account the first len characters.

endsWith ~suffix:"cd" ~len:4 "abcd" = true;;
+endsWith ~suffix:"cd" ~len:3 "abcde" = false;;
+endsWith ~suffix:"cde" ~len:99 "abcde" = true;;
+endsWith ~suffix:"ple" ~len:7 "example.dat" = true;;
+endsWith ~suffix:"World!" "Hello, World!" = true;;
+endsWith ~suffix:"world!" "Hello, World!" = false;; (* case-sensitive *)
+endsWith ~suffix:"World" "Hello, World!" = false;; (* exact match *)
val includes : search:t -> ?start:int -> t -> bool

includes ~search ?start s returns true if search is found anywhere within s starting at character number start (where 0 is the first character), false otherwise.

includes ~search:"gram" "programmer" = true;;
+includes ~search:"er" "programmer" = true;;
+includes ~search:"pro" "programmer" = true;;
+includes ~search:"xyz" "programmer" = false;;
+includes ~search:"gram" ~start:1 "programmer" = true;;
+includes ~search:"gram" ~start:4 "programmer" = false;;
+includes ~search:{js|한|js} ~start:1 {js|대한민국|js} = true;;
val indexOf : search:t -> ?start:int -> t -> int

indexOf ~search ?start s returns the position at which search was found within s starting at character position start, or -1 if search is not found in that portion of s. The return value is relative to the beginning of the string, no matter where the search started from.

indexOf ~search:"ok" "bookseller" = 2;;
+indexOf ~search:"sell" "bookseller" = 4;;
+indexOf ~search:"ee" "beekeeper" = 1;;
+indexOf ~search:"xyz" "bookseller" = -1;;
+indexOf ~search:"ok" ~start:1 "bookseller" = 2;;
+indexOf ~search:"sell" ~start:2 "bookseller" = 4;;
+indexOf ~search:"sell" ~start:5 "bookseller" = -1;;
val lastIndexOf : search:t -> ?start:int -> t -> int

lastIndexOf ~search ~start s returns the position of the last occurrence of searchValue within s, searching backwards from the given start position. Returns -1 if searchValue is not in s. The return value is always relative to the beginning of the string.

lastIndexOf ~search:"ok" "bookseller" = 2;;
+lastIndexOf ~search:"ee" "beekeeper" = 4;;
+lastIndexOf ~search:"xyz" "abcdefg" = -1;;
+lastIndexOf ~search:"ok" ~start:6 "bookseller" = 2;;
+lastIndexOf ~search:"ee" ~start:8 "beekeeper" = 4;;
+lastIndexOf ~search:"ee" ~start:3 "beekeeper" = 1;;
+lastIndexOf ~search:"xyz" ~start:4 "abcdefg" = -1;;
val localeCompare : other:t -> t -> float

localeCompare ~other:comparison reference returns:

  • a negative value if reference comes before comparison in sort order
  • zero if reference and comparison have the same sort order
  • a positive value if reference comes after comparison in sort order
(localeCompare ~other:"ant" "zebra") > 0.0;;
+(localeCompare ~other:"zebra" "ant") < 0.0;;
+(localeCompare ~other:"cat" "cat") = 0.0;;
+(localeCompare ~other:"cat" "CAT") > 0.0;;
val match_ : regexp:Js.re -> t -> t option array option

match ~regexp str matches a string against the given regexp. If there is no match, it returns None. For regular expressions without the g modifier, if there is a match, the return value is Some array where the array contains:

  • The entire matched string
  • Any capture groups if the regexp had parentheses

For regular expressions with the g modifier, a matched expression returns Some array with all the matched substrings and no capture groups.

match "The better bats" ~regexp:[%re "/b[aeiou]t/"] = Some [|"bet"|]
+match "The better bats" ~regexp:[%re "/b[aeiou]t/g"] = Some [|"bet";"bat"|]
+match "Today is 2018-04-05." ~regexp:[%re "/(\\d+)-(\\d+)-(\\d+)/"] = Some [|"2018-04-05"; "2018"; "04"; "05"|]
+match "The large container." ~regexp:[%re "/b[aeiou]g/"] = None
val normalize : ?form:[ `NFC | `NFD | `NFKC | `NFKD ] -> t -> t

normalize ~form str returns the normalized Unicode string using the specified form of normalization, which may be one of:

  • `NFC — Normalization Form Canonical Composition.
  • `NFD — Normalization Form Canonical Decomposition.
  • `NFKC — Normalization Form Compatibility Composition.
  • `NFKD — Normalization Form Compatibility Decomposition.

If form is omitted, `NFC is used.

Consider the character ã, which can be represented as the single codepoint \u00e3 or the combination of a lower case letter A \u0061 and a combining tilde \u0303. Normalization ensures that both can be stored in an equivalent binary representation.

val repeat : count:int -> t -> t

repeat ~count s returns a string that consists of count repetitions of s. Raises RangeError if n is negative.

repeat ~count:3 "ha" = "hahaha"
+repeat ~count:0 "empty" = ""
val replace : search:t -> replacement:t -> t -> t

replace ~search ~replacement string returns a new string which is identical to string except with the first matching instance of search replaced by replacement.

search is treated as a verbatim string to match, not a regular expression.

replace ~search:"old" ~replacement:"new" "old string" = "new string"
+replace ~search:"the" ~replacement:"this" "the cat and the dog" = "this cat and the dog"
val replaceByRe : regexp:Js.re -> replacement:t -> t -> t

replaceByRe ~regexp ~replacement string returns a new string where occurrences matching regexp have been replaced by replacement.

replaceByRe ~regexp:[%re "/[aeiou]/g"] ~replacement:"x" "vowels be gone" = "vxwxls bx gxnx"
+replaceByRe ~regexp:[%re "/(\\w+) (\\w+)/"] ~replacement:"$2, $1" "Juan Fulano" = "Fulano, Juan"
val unsafeReplaceBy0 : regexp:Js.re -> f:(t -> int -> t -> t) -> t -> t

unsafeReplaceBy0 ~regexp ~f s returns a new string with some or all matches of a pattern with no capturing parentheses replaced by the value returned from the given function. The function receives as its parameters the matched string, the offset at which the match begins, and the whole string being matched

let str = "beautiful vowels"
+let re = [%re "/[aeiou]/g"]
+let matchFn matchPart offset wholeString = Js.String.toUpperCase matchPart
+
+let replaced = Js.String.unsafeReplaceBy0 ~regexp:re ~f:matchFn str
+
+let () = Js.log replaced (* prints "bEAUtifUl vOwEls" *)

@see <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_function_as_a_parameter> MDN

val unsafeReplaceBy1 : regexp:Js.re -> f:(t -> t -> int -> t -> t) -> t -> t

unsafeReplaceBy1 ~regexp ~f s returns a new string with some or all matches of a pattern with one set of capturing parentheses replaced by the value returned from the given function. The function receives as its parameters the matched string, the captured strings, the offset at which the match begins, and the whole string being matched.

let str = "increment 23"
+let re = [%re "/increment (\\d+)/g"]
+let matchFn matchPart p1 offset wholeString =
+  wholeString ^ " is " ^ (string_of_int ((int_of_string p1) + 1))
+
+let replaced = Js.String.unsafeReplaceBy1 ~regexp:re ~f:matchFn str
+
+let () = Js.log replaced (* prints "increment 23 is 24" *)

@see <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_function_as_a_parameter> MDN

val unsafeReplaceBy2 : + regexp:Js.re -> + f:(t -> t -> t -> int -> t -> t) -> + t -> + t

unsafeReplaceBy2 ~regexp ~f s returns a new string with some or all matches of a pattern with two sets of capturing parentheses replaced by the value returned from the given function. The function receives as its parameters the matched string, the captured strings, the offset at which the match begins, and the whole string being matched.

let str = "7 times 6"
+let re = [%re "/(\\d+) times (\\d+)/"]
+let matchFn matchPart p1 p2 offset wholeString =
+  string_of_int ((int_of_string p1) * (int_of_string p2))
+
+let replaced = Js.String.unsafeReplaceBy2 ~regexp:re ~f:matchFn str
+
+let () = Js.log replaced (* prints "42" *)
val unsafeReplaceBy3 : + regexp:Js.re -> + f:(t -> t -> t -> t -> int -> t -> t) -> + t -> + t

unsafeReplaceBy3 ~regexp ~f s returns a new string with some or all matches of a pattern with three sets of capturing parentheses replaced by the value returned from the given function. The function receives as its parameters the matched string, the captured strings, the offset at which the match begins, and the whole string being matched.

search ~regexp str returns the starting position of the first match of regexp in the given str, or -1 if there is no match.

search ~regexp:[%re "/\\d+/"] "testing 1 2 3" = 8;;
+search ~regexp:[%re "/\\d+/"] "no numbers" = -1;;
val slice : ?start:int -> ?end_:int -> t -> t

slice ?start ?end str returns the substring of str starting at character start up to but not including end

If either start or end is negative, then it is evaluated as length str + - start (or length str - end).

If end is greater than the length of str, then it is treated as length + str.

If start is greater than end, slice returns the empty string.

slice ~start:2 ~end_:5 "abcdefg" = "cde";;
+slice ~start:2 ~end_:9 "abcdefg" = "cdefg";;
+slice ~start:(-4) ~end_:(-2) "abcdefg" = "de";;
+slice ~start:5 ~end_:1 "abcdefg" = "";;
val split : ?sep:t -> ?limit:int -> t -> t array

split ?sep ?limit str splits the given str at every occurrence of sep and returns an array of the first limit resulting substrings. If limit is negative or greater than the number of substrings, the array will contain all the substrings.

split ~sep:"/" ~limit: 3 "ant/bee/cat/dog/elk" = [|"ant"; "bee"; "cat"|];;
+split ~sep:"/" ~limit: 0 "ant/bee/cat/dog/elk" = [| |];;
+split ~sep:"/" ~limit: 9 "ant/bee/cat/dog/elk" = [|"ant"; "bee"; "cat"; "dog"; "elk"|];;
val splitByRe : regexp:Js.re -> ?limit:int -> t -> t option array

splitByRe str ~regexp ?limit () splits the given str at every occurrence of regexp and returns an array of the first limit resulting substrings. If limit is negative or greater than the number of substrings, the array will contain all the substrings.

splitByRe ~regexp:[%re "/\\s*:\\s*/"] ~limit:3 "one: two: three: four" = [|"one"; "two"; "three"|];;
+splitByRe ~regexp:[%re "/\\s*:\\s*/"] ~limit:0 "one: two: three: four" = [| |];;
+splitByRe ~regexp:[%re "/\\s*:\\s*/"] ~limit:8 "one: two: three: four" = [|"one"; "two"; "three"; "four"|];;

;

val startsWith : prefix:t -> ?start:int -> t -> bool

startsWith ~prefix ?start str returns true if the str starts with prefix starting at position start, false otherwise. If start is negative, the search starts at the beginning of str.

startsWith ~prefix:"Hello" ~start:0 "Hello, World!" = true;;
+startsWith ~prefix:"World" ~start:7 "Hello, World!" = true;;
+startsWith ~prefix:"World" ~start:8 "Hello, World!" = false;;
val substr : ?start:int -> ?len:int -> t -> t

substr ?start ?len str returns the substring of str of length len starting at position start.

If start is less than zero, the starting position is the length of str

  • start.

If start is greater than or equal to the length of str, returns the empty string.

If len is less than or equal to zero, returns the empty string.

substr ~start:3 ~len:4 "abcdefghij" = "defghij"
+substr ~start:(-3) ~len:4 "abcdefghij" = "hij"
+substr ~start:12 ~len:2 "abcdefghij" = ""
  • deprecated This function is deprecated, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr#sect1
val substring : ?start:int -> ?end_:int -> t -> t

substring ~start ~end_ str returns characters start up to but not including end_ from str.

If start is less than zero, it is treated as zero.

If end_ is zero or negative, the empty string is returned.

If start is greater than end_, the start and finish points are swapped.

substring ~start:3 ~end_:6 "playground" = "ygr";;
+substring ~start:6 ~end_:3 "playground" = "ygr";;
+substring ~start:4 ~end_:12 "playground" = "ground";;
val toLowerCase : t -> t

toLowerCase str converts str to lower case using the locale-insensitive case mappings in the Unicode Character Database. Notice that the conversion can give different results depending upon context, for example with the Greek letter sigma, which has two different lower case forms when it is the last character in a string or not.

toLowerCase "ABC" = "abc";;
+toLowerCase {js|ΣΠ|js} = {js|σπ|js};;
+toLowerCase {js|ΠΣ|js} = {js|πς|js};;
val toLocaleLowerCase : t -> t

toLocaleLowerCase str converts str to lower case using the current locale

val toUpperCase : t -> t

toUpperCase str converts str to upper case using the locale-insensitive case mappings in the Unicode Character Database. Notice that the conversion can expand the number of letters in the result; for example the German ß capitalizes to two Ses in a row.

toUpperCase "abc" = "ABC";;
+toUpperCase {js|Straße|js} = {js|STRASSE|js};;
+toUpperCase {js|πς|js} = {js|ΠΣ|js};;
val toLocaleUpperCase : t -> t

toLocaleUpperCase str converts str to upper case using the current locale

val trim : t -> t

trim str returns a string that is str with whitespace stripped from both ends. Internal whitespace is not removed.

trim "   abc def   " = "abc def"
+trim "\n\r\t abc def \n\n\t\r " = "abc def"
val anchor : name:t -> t -> t

anchor ~name:anchorName anchorText creates a string with an HTML <a> element with name attribute of anchorName and anchorText as its content.

anchor ~name:"page1" "Page One" = "<a name=\"page1\">Page One</a>"
  • deprecated This function is deprecated, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/anchor#sect1

link ~href:urlText linkText creates a string with an HTML <a> element with href attribute of urlText and linkText as its content.

link ~href:"page2.html" "Go to page two" = "<a href=\"page2.html\">Go to page two</a>"
  • deprecated This function is deprecated, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/link#sect1
val unsafeToArrayLike : t -> t Js.array_like
diff --git a/findlib-1/melange/js/Js/Typed_array/ArrayBuffer/index.html b/findlib-1/melange/js/Js/Typed_array/ArrayBuffer/index.html new file mode 100644 index 000000000..0ca0dea01 --- /dev/null +++ b/findlib-1/melange/js/Js/Typed_array/ArrayBuffer/index.html @@ -0,0 +1,2 @@ + +ArrayBuffer (docs.findlib-1.melange.js.Js.Typed_array.ArrayBuffer)

Module Typed_array.ArrayBuffer

The underlying buffer that the typed arrays provide views of

type t = array_buffer
val make : int -> t

takes length. initializes elements to 0

val byteLength : t -> int
val slice : ?start:int -> ?end_:int -> t -> array_buffer
diff --git a/findlib-1/melange/js/Js/Typed_array/DataView/index.html b/findlib-1/melange/js/Js/Typed_array/DataView/index.html new file mode 100644 index 000000000..430b4e682 --- /dev/null +++ b/findlib-1/melange/js/Js/Typed_array/DataView/index.html @@ -0,0 +1,2 @@ + +DataView (docs.findlib-1.melange.js.Js.Typed_array.DataView)

Module Typed_array.DataView

The DataView view provides a low-level interface for reading and writing multiple number types in an ArrayBuffer irrespective of the platform's endianness.

type t
val make : array_buffer -> t
val fromBuffer : array_buffer -> ?off:int -> ?len:int -> unit -> t
val buffer : t -> array_buffer
val byteLength : t -> int
val byteOffset : t -> int
val getInt8 : int -> t -> int
val getUint8 : int -> t -> int
val getInt16 : int -> t -> int
val getInt16LittleEndian : int -> t -> int
val getUint16 : int -> t -> int
val getUint16LittleEndian : int -> t -> int
val getInt32 : int -> t -> int
val getInt32LittleEndian : int -> t -> int
val getUint32 : int -> t -> int
val getUint32LittleEndian : int -> t -> int
val getFloat32 : int -> t -> float
val getFloat32LittleEndian : int -> t -> float
val getFloat64 : int -> t -> float
val getFloat64LittleEndian : int -> t -> float
val setInt8 : int -> int -> t -> unit
val setUint8 : int -> int -> t -> unit
val setInt16 : int -> int -> t -> unit
val setInt16LittleEndian : int -> int -> t -> unit
val setUint16 : int -> int -> t -> unit
val setUint16LittleEndian : int -> int -> t -> unit
val setInt32 : int -> int -> t -> unit
val setInt32LittleEndian : int -> int -> t -> unit
val setUint32 : int -> int -> t -> unit
val setUint32LittleEndian : int -> int -> t -> unit
val setFloat32 : int -> float -> t -> unit
val setFloat32LittleEndian : int -> float -> t -> unit
val setFloat64 : int -> float -> t -> unit
val setFloat64LittleEndian : int -> float -> t -> unit
diff --git a/findlib-1/melange/js/Js/Typed_array/Float32Array/index.html b/findlib-1/melange/js/Js/Typed_array/Float32Array/index.html new file mode 100644 index 000000000..460abbb1a --- /dev/null +++ b/findlib-1/melange/js/Js/Typed_array/Float32Array/index.html @@ -0,0 +1,2 @@ + +Float32Array (docs.findlib-1.melange.js.Js.Typed_array.Float32Array)

Module Typed_array.Float32Array

type elt = float
type 'a typed_array
type t = elt typed_array
val unsafe_get : t -> int -> elt
val unsafe_set : t -> int -> elt -> unit
val buffer : t -> array_buffer
val byteLength : t -> int
val byteOffset : t -> int
val setArray : elt array -> t -> unit
val setArrayOffset : elt array -> int -> t -> unit
val length : t -> int
val copyWithin : to_:int -> ?start:int -> ?end_:int -> t -> t
val fill : elt -> ?start:int -> ?end_:int -> t -> t
val reverseInPlace : t -> t
val sortInPlace : t -> t
val sortInPlaceWith : f:(elt -> elt -> int) -> t -> t
val includes : value:elt -> t -> bool
val indexOf : value:elt -> ?start:int -> t -> int
val join : ?sep:string -> t -> string
val lastIndexOf : value:elt -> t -> int
val lastIndexOfFrom : value:elt -> from:int -> t -> int
val slice : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val copy : t -> t
val subarray : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val toString : t -> string
val toLocaleString : t -> string
val entries : t -> (int * elt) Js.iterator
val every : f:(elt -> bool) -> t -> bool
val everyi : f:(elt -> int -> bool) -> t -> bool
val filter : f:(elt -> bool) -> t -> t
val filteri : f:(elt -> int -> bool) -> t -> t
val find : f:(elt -> bool) -> t -> elt Js.undefined
val findi : f:(elt -> int -> bool) -> t -> elt Js.undefined
val findIndex : f:(elt -> bool) -> t -> int
val findIndexi : f:(elt -> int -> bool) -> t -> int
val forEach : f:(elt -> unit) -> t -> unit
val forEachi : f:(elt -> int -> unit) -> t -> unit
val keys : t -> int Js.iterator
val map : f:(elt -> 'b) -> t -> 'b typed_array
val mapi : f:(elt -> int -> 'b) -> t -> 'b typed_array
val reduce : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reducei : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val reduceRight : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reduceRighti : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val some : f:(elt -> bool) -> t -> bool
val somei : f:(elt -> int -> bool) -> t -> bool
val _BYTES_PER_ELEMENT : int
val make : elt array -> t
val fromBuffer : array_buffer -> ?off:int -> ?len:int -> unit -> t
  • parameter offset

    is in bytes, length in elements

val fromLength : int -> t
val from : elt Js.array_like -> t
val values : t -> elt Js.iterator
diff --git a/findlib-1/melange/js/Js/Typed_array/Float64Array/index.html b/findlib-1/melange/js/Js/Typed_array/Float64Array/index.html new file mode 100644 index 000000000..40542046d --- /dev/null +++ b/findlib-1/melange/js/Js/Typed_array/Float64Array/index.html @@ -0,0 +1,2 @@ + +Float64Array (docs.findlib-1.melange.js.Js.Typed_array.Float64Array)

Module Typed_array.Float64Array

type elt = float
type 'a typed_array
type t = elt typed_array
val unsafe_get : t -> int -> elt
val unsafe_set : t -> int -> elt -> unit
val buffer : t -> array_buffer
val byteLength : t -> int
val byteOffset : t -> int
val setArray : elt array -> t -> unit
val setArrayOffset : elt array -> int -> t -> unit
val length : t -> int
val copyWithin : to_:int -> ?start:int -> ?end_:int -> t -> t
val fill : elt -> ?start:int -> ?end_:int -> t -> t
val reverseInPlace : t -> t
val sortInPlace : t -> t
val sortInPlaceWith : f:(elt -> elt -> int) -> t -> t
val includes : value:elt -> t -> bool
val indexOf : value:elt -> ?start:int -> t -> int
val join : ?sep:string -> t -> string
val lastIndexOf : value:elt -> t -> int
val lastIndexOfFrom : value:elt -> from:int -> t -> int
val slice : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val copy : t -> t
val subarray : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val toString : t -> string
val toLocaleString : t -> string
val entries : t -> (int * elt) Js.iterator
val every : f:(elt -> bool) -> t -> bool
val everyi : f:(elt -> int -> bool) -> t -> bool
val filter : f:(elt -> bool) -> t -> t
val filteri : f:(elt -> int -> bool) -> t -> t
val find : f:(elt -> bool) -> t -> elt Js.undefined
val findi : f:(elt -> int -> bool) -> t -> elt Js.undefined
val findIndex : f:(elt -> bool) -> t -> int
val findIndexi : f:(elt -> int -> bool) -> t -> int
val forEach : f:(elt -> unit) -> t -> unit
val forEachi : f:(elt -> int -> unit) -> t -> unit
val keys : t -> int Js.iterator
val map : f:(elt -> 'b) -> t -> 'b typed_array
val mapi : f:(elt -> int -> 'b) -> t -> 'b typed_array
val reduce : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reducei : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val reduceRight : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reduceRighti : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val some : f:(elt -> bool) -> t -> bool
val somei : f:(elt -> int -> bool) -> t -> bool
val _BYTES_PER_ELEMENT : int
val make : elt array -> t
val fromBuffer : array_buffer -> ?off:int -> ?len:int -> unit -> t
  • parameter offset

    is in bytes, length in elements

val fromLength : int -> t
val from : elt Js.array_like -> t
val values : t -> elt Js.iterator
diff --git a/findlib-1/melange/js/Js/Typed_array/Int16Array/index.html b/findlib-1/melange/js/Js/Typed_array/Int16Array/index.html new file mode 100644 index 000000000..46d0b7a91 --- /dev/null +++ b/findlib-1/melange/js/Js/Typed_array/Int16Array/index.html @@ -0,0 +1,2 @@ + +Int16Array (docs.findlib-1.melange.js.Js.Typed_array.Int16Array)

Module Typed_array.Int16Array

type elt = int
type 'a typed_array
type t = elt typed_array
val unsafe_get : t -> int -> elt
val unsafe_set : t -> int -> elt -> unit
val buffer : t -> array_buffer
val byteLength : t -> int
val byteOffset : t -> int
val setArray : elt array -> t -> unit
val setArrayOffset : elt array -> int -> t -> unit
val length : t -> int
val copyWithin : to_:int -> ?start:int -> ?end_:int -> t -> t
val fill : elt -> ?start:int -> ?end_:int -> t -> t
val reverseInPlace : t -> t
val sortInPlace : t -> t
val sortInPlaceWith : f:(elt -> elt -> int) -> t -> t
val includes : value:elt -> t -> bool
val indexOf : value:elt -> ?start:int -> t -> int
val join : ?sep:string -> t -> string
val lastIndexOf : value:elt -> t -> int
val lastIndexOfFrom : value:elt -> from:int -> t -> int
val slice : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val copy : t -> t
val subarray : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val toString : t -> string
val toLocaleString : t -> string
val entries : t -> (int * elt) Js.iterator
val every : f:(elt -> bool) -> t -> bool
val everyi : f:(elt -> int -> bool) -> t -> bool
val filter : f:(elt -> bool) -> t -> t
val filteri : f:(elt -> int -> bool) -> t -> t
val find : f:(elt -> bool) -> t -> elt Js.undefined
val findi : f:(elt -> int -> bool) -> t -> elt Js.undefined
val findIndex : f:(elt -> bool) -> t -> int
val findIndexi : f:(elt -> int -> bool) -> t -> int
val forEach : f:(elt -> unit) -> t -> unit
val forEachi : f:(elt -> int -> unit) -> t -> unit
val keys : t -> int Js.iterator
val map : f:(elt -> 'b) -> t -> 'b typed_array
val mapi : f:(elt -> int -> 'b) -> t -> 'b typed_array
val reduce : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reducei : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val reduceRight : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reduceRighti : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val some : f:(elt -> bool) -> t -> bool
val somei : f:(elt -> int -> bool) -> t -> bool
val _BYTES_PER_ELEMENT : int
val make : elt array -> t
val fromBuffer : array_buffer -> ?off:int -> ?len:int -> unit -> t
  • parameter offset

    is in bytes, length in elements

val fromLength : int -> t
val from : elt Js.array_like -> t
val values : t -> elt Js.iterator
diff --git a/findlib-1/melange/js/Js/Typed_array/Int32Array/index.html b/findlib-1/melange/js/Js/Typed_array/Int32Array/index.html new file mode 100644 index 000000000..7a01d8f46 --- /dev/null +++ b/findlib-1/melange/js/Js/Typed_array/Int32Array/index.html @@ -0,0 +1,2 @@ + +Int32Array (docs.findlib-1.melange.js.Js.Typed_array.Int32Array)

Module Typed_array.Int32Array

type elt = int32
type 'a typed_array
type t = elt typed_array
val unsafe_get : t -> int -> elt
val unsafe_set : t -> int -> elt -> unit
val buffer : t -> array_buffer
val byteLength : t -> int
val byteOffset : t -> int
val setArray : elt array -> t -> unit
val setArrayOffset : elt array -> int -> t -> unit
val length : t -> int
val copyWithin : to_:int -> ?start:int -> ?end_:int -> t -> t
val fill : elt -> ?start:int -> ?end_:int -> t -> t
val reverseInPlace : t -> t
val sortInPlace : t -> t
val sortInPlaceWith : f:(elt -> elt -> int) -> t -> t
val includes : value:elt -> t -> bool
val indexOf : value:elt -> ?start:int -> t -> int
val join : ?sep:string -> t -> string
val lastIndexOf : value:elt -> t -> int
val lastIndexOfFrom : value:elt -> from:int -> t -> int
val slice : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val copy : t -> t
val subarray : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val toString : t -> string
val toLocaleString : t -> string
val entries : t -> (int * elt) Js.iterator
val every : f:(elt -> bool) -> t -> bool
val everyi : f:(elt -> int -> bool) -> t -> bool
val filter : f:(elt -> bool) -> t -> t
val filteri : f:(elt -> int -> bool) -> t -> t
val find : f:(elt -> bool) -> t -> elt Js.undefined
val findi : f:(elt -> int -> bool) -> t -> elt Js.undefined
val findIndex : f:(elt -> bool) -> t -> int
val findIndexi : f:(elt -> int -> bool) -> t -> int
val forEach : f:(elt -> unit) -> t -> unit
val forEachi : f:(elt -> int -> unit) -> t -> unit
val keys : t -> int Js.iterator
val map : f:(elt -> 'b) -> t -> 'b typed_array
val mapi : f:(elt -> int -> 'b) -> t -> 'b typed_array
val reduce : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reducei : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val reduceRight : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reduceRighti : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val some : f:(elt -> bool) -> t -> bool
val somei : f:(elt -> int -> bool) -> t -> bool
val _BYTES_PER_ELEMENT : int
val make : elt array -> t
val fromBuffer : array_buffer -> ?off:int -> ?len:int -> unit -> t
  • parameter offset

    is in bytes, length in elements

val fromLength : int -> t
val from : elt Js.array_like -> t
val values : t -> elt Js.iterator
diff --git a/findlib-1/melange/js/Js/Typed_array/Int8Array/index.html b/findlib-1/melange/js/Js/Typed_array/Int8Array/index.html new file mode 100644 index 000000000..cfae4ddcc --- /dev/null +++ b/findlib-1/melange/js/Js/Typed_array/Int8Array/index.html @@ -0,0 +1,2 @@ + +Int8Array (docs.findlib-1.melange.js.Js.Typed_array.Int8Array)

Module Typed_array.Int8Array

type elt = int
type 'a typed_array
type t = elt typed_array
val unsafe_get : t -> int -> elt
val unsafe_set : t -> int -> elt -> unit
val buffer : t -> array_buffer
val byteLength : t -> int
val byteOffset : t -> int
val setArray : elt array -> t -> unit
val setArrayOffset : elt array -> int -> t -> unit
val length : t -> int
val copyWithin : to_:int -> ?start:int -> ?end_:int -> t -> t
val fill : elt -> ?start:int -> ?end_:int -> t -> t
val reverseInPlace : t -> t
val sortInPlace : t -> t
val sortInPlaceWith : f:(elt -> elt -> int) -> t -> t
val includes : value:elt -> t -> bool
val indexOf : value:elt -> ?start:int -> t -> int
val join : ?sep:string -> t -> string
val lastIndexOf : value:elt -> t -> int
val lastIndexOfFrom : value:elt -> from:int -> t -> int
val slice : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val copy : t -> t
val subarray : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val toString : t -> string
val toLocaleString : t -> string
val entries : t -> (int * elt) Js.iterator
val every : f:(elt -> bool) -> t -> bool
val everyi : f:(elt -> int -> bool) -> t -> bool
val filter : f:(elt -> bool) -> t -> t
val filteri : f:(elt -> int -> bool) -> t -> t
val find : f:(elt -> bool) -> t -> elt Js.undefined
val findi : f:(elt -> int -> bool) -> t -> elt Js.undefined
val findIndex : f:(elt -> bool) -> t -> int
val findIndexi : f:(elt -> int -> bool) -> t -> int
val forEach : f:(elt -> unit) -> t -> unit
val forEachi : f:(elt -> int -> unit) -> t -> unit
val keys : t -> int Js.iterator
val map : f:(elt -> 'b) -> t -> 'b typed_array
val mapi : f:(elt -> int -> 'b) -> t -> 'b typed_array
val reduce : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reducei : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val reduceRight : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reduceRighti : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val some : f:(elt -> bool) -> t -> bool
val somei : f:(elt -> int -> bool) -> t -> bool
val _BYTES_PER_ELEMENT : int
val make : elt array -> t
val fromBuffer : array_buffer -> ?off:int -> ?len:int -> unit -> t
  • parameter offset

    is in bytes, length in elements

val fromLength : int -> t
val from : elt Js.array_like -> t
val values : t -> elt Js.iterator
diff --git a/findlib-1/melange/js/Js/Typed_array/Uint16Array/index.html b/findlib-1/melange/js/Js/Typed_array/Uint16Array/index.html new file mode 100644 index 000000000..8e748c0fe --- /dev/null +++ b/findlib-1/melange/js/Js/Typed_array/Uint16Array/index.html @@ -0,0 +1,2 @@ + +Uint16Array (docs.findlib-1.melange.js.Js.Typed_array.Uint16Array)

Module Typed_array.Uint16Array

type elt = int
type 'a typed_array
type t = elt typed_array
val unsafe_get : t -> int -> elt
val unsafe_set : t -> int -> elt -> unit
val buffer : t -> array_buffer
val byteLength : t -> int
val byteOffset : t -> int
val setArray : elt array -> t -> unit
val setArrayOffset : elt array -> int -> t -> unit
val length : t -> int
val copyWithin : to_:int -> ?start:int -> ?end_:int -> t -> t
val fill : elt -> ?start:int -> ?end_:int -> t -> t
val reverseInPlace : t -> t
val sortInPlace : t -> t
val sortInPlaceWith : f:(elt -> elt -> int) -> t -> t
val includes : value:elt -> t -> bool
val indexOf : value:elt -> ?start:int -> t -> int
val join : ?sep:string -> t -> string
val lastIndexOf : value:elt -> t -> int
val lastIndexOfFrom : value:elt -> from:int -> t -> int
val slice : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val copy : t -> t
val subarray : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val toString : t -> string
val toLocaleString : t -> string
val entries : t -> (int * elt) Js.iterator
val every : f:(elt -> bool) -> t -> bool
val everyi : f:(elt -> int -> bool) -> t -> bool
val filter : f:(elt -> bool) -> t -> t
val filteri : f:(elt -> int -> bool) -> t -> t
val find : f:(elt -> bool) -> t -> elt Js.undefined
val findi : f:(elt -> int -> bool) -> t -> elt Js.undefined
val findIndex : f:(elt -> bool) -> t -> int
val findIndexi : f:(elt -> int -> bool) -> t -> int
val forEach : f:(elt -> unit) -> t -> unit
val forEachi : f:(elt -> int -> unit) -> t -> unit
val keys : t -> int Js.iterator
val map : f:(elt -> 'b) -> t -> 'b typed_array
val mapi : f:(elt -> int -> 'b) -> t -> 'b typed_array
val reduce : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reducei : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val reduceRight : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reduceRighti : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val some : f:(elt -> bool) -> t -> bool
val somei : f:(elt -> int -> bool) -> t -> bool
val _BYTES_PER_ELEMENT : int
val make : elt array -> t
val fromBuffer : array_buffer -> ?off:int -> ?len:int -> unit -> t
  • parameter offset

    is in bytes, length in elements

val fromLength : int -> t
val from : elt Js.array_like -> t
val values : t -> elt Js.iterator
diff --git a/findlib-1/melange/js/Js/Typed_array/Uint32Array/index.html b/findlib-1/melange/js/Js/Typed_array/Uint32Array/index.html new file mode 100644 index 000000000..1bdb0d4e8 --- /dev/null +++ b/findlib-1/melange/js/Js/Typed_array/Uint32Array/index.html @@ -0,0 +1,2 @@ + +Uint32Array (docs.findlib-1.melange.js.Js.Typed_array.Uint32Array)

Module Typed_array.Uint32Array

type elt = int
type 'a typed_array
type t = elt typed_array
val unsafe_get : t -> int -> elt
val unsafe_set : t -> int -> elt -> unit
val buffer : t -> array_buffer
val byteLength : t -> int
val byteOffset : t -> int
val setArray : elt array -> t -> unit
val setArrayOffset : elt array -> int -> t -> unit
val length : t -> int
val copyWithin : to_:int -> ?start:int -> ?end_:int -> t -> t
val fill : elt -> ?start:int -> ?end_:int -> t -> t
val reverseInPlace : t -> t
val sortInPlace : t -> t
val sortInPlaceWith : f:(elt -> elt -> int) -> t -> t
val includes : value:elt -> t -> bool
val indexOf : value:elt -> ?start:int -> t -> int
val join : ?sep:string -> t -> string
val lastIndexOf : value:elt -> t -> int
val lastIndexOfFrom : value:elt -> from:int -> t -> int
val slice : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val copy : t -> t
val subarray : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val toString : t -> string
val toLocaleString : t -> string
val entries : t -> (int * elt) Js.iterator
val every : f:(elt -> bool) -> t -> bool
val everyi : f:(elt -> int -> bool) -> t -> bool
val filter : f:(elt -> bool) -> t -> t
val filteri : f:(elt -> int -> bool) -> t -> t
val find : f:(elt -> bool) -> t -> elt Js.undefined
val findi : f:(elt -> int -> bool) -> t -> elt Js.undefined
val findIndex : f:(elt -> bool) -> t -> int
val findIndexi : f:(elt -> int -> bool) -> t -> int
val forEach : f:(elt -> unit) -> t -> unit
val forEachi : f:(elt -> int -> unit) -> t -> unit
val keys : t -> int Js.iterator
val map : f:(elt -> 'b) -> t -> 'b typed_array
val mapi : f:(elt -> int -> 'b) -> t -> 'b typed_array
val reduce : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reducei : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val reduceRight : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reduceRighti : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val some : f:(elt -> bool) -> t -> bool
val somei : f:(elt -> int -> bool) -> t -> bool
val _BYTES_PER_ELEMENT : int
val make : elt array -> t
val fromBuffer : array_buffer -> ?off:int -> ?len:int -> unit -> t
  • parameter offset

    is in bytes, length in elements

val fromLength : int -> t
val from : elt Js.array_like -> t
val values : t -> elt Js.iterator
diff --git a/findlib-1/melange/js/Js/Typed_array/Uint8Array/index.html b/findlib-1/melange/js/Js/Typed_array/Uint8Array/index.html new file mode 100644 index 000000000..ded1f62d1 --- /dev/null +++ b/findlib-1/melange/js/Js/Typed_array/Uint8Array/index.html @@ -0,0 +1,2 @@ + +Uint8Array (docs.findlib-1.melange.js.Js.Typed_array.Uint8Array)

Module Typed_array.Uint8Array

type elt = int
type 'a typed_array
type t = elt typed_array
val unsafe_get : t -> int -> elt
val unsafe_set : t -> int -> elt -> unit
val buffer : t -> array_buffer
val byteLength : t -> int
val byteOffset : t -> int
val setArray : elt array -> t -> unit
val setArrayOffset : elt array -> int -> t -> unit
val length : t -> int
val copyWithin : to_:int -> ?start:int -> ?end_:int -> t -> t
val fill : elt -> ?start:int -> ?end_:int -> t -> t
val reverseInPlace : t -> t
val sortInPlace : t -> t
val sortInPlaceWith : f:(elt -> elt -> int) -> t -> t
val includes : value:elt -> t -> bool
val indexOf : value:elt -> ?start:int -> t -> int
val join : ?sep:string -> t -> string
val lastIndexOf : value:elt -> t -> int
val lastIndexOfFrom : value:elt -> from:int -> t -> int
val slice : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val copy : t -> t
val subarray : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val toString : t -> string
val toLocaleString : t -> string
val entries : t -> (int * elt) Js.iterator
val every : f:(elt -> bool) -> t -> bool
val everyi : f:(elt -> int -> bool) -> t -> bool
val filter : f:(elt -> bool) -> t -> t
val filteri : f:(elt -> int -> bool) -> t -> t
val find : f:(elt -> bool) -> t -> elt Js.undefined
val findi : f:(elt -> int -> bool) -> t -> elt Js.undefined
val findIndex : f:(elt -> bool) -> t -> int
val findIndexi : f:(elt -> int -> bool) -> t -> int
val forEach : f:(elt -> unit) -> t -> unit
val forEachi : f:(elt -> int -> unit) -> t -> unit
val keys : t -> int Js.iterator
val map : f:(elt -> 'b) -> t -> 'b typed_array
val mapi : f:(elt -> int -> 'b) -> t -> 'b typed_array
val reduce : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reducei : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val reduceRight : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reduceRighti : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val some : f:(elt -> bool) -> t -> bool
val somei : f:(elt -> int -> bool) -> t -> bool
val _BYTES_PER_ELEMENT : int
val make : elt array -> t
val fromBuffer : array_buffer -> ?off:int -> ?len:int -> unit -> t
  • parameter offset

    is in bytes, length in elements

val fromLength : int -> t
val from : elt Js.array_like -> t
val values : t -> elt Js.iterator
diff --git a/findlib-1/melange/js/Js/Typed_array/Uint8ClampedArray/index.html b/findlib-1/melange/js/Js/Typed_array/Uint8ClampedArray/index.html new file mode 100644 index 000000000..3a780d339 --- /dev/null +++ b/findlib-1/melange/js/Js/Typed_array/Uint8ClampedArray/index.html @@ -0,0 +1,2 @@ + +Uint8ClampedArray (docs.findlib-1.melange.js.Js.Typed_array.Uint8ClampedArray)

Module Typed_array.Uint8ClampedArray

type elt = int
type 'a typed_array
type t = elt typed_array
val unsafe_get : t -> int -> elt
val unsafe_set : t -> int -> elt -> unit
val buffer : t -> array_buffer
val byteLength : t -> int
val byteOffset : t -> int
val setArray : elt array -> t -> unit
val setArrayOffset : elt array -> int -> t -> unit
val length : t -> int
val copyWithin : to_:int -> ?start:int -> ?end_:int -> t -> t
val fill : elt -> ?start:int -> ?end_:int -> t -> t
val reverseInPlace : t -> t
val sortInPlace : t -> t
val sortInPlaceWith : f:(elt -> elt -> int) -> t -> t
val includes : value:elt -> t -> bool
val indexOf : value:elt -> ?start:int -> t -> int
val join : ?sep:string -> t -> string
val lastIndexOf : value:elt -> t -> int
val lastIndexOfFrom : value:elt -> from:int -> t -> int
val slice : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val copy : t -> t
val subarray : ?start:int -> ?end_:int -> t -> t

start is inclusive, end_ exclusive

val toString : t -> string
val toLocaleString : t -> string
val entries : t -> (int * elt) Js.iterator
val every : f:(elt -> bool) -> t -> bool
val everyi : f:(elt -> int -> bool) -> t -> bool
val filter : f:(elt -> bool) -> t -> t
val filteri : f:(elt -> int -> bool) -> t -> t
val find : f:(elt -> bool) -> t -> elt Js.undefined
val findi : f:(elt -> int -> bool) -> t -> elt Js.undefined
val findIndex : f:(elt -> bool) -> t -> int
val findIndexi : f:(elt -> int -> bool) -> t -> int
val forEach : f:(elt -> unit) -> t -> unit
val forEachi : f:(elt -> int -> unit) -> t -> unit
val keys : t -> int Js.iterator
val map : f:(elt -> 'b) -> t -> 'b typed_array
val mapi : f:(elt -> int -> 'b) -> t -> 'b typed_array
val reduce : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reducei : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val reduceRight : f:('b -> elt -> 'b) -> init:'b -> t -> 'b
val reduceRighti : f:('b -> elt -> int -> 'b) -> init:'b -> t -> 'b
val some : f:(elt -> bool) -> t -> bool
val somei : f:(elt -> int -> bool) -> t -> bool
val _BYTES_PER_ELEMENT : int
val make : elt array -> t
val fromBuffer : array_buffer -> ?off:int -> ?len:int -> unit -> t
  • parameter offset

    is in bytes, length in elements

val fromLength : int -> t
val from : elt Js.array_like -> t
val values : t -> elt Js.iterator
diff --git a/findlib-1/melange/js/Js/Typed_array/index.html b/findlib-1/melange/js/Js/Typed_array/index.html new file mode 100644 index 000000000..8f8a78d9f --- /dev/null +++ b/findlib-1/melange/js/Js/Typed_array/index.html @@ -0,0 +1,2 @@ + +Typed_array (docs.findlib-1.melange.js.Js.Typed_array)

Module Js.Typed_array

Bindings to the functions in TypedArray.prototype

JavaScript Typed Array API

type array_buffer
module ArrayBuffer : sig ... end

The underlying buffer that the typed arrays provide views of

module Int8Array : sig ... end
module Uint8Array : sig ... end
module Uint8ClampedArray : sig ... end
module Int16Array : sig ... end
module Uint16Array : sig ... end
module Int32Array : sig ... end
module Uint32Array : sig ... end
module Float32Array : sig ... end
module Float64Array : sig ... end
module DataView : sig ... end

The DataView view provides a low-level interface for reading and writing multiple number types in an ArrayBuffer irrespective of the platform's endianness.

diff --git a/findlib-1/melange/js/Js/Types/index.html b/findlib-1/melange/js/Js/Types/index.html new file mode 100644 index 000000000..d93d8fc92 --- /dev/null +++ b/findlib-1/melange/js/Js/Types/index.html @@ -0,0 +1,2 @@ + +Types (docs.findlib-1.melange.js.Js.Types)

Module Js.Types

Utility functions for runtime reflection on JS types

type symbol

Js symbol type only available in ES6

type bigint_val

Js bigint type only available in ES2020

type obj_val
type undefined_val

This type has only one value undefined

type null_val

This type has only one value null

type function_val
type _ t =
  1. | Undefined : undefined_val t
  2. | Null : null_val t
  3. | Boolean : bool t
  4. | Number : float t
  5. | String : string t
  6. | Function : function_val t
  7. | Object : obj_val t
  8. | Symbol : symbol t
  9. | BigInt : bigint_val t
val test : 'a -> 'b t -> bool
test "x" String = true
type tagged_t =
  1. | JSFalse
  2. | JSTrue
  3. | JSNull
  4. | JSUndefined
  5. | JSNumber of float
  6. | JSString of string
  7. | JSFunction of function_val
  8. | JSObject of obj_val
  9. | JSSymbol of symbol
  10. | JSBigInt of bigint_val
val classify : 'a -> tagged_t
diff --git a/findlib-1/melange/js/Js/Undefined/index.html b/findlib-1/melange/js/Js/Undefined/index.html new file mode 100644 index 000000000..9dfd53302 --- /dev/null +++ b/findlib-1/melange/js/Js/Undefined/index.html @@ -0,0 +1,14 @@ + +Undefined (docs.findlib-1.melange.js.Js.Undefined)

Module Js.Undefined

Utility functions on undefined

Provides functionality for dealing with the 'a Js.undefined type

type +'a t = 'a Js.undefined

Local alias for 'a Js.undefined

val return : 'a -> 'a t

Constructs a value of 'a Js.undefined containing a value of 'a

val testAny : 'a -> bool

Returns true if the given value is empty (undefined)

val empty : 'a t

The empty value, undefined

val getUnsafe : 'a t -> 'a
val getExn : 'a t -> 'a
val map : f:('a -> 'b) Js.Fn.arity1 -> 'a t -> 'b t
val bind : f:('a -> 'b t) Js.Fn.arity1 -> 'a t -> 'b t

Bind the contained value using the given function

If 'a Js.undefined contains a value, that value is unwrapped, mapped to a 'b using the given function a' -> 'b, then wrapped back up and returned as 'b Js.undefined

let maybeGreetWorld (maybeGreeting: string Js.undefined) =
+  Js.Undefined.bind maybeGreeting ~f:(fun greeting -> greeting ^ " world!")
val iter : f:('a -> unit) Js.Fn.arity1 -> 'a t -> unit

Iterates over the contained value with the given function

If 'a Js.undefined contains a value, that value is unwrapped and applied to the given function.

let maybeSay (maybeMessage: string Js.undefined) =
+  Js.Undefined.iter maybeMessage ~f:(fun message -> Js.log message)
val fromOption : 'a option -> 'a t

Maps 'a option to 'a Js.undefined

+ +
Some a -> return a +
None -> empty +
+
val toOption : 'a t -> 'a option

Maps 'a Js.undefined to 'a option

+ +
return a -> Some a +
empty -> None +
+
diff --git a/findlib-1/melange/js/Js/WeakMap/index.html b/findlib-1/melange/js/Js/WeakMap/index.html new file mode 100644 index 000000000..d14678f18 --- /dev/null +++ b/findlib-1/melange/js/Js/WeakMap/index.html @@ -0,0 +1,2 @@ + +WeakMap (docs.findlib-1.melange.js.Js.WeakMap)

Module Js.WeakMap

Bindings to functions in WeakMap

ES6 WeakMap API

type ('k, 'v) t
val make : unit -> ('k, 'v) t
val get : key:'k Js.dict -> ('k, 'v) t -> 'v option
val has : key:'k Js.dict -> ('k, 'v) t -> bool
val set : key:'k Js.dict -> value:'v -> ('k, 'v) t -> ('k, 'v) t
val delete : key:'k Js.dict -> ('k, 'v) t -> bool
diff --git a/findlib-1/melange/js/Js/WeakSet/index.html b/findlib-1/melange/js/Js/WeakSet/index.html new file mode 100644 index 000000000..3c8886cb8 --- /dev/null +++ b/findlib-1/melange/js/Js/WeakSet/index.html @@ -0,0 +1,2 @@ + +WeakSet (docs.findlib-1.melange.js.Js.WeakSet)

Module Js.WeakSet

Bindings to functions in WeakSet

ES6 WeakSet API

type 'a t
val make : unit -> 'a t
val add : value:'a Js.dict -> 'a t -> 'a t
val delete : value:'a Js.dict -> 'a t -> bool
val has : value:'a Js.dict -> 'a t -> bool
diff --git a/findlib-1/melange/js/Js/index.html b/findlib-1/melange/js/Js/index.html new file mode 100644 index 000000000..0725f96aa --- /dev/null +++ b/findlib-1/melange/js/Js/index.html @@ -0,0 +1,2 @@ + +Js (docs.findlib-1.melange.js.Js)

Module Js

type +'a null

A value of this type can be either null or 'a. This type is the same as type t in Null

type +'a undefined

A value of this type can be either undefined or 'a. This type is the same as type t in Undefined

type +'a nullable

A value of this type can be undefined, null or 'a. This type is the same as type t n Nullable

type re

The type for JavaScript RegExp

type 'a dict

The type for a simple key-value dictionary abstraction over native JavaScript objects

type 'a iterator

The type for JavaScript iterators

type 'a array_like

The type for array-like objects in JavaScript

type bigint

The type for JavaScript BigInt

val toOption : 'a nullable -> 'a option
val undefinedToOption : 'a undefined -> 'a option
val nullToOption : 'a null -> 'a option
val isNullable : 'a nullable -> bool
val testAny : 'a -> bool

The same as isNullable except that it is more permissive on the types of input

val null : 'a null

The same as empty in Js.Null will be compiled as null

val undefined : 'a undefined

The same as empty Js.Undefined will be compiled as undefined

val typeof : 'a -> string

typeof x will be compiled as typeof x in JS Please consider functions in Types for a type safe way of reflection

val log : 'a -> unit

A convenience function to log everything

val log2 : 'a -> 'b -> unit
val log3 : 'a -> 'b -> 'c -> unit
val log4 : 'a -> 'b -> 'c -> 'd -> unit
val logMany : 'a array -> unit

A convenience function to log more than 4 arguments

val eqNull : 'a -> 'a null -> bool
val eqUndefined : 'a -> 'a undefined -> bool
val eqNullable : 'a -> 'a nullable -> bool
Operators
val unsafe_lt : 'a -> 'a -> bool

unsafe_lt a b will be compiled as a < b. It is marked as unsafe, since it is impossible to give a proper semantics for comparision which applies to any type

val unsafe_le : 'a -> 'a -> bool

unsafe_le a b will be compiled as a <= b. See also unsafe_lt

val unsafe_gt : 'a -> 'a -> bool

unsafe_gt a b will be compiled as a > b. See also unsafe_lt

val unsafe_ge : 'a -> 'a -> bool

unsafe_ge a b will be compiled as a >= b. See also unsafe_lt

Types for JS objects

type 'a t

This used to be mark a Js object type.

module Exn : sig ... end

Utilities for dealing with Js exceptions

module String : sig ... end

Bindings to the functions in String.prototype

module Null : sig ... end

Utility functions on null

module Undefined : sig ... end

Utility functions on undefined

module Nullable : sig ... end

Utility functions on nullable

module Array : sig ... end

Bindings to the functions in Array.prototype

module Re : sig ... end

Bindings to the functions in RegExp.prototype

module Promise : sig ... end

Bindings to JS Promise functions

module Date : sig ... end

Bindings to the functions in JS's Date.prototype

module Dict : sig ... end

Utility functions to treat a JS object as a dictionary

module Global : sig ... end

Bindings to functions in the JS global namespace

module Json : sig ... end

Utility functions to manipulate JSON values

module Math : sig ... end

Bindings to the functions in the Math object

module Obj : sig ... end

Utility functions on `Js.t` JS objects

module Typed_array : sig ... end

Bindings to the functions in TypedArray.prototype

module Types : sig ... end

Utility functions for runtime reflection on JS types

module Float : sig ... end

Bindings to functions in JavaScript's Number that deal with floats

module Int : sig ... end

Bindings to functions in JavaScript's Number that deal with ints

module Bigint : sig ... end

Bindings to functions in JavaScript's BigInt

module Console : sig ... end
module Set : sig ... end

Bindings to functions in Set

module WeakSet : sig ... end

Bindings to functions in WeakSet

module Map : sig ... end

Bindings to functions in Map

module WeakMap : sig ... end

Bindings to functions in WeakMap

module Iterator : sig ... end

Bindings to functions on Iterator

diff --git a/findlib-1/melange/js/index.html b/findlib-1/melange/js/index.html new file mode 100644 index 000000000..8760e16e7 --- /dev/null +++ b/findlib-1/melange/js/index.html @@ -0,0 +1,2 @@ + +js (docs.findlib-1.melange.js)

Package melange.js

Library melange.js

The entry point of this library is the module: Js.

diff --git a/findlib-1/ocaml-compiler-libs/common/Ocaml_common/index.html b/findlib-1/ocaml-compiler-libs/common/Ocaml_common/index.html new file mode 100644 index 000000000..010ffdc31 --- /dev/null +++ b/findlib-1/ocaml-compiler-libs/common/Ocaml_common/index.html @@ -0,0 +1,2 @@ + +Ocaml_common (docs.findlib-1.ocaml-compiler-libs.common.Ocaml_common)

Module Ocaml_common

module Arg_helper = Arg_helper
module Ast_helper = Ast_helper
module Ast_invariants = Ast_invariants
module Ast_iterator = Ast_iterator
module Ast_mapper = Ast_mapper
module Attr_helper = Attr_helper
module Binutils = Binutils
module Btype = Btype
module Build_path_prefix_map = Build_path_prefix_map
module Builtin_attributes = Builtin_attributes
module Bytesections = Bytesections
module CamlinternalMenhirLib = CamlinternalMenhirLib
module Ccomp = Ccomp
module Clflags = Clflags
module Cmi_format = Cmi_format
module Cmt2annot = Cmt2annot
module Cmt_format = Cmt_format
module Compenv = Compenv
module Compile_common = Compile_common
module Compmisc = Compmisc
module Compression = Compression
module Config = Config
module Consistbl = Consistbl
module Ctype = Ctype
module Datarepr = Datarepr
module Debuginfo = Debuginfo
module Depend = Depend
module Diffing = Diffing
module Diffing_with_keys = Diffing_with_keys
module Dll = Dll
module Docstrings = Docstrings
module Domainstate = Domainstate
module Env = Env
module Envaux = Envaux
module Errortrace = Errortrace
module Ident = Ident
module Identifiable = Identifiable
module Includeclass = Includeclass
module Includecore = Includecore
module Includemod = Includemod
module Includemod_errorprinter = Includemod_errorprinter
module Int_replace_polymorphic_compare = Int_replace_polymorphic_compare
module Lambda = Lambda
module Lazy_backtrack = Lazy_backtrack
module Lexer = Lexer
module Load_path = Load_path
module Local_store = Local_store
module Location = Location
module Longident = Longident
module Main_args = Main_args
module Makedepend = Makedepend
module Matching = Matching
module Meta = Meta
module Misc = Misc
module Mtype = Mtype
module Numbers = Numbers
module Opcodes = Opcodes
module Oprint = Oprint
module Parmatch = Parmatch
module Parse = Parse
module Parser = Parser
module Path = Path
module Patterns = Patterns
module Persistent_env = Persistent_env
module Pparse = Pparse
module Pprintast = Pprintast
module Predef = Predef
module Primitive = Primitive
module Printast = Printast
module Printlambda = Printlambda
module Printpat = Printpat
module Printtyp = Printtyp
module Printtyped = Printtyped
module Profile = Profile
module Rec_check = Rec_check
module Runtimedef = Runtimedef
module Shape = Shape
module Signature_group = Signature_group
module Simplif = Simplif
module Strongly_connected_components = Strongly_connected_components
module Stypes = Stypes
module Subst = Subst
module Switch = Switch
module Symtable = Symtable
module Syntaxerr = Syntaxerr
module Targetint = Targetint
module Tast_iterator = Tast_iterator
module Tast_mapper = Tast_mapper
module Terminfo = Terminfo
module Tmc = Tmc
module Translattribute = Translattribute
module Translclass = Translclass
module Translcore = Translcore
module Translmod = Translmod
module Translobj = Translobj
module Translprim = Translprim
module Type_immediacy = Type_immediacy
module Typeclass = Typeclass
module Typecore = Typecore
module Typedecl = Typedecl
module Typedecl_immediacy = Typedecl_immediacy
module Typedecl_properties = Typedecl_properties
module Typedecl_separability = Typedecl_separability
module Typedecl_unboxed = Typedecl_unboxed
module Typedecl_variance = Typedecl_variance
module Typedtree = Typedtree
module Typemod = Typemod
module Typeopt = Typeopt
module Types = Types
module Typetexp = Typetexp
module Untypeast = Untypeast
module Warnings = Warnings
diff --git a/findlib-1/ocaml-compiler-libs/common/index.html b/findlib-1/ocaml-compiler-libs/common/index.html new file mode 100644 index 000000000..166af5aa9 --- /dev/null +++ b/findlib-1/ocaml-compiler-libs/common/index.html @@ -0,0 +1,2 @@ + +common (docs.findlib-1.ocaml-compiler-libs.common)

Package ocaml-compiler-libs.common

Library ocaml-compiler-libs.common

The entry point of this library is the module: Ocaml_common.

Library ocaml-compiler-libs.shadow

The entry point of this library is the module: Ocaml_shadow.

diff --git a/findlib-1/ocaml-compiler-libs/index.html b/findlib-1/ocaml-compiler-libs/index.html new file mode 100644 index 000000000..f3b9f64c8 --- /dev/null +++ b/findlib-1/ocaml-compiler-libs/index.html @@ -0,0 +1,2 @@ + +ocaml-compiler-libs (docs.findlib-1.ocaml-compiler-libs)

Package ocaml-compiler-libs

Sub-indexes

diff --git a/findlib-1/ocaml-compiler-libs/shadow/Ocaml_shadow/Do_not_use_directly/index.html b/findlib-1/ocaml-compiler-libs/shadow/Ocaml_shadow/Do_not_use_directly/index.html new file mode 100644 index 000000000..0456c0da7 --- /dev/null +++ b/findlib-1/ocaml-compiler-libs/shadow/Ocaml_shadow/Do_not_use_directly/index.html @@ -0,0 +1,2 @@ + +Do_not_use_directly (docs.findlib-1.ocaml-compiler-libs.shadow.Ocaml_shadow.Do_not_use_directly)

Module Ocaml_shadow.Do_not_use_directly

diff --git a/findlib-1/ocaml-compiler-libs/shadow/Ocaml_shadow/index.html b/findlib-1/ocaml-compiler-libs/shadow/Ocaml_shadow/index.html new file mode 100644 index 000000000..27836438c --- /dev/null +++ b/findlib-1/ocaml-compiler-libs/shadow/Ocaml_shadow/index.html @@ -0,0 +1,2 @@ + +Ocaml_shadow (docs.findlib-1.ocaml-compiler-libs.shadow.Ocaml_shadow)

Module Ocaml_shadow

module Do_not_use_directly : sig ... end
module Afl_instrument = Do_not_use_directly
module Alias_analysis = Do_not_use_directly
module Allocated_const = Do_not_use_directly
module Annot = Do_not_use_directly
module Arch = Do_not_use_directly
module Arg_helper = Do_not_use_directly
module Asmgen = Do_not_use_directly
module Asmlibrarian = Do_not_use_directly
module Asmpackager = Do_not_use_directly
module Ast_helper = Do_not_use_directly
module Ast_invariants = Do_not_use_directly
module Ast_iterator = Do_not_use_directly
module Ast_mapper = Do_not_use_directly
module Asttypes = Do_not_use_directly
module Attr_helper = Do_not_use_directly
module Augment_specialised_args = Do_not_use_directly
module Backend_intf = Do_not_use_directly
module Backend_var = Do_not_use_directly
module Binutils = Do_not_use_directly
module Branch_relaxation = Do_not_use_directly
module Branch_relaxation_intf = Do_not_use_directly
module Btype = Do_not_use_directly
module Build_export_info = Do_not_use_directly
module Build_path_prefix_map = Do_not_use_directly
module Builtin_attributes = Do_not_use_directly
module Bytegen = Do_not_use_directly
module Bytelibrarian = Do_not_use_directly
module Bytepackager = Do_not_use_directly
module Bytesections = Do_not_use_directly
module CSE = Do_not_use_directly
module CSEgen = Do_not_use_directly
module CamlinternalMenhirLib = Do_not_use_directly
module Ccomp = Do_not_use_directly
module Clambda = Do_not_use_directly
module Clambda_primitives = Do_not_use_directly
module Clflags = Do_not_use_directly
module Closure = Do_not_use_directly
module Closure_conversion = Do_not_use_directly
module Closure_conversion_aux = Do_not_use_directly
module Closure_element = Do_not_use_directly
module Closure_id = Do_not_use_directly
module Closure_middle_end = Do_not_use_directly
module Closure_offsets = Do_not_use_directly
module Closure_origin = Do_not_use_directly
module Cmi_format = Do_not_use_directly
module Cmm = Do_not_use_directly
module Cmm_helpers = Do_not_use_directly
module Cmm_invariants = Do_not_use_directly
module Cmmgen = Do_not_use_directly
module Cmmgen_state = Do_not_use_directly
module Cmo_format = Do_not_use_directly
module Cmt2annot = Do_not_use_directly
module Cmt_format = Do_not_use_directly
module Cmx_format = Do_not_use_directly
module Cmxs_format = Do_not_use_directly
module Coloring = Do_not_use_directly
module Comballoc = Do_not_use_directly
module Compenv = Do_not_use_directly
module Compilation_unit = Do_not_use_directly
module Compile = Do_not_use_directly
module Compile_common = Do_not_use_directly
module Compilenv = Do_not_use_directly
module Compmisc = Do_not_use_directly
module Compression = Do_not_use_directly
module Config = Do_not_use_directly
module Config_boot = Do_not_use_directly
module Config_main = Do_not_use_directly
module Consistbl = Do_not_use_directly
module Convert_primitives = Do_not_use_directly
module Ctype = Do_not_use_directly
module Dataflow = Do_not_use_directly
module Datarepr = Do_not_use_directly
module Deadcode = Do_not_use_directly
module Debuginfo = Do_not_use_directly
module Depend = Do_not_use_directly
module Diffing = Do_not_use_directly
module Diffing_with_keys = Do_not_use_directly
module Dll = Do_not_use_directly
module Docstrings = Do_not_use_directly
module Domainstate = Do_not_use_directly
module Effect_analysis = Do_not_use_directly
module Emit = Do_not_use_directly
module Emitaux = Do_not_use_directly
module Emitcode = Do_not_use_directly
module Emitenv = Do_not_use_directly
module Env = Do_not_use_directly
module Envaux = Do_not_use_directly
module Errors = Do_not_use_directly
module Errortrace = Do_not_use_directly
module Export_id = Do_not_use_directly
module Export_info = Do_not_use_directly
module Export_info_for_pack = Do_not_use_directly
module Expunge = Do_not_use_directly
module Extract_projections = Do_not_use_directly
module Find_recursive_functions = Do_not_use_directly
module Flambda = Do_not_use_directly
module Flambda_invariants = Do_not_use_directly
module Flambda_iterators = Do_not_use_directly
module Flambda_middle_end = Do_not_use_directly
module Flambda_to_clambda = Do_not_use_directly
module Flambda_utils = Do_not_use_directly
module Freshening = Do_not_use_directly
module Genprintval = Do_not_use_directly
module Id_types = Do_not_use_directly
module Ident = Do_not_use_directly
module Identifiable = Do_not_use_directly
module Import_approx = Do_not_use_directly
module Includeclass = Do_not_use_directly
module Includecore = Do_not_use_directly
module Includemod = Do_not_use_directly
module Includemod_errorprinter = Do_not_use_directly
module Inconstant_idents = Do_not_use_directly
module Initialize_symbol_to_let_symbol = Do_not_use_directly
module Inline_and_simplify = Do_not_use_directly
module Inline_and_simplify_aux = Do_not_use_directly
module Inlining_cost = Do_not_use_directly
module Inlining_decision = Do_not_use_directly
module Inlining_decision_intf = Do_not_use_directly
module Inlining_stats = Do_not_use_directly
module Inlining_stats_types = Do_not_use_directly
module Inlining_transforms = Do_not_use_directly
module Instruct = Do_not_use_directly
module Int_replace_polymorphic_compare = Do_not_use_directly
module Interf = Do_not_use_directly
module Internal_variable_names = Do_not_use_directly
module Interval = Do_not_use_directly
module Invariant_params = Do_not_use_directly
module Lambda = Do_not_use_directly
module Lazy_backtrack = Do_not_use_directly
module Lexer = Do_not_use_directly
module Lift_code = Do_not_use_directly
module Lift_constants = Do_not_use_directly
module Lift_let_to_initialize_symbol = Do_not_use_directly
module Linear = Do_not_use_directly
module Linear_format = Do_not_use_directly
module Linearize = Do_not_use_directly
module Linkage_name = Do_not_use_directly
module Linscan = Do_not_use_directly
module Liveness = Do_not_use_directly
module Load_path = Do_not_use_directly
module Local_store = Do_not_use_directly
module Location = Do_not_use_directly
module Longident = Do_not_use_directly
module Mach = Do_not_use_directly
module Main = Do_not_use_directly
module Main_args = Do_not_use_directly
module Maindriver = Do_not_use_directly
module Makedepend = Do_not_use_directly
module Matching = Do_not_use_directly
module Meta = Do_not_use_directly
module Misc = Do_not_use_directly
module Mtype = Do_not_use_directly
module Mutable_variable = Do_not_use_directly
module Numbers = Do_not_use_directly
module Opcodes = Do_not_use_directly
module Oprint = Do_not_use_directly
module Optcompile = Do_not_use_directly
module Opterrors = Do_not_use_directly
module Optmain = Do_not_use_directly
module Optmaindriver = Do_not_use_directly
module Outcometree = Do_not_use_directly
module Parameter = Do_not_use_directly
module Parmatch = Do_not_use_directly
module Parse = Do_not_use_directly
module Parser = Do_not_use_directly
module Parsetree = Do_not_use_directly
module Pass_wrapper = Do_not_use_directly
module Path = Do_not_use_directly
module Patterns = Do_not_use_directly
module Persistent_env = Do_not_use_directly
module Polling = Do_not_use_directly
module Pparse = Do_not_use_directly
module Pprintast = Do_not_use_directly
module Predef = Do_not_use_directly
module Primitive = Do_not_use_directly
module Printast = Do_not_use_directly
module Printclambda = Do_not_use_directly
module Printclambda_primitives = Do_not_use_directly
module Printcmm = Do_not_use_directly
module Printinstr = Do_not_use_directly
module Printlambda = Do_not_use_directly
module Printlinear = Do_not_use_directly
module Printmach = Do_not_use_directly
module Printpat = Do_not_use_directly
module Printtyp = Do_not_use_directly
module Printtyped = Do_not_use_directly
module Proc = Do_not_use_directly
module Profile = Do_not_use_directly
module Projection = Do_not_use_directly
module Rec_check = Do_not_use_directly
module Ref_to_variables = Do_not_use_directly
module Reg = Do_not_use_directly
module Reload = Do_not_use_directly
module Reloadgen = Do_not_use_directly
module Remove_free_vars_equal_to_args = Do_not_use_directly
module Remove_unused_arguments = Do_not_use_directly
module Remove_unused_closure_vars = Do_not_use_directly
module Remove_unused_program_constructs = Do_not_use_directly
module Runtimedef = Do_not_use_directly
module Schedgen = Do_not_use_directly
module Scheduling = Do_not_use_directly
module Selectgen = Do_not_use_directly
module Selection = Do_not_use_directly
module Semantics_of_primitives = Do_not_use_directly
module Set_of_closures_id = Do_not_use_directly
module Set_of_closures_origin = Do_not_use_directly
module Shape = Do_not_use_directly
module Share_constants = Do_not_use_directly
module Signature_group = Do_not_use_directly
module Simple_value_approx = Do_not_use_directly
module Simplif = Do_not_use_directly
module Simplify_boxed_integer_ops = Do_not_use_directly
module Simplify_boxed_integer_ops_intf = Do_not_use_directly
module Simplify_common = Do_not_use_directly
module Simplify_primitives = Do_not_use_directly
module Spill = Do_not_use_directly
module Split = Do_not_use_directly
module Static_exception = Do_not_use_directly
module Strmatch = Do_not_use_directly
module Strongly_connected_components = Do_not_use_directly
module Stypes = Do_not_use_directly
module Subst = Do_not_use_directly
module Switch = Do_not_use_directly
module Symbol = Do_not_use_directly
module Symtable = Do_not_use_directly
module Syntaxerr = Do_not_use_directly
module Tag = Do_not_use_directly
module Targetint = Do_not_use_directly
module Tast_iterator = Do_not_use_directly
module Tast_mapper = Do_not_use_directly
module Terminfo = Do_not_use_directly
module Tmc = Do_not_use_directly
module Topcommon = Do_not_use_directly
module Topdirs = Do_not_use_directly
module Topeval = Do_not_use_directly
module Tophooks = Do_not_use_directly
module Toploop = Do_not_use_directly
module Topmain = Do_not_use_directly
module Topprinters = Do_not_use_directly
module Topstart = Do_not_use_directly
module Trace = Do_not_use_directly
module Translattribute = Do_not_use_directly
module Translclass = Do_not_use_directly
module Translcore = Do_not_use_directly
module Translmod = Do_not_use_directly
module Translobj = Do_not_use_directly
module Translprim = Do_not_use_directly
module Traverse_for_exported_symbols = Do_not_use_directly
module Type_immediacy = Do_not_use_directly
module Typeclass = Do_not_use_directly
module Typecore = Do_not_use_directly
module Typedecl = Do_not_use_directly
module Typedecl_immediacy = Do_not_use_directly
module Typedecl_properties = Do_not_use_directly
module Typedecl_separability = Do_not_use_directly
module Typedecl_unboxed = Do_not_use_directly
module Typedecl_variance = Do_not_use_directly
module Typedtree = Do_not_use_directly
module Typemod = Do_not_use_directly
module Typeopt = Do_not_use_directly
module Types = Do_not_use_directly
module Typetexp = Do_not_use_directly
module Un_anf = Do_not_use_directly
module Unbox_closures = Do_not_use_directly
module Unbox_free_vars_of_closures = Do_not_use_directly
module Unbox_specialised_args = Do_not_use_directly
module Untypeast = Do_not_use_directly
module Var_within_closure = Do_not_use_directly
module Variable = Do_not_use_directly
module Warnings = Do_not_use_directly
module X86_ast = Do_not_use_directly
module X86_dsl = Do_not_use_directly
module X86_gas = Do_not_use_directly
module X86_masm = Do_not_use_directly
module X86_proc = Do_not_use_directly
diff --git a/findlib-1/ocaml-compiler-libs/shadow/index.html b/findlib-1/ocaml-compiler-libs/shadow/index.html new file mode 100644 index 000000000..106867461 --- /dev/null +++ b/findlib-1/ocaml-compiler-libs/shadow/index.html @@ -0,0 +1,2 @@ + +shadow (docs.findlib-1.ocaml-compiler-libs.shadow)

Package ocaml-compiler-libs.shadow

Library ocaml-compiler-libs.shadow

The entry point of this library is the module: Ocaml_shadow.

diff --git a/findlib-1/ppx_derivers/Ppx_derivers/index.html b/findlib-1/ppx_derivers/Ppx_derivers/index.html new file mode 100644 index 000000000..f9fd67214 --- /dev/null +++ b/findlib-1/ppx_derivers/Ppx_derivers/index.html @@ -0,0 +1,2 @@ + +Ppx_derivers (docs.findlib-1.ppx_derivers.Ppx_derivers)

Module Ppx_derivers

Ppx derivers

This module holds the various derivers registered by either ppx_deriving or ppx_type_conv.

type deriver = ..

Type of a deriver. The concrete constructors are added by ppx_type_conv/ppx_deriving.

val register : string -> deriver -> unit

register name deriver registers a new deriver. Raises if name is already registered.

val lookup : string -> deriver option

Lookup a previously registered deriver

val derivers : unit -> (string * deriver) list

derivers () returns all currently registered derivers.

diff --git a/findlib-1/ppx_derivers/index.html b/findlib-1/ppx_derivers/index.html new file mode 100644 index 000000000..cf027e024 --- /dev/null +++ b/findlib-1/ppx_derivers/index.html @@ -0,0 +1,2 @@ + +ppx_derivers (docs.findlib-1.ppx_derivers)

Package ppx_derivers

Library ppx_derivers

The entry point of this library is the module: Ppx_derivers.

diff --git a/findlib-1/ppxlib/Ppxlib/Ast_builder/Default/Latest/index.html b/findlib-1/ppxlib/Ppxlib/Ast_builder/Default/Latest/index.html new file mode 100644 index 000000000..2597e9874 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_builder/Default/Latest/index.html @@ -0,0 +1,13 @@ + +Latest (docs.findlib-1.ppxlib.Ppxlib.Ast_builder.Default.Latest)

Module Default.Latest

This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.

diff --git a/findlib-1/ppxlib/Ppxlib/Ast_builder/Default/Located/index.html b/findlib-1/ppxlib/Ppxlib/Ast_builder/Default/Located/index.html new file mode 100644 index 000000000..143c57b56 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_builder/Default/Located/index.html @@ -0,0 +1,2 @@ + +Located (docs.findlib-1.ppxlib.Ppxlib.Ast_builder.Default.Located)

Module Default.Located

type 'a t = 'a Loc.t
val loc : _ t -> Location.t
val mk : loc:Location.t -> 'a -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val map_lident : string t -> Longident.t t
val lident : loc:Location.t -> string -> Longident.t t
diff --git a/findlib-1/ppxlib/Ppxlib/Ast_builder/Default/index.html b/findlib-1/ppxlib/Ppxlib/Ast_builder/Default/index.html new file mode 100644 index 000000000..956b7fb0a --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_builder/Default/index.html @@ -0,0 +1,724 @@ + +Default (docs.findlib-1.ppxlib.Ppxlib.Ast_builder.Default)

Module Ast_builder.Default

Helpers taking a ~loc argument. This module is meant to be opened or aliased.

module Located : sig ... end
val ptyp_var : + loc:Astlib.Location.t -> + string -> + Astlib.Ast_500.Parsetree.core_type
val pdir_string : + loc:Astlib.Location.t -> + string -> + Astlib.Ast_500.Parsetree.directive_argument
val pdir_int : + loc:Astlib.Location.t -> + string -> + char option -> + Astlib.Ast_500.Parsetree.directive_argument
val pexp_unreachable : + loc:Astlib.Location.t -> + Astlib.Ast_500.Parsetree.expression
val include_infos : + loc:Astlib.Location.t -> + 'a -> + 'b Astlib.Ast_500.Parsetree.include_infos
val location : + start:Lexing.position -> + end_:Lexing.position -> + ghost:bool -> + Astlib.Location.t
val open_infos : + loc:Astlib.Location.t -> + expr:'a -> + override:Astlib.Ast_500.Asttypes.override_flag -> + 'b Astlib.Ast_500.Parsetree.open_infos
val ppat_variant : + loc:Astlib.Location.t -> + string -> + Astlib.Ast_500.Parsetree.pattern option -> + Astlib.Ast_500.Parsetree.pattern
val ppat_unpack : + loc:Astlib.Location.t -> + string option Astlib.Location.loc -> + Astlib.Ast_500.Parsetree.pattern
val position : + fname:string -> + lnum:int -> + bol:int -> + cnum:int -> + Lexing.position
val value_description : + loc:Astlib.Location.t -> + name:string Astlib.Location.loc -> + type_:Astlib.Ast_500.Parsetree.core_type -> + prim:string list -> + Astlib.Ast_500.Parsetree.value_description
module Latest : sig ... end

This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.

val estring : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.expression
val efloat : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.expression
val eint32 : loc:Location.t -> int32 -> Astlib.Ast_500.Parsetree.expression
val eint64 : loc:Location.t -> int64 -> Astlib.Ast_500.Parsetree.expression
val enativeint : + loc:Location.t -> + nativeint -> + Astlib.Ast_500.Parsetree.expression
val pchar : loc:Location.t -> char -> Astlib.Ast_500.Parsetree.pattern
val pstring : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.pattern
val pfloat : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.pattern
val pint32 : loc:Location.t -> int32 -> Astlib.Ast_500.Parsetree.pattern
val pint64 : loc:Location.t -> int64 -> Astlib.Ast_500.Parsetree.pattern
val pnativeint : + loc:Location.t -> + nativeint -> + Astlib.Ast_500.Parsetree.pattern
val pbool : loc:Location.t -> bool -> Astlib.Ast_500.Parsetree.pattern

evar id produces a Pexp_ident _ expression, it parses its input so you can pass any dot-separated identifier, for instance: evar ~loc "Foo.bar".

val pvar : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.pattern

Same as pexp_apply but without labels

val ppat_tuple_opt : + loc:Location.t -> + Astlib.Ast_500.Parsetree.pattern list -> + Astlib.Ast_500.Parsetree.pattern option

elist_tail ~loc [expr1; expr2; expr3] expr_tail produces the expression expr1::expr2::expr3::expr_tail.

elist ~loc [expr1; expr2; expr3] produces the list litteral expression [expr1; expr2; expr3].

plist_tail ~loc [pat1; pat2; pat3] pat_tail produces the pattern pat1::pat2::pat3::pat_tail.

plist ~loc [pat1; pat2; pat3] produces the list pattern [pat1; pat2; pat3].

pstr_value_list ~loc rf vbs = pstr_value ~loc rf vbs if vbs <> [], [] otherwise.

  • deprecated [since 2016-10] use Nonrecursive on the P(str|sig)_type instead
val unapplied_type_constr_conv : + loc:Location.t -> + Longident.t Loc.t -> + f:(string -> string) -> + Astlib.Ast_500.Parsetree.expression

unapplied_type_constr_conv is the standard way to map identifiers to conversion fonctions, for preprocessor that creates values that follow the structure of types. More precisely, path_conv path (sprintf "sexp_of_%s") is:

  • sexp_of_t if path is "t"
  • A.B.sexp_of_foo if path is "A.B.foo"
  • A.B.sexp_of_f__foo (module A1) (module A2) if path is "A.B.F(A1)(A2).foo" type_constr_conv also applies it to a list of expression, which both prevents the compiler from allocating useless closures, and almost always what is needed, since type constructors are always applied.
val type_constr_conv : + loc:Location.t -> + Longident.t Loc.t -> + f:(string -> string) -> + Astlib.Ast_500.Parsetree.expression list -> + Astlib.Ast_500.Parsetree.expression

Tries to simplify fun v1 v2 .. -> f v1 v2 .. into f. Only works when f is a path, not an arbitrary expression as that would change the meaning of the code. This can be used either for cleaning up the generated code, or to reduce allocation if f is a local variable (the compiler won't optimize the allocation of the closure).

Eta-reduction can change the types/behavior in some corner cases that are unlikely to show up in generated code:

  • if f has optional arguments, eta-expanding f can drop them
  • because labels commute, it can change the type of an expression: $ let f ~x y = x + y let f2 = fun x -> add x;; val f : x:int -> int -> int = <fun> val f2 : int -> x:int -> int = <fun> In fact, if f does side effects before receiving all its arguments, and if the eta-expansion is partially applied, eta-reducing could change behavior.

eta_reduce_if_possible_and_nonrec is meant for the case where the resulting expression is going to be bound in a potentially recursive let-binding, where we have to keep the eta-expansion when rec_flag is Recursive to avoid a compile error.

diff --git a/findlib-1/ppxlib/Ppxlib/Ast_builder/Make/Latest/index.html b/findlib-1/ppxlib/Ppxlib/Ast_builder/Make/Latest/index.html new file mode 100644 index 000000000..722a71b54 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_builder/Make/Latest/index.html @@ -0,0 +1,11 @@ + +Latest (docs.findlib-1.ppxlib.Ppxlib.Ast_builder.Make.Latest)

Module Make.Latest

This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.

val constructor_declaration : + name:string Astlib.Location.loc -> + vars:string Astlib.Location.loc list -> + args:Astlib.Ast_500.Parsetree.constructor_arguments -> + res:Astlib.Ast_500.Parsetree.core_type option -> + unit -> + Astlib.Ast_500.Parsetree.constructor_declaration
diff --git a/findlib-1/ppxlib/Ppxlib/Ast_builder/Make/Located/index.html b/findlib-1/ppxlib/Ppxlib/Ast_builder/Make/Located/index.html new file mode 100644 index 000000000..cb85bf329 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_builder/Make/Located/index.html @@ -0,0 +1,2 @@ + +Located (docs.findlib-1.ppxlib.Ppxlib.Ast_builder.Make.Located)

Module Make.Located

type 'a t = 'a Loc.t
val loc : _ t -> Location.t
val mk : 'a -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val map_lident : string t -> Longident.t t
val lident : string -> Longident.t t
diff --git a/findlib-1/ppxlib/Ppxlib/Ast_builder/Make/argument-1-Loc/index.html b/findlib-1/ppxlib/Ppxlib/Ast_builder/Make/argument-1-Loc/index.html new file mode 100644 index 000000000..58ce723d8 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_builder/Make/argument-1-Loc/index.html @@ -0,0 +1,2 @@ + +Loc (docs.findlib-1.ppxlib.Ppxlib.Ast_builder.Make.Loc)

Parameter Make.Loc

val loc : Location.t
diff --git a/findlib-1/ppxlib/Ppxlib/Ast_builder/Make/index.html b/findlib-1/ppxlib/Ppxlib/Ast_builder/Make/index.html new file mode 100644 index 000000000..7ebf63be5 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_builder/Make/index.html @@ -0,0 +1,533 @@ + +Make (docs.findlib-1.ppxlib.Ppxlib.Ast_builder.Make)

Module Ast_builder.Make

Build Ast helpers with the location argument factorized.

Parameters

module Loc : Loc

Signature

module Located : sig ... end
include sig ... end
val loc : Location.t
val ptyp_var : string -> Astlib.Ast_500.Parsetree.core_type
val pdir_int : + string -> + char option -> + Astlib.Ast_500.Parsetree.directive_argument
val include_infos : 'a -> 'a Astlib.Ast_500.Parsetree.include_infos
val location : + start:Lexing.position -> + end_:Lexing.position -> + ghost:bool -> + Astlib.Location.t
val module_type_declaration : + name:string Astlib.Location.loc -> + type_:Astlib.Ast_500.Parsetree.module_type option -> + Astlib.Ast_500.Parsetree.module_type_declaration
val open_infos : + expr:'a -> + override:Astlib.Ast_500.Asttypes.override_flag -> + 'a Astlib.Ast_500.Parsetree.open_infos
val ppat_variant : + string -> + Astlib.Ast_500.Parsetree.pattern option -> + Astlib.Ast_500.Parsetree.pattern
val ppat_unpack : + string option Astlib.Location.loc -> + Astlib.Ast_500.Parsetree.pattern
val position : + fname:string -> + lnum:int -> + bol:int -> + cnum:int -> + Lexing.position
val value_description : + name:string Astlib.Location.loc -> + type_:Astlib.Ast_500.Parsetree.core_type -> + prim:string list -> + Astlib.Ast_500.Parsetree.value_description
val estring : string -> Astlib.Ast_500.Parsetree.expression
val enativeint : nativeint -> Astlib.Ast_500.Parsetree.expression
val pstring : string -> Astlib.Ast_500.Parsetree.pattern
val pfloat : string -> Astlib.Ast_500.Parsetree.pattern
val pint32 : int32 -> Astlib.Ast_500.Parsetree.pattern
val pint64 : int64 -> Astlib.Ast_500.Parsetree.pattern
val pnativeint : nativeint -> Astlib.Ast_500.Parsetree.pattern

evar id produces a Pexp_ident _ expression, it parses its input so you can pass any dot-separated identifier, for instance: evar ~loc "Foo.bar".

Same as pexp_apply but without labels

elist_tail ~loc [expr1; expr2; expr3] expr_tail produces the expression expr1::expr2::expr3::expr_tail.

elist ~loc [expr1; expr2; expr3] produces the list litteral expression [expr1; expr2; expr3].

plist_tail ~loc [pat1; pat2; pat3] pat_tail produces the pattern pat1::pat2::pat3::pat_tail.

plist ~loc [pat1; pat2; pat3] produces the list pattern [pat1; pat2; pat3].

pstr_value_list ~loc rf vbs = pstr_value ~loc rf vbs if vbs <> [], [] otherwise.

  • deprecated [since 2016-10] use Nonrecursive on the P(str|sig)_type instead
val unapplied_type_constr_conv : + Longident.t Loc.t -> + f:(string -> string) -> + Astlib.Ast_500.Parsetree.expression

unapplied_type_constr_conv is the standard way to map identifiers to conversion fonctions, for preprocessor that creates values that follow the structure of types. More precisely, path_conv path (sprintf "sexp_of_%s") is:

  • sexp_of_t if path is "t"
  • A.B.sexp_of_foo if path is "A.B.foo"
  • A.B.sexp_of_f__foo (module A1) (module A2) if path is "A.B.F(A1)(A2).foo" type_constr_conv also applies it to a list of expression, which both prevents the compiler from allocating useless closures, and almost always what is needed, since type constructors are always applied.
val type_constr_conv : + Longident.t Loc.t -> + f:(string -> string) -> + Astlib.Ast_500.Parsetree.expression list -> + Astlib.Ast_500.Parsetree.expression

Tries to simplify fun v1 v2 .. -> f v1 v2 .. into f. Only works when f is a path, not an arbitrary expression as that would change the meaning of the code. This can be used either for cleaning up the generated code, or to reduce allocation if f is a local variable (the compiler won't optimize the allocation of the closure).

Eta-reduction can change the types/behavior in some corner cases that are unlikely to show up in generated code:

  • if f has optional arguments, eta-expanding f can drop them
  • because labels commute, it can change the type of an expression: $ let f ~x y = x + y let f2 = fun x -> add x;; val f : x:int -> int -> int = <fun> val f2 : int -> x:int -> int = <fun> In fact, if f does side effects before receiving all its arguments, and if the eta-expansion is partially applied, eta-reducing could change behavior.

eta_reduce_if_possible_and_nonrec is meant for the case where the resulting expression is going to be bound in a potentially recursive let-binding, where we have to keep the eta-expansion when rec_flag is Recursive to avoid a compile error.

module Latest : sig ... end

This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.

diff --git a/findlib-1/ppxlib/Ppxlib/Ast_builder/index.html b/findlib-1/ppxlib/Ppxlib/Ast_builder/index.html new file mode 100644 index 000000000..3ec912f96 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_builder/index.html @@ -0,0 +1,2 @@ + +Ast_builder (docs.findlib-1.ppxlib.Ppxlib.Ast_builder)

Module Ppxlib.Ast_builder

Ast_builder is a module to generate OCaml AST fragments. It provides a shorter syntax than directly using the Parsetree constructors, as well as a better stability than the constructors.

For a detailed explanation on this module, refer to the relevant part of the manual.

API

module Default : sig ... end

Helpers taking a ~loc argument. This module is meant to be opened or aliased.

module type Loc = sig ... end
module type S = sig ... end
module Make (Loc : Loc) : S

Build Ast helpers with the location argument factorized.

val make : Location.t -> (module S)

Functional version of Make.

diff --git a/findlib-1/ppxlib/Ppxlib/Ast_builder/module-type-Loc/index.html b/findlib-1/ppxlib/Ppxlib/Ast_builder/module-type-Loc/index.html new file mode 100644 index 000000000..53a292ee7 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_builder/module-type-Loc/index.html @@ -0,0 +1,2 @@ + +Loc (docs.findlib-1.ppxlib.Ppxlib.Ast_builder.Loc)

Module type Ast_builder.Loc

val loc : Location.t
diff --git a/findlib-1/ppxlib/Ppxlib/Ast_builder/module-type-S/Latest/index.html b/findlib-1/ppxlib/Ppxlib/Ast_builder/module-type-S/Latest/index.html new file mode 100644 index 000000000..ab19ca219 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_builder/module-type-S/Latest/index.html @@ -0,0 +1,11 @@ + +Latest (docs.findlib-1.ppxlib.Ppxlib.Ast_builder.S.Latest)

Module S.Latest

This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.

val constructor_declaration : + name:string Astlib.Location.loc -> + vars:string Astlib.Location.loc list -> + args:Astlib.Ast_500.Parsetree.constructor_arguments -> + res:Astlib.Ast_500.Parsetree.core_type option -> + unit -> + Astlib.Ast_500.Parsetree.constructor_declaration
diff --git a/findlib-1/ppxlib/Ppxlib/Ast_builder/module-type-S/Located/index.html b/findlib-1/ppxlib/Ppxlib/Ast_builder/module-type-S/Located/index.html new file mode 100644 index 000000000..39b207f48 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_builder/module-type-S/Located/index.html @@ -0,0 +1,2 @@ + +Located (docs.findlib-1.ppxlib.Ppxlib.Ast_builder.S.Located)

Module S.Located

type 'a t = 'a Loc.t
val loc : _ t -> Location.t
val mk : 'a -> 'a t
val map : ('a -> 'b) -> 'a t -> 'b t
val map_lident : string t -> Longident.t t
val lident : string -> Longident.t t
diff --git a/findlib-1/ppxlib/Ppxlib/Ast_builder/module-type-S/index.html b/findlib-1/ppxlib/Ppxlib/Ast_builder/module-type-S/index.html new file mode 100644 index 000000000..92fec933a --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_builder/module-type-S/index.html @@ -0,0 +1,533 @@ + +S (docs.findlib-1.ppxlib.Ppxlib.Ast_builder.S)

Module type Ast_builder.S

module Located : sig ... end
include sig ... end
val loc : Location.t
val ptyp_var : string -> Astlib.Ast_500.Parsetree.core_type
val pdir_int : + string -> + char option -> + Astlib.Ast_500.Parsetree.directive_argument
val include_infos : 'a -> 'a Astlib.Ast_500.Parsetree.include_infos
val location : + start:Lexing.position -> + end_:Lexing.position -> + ghost:bool -> + Astlib.Location.t
val module_type_declaration : + name:string Astlib.Location.loc -> + type_:Astlib.Ast_500.Parsetree.module_type option -> + Astlib.Ast_500.Parsetree.module_type_declaration
val open_infos : + expr:'a -> + override:Astlib.Ast_500.Asttypes.override_flag -> + 'a Astlib.Ast_500.Parsetree.open_infos
val ppat_variant : + string -> + Astlib.Ast_500.Parsetree.pattern option -> + Astlib.Ast_500.Parsetree.pattern
val ppat_unpack : + string option Astlib.Location.loc -> + Astlib.Ast_500.Parsetree.pattern
val position : + fname:string -> + lnum:int -> + bol:int -> + cnum:int -> + Lexing.position
val value_description : + name:string Astlib.Location.loc -> + type_:Astlib.Ast_500.Parsetree.core_type -> + prim:string list -> + Astlib.Ast_500.Parsetree.value_description
val estring : string -> Astlib.Ast_500.Parsetree.expression
val enativeint : nativeint -> Astlib.Ast_500.Parsetree.expression
val pstring : string -> Astlib.Ast_500.Parsetree.pattern
val pfloat : string -> Astlib.Ast_500.Parsetree.pattern
val pint32 : int32 -> Astlib.Ast_500.Parsetree.pattern
val pint64 : int64 -> Astlib.Ast_500.Parsetree.pattern
val pnativeint : nativeint -> Astlib.Ast_500.Parsetree.pattern

evar id produces a Pexp_ident _ expression, it parses its input so you can pass any dot-separated identifier, for instance: evar ~loc "Foo.bar".

Same as pexp_apply but without labels

elist_tail ~loc [expr1; expr2; expr3] expr_tail produces the expression expr1::expr2::expr3::expr_tail.

elist ~loc [expr1; expr2; expr3] produces the list litteral expression [expr1; expr2; expr3].

plist_tail ~loc [pat1; pat2; pat3] pat_tail produces the pattern pat1::pat2::pat3::pat_tail.

plist ~loc [pat1; pat2; pat3] produces the list pattern [pat1; pat2; pat3].

pstr_value_list ~loc rf vbs = pstr_value ~loc rf vbs if vbs <> [], [] otherwise.

  • deprecated [since 2016-10] use Nonrecursive on the P(str|sig)_type instead
val unapplied_type_constr_conv : + Longident.t Loc.t -> + f:(string -> string) -> + Astlib.Ast_500.Parsetree.expression

unapplied_type_constr_conv is the standard way to map identifiers to conversion fonctions, for preprocessor that creates values that follow the structure of types. More precisely, path_conv path (sprintf "sexp_of_%s") is:

  • sexp_of_t if path is "t"
  • A.B.sexp_of_foo if path is "A.B.foo"
  • A.B.sexp_of_f__foo (module A1) (module A2) if path is "A.B.F(A1)(A2).foo" type_constr_conv also applies it to a list of expression, which both prevents the compiler from allocating useless closures, and almost always what is needed, since type constructors are always applied.
val type_constr_conv : + Longident.t Loc.t -> + f:(string -> string) -> + Astlib.Ast_500.Parsetree.expression list -> + Astlib.Ast_500.Parsetree.expression

Tries to simplify fun v1 v2 .. -> f v1 v2 .. into f. Only works when f is a path, not an arbitrary expression as that would change the meaning of the code. This can be used either for cleaning up the generated code, or to reduce allocation if f is a local variable (the compiler won't optimize the allocation of the closure).

Eta-reduction can change the types/behavior in some corner cases that are unlikely to show up in generated code:

  • if f has optional arguments, eta-expanding f can drop them
  • because labels commute, it can change the type of an expression: $ let f ~x y = x + y let f2 = fun x -> add x;; val f : x:int -> int -> int = <fun> val f2 : int -> x:int -> int = <fun> In fact, if f does side effects before receiving all its arguments, and if the eta-expansion is partially applied, eta-reducing could change behavior.

eta_reduce_if_possible_and_nonrec is meant for the case where the resulting expression is going to be bound in a potentially recursive let-binding, where we have to keep the eta-expansion when rec_flag is Recursive to avoid a compile error.

module Latest : sig ... end

This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.

diff --git a/findlib-1/ppxlib/Ppxlib/Ast_io/index.html b/findlib-1/ppxlib/Ppxlib/Ast_io/index.html new file mode 100644 index 000000000..1f0f5cf24 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_io/index.html @@ -0,0 +1,2 @@ + +Ast_io (docs.findlib-1.ppxlib.Ppxlib.Ast_io)

Module Ppxlib.Ast_io

A small module to help read bin-annots generated files.

type t
val read_binary : string -> (t, string) result
val get_ast : t -> ast
val get_input_name : t -> string
diff --git a/findlib-1/ppxlib/Ppxlib/Ast_pattern/Packed/index.html b/findlib-1/ppxlib/Ppxlib/Ast_pattern/Packed/index.html new file mode 100644 index 000000000..c18ecd1a7 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_pattern/Packed/index.html @@ -0,0 +1,6 @@ + +Packed (docs.findlib-1.ppxlib.Ppxlib.Ast_pattern.Packed)

Module Ast_pattern.Packed

type ('a, 'b) t
val create : ('a, 'b, 'c) t -> 'b -> ('a, 'c) t
val parse : ('a, 'b) t -> Location.t -> 'a -> 'b
val parse_res : + ('a, 'b) t -> + Location.t -> + 'a -> + ('b, Location.Error.t Stdppx.NonEmptyList.t) result
diff --git a/findlib-1/ppxlib/Ppxlib/Ast_pattern/index.html b/findlib-1/ppxlib/Ppxlib/Ast_pattern/index.html new file mode 100644 index 000000000..7fb5d8475 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_pattern/index.html @@ -0,0 +1,940 @@ + +Ast_pattern (docs.findlib-1.ppxlib.Ppxlib.Ast_pattern)

Module Ppxlib.Ast_pattern

This module implements first class AST patterns. It allows to destruct and extract values from AST fragments. This gives the same functionality as a pattern-match, but with simpler syntax and more stability than directly pattern-matching on the Parsetree constructors.

For a detailed explanation on this module, refer to the relevant part of the manual.

API

type ('a, 'b, 'c) t

Type of a pattern:

  • 'a is the type of value matched by the pattern
  • 'b is the continuation, for instance for a pattern that captures an int and a string, 'b will be int -> string -> _
  • 'c is the result of the continuation.
val parse : + ('a, 'b, 'c) t -> + Location.t -> + ?on_error:(unit -> 'c) -> + 'a -> + 'b -> + 'c

Matches a value against a pattern. Raise a located error in case of failure.

val parse_res : + ('a, 'b, 'c) t -> + Location.t -> + ?on_error:(unit -> 'c) -> + 'a -> + 'b -> + ('c, Location.Error.t Stdppx.NonEmptyList.t) result

Matches a value against a pattern and return a result.

module Packed : sig ... end
val __ : ('a, 'a -> 'b, 'b) t

Pattern that captures its input.

val __' : ('a, 'a Loc.t -> 'b, 'b) t

Same as __ but also captures the location.

Note: this should only be used for types that do not embed a location. For instance you can use it to capture a string constant:

estring __'

but using it to capture an expression would not yield the expected result:

pair (eint (int 42)) __'

In the latter case you should use the pexp_loc field of the captured expression instead.

val drop : ('a, 'b, 'b) t

Useful when some part of the AST is irrelevant. With __, the captured value is passed to the continuation, with drop it is ignored. In higher-level pattern matching, it is called wildcard pattern.

val as__ : ('a, 'b, 'c) t -> ('a, 'a -> 'b, 'c) t

As-pattern. Passes the current node to the continuation.

Pitfall. In general, the continuation is called step by step by being applied partially to every next captured node in the pattern. That means that the node captured by as__ is passed to the continuation before checking if the pattern is matched.

val alt : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> ('a, 'b, 'c) t

alt stands for `alternatives'. It matches either the first pattern or the second one.

val alt_option : + ('a, 'v -> 'b, 'c) t -> + ('a, 'b, 'c) t -> + ('a, 'v option -> 'b, 'c) t

Same as alt, for the common case where the left-hand-side captures a value but not the right-hand-side.

val (|||) : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> ('a, 'b, 'c) t

Same as alt

val map : ('a, 'b, 'c) t -> f:('d -> 'b) -> ('a, 'd, 'c) t
val map' : ('a, 'b, 'c) t -> f:(Location.t -> 'd -> 'b) -> ('a, 'd, 'c) t
val map_result : ('a, 'b, 'c) t -> f:('c -> 'd) -> ('a, 'b, 'd) t
val (>>|) : ('a, 'b, 'c) t -> ('d -> 'b) -> ('a, 'd, 'c) t

Same as map

val map0 : ('a, 'b, 'c) t -> f:'v -> ('a, 'v -> 'b, 'c) t
val map1 : ('a, 'v1 -> 'b, 'c) t -> f:('v1 -> 'v) -> ('a, 'v -> 'b, 'c) t
val map2 : + ('a, 'v1 -> 'v2 -> 'b, 'c) t -> + f:('v1 -> 'v2 -> 'v) -> + ('a, 'v -> 'b, 'c) t
val map0' : ('a, 'b, 'c) t -> f:(Location.t -> 'v) -> ('a, 'v -> 'b, 'c) t
val map1' : + ('a, 'v1 -> 'b, 'c) t -> + f:(Location.t -> 'v1 -> 'v) -> + ('a, 'v -> 'b, 'c) t
val map2' : + ('a, 'v1 -> 'v2 -> 'b, 'c) t -> + f:(Location.t -> 'v1 -> 'v2 -> 'v) -> + ('a, 'v -> 'b, 'c) t
val map_value : ('a, 'b, 'c) t -> f:('d -> 'a) -> ('d, 'b, 'c) t
val map_value' : + ('a, 'b, 'c) t -> + f:(Astlib.Location.t -> 'd -> 'a) -> + ('d, 'b, 'c) t
val nil : (_ list, 'a, 'a) t
val (^::) : ('a, 'b, 'c) t -> ('a list, 'c, 'd) t -> ('a list, 'b, 'd) t
val many : ('a, 'b -> 'c, 'c) t -> ('a list, 'b list -> 'c, 'c) t
val int : int -> (int, 'a, 'a) t
val char : char -> (char, 'a, 'a) t
val string : string -> (string, 'a, 'a) t
val float : float -> (float, 'a, 'a) t
val int32 : int32 -> (int32, 'a, 'a) t
val int64 : int64 -> (int64, 'a, 'a) t
val nativeint : nativeint -> (nativeint, 'a, 'a) t
val bool : bool -> (bool, 'a, 'a) t
val ebool : (bool, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.expression, 'a, 'b) t
val pbool : (bool, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) t
val cst : + to_string:('a -> string) -> + ?equal:('a -> 'a -> bool) -> + 'a -> + ('a, 'b, 'b) t
val none : (_ option, 'a, 'a) t
val some : ('a, 'b, 'c) t -> ('a option, 'b, 'c) t
val pair : ('a1, 'b, 'c) t -> ('a2, 'c, 'd) t -> ('a1 * 'a2, 'b, 'd) t
val (**) : ('a1, 'b, 'c) t -> ('a2, 'c, 'd) t -> ('a1 * 'a2, 'b, 'd) t
val triple : + ('a1, 'b, 'c) t -> + ('a2, 'c, 'd) t -> + ('a3, 'd, 'e) t -> + ('a1 * 'a2 * 'a3, 'b, 'e) t
val loc : ('a, 'b, 'c) t -> ('a Loc.t, 'b, 'c) t
val pack0 : ('a, 'b, 'c) t -> ('a, unit -> 'b, 'c) t
val pack2 : ('a, 'b -> 'c -> 'd, 'e) t -> ('a, ('b * 'c) -> 'd, 'e) t
val pack3 : + ('a, 'b -> 'c -> 'd -> 'e, 'f) t -> + ('a, ('b * 'c * 'd) -> 'e, 'f) t

AST patterns for each constructor/record of the parsetree are generated in the same way AST builders are generated. In addition, for every wrapper we generate a pattern to match the loc and attributes fields. For instance for the expression type:

val pexp_loc :
+  (Location.t, 'a, 'b) t ->
+  (expression, 'b, 'c) t ->
+  (expression, 'a, 'c) t
+
+val pexp_attributes :
+  (attributes, 'a, 'b) t ->
+  (expression, 'b, 'c) t ->
+  (expression, 'a, 'c) t
val nolabel : + (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t
val labelled : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Asttypes.arg_label, 'c, 'd) Ppxlib__.Ast_pattern0.t
val optional : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Asttypes.arg_label, 'c, 'd) Ppxlib__.Ast_pattern0.t
val binding_op : + op:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + pat:(Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + exp:(Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.binding_op, 'g, 'h) Ppxlib__.Ast_pattern0.t
val case : + lhs:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + guard: + (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + rhs:(Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.case, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pcl_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcl_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcl_constr : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcl_structure : + (Astlib.Ast_500.Parsetree.class_structure, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcl_fun : + (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'g, 'h) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'i, 'j) Ppxlib__.Ast_pattern0.t
val pcl_apply : + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + ((Astlib.Ast_500.Asttypes.arg_label * Astlib.Ast_500.Parsetree.expression) + list, + 'c, + 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcl_let : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_binding list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pcl_constraint : + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcl_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcl_open : + (Astlib.Longident.t Astlib.Location.loc Astlib.Ast_500.Parsetree.open_infos, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcf_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcf_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcf_inherit : + (Astlib.Ast_500.Asttypes.override_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (string Astlib.Location.loc option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pcf_val : + (string Astlib.Location.loc + * Astlib.Ast_500.Asttypes.mutable_flag + * Astlib.Ast_500.Parsetree.class_field_kind, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcf_method : + (string Astlib.Location.loc + * Astlib.Ast_500.Asttypes.private_flag + * Astlib.Ast_500.Parsetree.class_field_kind, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcf_constraint : + (Astlib.Ast_500.Parsetree.core_type * Astlib.Ast_500.Parsetree.core_type, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcf_initializer : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcf_attribute : + (Astlib.Ast_500.Parsetree.attribute, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcf_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val cfk_virtual : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field_kind, 'c, 'd) Ppxlib__.Ast_pattern0.t
val cfk_concrete : + (Astlib.Ast_500.Asttypes.override_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field_kind, 'e, 'f) Ppxlib__.Ast_pattern0.t
val class_infos_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + ('c Astlib.Ast_500.Parsetree.class_infos, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + ('f Astlib.Ast_500.Parsetree.class_infos, 'g, 'h) Ppxlib__.Ast_pattern0.t
val class_infos : + virt:(Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + params: + ((Astlib.Ast_500.Parsetree.core_type + * (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity)) + list, + 'c, + 'd) + Ppxlib__.Ast_pattern0.t -> + name:(string, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + expr:('g, 'h, 'i) Ppxlib__.Ast_pattern0.t -> + ('j Astlib.Ast_500.Parsetree.class_infos, 'k, 'l) Ppxlib__.Ast_pattern0.t
val class_signature : + self:(Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + fields: + (Astlib.Ast_500.Parsetree.class_type_field list, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_signature, 'e, 'f) Ppxlib__.Ast_pattern0.t
val class_structure : + self:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + fields: + (Astlib.Ast_500.Parsetree.class_field list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_structure, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcty_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcty_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcty_constr : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcty_signature : + (Astlib.Ast_500.Parsetree.class_signature, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcty_arrow : + (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pcty_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcty_open : + (Astlib.Longident.t Astlib.Location.loc Astlib.Ast_500.Parsetree.open_infos, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pctf_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pctf_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pctf_inherit : + (Astlib.Ast_500.Parsetree.class_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pctf_val : + (string Astlib.Location.loc + * Astlib.Ast_500.Asttypes.mutable_flag + * Astlib.Ast_500.Asttypes.virtual_flag + * Astlib.Ast_500.Parsetree.core_type, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pctf_method : + (string Astlib.Location.loc + * Astlib.Ast_500.Asttypes.private_flag + * Astlib.Ast_500.Asttypes.virtual_flag + * Astlib.Ast_500.Parsetree.core_type, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pctf_constraint : + (Astlib.Ast_500.Parsetree.core_type * Astlib.Ast_500.Parsetree.core_type, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pctf_attribute : + (Astlib.Ast_500.Parsetree.attribute, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pctf_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val closed : + (Astlib.Ast_500.Asttypes.closed_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val open_ : + (Astlib.Ast_500.Asttypes.closed_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val pconst_integer : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (char option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constant, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pconst_char : + (char, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constant, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pconst_string : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Location.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (string option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constant, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pconst_float : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (char option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constant, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcstr_tuple : + (Astlib.Ast_500.Parsetree.core_type list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constructor_arguments, 'c, 'd) + Ppxlib__.Ast_pattern0.t
val pcstr_record : + (Astlib.Ast_500.Parsetree.label_declaration list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constructor_arguments, 'c, 'd) + Ppxlib__.Ast_pattern0.t
val constructor_declaration_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constructor_declaration, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constructor_declaration, 'e, 'f) + Ppxlib__.Ast_pattern0.t
val constructor_declaration : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + vars:(string Astlib.Location.loc list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + args: + (Astlib.Ast_500.Parsetree.constructor_arguments, 'e, 'f) + Ppxlib__.Ast_pattern0.t -> + res: + (Astlib.Ast_500.Parsetree.core_type option, 'g, 'h) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constructor_declaration, 'i, 'j) + Ppxlib__.Ast_pattern0.t
val ptyp_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ptyp_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ptyp_any : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
val ptyp_var : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ptyp_arrow : + (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'g, 'h) Ppxlib__.Ast_pattern0.t
val ptyp_tuple : + (Astlib.Ast_500.Parsetree.core_type list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ptyp_constr : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ptyp_object : + (Astlib.Ast_500.Parsetree.object_field list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Asttypes.closed_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ptyp_class : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ptyp_alias : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ptyp_variant : + (Astlib.Ast_500.Parsetree.row_field list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Asttypes.closed_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (string list option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'g, 'h) Ppxlib__.Ast_pattern0.t
val ptyp_poly : + (string Astlib.Location.loc list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ptyp_package : + (Astlib.Longident.t Astlib.Location.loc + * (Astlib.Longident.t Astlib.Location.loc + * Astlib.Ast_500.Parsetree.core_type) + list, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ptyp_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val upto : + (Astlib.Ast_500.Asttypes.direction_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val downto_ : + (Astlib.Ast_500.Asttypes.direction_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val pdira_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.directive_argument, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.directive_argument, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pdir_string : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.directive_argument, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pdir_int : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (char option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.directive_argument, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pdir_ident : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.directive_argument, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pdir_bool : + (bool, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.directive_argument, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_ident : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_constant : + (Astlib.Ast_500.Parsetree.constant, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_let : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_binding list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pexp_function : + (Astlib.Ast_500.Parsetree.case list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_fun : + (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'i, 'j) Ppxlib__.Ast_pattern0.t
val pexp_apply : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + ((Astlib.Ast_500.Asttypes.arg_label * Astlib.Ast_500.Parsetree.expression) + list, + 'c, + 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_match : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.case list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_try : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.case list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_tuple : + (Astlib.Ast_500.Parsetree.expression list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_construct : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_variant : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_record : + ((Astlib.Longident.t Astlib.Location.loc + * Astlib.Ast_500.Parsetree.expression) + list, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_field : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_setfield : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pexp_array : + (Astlib.Ast_500.Parsetree.expression list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_ifthenelse : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pexp_sequence : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_while : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_for : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Asttypes.direction_flag, 'g, 'h) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'i, 'j) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'k, 'l) Ppxlib__.Ast_pattern0.t
val pexp_constraint : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_coerce : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pexp_send : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_new : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_setinstvar : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_override : + ((string Astlib.Location.loc * Astlib.Ast_500.Parsetree.expression) list, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_letmodule : + (string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pexp_letexception : + (Astlib.Ast_500.Parsetree.extension_constructor, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_assert : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_lazy : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_poly : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_object : + (Astlib.Ast_500.Parsetree.class_structure, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_newtype : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_pack : + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_open : + (Astlib.Ast_500.Parsetree.module_expr Astlib.Ast_500.Parsetree.open_infos, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_letop : + (Astlib.Ast_500.Parsetree.letop, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_unreachable : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
val extension_constructor_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.extension_constructor, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.extension_constructor, 'e, 'f) + Ppxlib__.Ast_pattern0.t
val extension_constructor : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + kind: + (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.extension_constructor, 'e, 'f) + Ppxlib__.Ast_pattern0.t
val pext_decl : + (string Astlib.Location.loc list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constructor_arguments, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'g, 'h) + Ppxlib__.Ast_pattern0.t
val pext_rebind : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'c, 'd) + Ppxlib__.Ast_pattern0.t
val unit : + (Astlib.Ast_500.Parsetree.functor_parameter, 'a, 'b) Ppxlib__.Ast_pattern0.t
val named : + (string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.functor_parameter, 'e, 'f) Ppxlib__.Ast_pattern0.t
val include_infos_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + ('c Astlib.Ast_500.Parsetree.include_infos, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + ('f Astlib.Ast_500.Parsetree.include_infos, 'g, 'h) Ppxlib__.Ast_pattern0.t
val include_infos : + mod_:('a, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + ('d Astlib.Ast_500.Parsetree.include_infos, 'e, 'f) Ppxlib__.Ast_pattern0.t
val injective : + (Astlib.Ast_500.Asttypes.injectivity, 'a, 'b) Ppxlib__.Ast_pattern0.t
val noinjectivity : + (Astlib.Ast_500.Asttypes.injectivity, 'a, 'b) Ppxlib__.Ast_pattern0.t
val label_declaration_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.label_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.label_declaration, 'e, 'f) Ppxlib__.Ast_pattern0.t
val label_declaration : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + mutable_: + (Astlib.Ast_500.Asttypes.mutable_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + type_:(Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.label_declaration, 'g, 'h) Ppxlib__.Ast_pattern0.t
val letop : + let_:(Astlib.Ast_500.Parsetree.binding_op, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + ands: + (Astlib.Ast_500.Parsetree.binding_op list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + body:(Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.letop, 'g, 'h) Ppxlib__.Ast_pattern0.t
val location : + start:(Lexing.position, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + end_:(Lexing.position, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + ghost:(bool, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Location.t, 'g, 'h) Ppxlib__.Ast_pattern0.t
val lident : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ldot : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'e, 'f) Ppxlib__.Ast_pattern0.t
val lapply : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'e, 'f) Ppxlib__.Ast_pattern0.t
val module_binding_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_binding, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_binding, 'e, 'f) Ppxlib__.Ast_pattern0.t
val module_binding : + name:(string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + expr:(Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_binding, 'e, 'f) Ppxlib__.Ast_pattern0.t
val module_declaration_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_declaration, 'e, 'f) Ppxlib__.Ast_pattern0.t
val module_declaration : + name:(string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + type_:(Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_declaration, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmod_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmod_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmod_ident : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pmod_structure : + (Astlib.Ast_500.Parsetree.structure_item list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pmod_functor : + (Astlib.Ast_500.Parsetree.functor_parameter, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmod_apply : + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmod_constraint : + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmod_unpack : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pmod_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
val module_substitution_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_substitution, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_substitution, 'e, 'f) + Ppxlib__.Ast_pattern0.t
val module_substitution : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + manifest:(Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_substitution, 'e, 'f) + Ppxlib__.Ast_pattern0.t
val pmty_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmty_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmty_ident : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pmty_signature : + (Astlib.Ast_500.Parsetree.signature_item list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pmty_functor : + (Astlib.Ast_500.Parsetree.functor_parameter, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmty_with : + (Astlib.Ast_500.Parsetree.module_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint list, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmty_typeof : + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pmty_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pmty_alias : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val module_type_declaration_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type_declaration, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type_declaration, 'e, 'f) + Ppxlib__.Ast_pattern0.t
val module_type_declaration : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + type_: + (Astlib.Ast_500.Parsetree.module_type option, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type_declaration, 'e, 'f) + Ppxlib__.Ast_pattern0.t
val immutable : + (Astlib.Ast_500.Asttypes.mutable_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val mutable_ : + (Astlib.Ast_500.Asttypes.mutable_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val pof_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pof_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val otag : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val oinherit : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val open_infos_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + ('c Astlib.Ast_500.Parsetree.open_infos, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + ('f Astlib.Ast_500.Parsetree.open_infos, 'g, 'h) Ppxlib__.Ast_pattern0.t
val open_infos : + expr:('a, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + override: + (Astlib.Ast_500.Asttypes.override_flag, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + ('f Astlib.Ast_500.Parsetree.open_infos, 'g, 'h) Ppxlib__.Ast_pattern0.t
val override : + (Astlib.Ast_500.Asttypes.override_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val fresh : + (Astlib.Ast_500.Asttypes.override_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val ppat_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_any : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
val ppat_var : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_alias : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_constant : + (Astlib.Ast_500.Parsetree.constant, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_interval : + (Astlib.Ast_500.Parsetree.constant, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constant, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_tuple : + (Astlib.Ast_500.Parsetree.pattern list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_construct : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + ((string Astlib.Location.loc list * Astlib.Ast_500.Parsetree.pattern) option, + 'c, + 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_variant : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_record : + ((Astlib.Longident.t Astlib.Location.loc * Astlib.Ast_500.Parsetree.pattern) + list, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Asttypes.closed_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_array : + (Astlib.Ast_500.Parsetree.pattern list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_or : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_constraint : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_type : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_lazy : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_unpack : + (string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_exception : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_open : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pstr : + (Astlib.Ast_500.Parsetree.structure_item list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.payload, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig : + (Astlib.Ast_500.Parsetree.signature_item list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.payload, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ptyp : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.payload, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.payload, 'e, 'f) Ppxlib__.Ast_pattern0.t
val position : + fname:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + lnum:(int, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + bol:(int, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + cnum:(int, 'g, 'h) Ppxlib__.Ast_pattern0.t -> + (Lexing.position, 'i, 'j) Ppxlib__.Ast_pattern0.t
val private_ : + (Astlib.Ast_500.Asttypes.private_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val public : + (Astlib.Ast_500.Asttypes.private_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val nonrecursive : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val recursive : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val prf_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val prf_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val rtag : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (bool, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type list, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'g, 'h) Ppxlib__.Ast_pattern0.t
val rinherit : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
val psig_value : + (Astlib.Ast_500.Parsetree.value_description, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_type : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration list, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
val psig_typesubst : + (Astlib.Ast_500.Parsetree.type_declaration list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_typext : + (Astlib.Ast_500.Parsetree.type_extension, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_exception : + (Astlib.Ast_500.Parsetree.type_exception, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_module : + (Astlib.Ast_500.Parsetree.module_declaration, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_modsubst : + (Astlib.Ast_500.Parsetree.module_substitution, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_recmodule : + (Astlib.Ast_500.Parsetree.module_declaration list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_modtype : + (Astlib.Ast_500.Parsetree.module_type_declaration, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_modtypesubst : + (Astlib.Ast_500.Parsetree.module_type_declaration, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_open : + (Astlib.Longident.t Astlib.Location.loc Astlib.Ast_500.Parsetree.open_infos, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_include : + (Astlib.Ast_500.Parsetree.module_type Astlib.Ast_500.Parsetree.include_infos, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_class : + (Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos + list, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_class_type : + (Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos + list, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_attribute : + (Astlib.Ast_500.Parsetree.attribute, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.attribute list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pstr_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pstr_eval : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.attribute list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pstr_value : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_binding list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pstr_primitive : + (Astlib.Ast_500.Parsetree.value_description, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_type : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration list, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pstr_typext : + (Astlib.Ast_500.Parsetree.type_extension, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_exception : + (Astlib.Ast_500.Parsetree.type_exception, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_module : + (Astlib.Ast_500.Parsetree.module_binding, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_recmodule : + (Astlib.Ast_500.Parsetree.module_binding list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_modtype : + (Astlib.Ast_500.Parsetree.module_type_declaration, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_open : + (Astlib.Ast_500.Parsetree.module_expr Astlib.Ast_500.Parsetree.open_infos, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_class : + (Astlib.Ast_500.Parsetree.class_expr Astlib.Ast_500.Parsetree.class_infos + list, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_class_type : + (Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos + list, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_include : + (Astlib.Ast_500.Parsetree.module_expr Astlib.Ast_500.Parsetree.include_infos, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_attribute : + (Astlib.Ast_500.Parsetree.attribute, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.attribute list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
val toplevel_directive : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + arg: + (Astlib.Ast_500.Parsetree.directive_argument option, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.toplevel_directive, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ptop_def : + (Astlib.Ast_500.Parsetree.structure_item list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.toplevel_phrase, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ptop_dir : + (Astlib.Ast_500.Parsetree.toplevel_directive, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.toplevel_phrase, 'c, 'd) Ppxlib__.Ast_pattern0.t
val type_declaration_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration, 'e, 'f) Ppxlib__.Ast_pattern0.t
val type_declaration : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + params: + ((Astlib.Ast_500.Parsetree.core_type + * (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity)) + list, + 'c, + 'd) + Ppxlib__.Ast_pattern0.t -> + cstrs: + ((Astlib.Ast_500.Parsetree.core_type + * Astlib.Ast_500.Parsetree.core_type + * Astlib.Location.t) + list, + 'e, + 'f) + Ppxlib__.Ast_pattern0.t -> + kind:(Astlib.Ast_500.Parsetree.type_kind, 'g, 'h) Ppxlib__.Ast_pattern0.t -> + private_: + (Astlib.Ast_500.Asttypes.private_flag, 'i, 'j) Ppxlib__.Ast_pattern0.t -> + manifest: + (Astlib.Ast_500.Parsetree.core_type option, 'k, 'l) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration, 'm, 'n) Ppxlib__.Ast_pattern0.t
val type_exception_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_exception, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_exception, 'e, 'f) Ppxlib__.Ast_pattern0.t
val type_exception : + constructor: + (Astlib.Ast_500.Parsetree.extension_constructor, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_exception, 'c, 'd) Ppxlib__.Ast_pattern0.t
val type_extension_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_extension, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_extension, 'e, 'f) Ppxlib__.Ast_pattern0.t
val type_extension : + path:(Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + params: + ((Astlib.Ast_500.Parsetree.core_type + * (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity)) + list, + 'c, + 'd) + Ppxlib__.Ast_pattern0.t -> + constructors: + (Astlib.Ast_500.Parsetree.extension_constructor list, 'e, 'f) + Ppxlib__.Ast_pattern0.t -> + private_: + (Astlib.Ast_500.Asttypes.private_flag, 'g, 'h) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_extension, 'i, 'j) Ppxlib__.Ast_pattern0.t
val ptype_abstract : + (Astlib.Ast_500.Parsetree.type_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t
val ptype_variant : + (Astlib.Ast_500.Parsetree.constructor_declaration list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_kind, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ptype_record : + (Astlib.Ast_500.Parsetree.label_declaration list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_kind, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ptype_open : + (Astlib.Ast_500.Parsetree.type_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t
val value_binding_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_binding, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_binding, 'e, 'f) Ppxlib__.Ast_pattern0.t
val value_binding : + pat:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + expr:(Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_binding, 'e, 'f) Ppxlib__.Ast_pattern0.t
val value_description_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_description, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_description, 'e, 'f) Ppxlib__.Ast_pattern0.t
val value_description : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + type_:(Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + prim:(string list, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_description, 'g, 'h) Ppxlib__.Ast_pattern0.t
val covariant : + (Astlib.Ast_500.Asttypes.variance, 'a, 'b) Ppxlib__.Ast_pattern0.t
val contravariant : + (Astlib.Ast_500.Asttypes.variance, 'a, 'b) Ppxlib__.Ast_pattern0.t
val novariance : + (Astlib.Ast_500.Asttypes.variance, 'a, 'b) Ppxlib__.Ast_pattern0.t
val virtual_ : + (Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val concrete : + (Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val pwith_type : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pwith_module : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pwith_modtype : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pwith_modtypesubst : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pwith_typesubst : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pwith_modsubst : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
val true_ : (bool, 'a, 'a) t
val false_ : (bool, 'a, 'a) t
val eint : (int, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.expression, 'a, 'b) t
val echar : (char, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.expression, 'a, 'b) t
val estring : + (string, 'a, 'b) t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) t
val efloat : + (string, 'a, 'b) t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) t
val eint32 : + (int32, 'a, 'b) t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) t
val eint64 : + (int64, 'a, 'b) t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) t
val enativeint : + (nativeint, 'a, 'b) t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) t
val pint : (int, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) t
val pchar : (char, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) t
val pstring : + (string, 'a, 'b) t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) t
val pfloat : (string, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) t
val pint32 : (int32, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) t
val pint64 : (int64, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) t
val pnativeint : + (nativeint, 'a, 'b) t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) t
val single_expr_payload : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) t -> + (Astlib.Ast_500.Parsetree.payload, 'a, 'b) t
val attribute : + name:(string, 'a, 'b) t -> + payload:(Astlib.Ast_500.Parsetree.payload, 'b, 'c) t -> + (Astlib.Ast_500.Parsetree.attribute, 'a, 'c) t
val extension : + (string, 'a, 'b) t -> + (Astlib.Ast_500.Parsetree.payload, 'b, 'c) t -> + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'c) t
val elist : + (Astlib.Ast_500.Parsetree.expression, 'a -> 'a, 'b) t -> + (Astlib.Ast_500.Parsetree.expression, 'b list -> 'c, 'c) t
val esequence : + (Astlib.Ast_500.Parsetree.expression, 'a -> 'a, 'b) t -> + (Astlib.Ast_500.Parsetree.expression, 'b list -> 'c, 'c) t
type context
val of_func : (context -> Location.t -> 'a -> 'b -> 'c) -> ('a, 'b, 'c) t
val to_func : ('a, 'b, 'c) t -> context -> Location.t -> 'a -> 'b -> 'c
diff --git a/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-fold/index.html b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-fold/index.html new file mode 100644 index 000000000..ed1487b1b --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-fold/index.html @@ -0,0 +1,2 @@ + +fold (docs.findlib-1.ppxlib.Ppxlib.Ast_traverse.fold)

Class Ast_traverse.fold

inherit 'acc Ppxlib_ast.Ast.fold
diff --git a/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-fold_map/index.html b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-fold_map/index.html new file mode 100644 index 000000000..0c14114d7 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-fold_map/index.html @@ -0,0 +1,2 @@ + +fold_map (docs.findlib-1.ppxlib.Ppxlib.Ast_traverse.fold_map)

Class Ast_traverse.fold_map

diff --git a/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-iter/index.html b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-iter/index.html new file mode 100644 index 000000000..53bd1bf5c --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-iter/index.html @@ -0,0 +1,2 @@ + +iter (docs.findlib-1.ppxlib.Ppxlib.Ast_traverse.iter)

Class Ast_traverse.iter

diff --git a/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-lift/index.html b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-lift/index.html new file mode 100644 index 000000000..aeea684b8 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-lift/index.html @@ -0,0 +1,2 @@ + +lift (docs.findlib-1.ppxlib.Ppxlib.Ast_traverse.lift)

Class Ast_traverse.lift

inherit 'res Ppxlib_ast.Ast.lift
diff --git a/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-lift_map_with_context/index.html b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-lift_map_with_context/index.html new file mode 100644 index 000000000..b81d33537 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-lift_map_with_context/index.html @@ -0,0 +1,2 @@ + +lift_map_with_context (docs.findlib-1.ppxlib.Ppxlib.Ast_traverse.lift_map_with_context)

Class Ast_traverse.lift_map_with_context

diff --git a/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-map/index.html b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-map/index.html new file mode 100644 index 000000000..af826a0f5 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-map/index.html @@ -0,0 +1,2 @@ + +map (docs.findlib-1.ppxlib.Ppxlib.Ast_traverse.map)

Class Ast_traverse.map

diff --git a/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-map_with_context/index.html b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-map_with_context/index.html new file mode 100644 index 000000000..1a1135a42 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-map_with_context/index.html @@ -0,0 +1,2 @@ + +map_with_context (docs.findlib-1.ppxlib.Ppxlib.Ast_traverse.map_with_context)

Class Ast_traverse.map_with_context

diff --git a/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-map_with_expansion_context_and_errors/index.html b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-map_with_expansion_context_and_errors/index.html new file mode 100644 index 000000000..c7ee492eb --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-map_with_expansion_context_and_errors/index.html @@ -0,0 +1,4 @@ + +map_with_expansion_context_and_errors (docs.findlib-1.ppxlib.Ppxlib.Ast_traverse.map_with_expansion_context_and_errors)

Class Ast_traverse.map_with_expansion_context_and_errors

inherit [Ppxlib__.Expansion_context.Base.t, Ppxlib__.Location.Error.t list] + Ppxlib_traverse_builtins.std_lift_mappers_with_context
inherit [Ppxlib__.Expansion_context.Base.t, Ppxlib__.Location.Error.t list] + Ppxlib_ast.Ast.lift_map_with_context
diff --git a/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-map_with_path/index.html b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-map_with_path/index.html new file mode 100644 index 000000000..6c9a89e24 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-map_with_path/index.html @@ -0,0 +1,2 @@ + +map_with_path (docs.findlib-1.ppxlib.Ppxlib.Ast_traverse.map_with_path)

Class Ast_traverse.map_with_path

diff --git a/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-sexp_of/index.html b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-sexp_of/index.html new file mode 100644 index 000000000..91b08ca3b --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_traverse/class-sexp_of/index.html @@ -0,0 +1,2 @@ + +sexp_of (docs.findlib-1.ppxlib.Ppxlib.Ast_traverse.sexp_of)

Class Ast_traverse.sexp_of

diff --git a/findlib-1/ppxlib/Ppxlib/Ast_traverse/index.html b/findlib-1/ppxlib/Ppxlib/Ast_traverse/index.html new file mode 100644 index 000000000..668892bfe --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Ast_traverse/index.html @@ -0,0 +1,28 @@ + +Ast_traverse (docs.findlib-1.ppxlib.Ppxlib.Ast_traverse)

Module Ppxlib.Ast_traverse

This module provides AST traversal classes, such as maps, iterations, folds, etc. on the Parsetree types.

For a detailed explanation on this module, refer to the relevant part of the manual.

API

To use these classes, inherit from them and override the methods corresponding to the types from Parsetree you want to process. For instance to collect all the string constants in a structure:

let string_constants_of =
+  object
+    inherit [string list] Ast_traverse.fold as super
+
+    method! expression e acc =
+      let acc = super#expression e acc in
+      match e.pexp_desc with
+      | Pexp_constant (Const_string (s, _)) -> s :: acc
+      | _ -> acc
+
+    method! pattern p acc =
+      let acc = super#pattern p acc in
+      match p.ppat_desc with
+      | Ppat_constant (Const_string (s, _)) -> s :: acc
+      | _ -> acc
+  end
+
+let string_constants_of_structure = string_constants_of#structure
class map : object ... end
class iter : object ... end
class 'acc fold : object ... end
class 'acc fold_map : object ... end
class 'ctx map_with_context : object ... end
val do_not_enter_value_binding : + (Astlib.Ast_500.Parsetree.value_binding, unit) Attribute.t
val do_not_enter_value_description : + (Astlib.Ast_500.Parsetree.value_description, unit) Attribute.t
val do_not_enter_module_binding : + (Astlib.Ast_500.Parsetree.module_binding, unit) Attribute.t
val do_not_enter_module_declaration : + (Astlib.Ast_500.Parsetree.module_declaration, unit) Attribute.t
val do_not_enter_module_type_declaration : + (Astlib.Ast_500.Parsetree.module_type_declaration, unit) Attribute.t
val do_not_enter_let_module : + (Astlib.Ast_500.Parsetree.expression, unit) Attribute.t
class virtual 'res lift : object ... end
class virtual ['ctx, 'res] lift_map_with_context : object ... end
class sexp_of : object ... end
val sexp_of : sexp_of
diff --git a/findlib-1/ppxlib/Ppxlib/Attribute/Context/index.html b/findlib-1/ppxlib/Ppxlib/Attribute/Context/index.html new file mode 100644 index 000000000..fd4745b42 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Attribute/Context/index.html @@ -0,0 +1,9 @@ + +Context (docs.findlib-1.ppxlib.Ppxlib.Attribute.Context)

Module Attribute.Context

type 'a t =
  1. | Label_declaration : Astlib.Ast_500.Parsetree.label_declaration t
  2. | Constructor_declaration : Astlib.Ast_500.Parsetree.constructor_declaration t
  3. | Type_declaration : Astlib.Ast_500.Parsetree.type_declaration t
  4. | Type_exception : Astlib.Ast_500.Parsetree.type_exception t
  5. | Type_extension : Astlib.Ast_500.Parsetree.type_extension t
  6. | Extension_constructor : Astlib.Ast_500.Parsetree.extension_constructor t
  7. | Pattern : Astlib.Ast_500.Parsetree.pattern t
  8. | Core_type : Astlib.Ast_500.Parsetree.core_type t
  9. | Expression : Astlib.Ast_500.Parsetree.expression t
  10. | Value_description : Astlib.Ast_500.Parsetree.value_description t
  11. | Class_type : Astlib.Ast_500.Parsetree.class_type t
  12. | Class_type_field : Astlib.Ast_500.Parsetree.class_type_field t
  13. | Class_infos : _ Astlib.Ast_500.Parsetree.class_infos t
  14. | Class_expr : Astlib.Ast_500.Parsetree.class_expr t
  15. | Class_field : Astlib.Ast_500.Parsetree.class_field t
  16. | Module_type : Astlib.Ast_500.Parsetree.module_type t
  17. | Module_declaration : Astlib.Ast_500.Parsetree.module_declaration t
  18. | Module_type_declaration : Astlib.Ast_500.Parsetree.module_type_declaration t
  19. | Module_substitution : Astlib.Ast_500.Parsetree.module_substitution t
  20. | Open_description : Astlib.Longident.t Astlib.Location.loc + Astlib.Ast_500.Parsetree.open_infos + t
  21. | Open_declaration : Astlib.Ast_500.Parsetree.module_expr + Astlib.Ast_500.Parsetree.open_infos + t
  22. | Include_infos : _ Astlib.Ast_500.Parsetree.include_infos t
  23. | Module_expr : Astlib.Ast_500.Parsetree.module_expr t
  24. | Value_binding : Astlib.Ast_500.Parsetree.value_binding t
  25. | Module_binding : Astlib.Ast_500.Parsetree.module_binding t
  26. | Pstr_eval : Astlib.Ast_500.Parsetree.structure_item t
  27. | Pstr_extension : Astlib.Ast_500.Parsetree.structure_item t
  28. | Psig_extension : Astlib.Ast_500.Parsetree.signature_item t
  29. | Rtag : Astlib.Ast_500.Parsetree.row_field t
  30. | Object_type_field : Astlib.Ast_500.Parsetree.object_field t
val constructor_declaration : + Astlib.Ast_500.Parsetree.constructor_declaration t
val module_type_declaration : + Astlib.Ast_500.Parsetree.module_type_declaration t
diff --git a/findlib-1/ppxlib/Ppxlib/Attribute/Floating/Context/index.html b/findlib-1/ppxlib/Ppxlib/Attribute/Floating/Context/index.html new file mode 100644 index 000000000..f1c83d91d --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Attribute/Floating/Context/index.html @@ -0,0 +1,2 @@ + +Context (docs.findlib-1.ppxlib.Ppxlib.Attribute.Floating.Context)

Module Floating.Context

diff --git a/findlib-1/ppxlib/Ppxlib/Attribute/Floating/index.html b/findlib-1/ppxlib/Ppxlib/Attribute/Floating/index.html new file mode 100644 index 000000000..f995bedf1 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Attribute/Floating/index.html @@ -0,0 +1,10 @@ + +Floating (docs.findlib-1.ppxlib.Ppxlib.Attribute.Floating)

Module Attribute.Floating

type ('context, 'payload) t
module Context : sig ... end
val declare : + string -> + 'a Context.t -> + (Astlib.Ast_500.Parsetree.payload, 'b, 'c) Ast_pattern.t -> + 'b -> + ('a, 'c) t
val name : (_, _) t -> string
val convert_res : + ('a, 'b) t list -> + 'a -> + ('b option, Location.Error.t Stdppx.NonEmptyList.t) result
val convert : ('a, 'b) t list -> 'a -> 'b option
diff --git a/findlib-1/ppxlib/Ppxlib/Attribute/index.html b/findlib-1/ppxlib/Ppxlib/Attribute/index.html new file mode 100644 index 000000000..210f630aa --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Attribute/index.html @@ -0,0 +1,47 @@ + +Attribute (docs.findlib-1.ppxlib.Ppxlib.Attribute)

Module Ppxlib.Attribute

This module provides hygiene for attributes. The goal is to report misuses of attributes to the user as soon as possible so that no mistyped attribute get silently ignored.

type ('context, 'payload) t

Type of declared attribute.

The 'context type parameter describes where the attribute is expected and the 'payload one what its payload should contain.

type packed =
  1. | T : (_, _) t -> packed
module Context : sig ... end
val declare : + string -> + 'a Context.t -> + (Astlib.Ast_500.Parsetree.payload, 'b, 'c) Ast_pattern.t -> + 'b -> + ('a, 'c) t

declare fully_qualified_name context payload_pattern k declares an attribute. k is used to build the value resulting from parsing the payload.

For instance if a rewriter named "foo" expect the attribute @@default on record field declaration with an expression as payload:

let default =
+  Attribute.declare "foo.default" Attribute.Context.label_declaration
+    Ast_pattern.(pstr (pstr_eval __ nil))
+    (fun x -> x)

fully_qualified_name is expected to be a dot-separated list of names. When matching, any full suffix will be accepted. So for instance an attribute declared with name "foo.bar.default" will match exactly these attribute names: "default", "bar.default" and "foo.bar.default".

Additionally it is possible to prevent a suffix to be shortened by prefixing it with '@'. So for instance an attribute declared with name "foo.@bar.default" will match exactly these attribute names: "bar.default" and "foo.bar.default".

When matching against a list of attributes on an item, if several matches are possible, the longest one is used. For instance using the attribute "foo.default" declared in the previous example, on this code it will match the @foo.default 0 attribute:

type t = { x : int [@default 42] [@foo.default 0] }

This is to allow the user to specify a @default attribute for all re-writers that use it but still put a specific one for one specific re-writer.

It is not allowed to declare an attribute with a name that matches a previously-defined one on the same context. For instance trying to declare the same attribute twice will fail.

val declare_with_name_loc : + string -> + 'a Context.t -> + (Astlib.Ast_500.Parsetree.payload, 'b, 'c) Ast_pattern.t -> + (name_loc:Location.t -> 'b) -> + ('a, 'c) t

Same as declare but the callback receives the location of the name of the attribute.

val declare_with_attr_loc : + string -> + 'a Context.t -> + (Astlib.Ast_500.Parsetree.payload, 'b, 'c) Ast_pattern.t -> + (attr_loc:Location.t -> 'b) -> + ('a, 'c) t

Same as declare but the callback receives the location of the attribute.

type 'a flag = ('a, unit) t

Types for attributes without payload.

val declare_flag : string -> 'a Context.t -> 'a flag

Same as declare, but the payload is expected to be empty. It is supposed to be used in conjunction with has_flag.

val name : (_, _) t -> string
val context : ('a, _) t -> 'a Context.t
val get_res : + ('a, 'b) t -> + ?mark_as_seen:bool -> + 'a -> + ('b option, Location.Error.t Stdppx.NonEmptyList.t) result

Gets the associated attribute value. Marks the attribute as seen unless mark_as_seen=false. Returns an Error if the attribute is duplicated

val get : ('a, 'b) t -> ?mark_as_seen:bool -> 'a -> 'b option

See get_res. Raises a located error if the attribute is duplicated

val has_flag_res : + 'a flag -> + ?mark_as_seen:bool -> + 'a -> + (bool, Location.Error.t Stdppx.NonEmptyList.t) result

Answers whether the given flag is attached as an attribute. See get_res for the meaning of mark_as_seen.

val has_flag : 'a flag -> ?mark_as_seen:bool -> 'a -> bool

See has_flag_res. Raises a located error if the attribute is duplicated.

val consume_res : + ('a, 'b) t -> + 'a -> + (('a * 'b) option, Location.Error.t Stdppx.NonEmptyList.t) result

consume_res t x returns the value associated to attribute t on x if present as well as x with t removed.

val consume : ('a, 'b) t -> 'a -> ('a * 'b) option

See consume_res. Raises a located exception in case of error.

val remove_seen_res : + 'a Context.t -> + packed list -> + 'a -> + ('a, Location.Error.t Stdppx.NonEmptyList.t) result

remove_seen x attrs removes the set of attributes matched by elements of attrs. Only remove them if they where seen by get or consume.

val remove_seen : 'a Context.t -> packed list -> 'a -> 'a

See remove_seen_res. Raises in case of error.

module Floating : sig ... end
val explicitly_drop : Ppxlib__.Ast_traverse0.iter

Code that is voluntarily dropped by a rewriter needs to be given to this object. All attributes inside will be marked as handled.

val check_unused : Ppxlib__.Ast_traverse0.iter

Raise if there are unused attributes.

val collect_unused_attributes_errors : + Location.Error.t list Ppxlib__.Ast_traverse0.fold

Collect all errors due to unused attributes.

val collect : Ppxlib__.Ast_traverse0.iter

Collect all attribute names. To be used in conjunction with check_all_seen.

val collect_unseen_errors : unit -> Location.Error.t list
val check_all_seen : unit -> unit

Check that all attributes collected by collect_unseen_errors have been:

  • matched at least once by one of: get, consume or Floating.convert
  • seen by check_unused (to allow allowlisted attributed to pass through)

This helps with faulty ppx rewriters that silently drop attributes.

val mark_as_handled_manually : Astlib.Ast_500.Parsetree.attribute -> unit

Mark an attribute as seen and handled. This is only to make ppx rewriters that don't use ppxlib works well with the ones that do use it.

val dropped_so_far_structure : + Astlib.Ast_500.Parsetree.structure_item list -> + string Loc.t list

Return the list of attributes that have been dropped so far: attributes that haven't been marked and are not present in the given AST. This is used to debug extensions that drop attributes.

val dropped_so_far_signature : + Astlib.Ast_500.Parsetree.signature_item list -> + string Loc.t list
val reset_checks : unit -> unit
val pattern : + ('a, 'b) t -> + ('a, 'c, 'd) Ast_pattern.t -> + ('a, 'b option -> 'c, 'd) Ast_pattern.t
val pattern_res : + ('a, 'b) t -> + ('a, 'c, 'd) Ast_pattern.t -> + ('a, 'b option -> 'c, ('d, Location.Error.t Stdppx.NonEmptyList.t) result) + Ast_pattern.t
diff --git a/findlib-1/ppxlib/Ppxlib/Caller_id/index.html b/findlib-1/ppxlib/Ppxlib/Caller_id/index.html new file mode 100644 index 000000000..2fb832d75 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Caller_id/index.html @@ -0,0 +1,2 @@ + +Caller_id (docs.findlib-1.ppxlib.Ppxlib.Caller_id)

Module Ppxlib.Caller_id

Small helper to find out who is the caller of a function

module Printexc = Printexc
type t = Printexc.location option
val get : skip:string list -> Stdlib__Printexc.location option
diff --git a/findlib-1/ppxlib/Ppxlib/Code_path/index.html b/findlib-1/ppxlib/Ppxlib/Code_path/index.html new file mode 100644 index 000000000..5fa8b7a58 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Code_path/index.html @@ -0,0 +1,2 @@ + +Code_path (docs.findlib-1.ppxlib.Ppxlib.Code_path)

Module Ppxlib.Code_path

This module contains type and functions for representing and manipulating path to AST nodes.

type t

Type for path to AST nodes

val file_path : t -> string

Return the path to the .ml or .mli file for this code path.

val main_module_name : t -> string

Return the module name corresponding to the file to which this code path leads to.

val submodule_path : t -> string list

Return the path within the main module this code path represents as a list of module names.

val enclosing_module : t -> string

Return the nearest enclosing module name. Does descend into expressions.

val value : t -> string option

Return the name of the value to which this code path leads or None if it leads to the toplevel of a module or submodule.

val enclosing_value : t -> string option

Like value, returns the name of an enclosing value definition. Unlike value, includes names inside expressions, not just names that the code path can reach from the toplevel module.

val fully_qualified_path : t -> string

Return the fully qualified path to the module or value this code path leads to, eg "Some_main_module.Some_submodule.some_value". Note that the fully qualified path doesn't descend into expressions which means it will always stop at the first value description or value binding.

val to_string_path : t -> string

Return the string version of this code path as built by Ast_traverse.map_with_path. Used for compatibility with path from version 0.5.0 and lower.

diff --git a/findlib-1/ppxlib/Ppxlib/Context_free/Rule/Constant_kind/index.html b/findlib-1/ppxlib/Ppxlib/Context_free/Rule/Constant_kind/index.html new file mode 100644 index 000000000..6cca47120 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Context_free/Rule/Constant_kind/index.html @@ -0,0 +1,2 @@ + +Constant_kind (docs.findlib-1.ppxlib.Ppxlib.Context_free.Rule.Constant_kind)

Module Rule.Constant_kind

Used for the constant function.

type t =
  1. | Float
  2. | Integer
diff --git a/findlib-1/ppxlib/Ppxlib/Context_free/Rule/index.html b/findlib-1/ppxlib/Ppxlib/Context_free/Rule/index.html new file mode 100644 index 000000000..5b6cda19e --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Context_free/Rule/index.html @@ -0,0 +1,88 @@ + +Rule (docs.findlib-1.ppxlib.Ppxlib.Context_free.Rule)

Module Context_free.Rule

Local rewriting rules.

This module lets you define local rewriting rules, such as extension point expanders. It is not completely generic and you cannot define any kind of rewriting, it currently focuses on what is commonly used. New scheme can be added on demand.

We have some ideas to make this fully generic, but this hasn't been a priority so far.

type t
val extension : Extension.t -> t

Rewrite an extension point

val special_function : + string -> + (Astlib.Ast_500.Parsetree.expression -> + Astlib.Ast_500.Parsetree.expression option) -> + t

special_function id expand is a rule to rewrite a function call at parsing time. id is the identifier to match on and expand is used to expand the full function application (it gets the Pexp_apply node). If the function is found in the tree without being applied, expand gets only the identifier (Pexp_ident node) so you should handle both cases.

If id is an operator identifier and contains dots, it should be parenthesized (e.g. "(+.+)"). Another option is to use the special_function' variant which takes directly a Longident.t argument.

expand must decide whether the expression it receive can be rewritten or not. Especially ppxlib makes the assumption that expand is idempotent. It will loop if it is not.

module Constant_kind : sig ... end

Used for the constant function.

val constant : + Constant_kind.t -> + char -> + (Location.t -> string -> Ppxlib_ast.Parsetree.expression) -> + t

constant kind suffix expander Registers an extension for transforming constants literals, based on the suffix character.

The rest of this API is for rewriting rules that apply when a certain attribute is present. The API is not complete and is currently only enough to implement deriving.

type ('a, 'b, 'c) attr_group_inline = + ('b, 'c) Attribute.t -> + (ctxt:Expansion_context.Deriver.t -> + Ppxlib_ast.Asttypes.rec_flag -> + 'b list -> + 'c option list -> + 'a list) -> + t

Match the attribute on a group of items, such as a group of recursive type definitions (Pstr_type, Psig_type). The expander will be triggered if any of the item has the attribute. The expander is called as follow:

expand ~loc ~path rec_flag items values

where values is the list of values associated to the attribute for each item in items. expand must return a list of element to add after the group. For instance a list of structure item to add after a group of type definitions.

The _expect variants are for producing code that is compared to what the user wrote in the source code.

type ('a, 'b, 'c) attr_inline = + ('b, 'c) Attribute.t -> + (ctxt:Expansion_context.Deriver.t -> 'b -> 'c -> 'a list) -> + t

Same as attr_group_inline but for elements that are not part of a group, such as exceptions and type extensions

diff --git a/findlib-1/ppxlib/Ppxlib/Context_free/class-map_top_down/index.html b/findlib-1/ppxlib/Ppxlib/Context_free/class-map_top_down/index.html new file mode 100644 index 000000000..8ddd3e7ec --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Context_free/class-map_top_down/index.html @@ -0,0 +1,2 @@ + +map_top_down (docs.findlib-1.ppxlib.Ppxlib.Context_free.map_top_down)

Class Context_free.map_top_down

inherit Ppxlib__.Ast_traverse.map_with_expansion_context_and_errors
diff --git a/findlib-1/ppxlib/Ppxlib/Context_free/index.html b/findlib-1/ppxlib/Ppxlib/Context_free/index.html new file mode 100644 index 000000000..3fd0b99a6 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Context_free/index.html @@ -0,0 +1,3 @@ + +Context_free (docs.findlib-1.ppxlib.Ppxlib.Context_free)

Module Ppxlib.Context_free

Context free rewriting, to define local rewriting rules that will all be applied at once by the driver.

module Rule : sig ... end

Local rewriting rules.

class map_top_down : ?expect_mismatch_handler:{Expect_mismatch_handler}2.t -> ?generated_code_hook: + {Generated_code_hook}1.t -> ?embed_errors:bool -> Rule.t list -> object ... end
diff --git a/findlib-1/ppxlib/Ppxlib/Deriving/Args/index.html b/findlib-1/ppxlib/Ppxlib/Deriving/Args/index.html new file mode 100644 index 000000000..5e1db23a0 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Deriving/Args/index.html @@ -0,0 +1,1019 @@ + +Args (docs.findlib-1.ppxlib.Ppxlib.Deriving.Args)

Module Deriving.Args

Specification of generator arguments

type ('a, 'b) t
type 'a param
val empty : ('m, 'm) t
val arg : + string -> + (Astlib.Ast_500.Parsetree.expression, 'a -> 'a option, 'a option) + Ast_pattern.t -> + 'a option param
val flag : string -> bool param

Flag matches punned labelled argument, i.e. of the form ~foo. It returns true iff the argument is present.

val (+>) : ('m1, 'a -> 'm2) t -> 'a param -> ('m1, 'm2) t

For convenience, so that one can write the following without having to open both Ast_pattern and Deriving.Args:

Deriving.Args.(
+  empty
+  +> arg_option "foo" (estring __)
+  +> arg_option "bar" (pack2 (eint __ ** eint __))
+  +> flag "dotdotdot")
include module type of struct include Ast_pattern end + with type ('a, 'b, 'c) t := ('a, 'b, 'c) Ast_pattern.t

For a detailed explanation on this module, refer to the relevant part of the manual.

API

val parse : + ('a, 'b, 'c) Ast_pattern.t -> + Location.t -> + ?on_error:(unit -> 'c) -> + 'a -> + 'b -> + 'c

Matches a value against a pattern. Raise a located error in case of failure.

val parse_res : + ('a, 'b, 'c) Ast_pattern.t -> + Location.t -> + ?on_error:(unit -> 'c) -> + 'a -> + 'b -> + ('c, Location.Error.t Stdppx.NonEmptyList.t) result

Matches a value against a pattern and return a result.

module Packed = Ast_pattern.Packed
val __ : ('a, 'a -> 'b, 'b) Ast_pattern.t

Pattern that captures its input.

val __' : ('a, 'a Loc.t -> 'b, 'b) Ast_pattern.t

Same as __ but also captures the location.

Note: this should only be used for types that do not embed a location. For instance you can use it to capture a string constant:

estring __'

but using it to capture an expression would not yield the expected result:

pair (eint (int 42)) __'

In the latter case you should use the pexp_loc field of the captured expression instead.

val drop : ('a, 'b, 'b) Ast_pattern.t

Useful when some part of the AST is irrelevant. With __, the captured value is passed to the continuation, with drop it is ignored. In higher-level pattern matching, it is called wildcard pattern.

val as__ : ('a, 'b, 'c) Ast_pattern.t -> ('a, 'a -> 'b, 'c) Ast_pattern.t

As-pattern. Passes the current node to the continuation.

Pitfall. In general, the continuation is called step by step by being applied partially to every next captured node in the pattern. That means that the node captured by as__ is passed to the continuation before checking if the pattern is matched.

val alt : + ('a, 'b, 'c) Ast_pattern.t -> + ('a, 'b, 'c) Ast_pattern.t -> + ('a, 'b, 'c) Ast_pattern.t

alt stands for `alternatives'. It matches either the first pattern or the second one.

val alt_option : + ('a, 'v -> 'b, 'c) Ast_pattern.t -> + ('a, 'b, 'c) Ast_pattern.t -> + ('a, 'v option -> 'b, 'c) Ast_pattern.t

Same as alt, for the common case where the left-hand-side captures a value but not the right-hand-side.

val (|||) : + ('a, 'b, 'c) Ast_pattern.t -> + ('a, 'b, 'c) Ast_pattern.t -> + ('a, 'b, 'c) Ast_pattern.t

Same as alt

val map : + ('a, 'b, 'c) Ast_pattern.t -> + f:('d -> 'b) -> + ('a, 'd, 'c) Ast_pattern.t
val map' : + ('a, 'b, 'c) Ast_pattern.t -> + f:(Location.t -> 'd -> 'b) -> + ('a, 'd, 'c) Ast_pattern.t
val map_result : + ('a, 'b, 'c) Ast_pattern.t -> + f:('c -> 'd) -> + ('a, 'b, 'd) Ast_pattern.t
val (>>|) : + ('a, 'b, 'c) Ast_pattern.t -> + ('d -> 'b) -> + ('a, 'd, 'c) Ast_pattern.t

Same as map

val map0 : + ('a, 'b, 'c) Ast_pattern.t -> + f:'v -> + ('a, 'v -> 'b, 'c) Ast_pattern.t
val map1 : + ('a, 'v1 -> 'b, 'c) Ast_pattern.t -> + f:('v1 -> 'v) -> + ('a, 'v -> 'b, 'c) Ast_pattern.t
val map2 : + ('a, 'v1 -> 'v2 -> 'b, 'c) Ast_pattern.t -> + f:('v1 -> 'v2 -> 'v) -> + ('a, 'v -> 'b, 'c) Ast_pattern.t
val map0' : + ('a, 'b, 'c) Ast_pattern.t -> + f:(Location.t -> 'v) -> + ('a, 'v -> 'b, 'c) Ast_pattern.t
val map1' : + ('a, 'v1 -> 'b, 'c) Ast_pattern.t -> + f:(Location.t -> 'v1 -> 'v) -> + ('a, 'v -> 'b, 'c) Ast_pattern.t
val map2' : + ('a, 'v1 -> 'v2 -> 'b, 'c) Ast_pattern.t -> + f:(Location.t -> 'v1 -> 'v2 -> 'v) -> + ('a, 'v -> 'b, 'c) Ast_pattern.t
val map_value : + ('a, 'b, 'c) Ast_pattern.t -> + f:('d -> 'a) -> + ('d, 'b, 'c) Ast_pattern.t
val map_value' : + ('a, 'b, 'c) Ast_pattern.t -> + f:(Astlib.Location.t -> 'd -> 'a) -> + ('d, 'b, 'c) Ast_pattern.t
val nil : (_ list, 'a, 'a) Ast_pattern.t
val (^::) : + ('a, 'b, 'c) Ast_pattern.t -> + ('a list, 'c, 'd) Ast_pattern.t -> + ('a list, 'b, 'd) Ast_pattern.t
val many : + ('a, 'b -> 'c, 'c) Ast_pattern.t -> + ('a list, 'b list -> 'c, 'c) Ast_pattern.t
val int : int -> (int, 'a, 'a) Ast_pattern.t
val char : char -> (char, 'a, 'a) Ast_pattern.t
val string : string -> (string, 'a, 'a) Ast_pattern.t
val float : float -> (float, 'a, 'a) Ast_pattern.t
val int32 : int32 -> (int32, 'a, 'a) Ast_pattern.t
val int64 : int64 -> (int64, 'a, 'a) Ast_pattern.t
val nativeint : nativeint -> (nativeint, 'a, 'a) Ast_pattern.t
val bool : bool -> (bool, 'a, 'a) Ast_pattern.t
val ebool : + (bool, 'a, 'b) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ast_pattern.t
val pbool : + (bool, 'a, 'b) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ast_pattern.t
val cst : + to_string:('a -> string) -> + ?equal:('a -> 'a -> bool) -> + 'a -> + ('a, 'b, 'b) Ast_pattern.t
val none : (_ option, 'a, 'a) Ast_pattern.t
val some : ('a, 'b, 'c) Ast_pattern.t -> ('a option, 'b, 'c) Ast_pattern.t
val pair : + ('a1, 'b, 'c) Ast_pattern.t -> + ('a2, 'c, 'd) Ast_pattern.t -> + ('a1 * 'a2, 'b, 'd) Ast_pattern.t
val (**) : + ('a1, 'b, 'c) Ast_pattern.t -> + ('a2, 'c, 'd) Ast_pattern.t -> + ('a1 * 'a2, 'b, 'd) Ast_pattern.t
val triple : + ('a1, 'b, 'c) Ast_pattern.t -> + ('a2, 'c, 'd) Ast_pattern.t -> + ('a3, 'd, 'e) Ast_pattern.t -> + ('a1 * 'a2 * 'a3, 'b, 'e) Ast_pattern.t
val loc : ('a, 'b, 'c) Ast_pattern.t -> ('a Loc.t, 'b, 'c) Ast_pattern.t
val pack0 : ('a, 'b, 'c) Ast_pattern.t -> ('a, unit -> 'b, 'c) Ast_pattern.t
val pack2 : + ('a, 'b -> 'c -> 'd, 'e) Ast_pattern.t -> + ('a, ('b * 'c) -> 'd, 'e) Ast_pattern.t
val pack3 : + ('a, 'b -> 'c -> 'd -> 'e, 'f) Ast_pattern.t -> + ('a, ('b * 'c * 'd) -> 'e, 'f) Ast_pattern.t

AST patterns for each constructor/record of the parsetree are generated in the same way AST builders are generated. In addition, for every wrapper we generate a pattern to match the loc and attributes fields. For instance for the expression type:

val pexp_loc :
+  (Location.t, 'a, 'b) t ->
+  (expression, 'b, 'c) t ->
+  (expression, 'a, 'c) t
+
+val pexp_attributes :
+  (attributes, 'a, 'b) t ->
+  (expression, 'b, 'c) t ->
+  (expression, 'a, 'c) t
val nolabel : + (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t
val labelled : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Asttypes.arg_label, 'c, 'd) Ppxlib__.Ast_pattern0.t
val optional : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Asttypes.arg_label, 'c, 'd) Ppxlib__.Ast_pattern0.t
val binding_op : + op:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + pat:(Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + exp:(Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.binding_op, 'g, 'h) Ppxlib__.Ast_pattern0.t
val case : + lhs:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + guard: + (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + rhs:(Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.case, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pcl_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcl_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcl_constr : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcl_structure : + (Astlib.Ast_500.Parsetree.class_structure, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcl_fun : + (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'g, 'h) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'i, 'j) Ppxlib__.Ast_pattern0.t
val pcl_apply : + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + ((Astlib.Ast_500.Asttypes.arg_label * Astlib.Ast_500.Parsetree.expression) + list, + 'c, + 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcl_let : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_binding list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pcl_constraint : + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcl_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcl_open : + (Astlib.Longident.t Astlib.Location.loc Astlib.Ast_500.Parsetree.open_infos, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcf_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcf_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcf_inherit : + (Astlib.Ast_500.Asttypes.override_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (string Astlib.Location.loc option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pcf_val : + (string Astlib.Location.loc + * Astlib.Ast_500.Asttypes.mutable_flag + * Astlib.Ast_500.Parsetree.class_field_kind, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcf_method : + (string Astlib.Location.loc + * Astlib.Ast_500.Asttypes.private_flag + * Astlib.Ast_500.Parsetree.class_field_kind, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcf_constraint : + (Astlib.Ast_500.Parsetree.core_type * Astlib.Ast_500.Parsetree.core_type, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcf_initializer : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcf_attribute : + (Astlib.Ast_500.Parsetree.attribute, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcf_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val cfk_virtual : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field_kind, 'c, 'd) Ppxlib__.Ast_pattern0.t
val cfk_concrete : + (Astlib.Ast_500.Asttypes.override_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field_kind, 'e, 'f) Ppxlib__.Ast_pattern0.t
val class_infos_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + ('c Astlib.Ast_500.Parsetree.class_infos, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + ('f Astlib.Ast_500.Parsetree.class_infos, 'g, 'h) Ppxlib__.Ast_pattern0.t
val class_infos : + virt:(Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + params: + ((Astlib.Ast_500.Parsetree.core_type + * (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity)) + list, + 'c, + 'd) + Ppxlib__.Ast_pattern0.t -> + name:(string, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + expr:('g, 'h, 'i) Ppxlib__.Ast_pattern0.t -> + ('j Astlib.Ast_500.Parsetree.class_infos, 'k, 'l) Ppxlib__.Ast_pattern0.t
val class_signature : + self:(Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + fields: + (Astlib.Ast_500.Parsetree.class_type_field list, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_signature, 'e, 'f) Ppxlib__.Ast_pattern0.t
val class_structure : + self:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + fields: + (Astlib.Ast_500.Parsetree.class_field list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_structure, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcty_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcty_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcty_constr : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcty_signature : + (Astlib.Ast_500.Parsetree.class_signature, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcty_arrow : + (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pcty_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pcty_open : + (Astlib.Longident.t Astlib.Location.loc Astlib.Ast_500.Parsetree.open_infos, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pctf_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pctf_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pctf_inherit : + (Astlib.Ast_500.Parsetree.class_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pctf_val : + (string Astlib.Location.loc + * Astlib.Ast_500.Asttypes.mutable_flag + * Astlib.Ast_500.Asttypes.virtual_flag + * Astlib.Ast_500.Parsetree.core_type, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pctf_method : + (string Astlib.Location.loc + * Astlib.Ast_500.Asttypes.private_flag + * Astlib.Ast_500.Asttypes.virtual_flag + * Astlib.Ast_500.Parsetree.core_type, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pctf_constraint : + (Astlib.Ast_500.Parsetree.core_type * Astlib.Ast_500.Parsetree.core_type, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pctf_attribute : + (Astlib.Ast_500.Parsetree.attribute, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pctf_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val closed : + (Astlib.Ast_500.Asttypes.closed_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val open_ : + (Astlib.Ast_500.Asttypes.closed_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val pconst_integer : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (char option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constant, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pconst_char : + (char, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constant, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pconst_string : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Location.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (string option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constant, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pconst_float : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (char option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constant, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pcstr_tuple : + (Astlib.Ast_500.Parsetree.core_type list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constructor_arguments, 'c, 'd) + Ppxlib__.Ast_pattern0.t
val pcstr_record : + (Astlib.Ast_500.Parsetree.label_declaration list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constructor_arguments, 'c, 'd) + Ppxlib__.Ast_pattern0.t
val constructor_declaration_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constructor_declaration, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constructor_declaration, 'e, 'f) + Ppxlib__.Ast_pattern0.t
val constructor_declaration : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + vars:(string Astlib.Location.loc list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + args: + (Astlib.Ast_500.Parsetree.constructor_arguments, 'e, 'f) + Ppxlib__.Ast_pattern0.t -> + res: + (Astlib.Ast_500.Parsetree.core_type option, 'g, 'h) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constructor_declaration, 'i, 'j) + Ppxlib__.Ast_pattern0.t
val ptyp_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ptyp_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ptyp_any : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
val ptyp_var : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ptyp_arrow : + (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'g, 'h) Ppxlib__.Ast_pattern0.t
val ptyp_tuple : + (Astlib.Ast_500.Parsetree.core_type list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ptyp_constr : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ptyp_object : + (Astlib.Ast_500.Parsetree.object_field list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Asttypes.closed_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ptyp_class : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ptyp_alias : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ptyp_variant : + (Astlib.Ast_500.Parsetree.row_field list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Asttypes.closed_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (string list option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'g, 'h) Ppxlib__.Ast_pattern0.t
val ptyp_poly : + (string Astlib.Location.loc list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ptyp_package : + (Astlib.Longident.t Astlib.Location.loc + * (Astlib.Longident.t Astlib.Location.loc + * Astlib.Ast_500.Parsetree.core_type) + list, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ptyp_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val upto : + (Astlib.Ast_500.Asttypes.direction_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val downto_ : + (Astlib.Ast_500.Asttypes.direction_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val pdira_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.directive_argument, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.directive_argument, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pdir_string : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.directive_argument, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pdir_int : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (char option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.directive_argument, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pdir_ident : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.directive_argument, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pdir_bool : + (bool, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.directive_argument, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_ident : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_constant : + (Astlib.Ast_500.Parsetree.constant, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_let : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_binding list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pexp_function : + (Astlib.Ast_500.Parsetree.case list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_fun : + (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'i, 'j) Ppxlib__.Ast_pattern0.t
val pexp_apply : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + ((Astlib.Ast_500.Asttypes.arg_label * Astlib.Ast_500.Parsetree.expression) + list, + 'c, + 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_match : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.case list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_try : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.case list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_tuple : + (Astlib.Ast_500.Parsetree.expression list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_construct : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_variant : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_record : + ((Astlib.Longident.t Astlib.Location.loc + * Astlib.Ast_500.Parsetree.expression) + list, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_field : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_setfield : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pexp_array : + (Astlib.Ast_500.Parsetree.expression list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_ifthenelse : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pexp_sequence : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_while : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_for : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Asttypes.direction_flag, 'g, 'h) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'i, 'j) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'k, 'l) Ppxlib__.Ast_pattern0.t
val pexp_constraint : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_coerce : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pexp_send : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_new : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_setinstvar : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_override : + ((string Astlib.Location.loc * Astlib.Ast_500.Parsetree.expression) list, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_letmodule : + (string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
val pexp_letexception : + (Astlib.Ast_500.Parsetree.extension_constructor, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_assert : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_lazy : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_poly : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_object : + (Astlib.Ast_500.Parsetree.class_structure, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_newtype : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_pack : + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_open : + (Astlib.Ast_500.Parsetree.module_expr Astlib.Ast_500.Parsetree.open_infos, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pexp_letop : + (Astlib.Ast_500.Parsetree.letop, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pexp_unreachable : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
val extension_constructor_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.extension_constructor, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.extension_constructor, 'e, 'f) + Ppxlib__.Ast_pattern0.t
val extension_constructor : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + kind: + (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.extension_constructor, 'e, 'f) + Ppxlib__.Ast_pattern0.t
val pext_decl : + (string Astlib.Location.loc list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constructor_arguments, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'g, 'h) + Ppxlib__.Ast_pattern0.t
val pext_rebind : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'c, 'd) + Ppxlib__.Ast_pattern0.t
val unit : + (Astlib.Ast_500.Parsetree.functor_parameter, 'a, 'b) Ppxlib__.Ast_pattern0.t
val named : + (string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.functor_parameter, 'e, 'f) Ppxlib__.Ast_pattern0.t
val include_infos_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + ('c Astlib.Ast_500.Parsetree.include_infos, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + ('f Astlib.Ast_500.Parsetree.include_infos, 'g, 'h) Ppxlib__.Ast_pattern0.t
val include_infos : + mod_:('a, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + ('d Astlib.Ast_500.Parsetree.include_infos, 'e, 'f) Ppxlib__.Ast_pattern0.t
val injective : + (Astlib.Ast_500.Asttypes.injectivity, 'a, 'b) Ppxlib__.Ast_pattern0.t
val noinjectivity : + (Astlib.Ast_500.Asttypes.injectivity, 'a, 'b) Ppxlib__.Ast_pattern0.t
val label_declaration_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.label_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.label_declaration, 'e, 'f) Ppxlib__.Ast_pattern0.t
val label_declaration : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + mutable_: + (Astlib.Ast_500.Asttypes.mutable_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + type_:(Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.label_declaration, 'g, 'h) Ppxlib__.Ast_pattern0.t
val letop : + let_:(Astlib.Ast_500.Parsetree.binding_op, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + ands: + (Astlib.Ast_500.Parsetree.binding_op list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + body:(Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.letop, 'g, 'h) Ppxlib__.Ast_pattern0.t
val location : + start:(Lexing.position, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + end_:(Lexing.position, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + ghost:(bool, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Location.t, 'g, 'h) Ppxlib__.Ast_pattern0.t
val lident : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ldot : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'e, 'f) Ppxlib__.Ast_pattern0.t
val lapply : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'e, 'f) Ppxlib__.Ast_pattern0.t
val module_binding_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_binding, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_binding, 'e, 'f) Ppxlib__.Ast_pattern0.t
val module_binding : + name:(string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + expr:(Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_binding, 'e, 'f) Ppxlib__.Ast_pattern0.t
val module_declaration_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_declaration, 'e, 'f) Ppxlib__.Ast_pattern0.t
val module_declaration : + name:(string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + type_:(Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_declaration, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmod_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmod_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmod_ident : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pmod_structure : + (Astlib.Ast_500.Parsetree.structure_item list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pmod_functor : + (Astlib.Ast_500.Parsetree.functor_parameter, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmod_apply : + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmod_constraint : + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmod_unpack : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pmod_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
val module_substitution_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_substitution, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_substitution, 'e, 'f) + Ppxlib__.Ast_pattern0.t
val module_substitution : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + manifest:(Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_substitution, 'e, 'f) + Ppxlib__.Ast_pattern0.t
val pmty_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmty_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmty_ident : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pmty_signature : + (Astlib.Ast_500.Parsetree.signature_item list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pmty_functor : + (Astlib.Ast_500.Parsetree.functor_parameter, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmty_with : + (Astlib.Ast_500.Parsetree.module_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint list, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pmty_typeof : + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pmty_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pmty_alias : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
val module_type_declaration_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type_declaration, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type_declaration, 'e, 'f) + Ppxlib__.Ast_pattern0.t
val module_type_declaration : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + type_: + (Astlib.Ast_500.Parsetree.module_type option, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type_declaration, 'e, 'f) + Ppxlib__.Ast_pattern0.t
val immutable : + (Astlib.Ast_500.Asttypes.mutable_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val mutable_ : + (Astlib.Ast_500.Asttypes.mutable_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val pof_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pof_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val otag : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val oinherit : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val open_infos_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + ('c Astlib.Ast_500.Parsetree.open_infos, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + ('f Astlib.Ast_500.Parsetree.open_infos, 'g, 'h) Ppxlib__.Ast_pattern0.t
val open_infos : + expr:('a, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + override: + (Astlib.Ast_500.Asttypes.override_flag, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + ('f Astlib.Ast_500.Parsetree.open_infos, 'g, 'h) Ppxlib__.Ast_pattern0.t
val override : + (Astlib.Ast_500.Asttypes.override_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val fresh : + (Astlib.Ast_500.Asttypes.override_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val ppat_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_any : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
val ppat_var : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_alias : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_constant : + (Astlib.Ast_500.Parsetree.constant, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_interval : + (Astlib.Ast_500.Parsetree.constant, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constant, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_tuple : + (Astlib.Ast_500.Parsetree.pattern list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_construct : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + ((string Astlib.Location.loc list * Astlib.Ast_500.Parsetree.pattern) option, + 'c, + 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_variant : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_record : + ((Astlib.Longident.t Astlib.Location.loc * Astlib.Ast_500.Parsetree.pattern) + list, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Asttypes.closed_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_array : + (Astlib.Ast_500.Parsetree.pattern list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_or : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_constraint : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ppat_type : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_lazy : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_unpack : + (string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_exception : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat_open : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pstr : + (Astlib.Ast_500.Parsetree.structure_item list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.payload, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig : + (Astlib.Ast_500.Parsetree.signature_item list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.payload, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ptyp : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.payload, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ppat : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.payload, 'e, 'f) Ppxlib__.Ast_pattern0.t
val position : + fname:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + lnum:(int, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + bol:(int, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + cnum:(int, 'g, 'h) Ppxlib__.Ast_pattern0.t -> + (Lexing.position, 'i, 'j) Ppxlib__.Ast_pattern0.t
val private_ : + (Astlib.Ast_500.Asttypes.private_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val public : + (Astlib.Ast_500.Asttypes.private_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val nonrecursive : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val recursive : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val prf_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val prf_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
val rtag : + (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (bool, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type list, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'g, 'h) Ppxlib__.Ast_pattern0.t
val rinherit : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
val psig_value : + (Astlib.Ast_500.Parsetree.value_description, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_type : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration list, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
val psig_typesubst : + (Astlib.Ast_500.Parsetree.type_declaration list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_typext : + (Astlib.Ast_500.Parsetree.type_extension, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_exception : + (Astlib.Ast_500.Parsetree.type_exception, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_module : + (Astlib.Ast_500.Parsetree.module_declaration, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_modsubst : + (Astlib.Ast_500.Parsetree.module_substitution, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_recmodule : + (Astlib.Ast_500.Parsetree.module_declaration list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_modtype : + (Astlib.Ast_500.Parsetree.module_type_declaration, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_modtypesubst : + (Astlib.Ast_500.Parsetree.module_type_declaration, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_open : + (Astlib.Longident.t Astlib.Location.loc Astlib.Ast_500.Parsetree.open_infos, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_include : + (Astlib.Ast_500.Parsetree.module_type Astlib.Ast_500.Parsetree.include_infos, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_class : + (Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos + list, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_class_type : + (Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos + list, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_attribute : + (Astlib.Ast_500.Parsetree.attribute, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val psig_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.attribute list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pstr_loc : + (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pstr_eval : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.attribute list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pstr_value : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_binding list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pstr_primitive : + (Astlib.Ast_500.Parsetree.value_description, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_type : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration list, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pstr_typext : + (Astlib.Ast_500.Parsetree.type_extension, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_exception : + (Astlib.Ast_500.Parsetree.type_exception, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_module : + (Astlib.Ast_500.Parsetree.module_binding, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_recmodule : + (Astlib.Ast_500.Parsetree.module_binding list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_modtype : + (Astlib.Ast_500.Parsetree.module_type_declaration, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_open : + (Astlib.Ast_500.Parsetree.module_expr Astlib.Ast_500.Parsetree.open_infos, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_class : + (Astlib.Ast_500.Parsetree.class_expr Astlib.Ast_500.Parsetree.class_infos + list, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_class_type : + (Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos + list, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_include : + (Astlib.Ast_500.Parsetree.module_expr Astlib.Ast_500.Parsetree.include_infos, + 'a, + 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_attribute : + (Astlib.Ast_500.Parsetree.attribute, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
val pstr_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.attribute list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
val toplevel_directive : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + arg: + (Astlib.Ast_500.Parsetree.directive_argument option, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.toplevel_directive, 'e, 'f) Ppxlib__.Ast_pattern0.t
val ptop_def : + (Astlib.Ast_500.Parsetree.structure_item list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.toplevel_phrase, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ptop_dir : + (Astlib.Ast_500.Parsetree.toplevel_directive, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.toplevel_phrase, 'c, 'd) Ppxlib__.Ast_pattern0.t
val type_declaration_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration, 'e, 'f) Ppxlib__.Ast_pattern0.t
val type_declaration : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + params: + ((Astlib.Ast_500.Parsetree.core_type + * (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity)) + list, + 'c, + 'd) + Ppxlib__.Ast_pattern0.t -> + cstrs: + ((Astlib.Ast_500.Parsetree.core_type + * Astlib.Ast_500.Parsetree.core_type + * Astlib.Location.t) + list, + 'e, + 'f) + Ppxlib__.Ast_pattern0.t -> + kind:(Astlib.Ast_500.Parsetree.type_kind, 'g, 'h) Ppxlib__.Ast_pattern0.t -> + private_: + (Astlib.Ast_500.Asttypes.private_flag, 'i, 'j) Ppxlib__.Ast_pattern0.t -> + manifest: + (Astlib.Ast_500.Parsetree.core_type option, 'k, 'l) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration, 'm, 'n) Ppxlib__.Ast_pattern0.t
val type_exception_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_exception, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_exception, 'e, 'f) Ppxlib__.Ast_pattern0.t
val type_exception : + constructor: + (Astlib.Ast_500.Parsetree.extension_constructor, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_exception, 'c, 'd) Ppxlib__.Ast_pattern0.t
val type_extension_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_extension, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_extension, 'e, 'f) Ppxlib__.Ast_pattern0.t
val type_extension : + path:(Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + params: + ((Astlib.Ast_500.Parsetree.core_type + * (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity)) + list, + 'c, + 'd) + Ppxlib__.Ast_pattern0.t -> + constructors: + (Astlib.Ast_500.Parsetree.extension_constructor list, 'e, 'f) + Ppxlib__.Ast_pattern0.t -> + private_: + (Astlib.Ast_500.Asttypes.private_flag, 'g, 'h) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_extension, 'i, 'j) Ppxlib__.Ast_pattern0.t
val ptype_abstract : + (Astlib.Ast_500.Parsetree.type_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t
val ptype_variant : + (Astlib.Ast_500.Parsetree.constructor_declaration list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_kind, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ptype_record : + (Astlib.Ast_500.Parsetree.label_declaration list, 'a, 'b) + Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_kind, 'c, 'd) Ppxlib__.Ast_pattern0.t
val ptype_open : + (Astlib.Ast_500.Parsetree.type_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t
val value_binding_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_binding, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_binding, 'e, 'f) Ppxlib__.Ast_pattern0.t
val value_binding : + pat:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + expr:(Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_binding, 'e, 'f) Ppxlib__.Ast_pattern0.t
val value_description_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_description, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_description, 'e, 'f) Ppxlib__.Ast_pattern0.t
val value_description : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + type_:(Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + prim:(string list, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_description, 'g, 'h) Ppxlib__.Ast_pattern0.t
val covariant : + (Astlib.Ast_500.Asttypes.variance, 'a, 'b) Ppxlib__.Ast_pattern0.t
val contravariant : + (Astlib.Ast_500.Asttypes.variance, 'a, 'b) Ppxlib__.Ast_pattern0.t
val novariance : + (Astlib.Ast_500.Asttypes.variance, 'a, 'b) Ppxlib__.Ast_pattern0.t
val virtual_ : + (Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val concrete : + (Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
val pwith_type : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pwith_module : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pwith_modtype : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pwith_modtypesubst : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pwith_typesubst : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
val pwith_modsubst : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
val true_ : (bool, 'a, 'a) Ast_pattern.t
val false_ : (bool, 'a, 'a) Ast_pattern.t
val eint : + (int, 'a, 'b) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ast_pattern.t
val echar : + (char, 'a, 'b) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ast_pattern.t
val estring : + (string, 'a, 'b) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ast_pattern.t
val efloat : + (string, 'a, 'b) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ast_pattern.t
val eint32 : + (int32, 'a, 'b) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ast_pattern.t
val eint64 : + (int64, 'a, 'b) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ast_pattern.t
val enativeint : + (nativeint, 'a, 'b) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ast_pattern.t
val pint : + (int, 'a, 'b) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ast_pattern.t
val pchar : + (char, 'a, 'b) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ast_pattern.t
val pstring : + (string, 'a, 'b) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ast_pattern.t
val pfloat : + (string, 'a, 'b) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ast_pattern.t
val pint32 : + (int32, 'a, 'b) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ast_pattern.t
val pint64 : + (int64, 'a, 'b) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ast_pattern.t
val pnativeint : + (nativeint, 'a, 'b) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ast_pattern.t
val attribute : + name:(string, 'a, 'b) Ast_pattern.t -> + payload:(Astlib.Ast_500.Parsetree.payload, 'b, 'c) Ast_pattern.t -> + (Astlib.Ast_500.Parsetree.attribute, 'a, 'c) Ast_pattern.t
type context = Ast_pattern.context
val of_func : + (context -> Location.t -> 'a -> 'b -> 'c) -> + ('a, 'b, 'c) Ast_pattern.t
val to_func : + ('a, 'b, 'c) Ast_pattern.t -> + context -> + Location.t -> + 'a -> + 'b -> + 'c
diff --git a/findlib-1/ppxlib/Ppxlib/Deriving/Generator/V2/index.html b/findlib-1/ppxlib/Ppxlib/Deriving/Generator/V2/index.html new file mode 100644 index 000000000..540cf8cb0 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Deriving/Generator/V2/index.html @@ -0,0 +1,13 @@ + +V2 (docs.findlib-1.ppxlib.Ppxlib.Deriving.Generator.V2)

Module Generator.V2

val make : + ?attributes:Attribute.packed list -> + ?deps:t list -> + ?unused_code_warnings:bool -> + ('f, 'output_ast) Args.t -> + (ctxt:Expansion_context.Deriver.t -> 'input_ast -> 'f) -> + ('output_ast, 'input_ast) t

Same as Generator.make, but the generator has access to an expansion context.

val make_noarg : + ?attributes:Attribute.packed list -> + ?deps:t list -> + ?unused_code_warnings:bool -> + (ctxt:Expansion_context.Deriver.t -> 'input_ast -> 'output_ast) -> + ('output_ast, 'input_ast) t

Same as Generator.make_noarg, but the generator has access to an expansion context.

diff --git a/findlib-1/ppxlib/Ppxlib/Deriving/Generator/index.html b/findlib-1/ppxlib/Ppxlib/Deriving/Generator/index.html new file mode 100644 index 000000000..a7d14cd4f --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Deriving/Generator/index.html @@ -0,0 +1,19 @@ + +Generator (docs.findlib-1.ppxlib.Ppxlib.Deriving.Generator)

Module Deriving.Generator

type ('output_ast, 'input_ast) t
val make : + ?attributes:Attribute.packed list -> + ?deps:t list -> + ?unused_code_warnings:bool -> + ('f, 'output_ast) Args.t -> + (loc:Location.t -> path:string -> 'input_ast -> 'f) -> + ('output_ast, 'input_ast) t

make args gen creates a generator that can be passed to Deriving.add to generate an output AST from an input AST and generator arguments.

deps is a list of derivers that this generator depends on.

attributes is deprecated and unused. It is only kept for backward compatibility.

unused_code_warning controls whether unused code warnings (e.g. warnings 32 and 60) are enabled or suppressed in emitted code. Default is false, which suppresses the warnings.

val make_noarg : + ?attributes:Attribute.packed list -> + ?deps:t list -> + ?unused_code_warnings:bool -> + (loc:Location.t -> path:string -> 'input_ast -> 'output_ast) -> + ('output_ast, 'input_ast) t

Same as make, but without arguments.

module V2 : sig ... end
val apply : + ('output_ast, 'input_ast) t -> + name:string -> + ctxt:Expansion_context.Deriver.t -> + 'input_ast -> + (string * Astlib.Ast_500.Parsetree.expression) list -> + 'output_ast
diff --git a/findlib-1/ppxlib/Ppxlib/Deriving/index.html b/findlib-1/ppxlib/Ppxlib/Deriving/index.html new file mode 100644 index 000000000..32035dd43 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Deriving/index.html @@ -0,0 +1,55 @@ + +Deriving (docs.findlib-1.ppxlib.Ppxlib.Deriving)

Module Ppxlib.Deriving

Deriving code from type declarations.

module Args : sig ... end

Specification of generator arguments

Generator registration
type t

Type of registered derivers

module Generator : sig ... end

Register a new deriving generator.

The various arguments are for the various items on which derivers can be attached in structure and signatures.

We distinguish exception from type_extension as exception E is not exactly the same as type exn += E. Indeed if the type exn is redefined, then type exn += E will add E to the new exn type while exception E will add E to the predefined exn type.

extension register an expander for extension with the name of the deriver. This is here mostly to support the ppx_deriving backend.

val add_alias : + string -> + ?str_type_decl:t list -> + ?str_type_ext:t list -> + ?str_exception:t list -> + ?str_module_type_decl:t list -> + ?sig_type_decl:t list -> + ?sig_type_ext:t list -> + ?sig_exception:t list -> + ?sig_module_type_decl:t list -> + t list -> + t

add_alias name set add an alias. When the user write the alias, all the generator of set will be used instead. It is possible to override the set for any of the context by passing the specific set in the approriate optional argument of add_alias.

val ignore : t -> unit

Ignore a deriver. So that one can write: Deriving.add ... |> + Deriving.ignore

diff --git a/findlib-1/ppxlib/Ppxlib/Driver/Cookies/index.html b/findlib-1/ppxlib/Ppxlib/Driver/Cookies/index.html new file mode 100644 index 000000000..d7a098593 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Driver/Cookies/index.html @@ -0,0 +1,14 @@ + +Cookies (docs.findlib-1.ppxlib.Ppxlib.Driver.Cookies)

Module Driver.Cookies

type t
val get : + t -> + string -> + (Astlib.Ast_500.Parsetree.expression, 'a -> 'a, 'b) Ast_pattern.t -> + 'b option

get cookies name pattern look for a cookie named name and parse it using pattern. Raises if the parsing fails.

val get_res : + t -> + string -> + (Astlib.Ast_500.Parsetree.expression, 'a -> 'a, 'b) Ast_pattern.t -> + ('b option, Location.Error.t Stdppx.NonEmptyList.t) result

get cookies name pattern look for a cookie named name and parse it using pattern, returning a result instead of raising when the parsing fails.

val set : t -> string -> Astlib.Ast_500.Parsetree.expression -> unit

set cookies name expr set cookie name to expr.

val add_handler : (t -> unit) -> unit

Register a callback that is called before a rewriting. The handler is expected to lookup some cookies and set some global variables.

This API is a temporary hack to allow to migrate from add_arg to the use of cookie, until ppxlib has been upgraded to pass cookies through.

val add_simple_handler : + string -> + (Astlib.Ast_500.Parsetree.expression, 'a -> 'a, 'b) Ast_pattern.t -> + f:('b option -> unit) -> + unit

Shorthand for: add_handler (fun t -> f (get t name pattern))

val add_post_handler : (t -> unit) -> unit

Register a callback that is called after a rewriting. The handler is expected to set some cookies from some global variables.

diff --git a/findlib-1/ppxlib/Ppxlib/Driver/Create_file_property/argument-1-Name/index.html b/findlib-1/ppxlib/Ppxlib/Driver/Create_file_property/argument-1-Name/index.html new file mode 100644 index 000000000..37c310664 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Driver/Create_file_property/argument-1-Name/index.html @@ -0,0 +1,2 @@ + +Name (docs.findlib-1.ppxlib.Ppxlib.Driver.Create_file_property.Name)

Parameter Create_file_property.Name

val name : string
diff --git a/findlib-1/ppxlib/Ppxlib/Driver/Create_file_property/argument-2-T/index.html b/findlib-1/ppxlib/Ppxlib/Driver/Create_file_property/argument-2-T/index.html new file mode 100644 index 000000000..2d05232e2 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Driver/Create_file_property/argument-2-T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.ppxlib.Ppxlib.Driver.Create_file_property.T)

Parameter Create_file_property.T

type t
val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
diff --git a/findlib-1/ppxlib/Ppxlib/Driver/Create_file_property/index.html b/findlib-1/ppxlib/Ppxlib/Driver/Create_file_property/index.html new file mode 100644 index 000000000..768dd4431 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Driver/Create_file_property/index.html @@ -0,0 +1,2 @@ + +Create_file_property (docs.findlib-1.ppxlib.Ppxlib.Driver.Create_file_property)

Module Driver.Create_file_property

Create a new file property.

A file property represent a piece of information about a file that can be set during preprocessing. If the -output-metadata FILE command line option was passed to the driver, then it will output this information to the given file.

This mechanism is used to pass information gathered while preprocessing the file to the build system. For instance, this is used by ppx_inline_test to tell whether a file contains tests or not.

In the future we could also use this to directly compute the dependencies and pass them here, to avoid calling ocamldep separately.

Parameters

module Name : sig ... end

Signature

val set : T.t -> unit
diff --git a/findlib-1/ppxlib/Ppxlib/Driver/Instrument/V2/index.html b/findlib-1/ppxlib/Ppxlib/Driver/Instrument/V2/index.html new file mode 100644 index 000000000..49444596c --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Driver/Instrument/V2/index.html @@ -0,0 +1,7 @@ + +V2 (docs.findlib-1.ppxlib.Ppxlib.Driver.Instrument.V2)

Module Instrument.V2

Same as Instrument.make, but the transformation that will be applied to the AST has access to an expansion context. To be used together with Driver.V2.

diff --git a/findlib-1/ppxlib/Ppxlib/Driver/Instrument/index.html b/findlib-1/ppxlib/Ppxlib/Driver/Instrument/index.html new file mode 100644 index 000000000..1c58aa1f4 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Driver/Instrument/index.html @@ -0,0 +1,5 @@ + +Instrument (docs.findlib-1.ppxlib.Ppxlib.Driver.Instrument)

Module Driver.Instrument

type t
type pos =
  1. | Before
  2. | After

make transformation ~position creates an instrumentation that can be passed to Driver.register_transformation to instrument an implementation file. transformation is the transformation that will be applied to the AST; position specifies if it should be applied before or after rewriters defined through rules, impl or intf are applied.

module V2 : sig ... end
diff --git a/findlib-1/ppxlib/Ppxlib/Driver/Lint_error/index.html b/findlib-1/ppxlib/Ppxlib/Driver/Lint_error/index.html new file mode 100644 index 000000000..41995cbdf --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Driver/Lint_error/index.html @@ -0,0 +1,2 @@ + +Lint_error (docs.findlib-1.ppxlib.Ppxlib.Driver.Lint_error)

Module Driver.Lint_error

Error reported by linters

type t
val of_string : Location.t -> string -> t
diff --git a/findlib-1/ppxlib/Ppxlib/Driver/V2/index.html b/findlib-1/ppxlib/Ppxlib/Driver/V2/index.html new file mode 100644 index 000000000..12eaece70 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Driver/V2/index.html @@ -0,0 +1,53 @@ + +V2 (docs.findlib-1.ppxlib.Ppxlib.Driver.V2)

Module Driver.V2

Same as Driver.register_transformation, but the callbacks have access to an expansion context. Their signatures coincide with the signatures of the respective methods in Ast_traverse.map_with_expansion_context.

Same as Driver.register_transformation_using_ocaml_current_ast, but the callbacks ?impl and ?intf have access to an expansion context.

diff --git a/findlib-1/ppxlib/Ppxlib/Driver/index.html b/findlib-1/ppxlib/Ppxlib/Driver/index.html new file mode 100644 index 000000000..b3b5048d1 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Driver/index.html @@ -0,0 +1,53 @@ + +Driver (docs.findlib-1.ppxlib.Ppxlib.Driver)

Module Ppxlib.Driver

Interaction with the driver, such as getting/seeting cookies, adding arguments.

The relevant part in the manual is the section on its execution.

val add_arg : Arg.key -> Arg.spec -> doc:string -> unit

Add one argument to the command line

module Lint_error : sig ... end

Error reported by linters

module Cookies : sig ... end
module Instrument : sig ... end
val register_transformation : + ?extensions:Extension.t list -> + ?rules:Context_free.Rule.t list -> + ?enclose_impl: + (Location.t option -> + Astlib.Ast_500.Parsetree.structure_item list + * Astlib.Ast_500.Parsetree.structure_item list) -> + ?enclose_intf: + (Location.t option -> + Astlib.Ast_500.Parsetree.signature_item list + * Astlib.Ast_500.Parsetree.signature_item list) -> + ?impl: + (Astlib.Ast_500.Parsetree.structure_item list -> + Astlib.Ast_500.Parsetree.structure_item list) -> + ?intf: + (Astlib.Ast_500.Parsetree.signature_item list -> + Astlib.Ast_500.Parsetree.signature_item list) -> + ?lint_impl: + (Astlib.Ast_500.Parsetree.structure_item list -> Lint_error.t list) -> + ?lint_intf: + (Astlib.Ast_500.Parsetree.signature_item list -> Lint_error.t list) -> + ?preprocess_impl: + (Astlib.Ast_500.Parsetree.structure_item list -> + Astlib.Ast_500.Parsetree.structure_item list) -> + ?preprocess_intf: + (Astlib.Ast_500.Parsetree.signature_item list -> + Astlib.Ast_500.Parsetree.signature_item list) -> + ?instrument:Instrument.t -> + ?aliases:string list -> + string -> + unit

register_transformation name registers a code transformation.

name is a logical name for the set of transformations (such as sexp_conv or bin_prot). It is mostly used for debugging purposes.

rules is a list of context independent rewriting rules, such as extension point expanders. This is what most code transformation should use.

extensions is a special cases of rules and is deprecated. It is only kept for backward compatibility.

enclose_impl and enclose_intf produces a header and footer for implementation/interface files. They are a special case of impl and intf. The header is placed after any initial module-level attributes; the footer is placed after everything else. Both functions receive a location that denotes all of the items between header and footer, or None if the that list of items is empty.

impl is an optional function that is applied on implementation files and intf is an optional function that is applied on interface files. These two functions are applied on the AST of the whole file. They should only be used when the other mechanism are not enough. For instance if the transformation expands extension points that depend on the context.

lint_impl and lint_intf are applied to the unprocessed source. Errors they return will be reported to the user as preprocessor warnings.

instrument can be used to instrument implementation files. Its transformation is applied to the AST of the whole file. The difference to impl is that you can specify if it should be applied before or after all rewriters defined through rules, impl or intf are applied.

More information on each phase, and their relative order, can be found in the manual.

val register_transformation_using_ocaml_current_ast : + ?impl: + (Ppxlib_ast.Compiler_version.Ast.Parsetree.structure -> + Ppxlib_ast.Compiler_version.Ast.Parsetree.structure) -> + ?intf: + (Ppxlib_ast.Compiler_version.Ast.Parsetree.signature -> + Ppxlib_ast.Compiler_version.Ast.Parsetree.signature) -> + ?aliases:string list -> + string -> + unit

Same as register_transformation except that it uses the same AST as the current ocaml compiler.

This is not the intended way of using driver. This is only for ppx rewriters that are not written using ppxlib but want to export a driver compatible library.

val register_code_transformation : + name:string -> + ?aliases:string list -> + impl: + (Astlib.Ast_500.Parsetree.structure_item list -> + Astlib.Ast_500.Parsetree.structure_item list) -> + intf: + (Astlib.Ast_500.Parsetree.signature_item list -> + Astlib.Ast_500.Parsetree.signature_item list) -> + unit

Same as:

register_transformation ~name ~impl ~intf ()
  • deprecated [since 2015-11] use register_transformation instead
val register_correction : loc:Location.t -> repl:string -> unit

Rewriters might call this function to suggest a correction to the code source. When they do this, the driver will generate a file.ml.ppx-corrected file with the suggested replacement. The build system will then show the diff to the user who is free to accept the correction or not.

val register_process_file_hook : (unit -> unit) -> unit

Hook called before processing a file

module V2 : sig ... end
module Create_file_property + (Name : sig ... end) + (T : Stdppx.Sexpable.S) : + sig ... end

Create a new file property.

val standalone : unit -> unit

Suitable for -pp and also usable as a standalone command line tool.

If the first command line argument is -as-ppx then it will run as a ppx rewriter.

val run_as_ppx_rewriter : unit -> unit

Suitable for -ppx. Used only for the public release.

val pretty : unit -> bool

If true, code transformations should avoid generating code that is not strictly necessary, such as extra type annotations.

diff --git a/findlib-1/ppxlib/Ppxlib/Expansion_context/Base/index.html b/findlib-1/ppxlib/Ppxlib/Expansion_context/Base/index.html new file mode 100644 index 000000000..3db0202f3 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Expansion_context/Base/index.html @@ -0,0 +1,2 @@ + +Base (docs.findlib-1.ppxlib.Ppxlib.Expansion_context.Base)

Module Expansion_context.Base

type t

Type for the location independent parts of the expansion context

val code_path : t -> Code_path.t

Return the code path for the given context In Driver, Deriving and Extension, the context is initialized so that the file_path component of the code_path is determined from the first location found in the input AST. That means that:

  • It's the empty string in empty structures or signatures
  • It can be altered by line directives
val input_name : t -> string

Return the input name for the given context. In Driver, Deriving and Extension, the context argument is initialized so that the input_name matches the input filename passed to the driver on the command line. That means that:

  • It has a value even for empty files
  • It is not affected by line directives
  • It is "_none_" when using Driver.map_structure or Driver.map_signature
val tool_name : t -> string

Can be used within a ppx preprocessor to know which tool is calling it "ocamlc", "ocamlopt", "ocamldep", "ocaml", ... .

diff --git a/findlib-1/ppxlib/Ppxlib/Expansion_context/Deriver/index.html b/findlib-1/ppxlib/Ppxlib/Expansion_context/Deriver/index.html new file mode 100644 index 000000000..27d5ac4bb --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Expansion_context/Deriver/index.html @@ -0,0 +1,2 @@ + +Deriver (docs.findlib-1.ppxlib.Ppxlib.Expansion_context.Deriver)

Module Expansion_context.Deriver

type t

Type of expansion contexts for derivers

val derived_item_loc : t -> Location.t

Return the location of the item to which the deriver is being applied

val code_path : t -> Code_path.t

Return the code path for the given context In Driver, Deriving and Extension, the context is initialized so that the file_path component of the code_path is determined from the first location found in the input AST. That means that:

  • It's the empty string in empty structures or signatures
  • It can be altered by line directives
val input_name : t -> string

Return the input name for the given context. In Driver, Deriving and Extension, the context argument is initialized so that the input_name matches the input filename passed to the driver on the command line. That means that:

  • It has a value even for empty files
  • It is not affected by line directives
  • It is "_none_" when using Driver.map_structure or Driver.map_signature
val tool_name : t -> string

Can be used within a ppx preprocessor to know which tool is calling it "ocamlc", "ocamlopt", "ocamldep", "ocaml", ... .

val with_loc_and_path : (loc:Location.t -> path:string -> 'a) -> ctxt:t -> 'a

Wrap a fun ~loc ~path into a fun ~ctxt

val inline : t -> bool

Whether the derived code is going to be inlined in the source

diff --git a/findlib-1/ppxlib/Ppxlib/Expansion_context/Extension/index.html b/findlib-1/ppxlib/Ppxlib/Expansion_context/Extension/index.html new file mode 100644 index 000000000..89c2c5d8c --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Expansion_context/Extension/index.html @@ -0,0 +1,2 @@ + +Extension (docs.findlib-1.ppxlib.Ppxlib.Expansion_context.Extension)

Module Expansion_context.Extension

type t

Type of expansion contexts for extensions

val extension_point_loc : t -> Location.t

Return the location of the extension point being expanded

val code_path : t -> Code_path.t

Return the code path for the given context In Driver, Deriving and Extension, the context is initialized so that the file_path component of the code_path is determined from the first location found in the input AST. That means that:

  • It's the empty string in empty structures or signatures
  • It can be altered by line directives
val input_name : t -> string

Return the input name for the given context. In Driver, Deriving and Extension, the context argument is initialized so that the input_name matches the input filename passed to the driver on the command line. That means that:

  • It has a value even for empty files
  • It is not affected by line directives
  • It is "_none_" when using Driver.map_structure or Driver.map_signature
val tool_name : t -> string

Can be used within a ppx preprocessor to know which tool is calling it "ocamlc", "ocamlopt", "ocamldep", "ocaml", ... .

val with_loc_and_path : (loc:Location.t -> path:string -> 'a) -> ctxt:t -> 'a

Wrap a fun ~loc ~path into a fun ~ctxt

diff --git a/findlib-1/ppxlib/Ppxlib/Expansion_context/index.html b/findlib-1/ppxlib/Ppxlib/Expansion_context/index.html new file mode 100644 index 000000000..c28cd4d29 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Expansion_context/index.html @@ -0,0 +1,2 @@ + +Expansion_context (docs.findlib-1.ppxlib.Ppxlib.Expansion_context)

Module Ppxlib.Expansion_context

The context given to rewriting rules when expanding.

module Base : sig ... end
module Extension : sig ... end
module Deriver : sig ... end
diff --git a/findlib-1/ppxlib/Ppxlib/Expansion_helpers/Quoter/index.html b/findlib-1/ppxlib/Ppxlib/Expansion_helpers/Quoter/index.html new file mode 100644 index 000000000..c5dfe41d9 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Expansion_helpers/Quoter/index.html @@ -0,0 +1,8 @@ + +Quoter (docs.findlib-1.ppxlib.Ppxlib.Expansion_helpers.Quoter)

Module Expansion_helpers.Quoter

Generate expressions in a hygienic way.

The idea is that whenever we want to refer to an expression in generated code we first quote it. The result will be an identifier that is guaranteed to refer to the expression it was created from. This way it is impossible for quoted fragments to refer to newly introduced expressions.

For more information, see the section on quoting in the good practices section.

type t
val create : unit -> t

Creates a quoter. A quoter guarantees to give names that do not clash with any other names used before

quote t e returns the expression that is safe to use in place of e in generated code

sanitize t e Returns e wrapped with bindings for all quoted expressions in the quoter t

diff --git a/findlib-1/ppxlib/Ppxlib/Expansion_helpers/index.html b/findlib-1/ppxlib/Ppxlib/Expansion_helpers/index.html new file mode 100644 index 000000000..fbae13bdc --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Expansion_helpers/index.html @@ -0,0 +1,6 @@ + +Expansion_helpers (docs.findlib-1.ppxlib.Ppxlib.Expansion_helpers)

Module Ppxlib.Expansion_helpers

Various helpers for expansion, such as quoting expressions in their context, or mangling names.

Mangling

Derive mangled names from type names in a deriver. For instance, the t can be turned into t_of_yojson or yojson_of_t with the functions from this module.

type affix =
  1. | Prefix of string
    (*

    Prefix p adds prefix p.

    *)
  2. | Suffix of string
    (*

    Suffix s adds suffix s.

    *)
  3. | PrefixSuffix of string * string
    (*

    PrefixSuffix (p, s) adds both prefix p and suffix s.

    *)

Specification for name mangling.

val mangle : ?fixpoint:string -> affix -> string -> string

mangle ~fixpoint affix s derives a mangled name from s with the mangling specified by affix. If s is equal to fixpoint ("t" by default), then s is omitted from the mangled name.

val mangle_type_decl : + ?fixpoint:string -> + affix -> + Astlib.Ast_500.Parsetree.type_declaration -> + string

mangle_type_decl ~fixpoint affix td does the same as mangle, but for the name of td.

val mangle_lid : ?fixpoint:string -> affix -> Longident.t -> Longident.t

mangle_lid ~fixpoint affix lid does the same as mangle, but for the last component of lid.

Quoting

module Quoter : sig ... end

Generate expressions in a hygienic way.

diff --git a/findlib-1/ppxlib/Ppxlib/Extension/Context/index.html b/findlib-1/ppxlib/Ppxlib/Extension/Context/index.html new file mode 100644 index 000000000..89eb517f8 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Extension/Context/index.html @@ -0,0 +1,15 @@ + +Context (docs.findlib-1.ppxlib.Ppxlib.Extension.Context)

Module Extension.Context

val eq : 'a t -> 'b t -> ('a, 'b) equality
val get_extension : + 'a t -> + 'a -> + ((string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) + * Astlib.Ast_500.Parsetree.attribute list) + option
val merge_attributes : + 'a t -> + 'a -> + Astlib.Ast_500.Parsetree.attribute list -> + 'a
val merge_attributes_res : + 'a t -> + 'a -> + Astlib.Ast_500.Parsetree.attribute list -> + ('a, Location.Error.t Stdppx.NonEmptyList.t) result
diff --git a/findlib-1/ppxlib/Ppxlib/Extension/Expert/index.html b/findlib-1/ppxlib/Ppxlib/Extension/Expert/index.html new file mode 100644 index 000000000..897346dc6 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Extension/Expert/index.html @@ -0,0 +1,20 @@ + +Expert (docs.findlib-1.ppxlib.Ppxlib.Extension.Expert)

Module Extension.Expert

This module allows to declare extensions that do not produce a value of the context type. This is typically useful for extensions point that depends on more things from the context than the path and location.

type ('context, 'payload) t

Type of declared expert extensions.

The 'context type parameter describes where the extension is expected and the 'payload one what its payload should contain.

val declare : + string -> + 'context Context.t -> + (Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ast_pattern.t -> + 'a -> + ('context, 'b) t
val declare_with_path_arg : + string -> + 'context Context.t -> + (Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ast_pattern.t -> + (arg:Longident.t Loc.t option -> 'a) -> + ('context, 'b) t
val convert_res : + (_, 'a) t list -> + loc:Location.t -> + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) -> + ('a option, Location.Error.t Stdppx.NonEmptyList.t) result
val convert : + (_, 'a) t list -> + loc:Location.t -> + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) -> + 'a option
diff --git a/findlib-1/ppxlib/Ppxlib/Extension/For_context/index.html b/findlib-1/ppxlib/Ppxlib/Extension/For_context/index.html new file mode 100644 index 000000000..3a61de437 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Extension/For_context/index.html @@ -0,0 +1,18 @@ + +For_context (docs.findlib-1.ppxlib.Ppxlib.Extension.For_context)

Module Extension.For_context

This module is used to implement Context_free.map_top_down

type 'a t
val convert : + 'a t list -> + ctxt:Expansion_context.Extension.t -> + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) -> + 'a option
val convert_inline_res : + 'a t list -> + ctxt:Expansion_context.Extension.t -> + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) -> + ('a list option, Location.Error.t Stdppx.NonEmptyList.t) result
val convert_inline : + 'a t list -> + ctxt:Expansion_context.Extension.t -> + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) -> + 'a list option
diff --git a/findlib-1/ppxlib/Ppxlib/Extension/V2/index.html b/findlib-1/ppxlib/Ppxlib/Extension/V2/index.html new file mode 100644 index 000000000..4b40afe56 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Extension/V2/index.html @@ -0,0 +1,12 @@ + +V2 (docs.findlib-1.ppxlib.Ppxlib.Extension.V2)

Module Extension.V2

type nonrec t = t
val declare : + string -> + 'context Context.t -> + (Astlib.Ast_500.Parsetree.payload, 'a, 'context) Ast_pattern.t -> + (loc:Location.t -> path:string -> 'a) -> + t
val declare_inline : + string -> + 'context Context.t -> + (Astlib.Ast_500.Parsetree.payload, 'a, 'context list) Ast_pattern.t -> + (loc:Location.t -> path:string -> 'a) -> + t
diff --git a/findlib-1/ppxlib/Ppxlib/Extension/V3/index.html b/findlib-1/ppxlib/Ppxlib/Extension/V3/index.html new file mode 100644 index 000000000..d9701f80a --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Extension/V3/index.html @@ -0,0 +1,27 @@ + +V3 (docs.findlib-1.ppxlib.Ppxlib.Extension.V3)

Module Extension.V3

type nonrec t = t
val declare : + string -> + 'context Context.t -> + (Astlib.Ast_500.Parsetree.payload, 'a, 'context) Ast_pattern.t -> + (ctxt:Expansion_context.Extension.t -> 'a) -> + t
val declare_inline : + string -> + 'context Context.t -> + (Astlib.Ast_500.Parsetree.payload, 'a, 'context list) Ast_pattern.t -> + (ctxt:Expansion_context.Extension.t -> 'a) -> + t
val declare_with_path_arg : + string -> + 'context Context.t -> + (Astlib.Ast_500.Parsetree.payload, 'a, 'context) Ast_pattern.t -> + (ctxt:Expansion_context.Extension.t -> + arg:Longident.t Ppxlib_ast.Asttypes.loc option -> + 'a) -> + t

Same as declare except that the extension name takes an additional path argument. The path is the part of the name that start with a capitalized component. For instance in the following, the extension "map" would receive the path argument Foo.Bar:

let%map.Foo.Bar x = 1 in
+...
val declare_inline_with_path_arg : + string -> + 'context Context.t -> + (Astlib.Ast_500.Parsetree.payload, 'a, 'context list) Ast_pattern.t -> + (ctxt:Expansion_context.Extension.t -> + arg:Longident.t Ppxlib_ast.Asttypes.loc option -> + 'a) -> + t
diff --git a/findlib-1/ppxlib/Ppxlib/Extension/index.html b/findlib-1/ppxlib/Ppxlib/Extension/index.html new file mode 100644 index 000000000..64d06e337 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Extension/index.html @@ -0,0 +1,30 @@ + +Extension (docs.findlib-1.ppxlib.Ppxlib.Extension)

Module Ppxlib.Extension

Declare extenders to rewrite extension nodes.

type (_, _) equality =
  1. | Eq : ('a, 'a) equality
  2. | Ne : (_, _) equality
module Context : sig ... end
type t

Type of declared extensions.

val declare : + string -> + 'context Context.t -> + (Astlib.Ast_500.Parsetree.payload, 'a, 'context) Ast_pattern.t -> + (loc:Location.t -> path:string -> 'a) -> + t

declare name context pattern expander declares the extension names name for context.

expander is responsible for producing the code to replace the extension in the AST. It receives as argument:

  • loc: the location of the enclosing node. For instance for expression it is the pexp_loc field
  • path: the current module path
val declare_with_path_arg : + string -> + 'context Context.t -> + (Astlib.Ast_500.Parsetree.payload, 'a, 'context) Ast_pattern.t -> + (loc:Location.t -> + path:string -> + arg:Longident.t Ppxlib_ast.Asttypes.loc option -> + 'a) -> + t

Same as declare except that the extension name takes an additional path argument. The path is the part of the name that start with a capitalized component. For instance in the following, the extension "map" would receive the path argument Foo.Bar:

let%map.Foo.Bar x = 1 in
+...
val declare_inline : + string -> + 'context Context.t -> + (Astlib.Ast_500.Parsetree.payload, 'a, 'context list) Ast_pattern.t -> + (loc:Location.t -> path:string -> 'a) -> + t

Inline the result of the expansion into its parent. Only works for these contexts:

  • class_field
  • class_type_field
  • signature_item
  • structure_item
val declare_inline_with_path_arg : + string -> + 'context Context.t -> + (Astlib.Ast_500.Parsetree.payload, 'a, 'context list) Ast_pattern.t -> + (loc:Location.t -> + path:string -> + arg:Longident.t Ppxlib_ast.Asttypes.loc option -> + 'a) -> + t
module For_context : sig ... end

This module is used to implement Context_free.map_top_down

val filter_by_context : 'a Context.t -> t list -> 'a For_context.t list

Given a context and a list of extension expander, returns all the ones that are for this context.

module Expert : sig ... end

This module allows to declare extensions that do not produce a value of the context type. This is typically useful for extensions point that depends on more things from the context than the path and location.

val check_unused : Ast_traverse.iter
val collect_unhandled_extension_errors : + Location.Error.t list Ast_traverse.fold
module V2 : sig ... end
module V3 : sig ... end
diff --git a/findlib-1/ppxlib/Ppxlib/Keyword/index.html b/findlib-1/ppxlib/Ppxlib/Keyword/index.html new file mode 100644 index 000000000..a505337cc --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Keyword/index.html @@ -0,0 +1,2 @@ + +Keyword (docs.findlib-1.ppxlib.Ppxlib.Keyword)

Module Ppxlib.Keyword

Small module to check if a string is an OCaml keyword.

val is_keyword : string -> bool

Check if a string is an OCaml keyword.

diff --git a/findlib-1/ppxlib/Ppxlib/Loc/index.html b/findlib-1/ppxlib/Ppxlib/Loc/index.html new file mode 100644 index 000000000..ceddedcec --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Loc/index.html @@ -0,0 +1,2 @@ + +Loc (docs.findlib-1.ppxlib.Ppxlib.Loc)

Module Ppxlib.Loc

Located items

type 'a t = 'a Astlib.Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
val txt : 'a t -> 'a
val loc : _ t -> Location.t
val make : loc:Location.t -> 'a -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t
diff --git a/findlib-1/ppxlib/Ppxlib/Location/Error/index.html b/findlib-1/ppxlib/Ppxlib/Location/Error/index.html new file mode 100644 index 000000000..c5fb2988a --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Location/Error/index.html @@ -0,0 +1,4 @@ + +Error (docs.findlib-1.ppxlib.Ppxlib.Location.Error)

Module Location.Error

For a detailed explanation on error reporting, refer to the relevant part of the tutorial.

type t
val make : loc:t -> string -> sub:(t * string) list -> t
val createf : loc:t -> ('a, Format.formatter, unit, t) format4 -> 'a
val message : t -> string
val set_message : t -> string -> t
val register_error_of_exn : (exn -> t option) -> unit

Register an exception handler. Exception registered this way will be properly displayed by report_exception.

val of_exn : exn -> t option
val to_extension : + t -> + string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload

Convert an error to an extension point. The compiler recognizes this and displays the error properly.

val raise : t -> 'a

Raise a compiler Parsing.Location.Error exception. The composition of Location.Error.createf with Location.Error.raise is the same as Location.raise_errorf.

val update_loc : t -> t -> t

Update where the error is located. The old location will be overwritten.

val get_location : t -> t

Find out where the error is located.

diff --git a/findlib-1/ppxlib/Ppxlib/Location/index.html b/findlib-1/ppxlib/Ppxlib/Location/index.html new file mode 100644 index 000000000..5b86aa8fe --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Location/index.html @@ -0,0 +1,9 @@ + +Location (docs.findlib-1.ppxlib.Ppxlib.Location)

Module Ppxlib.Location

Overrides the Location module of OCaml

There are less functions in this module. However the API should be more stable than the Location module of OCaml.

For a detailled presentation of good practices regarding locations, refer to the section in the manual.

type t = Astlib.Location.t = {
  1. loc_start : Lexing.position;
  2. loc_end : Lexing.position;
  3. loc_ghost : bool;
}
val in_file : string -> t

Return an empty ghost range located in a given file.

val set_filename : t -> string -> t

Set the pos_fname both in loc_start and loc_end. Leave the rest as is.

val none : t

An arbitrary value of type t; describes an empty ghost range.

val init : Lexing.lexbuf -> string -> unit

Set the file name and line number of the lexbuf to be the start of the named file.

val raise_errorf : ?loc:t -> ('a, Format.formatter, unit, 'b) format4 -> 'a

Raise a located error. Should be avoided as much as possible, in favor of error_extensionf. See the relevant part of the tutorial.

val of_lexbuf : Lexing.lexbuf -> t

Return the location corresponding to the last matched regular expression

val report_exception : Format.formatter -> exn -> unit

Report an exception on the given formatter

val print : Format.formatter -> t -> unit

Prints File "...", line ..., characters ...-...:

type nonrec 'a loc = 'a Astlib.Location.loc = {
  1. txt : 'a;
  2. loc : t;
}
val compare_pos : Lexing.position -> Lexing.position -> int
val compare : t -> t -> int
module Error : sig ... end
val error_extensionf : + loc:t -> + ('a, + Format.formatter, + unit, + string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) + format4 -> + 'a

Returns an error extension node. When encountered in the AST, the compiler recognizes it and displays the error properly.

For a detailed explanation on error reporting, refer to the relevant part of the tutorial.

exception Error of Error.t
diff --git a/findlib-1/ppxlib/Ppxlib/Longident/Map/index.html b/findlib-1/ppxlib/Ppxlib/Longident/Map/index.html new file mode 100644 index 000000000..b7d8f0186 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Longident/Map/index.html @@ -0,0 +1,8 @@ + +Map (docs.findlib-1.ppxlib.Ppxlib.Longident.Map)

Module Longident.Map

Maps

type key = t

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/findlib-1/ppxlib/Ppxlib/Longident/Set/index.html b/findlib-1/ppxlib/Ppxlib/Longident/Set/index.html new file mode 100644 index 000000000..89088da38 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Longident/Set/index.html @@ -0,0 +1,3 @@ + +Set (docs.findlib-1.ppxlib.Ppxlib.Longident.Set)

Module Longident.Set

Sets

type elt = t

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/findlib-1/ppxlib/Ppxlib/Longident/index.html b/findlib-1/ppxlib/Ppxlib/Longident/index.html new file mode 100644 index 000000000..05e44b36f --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Longident/index.html @@ -0,0 +1,2 @@ + +Longident (docs.findlib-1.ppxlib.Ppxlib.Longident)

Module Ppxlib.Longident

Overrides the Longident module of OCaml

type t = Astlib.Longident.t =
  1. | Lident of string
  2. | Ldot of t * string
  3. | Lapply of t * t
val compare : t -> t -> int
val sexp_of_t : t -> Stdppx.Sexp.t
val flatten_exn : t -> string list
val last_exn : t -> string
val parse : string -> t

Parses the given string as a longident, properly handling infix operators which may contain '.'. Note that it does not parse Lapply _ longidents and will raise Invalid_argument _ if passed values such as "A(B)".

val name : t -> string
module Map : Map.S with type key = t
module Set : Set.S with type elt = t
diff --git a/findlib-1/ppxlib/Ppxlib/Merlin_helpers/index.html b/findlib-1/ppxlib/Ppxlib/Merlin_helpers/index.html new file mode 100644 index 000000000..038b2b406 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Merlin_helpers/index.html @@ -0,0 +1,10 @@ + +Merlin_helpers (docs.findlib-1.ppxlib.Ppxlib.Merlin_helpers)

Module Ppxlib.Merlin_helpers

Some helpers to annotate the AST so merlin can decide which branches to look at and which branches to ignore.

More information can be found in the section of the manual about locations.

Annotations merlin understand

Adding this [@merlin.hide] attribute on a piece of AST "hides" it from merlin: it tells merlin not to consider that branch if another piece of AST with the same location exist.

Adding this [@merlin.focus] attribute on a piece of AST tells merlin to prefer it to any other piece of AST when several have the same location.

Helpers

The following functions add the corresponding attribute (defined above) to specific pieces of AST.

diff --git a/findlib-1/ppxlib/Ppxlib/Reserved_namespaces/index.html b/findlib-1/ppxlib/Ppxlib/Reserved_namespaces/index.html new file mode 100644 index 000000000..afde46d78 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Reserved_namespaces/index.html @@ -0,0 +1,2 @@ + +Reserved_namespaces (docs.findlib-1.ppxlib.Ppxlib.Reserved_namespaces)

Module Ppxlib.Reserved_namespaces

Small module to reserve namespaces in attribute names.

val reserve : string -> unit

reserve "foo" has two implications:

  • one can't then declare an attribute inside this namespace
  • attributes within this namespace won't be reported by check_unused

This is here to insure that the rewriter cohabits well with other rewriter or tools (e.g. merlin) which might leave attribute on the AST.

N.B. the following namespaces are reserved by default: merlin, reason, refmt ns, res, metaocaml, ocamlformat and ppxlib.

val is_in_reserved_namespaces : string -> bool
diff --git a/findlib-1/ppxlib/Ppxlib/Spellcheck/index.html b/findlib-1/ppxlib/Ppxlib/Spellcheck/index.html new file mode 100644 index 000000000..8f7e26efd --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/Spellcheck/index.html @@ -0,0 +1,2 @@ + +Spellcheck (docs.findlib-1.ppxlib.Ppxlib.Spellcheck)

Module Ppxlib.Spellcheck

Helpers to provide hints to PPX users for typos or spellchecks.

exception Cutoff_met
val levenshtein_distance : string -> string -> int -> int option
val spellcheck : string list -> string -> string option
diff --git a/findlib-1/ppxlib/Ppxlib/With_errors/index.html b/findlib-1/ppxlib/Ppxlib/With_errors/index.html new file mode 100644 index 000000000..d1664e008 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/With_errors/index.html @@ -0,0 +1,5 @@ + +With_errors (docs.findlib-1.ppxlib.Ppxlib.With_errors)

Module Ppxlib.With_errors

type 'a t = 'a * Location.Error.t list
val return : 'a -> 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
val of_result : + ('a, Location.Error.t Stdppx.NonEmptyList.t) result -> + default:'a -> + 'a t
val combine_errors : 'a t list -> 'a list t
diff --git a/findlib-1/ppxlib/Ppxlib/class-fold/index.html b/findlib-1/ppxlib/Ppxlib/class-fold/index.html new file mode 100644 index 000000000..47d44e2ac --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/class-fold/index.html @@ -0,0 +1,16 @@ + +fold (docs.findlib-1.ppxlib.Ppxlib.fold)

Class Ppxlib.fold

method virtual bool : bool -> 'acc0 -> 'acc0
method virtual char : char -> 'acc1 -> 'acc1
method virtual int : int -> 'acc2 -> 'acc2
method virtual list : 'a. ('a -> 'acc3 -> 'acc3) -> 'a list -> 'acc3 -> 'acc3
method virtual option : 'a. ('a -> 'acc4 -> 'acc4) -> + 'a option -> + 'acc4 -> + 'acc4
method virtual string : string -> 'acc5 -> 'acc5
method position : position -> 'acc6 -> 'acc6
method location : location -> 'acc7 -> 'acc7
method location_stack : location_stack -> 'acc8 -> 'acc8
method loc : 'a. ('a -> 'acc9 -> 'acc9) -> 'a loc -> 'acc9 -> 'acc9
method longident : longident -> 'acc10 -> 'acc10
method longident_loc : longident_loc -> 'acc11 -> 'acc11
method rec_flag : rec_flag -> 'acc12 -> 'acc12
method direction_flag : direction_flag -> 'acc13 -> 'acc13
method private_flag : private_flag -> 'acc14 -> 'acc14
method mutable_flag : mutable_flag -> 'acc15 -> 'acc15
method virtual_flag : virtual_flag -> 'acc16 -> 'acc16
method override_flag : override_flag -> 'acc17 -> 'acc17
method closed_flag : closed_flag -> 'acc18 -> 'acc18
method label : label -> 'acc19 -> 'acc19
method arg_label : arg_label -> 'acc20 -> 'acc20
method variance : variance -> 'acc21 -> 'acc21
method injectivity : injectivity -> 'acc22 -> 'acc22
method constant : constant -> 'acc23 -> 'acc23
method attribute : attribute -> 'acc24 -> 'acc24
method extension : extension -> 'acc25 -> 'acc25
method attributes : attributes -> 'acc26 -> 'acc26
method payload : payload -> 'acc27 -> 'acc27
method core_type : core_type -> 'acc28 -> 'acc28
method core_type_desc : core_type_desc -> 'acc29 -> 'acc29
method package_type : package_type -> 'acc30 -> 'acc30
method row_field : row_field -> 'acc31 -> 'acc31
method row_field_desc : row_field_desc -> 'acc32 -> 'acc32
method object_field : object_field -> 'acc33 -> 'acc33
method object_field_desc : object_field_desc -> 'acc34 -> 'acc34
method pattern : pattern -> 'acc35 -> 'acc35
method pattern_desc : pattern_desc -> 'acc36 -> 'acc36
method expression : expression -> 'acc37 -> 'acc37
method expression_desc : expression_desc -> 'acc38 -> 'acc38
method case : case -> 'acc39 -> 'acc39
method letop : letop -> 'acc40 -> 'acc40
method binding_op : binding_op -> 'acc41 -> 'acc41
method value_description : value_description -> 'acc42 -> 'acc42
method type_declaration : type_declaration -> 'acc43 -> 'acc43
method type_kind : type_kind -> 'acc44 -> 'acc44
method label_declaration : label_declaration -> 'acc45 -> 'acc45
method constructor_declaration : constructor_declaration -> 'acc46 -> 'acc46
method constructor_arguments : constructor_arguments -> 'acc47 -> 'acc47
method type_extension : type_extension -> 'acc48 -> 'acc48
method extension_constructor : extension_constructor -> 'acc49 -> 'acc49
method type_exception : type_exception -> 'acc50 -> 'acc50
method extension_constructor_kind : extension_constructor_kind -> + 'acc51 -> + 'acc51
method class_type : class_type -> 'acc52 -> 'acc52
method class_type_desc : class_type_desc -> 'acc53 -> 'acc53
method class_signature : class_signature -> 'acc54 -> 'acc54
method class_type_field : class_type_field -> 'acc55 -> 'acc55
method class_type_field_desc : class_type_field_desc -> 'acc56 -> 'acc56
method class_infos : 'a. ('a -> 'acc57 -> 'acc57) -> + 'a class_infos -> + 'acc57 -> + 'acc57
method class_description : class_description -> 'acc58 -> 'acc58
method class_type_declaration : class_type_declaration -> 'acc59 -> 'acc59
method class_expr : class_expr -> 'acc60 -> 'acc60
method class_expr_desc : class_expr_desc -> 'acc61 -> 'acc61
method class_structure : class_structure -> 'acc62 -> 'acc62
method class_field : class_field -> 'acc63 -> 'acc63
method class_field_desc : class_field_desc -> 'acc64 -> 'acc64
method class_field_kind : class_field_kind -> 'acc65 -> 'acc65
method class_declaration : class_declaration -> 'acc66 -> 'acc66
method module_type : module_type -> 'acc67 -> 'acc67
method module_type_desc : module_type_desc -> 'acc68 -> 'acc68
method functor_parameter : functor_parameter -> 'acc69 -> 'acc69
method signature : signature -> 'acc70 -> 'acc70
method signature_item : signature_item -> 'acc71 -> 'acc71
method signature_item_desc : signature_item_desc -> 'acc72 -> 'acc72
method module_declaration : module_declaration -> 'acc73 -> 'acc73
method module_substitution : module_substitution -> 'acc74 -> 'acc74
method module_type_declaration : module_type_declaration -> 'acc75 -> 'acc75
method open_infos : 'a. ('a -> 'acc76 -> 'acc76) -> + 'a open_infos -> + 'acc76 -> + 'acc76
method open_description : open_description -> 'acc77 -> 'acc77
method open_declaration : open_declaration -> 'acc78 -> 'acc78
method include_infos : 'a. ('a -> 'acc79 -> 'acc79) -> + 'a include_infos -> + 'acc79 -> + 'acc79
method include_description : include_description -> 'acc80 -> 'acc80
method include_declaration : include_declaration -> 'acc81 -> 'acc81
method with_constraint : with_constraint -> 'acc82 -> 'acc82
method module_expr : module_expr -> 'acc83 -> 'acc83
method module_expr_desc : module_expr_desc -> 'acc84 -> 'acc84
method structure : structure -> 'acc85 -> 'acc85
method structure_item : structure_item -> 'acc86 -> 'acc86
method structure_item_desc : structure_item_desc -> 'acc87 -> 'acc87
method value_binding : value_binding -> 'acc88 -> 'acc88
method module_binding : module_binding -> 'acc89 -> 'acc89
method toplevel_phrase : toplevel_phrase -> 'acc90 -> 'acc90
method toplevel_directive : toplevel_directive -> 'acc91 -> 'acc91
method directive_argument : directive_argument -> 'acc92 -> 'acc92
method directive_argument_desc : directive_argument_desc -> 'acc93 -> 'acc93
method cases : cases -> 'acc94 -> 'acc94
diff --git a/findlib-1/ppxlib/Ppxlib/class-fold_map/index.html b/findlib-1/ppxlib/Ppxlib/class-fold_map/index.html new file mode 100644 index 000000000..4b8b73bef --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/class-fold_map/index.html @@ -0,0 +1,80 @@ + +fold_map (docs.findlib-1.ppxlib.Ppxlib.fold_map)

Class Ppxlib.fold_map

method virtual bool : bool -> 'acc0 -> bool * 'acc0
method virtual char : char -> 'acc1 -> char * 'acc1
method virtual int : int -> 'acc2 -> int * 'acc2
method virtual list : 'a. ('a -> 'acc3 -> 'a * 'acc3) -> + 'a list -> + 'acc3 -> + 'a list * 'acc3
method virtual option : 'a. ('a -> 'acc4 -> 'a * 'acc4) -> + 'a option -> + 'acc4 -> + 'a option * 'acc4
method virtual string : string -> 'acc5 -> string * 'acc5
method position : position -> 'acc6 -> position * 'acc6
method location : location -> 'acc7 -> location * 'acc7
method location_stack : location_stack -> 'acc8 -> location_stack * 'acc8
method loc : 'a. ('a -> 'acc9 -> 'a * 'acc9) -> + 'a loc -> + 'acc9 -> + 'a loc * 'acc9
method longident : longident -> 'acc10 -> longident * 'acc10
method longident_loc : longident_loc -> 'acc11 -> longident_loc * 'acc11
method rec_flag : rec_flag -> 'acc12 -> rec_flag * 'acc12
method direction_flag : direction_flag -> 'acc13 -> direction_flag * 'acc13
method private_flag : private_flag -> 'acc14 -> private_flag * 'acc14
method mutable_flag : mutable_flag -> 'acc15 -> mutable_flag * 'acc15
method virtual_flag : virtual_flag -> 'acc16 -> virtual_flag * 'acc16
method override_flag : override_flag -> 'acc17 -> override_flag * 'acc17
method closed_flag : closed_flag -> 'acc18 -> closed_flag * 'acc18
method label : label -> 'acc19 -> label * 'acc19
method arg_label : arg_label -> 'acc20 -> arg_label * 'acc20
method variance : variance -> 'acc21 -> variance * 'acc21
method injectivity : injectivity -> 'acc22 -> injectivity * 'acc22
method constant : constant -> 'acc23 -> constant * 'acc23
method attribute : attribute -> 'acc24 -> attribute * 'acc24
method extension : extension -> 'acc25 -> extension * 'acc25
method attributes : attributes -> 'acc26 -> attributes * 'acc26
method payload : payload -> 'acc27 -> payload * 'acc27
method core_type : core_type -> 'acc28 -> core_type * 'acc28
method core_type_desc : core_type_desc -> 'acc29 -> core_type_desc * 'acc29
method package_type : package_type -> 'acc30 -> package_type * 'acc30
method row_field : row_field -> 'acc31 -> row_field * 'acc31
method row_field_desc : row_field_desc -> 'acc32 -> row_field_desc * 'acc32
method object_field : object_field -> 'acc33 -> object_field * 'acc33
method object_field_desc : object_field_desc -> + 'acc34 -> + object_field_desc * 'acc34
method pattern : pattern -> 'acc35 -> pattern * 'acc35
method pattern_desc : pattern_desc -> 'acc36 -> pattern_desc * 'acc36
method expression : expression -> 'acc37 -> expression * 'acc37
method expression_desc : expression_desc -> 'acc38 -> expression_desc * 'acc38
method case : case -> 'acc39 -> case * 'acc39
method letop : letop -> 'acc40 -> letop * 'acc40
method binding_op : binding_op -> 'acc41 -> binding_op * 'acc41
method value_description : value_description -> + 'acc42 -> + value_description * 'acc42
method type_declaration : type_declaration -> + 'acc43 -> + type_declaration * 'acc43
method type_kind : type_kind -> 'acc44 -> type_kind * 'acc44
method label_declaration : label_declaration -> + 'acc45 -> + label_declaration * 'acc45
method constructor_declaration : constructor_declaration -> + 'acc46 -> + constructor_declaration * 'acc46
method constructor_arguments : constructor_arguments -> + 'acc47 -> + constructor_arguments * 'acc47
method type_extension : type_extension -> 'acc48 -> type_extension * 'acc48
method extension_constructor : extension_constructor -> + 'acc49 -> + extension_constructor * 'acc49
method type_exception : type_exception -> 'acc50 -> type_exception * 'acc50
method extension_constructor_kind : extension_constructor_kind -> + 'acc51 -> + extension_constructor_kind * 'acc51
method class_type : class_type -> 'acc52 -> class_type * 'acc52
method class_type_desc : class_type_desc -> 'acc53 -> class_type_desc * 'acc53
method class_signature : class_signature -> 'acc54 -> class_signature * 'acc54
method class_type_field : class_type_field -> + 'acc55 -> + class_type_field * 'acc55
method class_type_field_desc : class_type_field_desc -> + 'acc56 -> + class_type_field_desc * 'acc56
method class_infos : 'a. ('a -> 'acc57 -> 'a * 'acc57) -> + 'a class_infos -> + 'acc57 -> + 'a class_infos * 'acc57
method class_description : class_description -> + 'acc58 -> + class_description * 'acc58
method class_type_declaration : class_type_declaration -> + 'acc59 -> + class_type_declaration * 'acc59
method class_expr : class_expr -> 'acc60 -> class_expr * 'acc60
method class_expr_desc : class_expr_desc -> 'acc61 -> class_expr_desc * 'acc61
method class_structure : class_structure -> 'acc62 -> class_structure * 'acc62
method class_field : class_field -> 'acc63 -> class_field * 'acc63
method class_field_desc : class_field_desc -> + 'acc64 -> + class_field_desc * 'acc64
method class_field_kind : class_field_kind -> + 'acc65 -> + class_field_kind * 'acc65
method class_declaration : class_declaration -> + 'acc66 -> + class_declaration * 'acc66
method module_type : module_type -> 'acc67 -> module_type * 'acc67
method module_type_desc : module_type_desc -> + 'acc68 -> + module_type_desc * 'acc68
method functor_parameter : functor_parameter -> + 'acc69 -> + functor_parameter * 'acc69
method signature : signature -> 'acc70 -> signature * 'acc70
method signature_item : signature_item -> 'acc71 -> signature_item * 'acc71
method signature_item_desc : signature_item_desc -> + 'acc72 -> + signature_item_desc * 'acc72
method module_declaration : module_declaration -> + 'acc73 -> + module_declaration * 'acc73
method module_substitution : module_substitution -> + 'acc74 -> + module_substitution * 'acc74
method module_type_declaration : module_type_declaration -> + 'acc75 -> + module_type_declaration * 'acc75
method open_infos : 'a. ('a -> 'acc76 -> 'a * 'acc76) -> + 'a open_infos -> + 'acc76 -> + 'a open_infos * 'acc76
method open_description : open_description -> + 'acc77 -> + open_description * 'acc77
method open_declaration : open_declaration -> + 'acc78 -> + open_declaration * 'acc78
method include_infos : 'a. ('a -> 'acc79 -> 'a * 'acc79) -> + 'a include_infos -> + 'acc79 -> + 'a include_infos * 'acc79
method include_description : include_description -> + 'acc80 -> + include_description * 'acc80
method include_declaration : include_declaration -> + 'acc81 -> + include_declaration * 'acc81
method with_constraint : with_constraint -> 'acc82 -> with_constraint * 'acc82
method module_expr : module_expr -> 'acc83 -> module_expr * 'acc83
method module_expr_desc : module_expr_desc -> + 'acc84 -> + module_expr_desc * 'acc84
method structure : structure -> 'acc85 -> structure * 'acc85
method structure_item : structure_item -> 'acc86 -> structure_item * 'acc86
method structure_item_desc : structure_item_desc -> + 'acc87 -> + structure_item_desc * 'acc87
method value_binding : value_binding -> 'acc88 -> value_binding * 'acc88
method module_binding : module_binding -> 'acc89 -> module_binding * 'acc89
method toplevel_phrase : toplevel_phrase -> 'acc90 -> toplevel_phrase * 'acc90
method toplevel_directive : toplevel_directive -> + 'acc91 -> + toplevel_directive * 'acc91
method directive_argument : directive_argument -> + 'acc92 -> + directive_argument * 'acc92
method directive_argument_desc : directive_argument_desc -> + 'acc93 -> + directive_argument_desc * 'acc93
method cases : cases -> 'acc94 -> cases * 'acc94
diff --git a/findlib-1/ppxlib/Ppxlib/class-iter/index.html b/findlib-1/ppxlib/Ppxlib/class-iter/index.html new file mode 100644 index 000000000..ec3b2f684 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/class-iter/index.html @@ -0,0 +1,2 @@ + +iter (docs.findlib-1.ppxlib.Ppxlib.iter)

Class Ppxlib.iter

method virtual bool : bool -> unit
method virtual char : char -> unit
method virtual int : int -> unit
method virtual list : 'a. ('a -> unit) -> 'a list -> unit
method virtual option : 'a. ('a -> unit) -> 'a option -> unit
method virtual string : string -> unit
method position : position -> unit
method location : location -> unit
method location_stack : location_stack -> unit
method loc : 'a. ('a -> unit) -> 'a loc -> unit
method longident : longident -> unit
method longident_loc : longident_loc -> unit
method rec_flag : rec_flag -> unit
method direction_flag : direction_flag -> unit
method private_flag : private_flag -> unit
method mutable_flag : mutable_flag -> unit
method virtual_flag : virtual_flag -> unit
method override_flag : override_flag -> unit
method closed_flag : closed_flag -> unit
method label : label -> unit
method arg_label : arg_label -> unit
method variance : variance -> unit
method injectivity : injectivity -> unit
method constant : constant -> unit
method attribute : attribute -> unit
method extension : extension -> unit
method attributes : attributes -> unit
method payload : payload -> unit
method core_type : core_type -> unit
method core_type_desc : core_type_desc -> unit
method package_type : package_type -> unit
method row_field : row_field -> unit
method row_field_desc : row_field_desc -> unit
method object_field : object_field -> unit
method object_field_desc : object_field_desc -> unit
method pattern : pattern -> unit
method pattern_desc : pattern_desc -> unit
method expression : expression -> unit
method expression_desc : expression_desc -> unit
method case : case -> unit
method letop : letop -> unit
method binding_op : binding_op -> unit
method value_description : value_description -> unit
method type_declaration : type_declaration -> unit
method type_kind : type_kind -> unit
method label_declaration : label_declaration -> unit
method constructor_declaration : constructor_declaration -> unit
method constructor_arguments : constructor_arguments -> unit
method type_extension : type_extension -> unit
method extension_constructor : extension_constructor -> unit
method type_exception : type_exception -> unit
method extension_constructor_kind : extension_constructor_kind -> unit
method class_type : class_type -> unit
method class_type_desc : class_type_desc -> unit
method class_signature : class_signature -> unit
method class_type_field : class_type_field -> unit
method class_type_field_desc : class_type_field_desc -> unit
method class_infos : 'a. ('a -> unit) -> 'a class_infos -> unit
method class_description : class_description -> unit
method class_type_declaration : class_type_declaration -> unit
method class_expr : class_expr -> unit
method class_expr_desc : class_expr_desc -> unit
method class_structure : class_structure -> unit
method class_field : class_field -> unit
method class_field_desc : class_field_desc -> unit
method class_field_kind : class_field_kind -> unit
method class_declaration : class_declaration -> unit
method module_type : module_type -> unit
method module_type_desc : module_type_desc -> unit
method functor_parameter : functor_parameter -> unit
method signature : signature -> unit
method signature_item : signature_item -> unit
method signature_item_desc : signature_item_desc -> unit
method module_declaration : module_declaration -> unit
method module_substitution : module_substitution -> unit
method module_type_declaration : module_type_declaration -> unit
method open_infos : 'a. ('a -> unit) -> 'a open_infos -> unit
method open_description : open_description -> unit
method open_declaration : open_declaration -> unit
method include_infos : 'a. ('a -> unit) -> 'a include_infos -> unit
method include_description : include_description -> unit
method include_declaration : include_declaration -> unit
method with_constraint : with_constraint -> unit
method module_expr : module_expr -> unit
method module_expr_desc : module_expr_desc -> unit
method structure : structure -> unit
method structure_item : structure_item -> unit
method structure_item_desc : structure_item_desc -> unit
method value_binding : value_binding -> unit
method module_binding : module_binding -> unit
method toplevel_phrase : toplevel_phrase -> unit
method toplevel_directive : toplevel_directive -> unit
method directive_argument : directive_argument -> unit
method directive_argument_desc : directive_argument_desc -> unit
method cases : cases -> unit
diff --git a/findlib-1/ppxlib/Ppxlib/class-lift/index.html b/findlib-1/ppxlib/Ppxlib/class-lift/index.html new file mode 100644 index 000000000..653662cc9 --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/class-lift/index.html @@ -0,0 +1,2 @@ + +lift (docs.findlib-1.ppxlib.Ppxlib.lift)

Class Ppxlib.lift

method virtual record : (string * 'res0) list -> 'res0
method virtual constr : string -> 'res1 list -> 'res1
method virtual tuple : 'res2 list -> 'res2
method virtual bool : bool -> 'res3
method virtual char : char -> 'res4
method virtual int : int -> 'res5
method virtual list : 'a. ('a -> 'res6) -> 'a list -> 'res6
method virtual option : 'a. ('a -> 'res7) -> 'a option -> 'res7
method virtual string : string -> 'res8
method position : position -> 'res9
method location : location -> 'res10
method location_stack : location_stack -> 'res11
method loc : 'a. ('a -> 'res12) -> 'a loc -> 'res12
method longident : longident -> 'res13
method longident_loc : longident_loc -> 'res14
method rec_flag : rec_flag -> 'res15
method direction_flag : direction_flag -> 'res16
method private_flag : private_flag -> 'res17
method mutable_flag : mutable_flag -> 'res18
method virtual_flag : virtual_flag -> 'res19
method override_flag : override_flag -> 'res20
method closed_flag : closed_flag -> 'res21
method label : label -> 'res22
method arg_label : arg_label -> 'res23
method variance : variance -> 'res24
method injectivity : injectivity -> 'res25
method constant : constant -> 'res26
method attribute : attribute -> 'res27
method extension : extension -> 'res28
method attributes : attributes -> 'res29
method payload : payload -> 'res30
method core_type : core_type -> 'res31
method core_type_desc : core_type_desc -> 'res32
method package_type : package_type -> 'res33
method row_field : row_field -> 'res34
method row_field_desc : row_field_desc -> 'res35
method object_field : object_field -> 'res36
method object_field_desc : object_field_desc -> 'res37
method pattern : pattern -> 'res38
method pattern_desc : pattern_desc -> 'res39
method expression : expression -> 'res40
method expression_desc : expression_desc -> 'res41
method case : case -> 'res42
method letop : letop -> 'res43
method binding_op : binding_op -> 'res44
method value_description : value_description -> 'res45
method type_declaration : type_declaration -> 'res46
method type_kind : type_kind -> 'res47
method label_declaration : label_declaration -> 'res48
method constructor_declaration : constructor_declaration -> 'res49
method constructor_arguments : constructor_arguments -> 'res50
method type_extension : type_extension -> 'res51
method extension_constructor : extension_constructor -> 'res52
method type_exception : type_exception -> 'res53
method extension_constructor_kind : extension_constructor_kind -> 'res54
method class_type : class_type -> 'res55
method class_type_desc : class_type_desc -> 'res56
method class_signature : class_signature -> 'res57
method class_type_field : class_type_field -> 'res58
method class_type_field_desc : class_type_field_desc -> 'res59
method class_infos : 'a. ('a -> 'res60) -> 'a class_infos -> 'res60
method class_description : class_description -> 'res61
method class_type_declaration : class_type_declaration -> 'res62
method class_expr : class_expr -> 'res63
method class_expr_desc : class_expr_desc -> 'res64
method class_structure : class_structure -> 'res65
method class_field : class_field -> 'res66
method class_field_desc : class_field_desc -> 'res67
method class_field_kind : class_field_kind -> 'res68
method class_declaration : class_declaration -> 'res69
method module_type : module_type -> 'res70
method module_type_desc : module_type_desc -> 'res71
method functor_parameter : functor_parameter -> 'res72
method signature : signature -> 'res73
method signature_item : signature_item -> 'res74
method signature_item_desc : signature_item_desc -> 'res75
method module_declaration : module_declaration -> 'res76
method module_substitution : module_substitution -> 'res77
method module_type_declaration : module_type_declaration -> 'res78
method open_infos : 'a. ('a -> 'res79) -> 'a open_infos -> 'res79
method open_description : open_description -> 'res80
method open_declaration : open_declaration -> 'res81
method include_infos : 'a. ('a -> 'res82) -> 'a include_infos -> 'res82
method include_description : include_description -> 'res83
method include_declaration : include_declaration -> 'res84
method with_constraint : with_constraint -> 'res85
method module_expr : module_expr -> 'res86
method module_expr_desc : module_expr_desc -> 'res87
method structure : structure -> 'res88
method structure_item : structure_item -> 'res89
method structure_item_desc : structure_item_desc -> 'res90
method value_binding : value_binding -> 'res91
method module_binding : module_binding -> 'res92
method toplevel_phrase : toplevel_phrase -> 'res93
method toplevel_directive : toplevel_directive -> 'res94
method directive_argument : directive_argument -> 'res95
method directive_argument_desc : directive_argument_desc -> 'res96
method cases : cases -> 'res97
diff --git a/findlib-1/ppxlib/Ppxlib/class-lift_map_with_context/index.html b/findlib-1/ppxlib/Ppxlib/class-lift_map_with_context/index.html new file mode 100644 index 000000000..21b82861f --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/class-lift_map_with_context/index.html @@ -0,0 +1,80 @@ + +lift_map_with_context (docs.findlib-1.ppxlib.Ppxlib.lift_map_with_context)

Class Ppxlib.lift_map_with_context

method virtual record : 'ctx0 -> (string * 'res0) list -> 'res0
method virtual constr : 'ctx1 -> string -> 'res1 list -> 'res1
method virtual tuple : 'ctx2 -> 'res2 list -> 'res2
method virtual other : 'a. 'ctx3 -> 'a -> 'res3
method virtual bool : 'ctx4 -> bool -> bool * 'res4
method virtual char : 'ctx5 -> char -> char * 'res5
method virtual int : 'ctx6 -> int -> int * 'res6
method virtual list : 'a. ('ctx7 -> 'a -> 'a * 'res7) -> + 'ctx7 -> + 'a list -> + 'a list * 'res7
method virtual option : 'a. ('ctx8 -> 'a -> 'a * 'res8) -> + 'ctx8 -> + 'a option -> + 'a option * 'res8
method virtual string : 'ctx9 -> string -> string * 'res9
method position : 'ctx10 -> position -> position * 'res10
method location : 'ctx11 -> location -> location * 'res11
method location_stack : 'ctx12 -> location_stack -> location_stack * 'res12
method loc : 'a. ('ctx13 -> 'a -> 'a * 'res13) -> + 'ctx13 -> + 'a loc -> + 'a loc * 'res13
method longident : 'ctx14 -> longident -> longident * 'res14
method longident_loc : 'ctx15 -> longident_loc -> longident_loc * 'res15
method rec_flag : 'ctx16 -> rec_flag -> rec_flag * 'res16
method direction_flag : 'ctx17 -> direction_flag -> direction_flag * 'res17
method private_flag : 'ctx18 -> private_flag -> private_flag * 'res18
method mutable_flag : 'ctx19 -> mutable_flag -> mutable_flag * 'res19
method virtual_flag : 'ctx20 -> virtual_flag -> virtual_flag * 'res20
method override_flag : 'ctx21 -> override_flag -> override_flag * 'res21
method closed_flag : 'ctx22 -> closed_flag -> closed_flag * 'res22
method label : 'ctx23 -> label -> label * 'res23
method arg_label : 'ctx24 -> arg_label -> arg_label * 'res24
method variance : 'ctx25 -> variance -> variance * 'res25
method injectivity : 'ctx26 -> injectivity -> injectivity * 'res26
method constant : 'ctx27 -> constant -> constant * 'res27
method attribute : 'ctx28 -> attribute -> attribute * 'res28
method extension : 'ctx29 -> extension -> extension * 'res29
method attributes : 'ctx30 -> attributes -> attributes * 'res30
method payload : 'ctx31 -> payload -> payload * 'res31
method core_type : 'ctx32 -> core_type -> core_type * 'res32
method core_type_desc : 'ctx33 -> core_type_desc -> core_type_desc * 'res33
method package_type : 'ctx34 -> package_type -> package_type * 'res34
method row_field : 'ctx35 -> row_field -> row_field * 'res35
method row_field_desc : 'ctx36 -> row_field_desc -> row_field_desc * 'res36
method object_field : 'ctx37 -> object_field -> object_field * 'res37
method object_field_desc : 'ctx38 -> + object_field_desc -> + object_field_desc * 'res38
method pattern : 'ctx39 -> pattern -> pattern * 'res39
method pattern_desc : 'ctx40 -> pattern_desc -> pattern_desc * 'res40
method expression : 'ctx41 -> expression -> expression * 'res41
method expression_desc : 'ctx42 -> expression_desc -> expression_desc * 'res42
method case : 'ctx43 -> case -> case * 'res43
method letop : 'ctx44 -> letop -> letop * 'res44
method binding_op : 'ctx45 -> binding_op -> binding_op * 'res45
method value_description : 'ctx46 -> + value_description -> + value_description * 'res46
method type_declaration : 'ctx47 -> + type_declaration -> + type_declaration * 'res47
method type_kind : 'ctx48 -> type_kind -> type_kind * 'res48
method label_declaration : 'ctx49 -> + label_declaration -> + label_declaration * 'res49
method constructor_declaration : 'ctx50 -> + constructor_declaration -> + constructor_declaration * 'res50
method constructor_arguments : 'ctx51 -> + constructor_arguments -> + constructor_arguments * 'res51
method type_extension : 'ctx52 -> type_extension -> type_extension * 'res52
method extension_constructor : 'ctx53 -> + extension_constructor -> + extension_constructor * 'res53
method type_exception : 'ctx54 -> type_exception -> type_exception * 'res54
method extension_constructor_kind : 'ctx55 -> + extension_constructor_kind -> + extension_constructor_kind * 'res55
method class_type : 'ctx56 -> class_type -> class_type * 'res56
method class_type_desc : 'ctx57 -> class_type_desc -> class_type_desc * 'res57
method class_signature : 'ctx58 -> class_signature -> class_signature * 'res58
method class_type_field : 'ctx59 -> + class_type_field -> + class_type_field * 'res59
method class_type_field_desc : 'ctx60 -> + class_type_field_desc -> + class_type_field_desc * 'res60
method class_infos : 'a. ('ctx61 -> 'a -> 'a * 'res61) -> + 'ctx61 -> + 'a class_infos -> + 'a class_infos * 'res61
method class_description : 'ctx62 -> + class_description -> + class_description * 'res62
method class_type_declaration : 'ctx63 -> + class_type_declaration -> + class_type_declaration * 'res63
method class_expr : 'ctx64 -> class_expr -> class_expr * 'res64
method class_expr_desc : 'ctx65 -> class_expr_desc -> class_expr_desc * 'res65
method class_structure : 'ctx66 -> class_structure -> class_structure * 'res66
method class_field : 'ctx67 -> class_field -> class_field * 'res67
method class_field_desc : 'ctx68 -> + class_field_desc -> + class_field_desc * 'res68
method class_field_kind : 'ctx69 -> + class_field_kind -> + class_field_kind * 'res69
method class_declaration : 'ctx70 -> + class_declaration -> + class_declaration * 'res70
method module_type : 'ctx71 -> module_type -> module_type * 'res71
method module_type_desc : 'ctx72 -> + module_type_desc -> + module_type_desc * 'res72
method functor_parameter : 'ctx73 -> + functor_parameter -> + functor_parameter * 'res73
method signature : 'ctx74 -> signature -> signature * 'res74
method signature_item : 'ctx75 -> signature_item -> signature_item * 'res75
method signature_item_desc : 'ctx76 -> + signature_item_desc -> + signature_item_desc * 'res76
method module_declaration : 'ctx77 -> + module_declaration -> + module_declaration * 'res77
method module_substitution : 'ctx78 -> + module_substitution -> + module_substitution * 'res78
method module_type_declaration : 'ctx79 -> + module_type_declaration -> + module_type_declaration * 'res79
method open_infos : 'a. ('ctx80 -> 'a -> 'a * 'res80) -> + 'ctx80 -> + 'a open_infos -> + 'a open_infos * 'res80
method open_description : 'ctx81 -> + open_description -> + open_description * 'res81
method open_declaration : 'ctx82 -> + open_declaration -> + open_declaration * 'res82
method include_infos : 'a. ('ctx83 -> 'a -> 'a * 'res83) -> + 'ctx83 -> + 'a include_infos -> + 'a include_infos * 'res83
method include_description : 'ctx84 -> + include_description -> + include_description * 'res84
method include_declaration : 'ctx85 -> + include_declaration -> + include_declaration * 'res85
method with_constraint : 'ctx86 -> with_constraint -> with_constraint * 'res86
method module_expr : 'ctx87 -> module_expr -> module_expr * 'res87
method module_expr_desc : 'ctx88 -> + module_expr_desc -> + module_expr_desc * 'res88
method structure : 'ctx89 -> structure -> structure * 'res89
method structure_item : 'ctx90 -> structure_item -> structure_item * 'res90
method structure_item_desc : 'ctx91 -> + structure_item_desc -> + structure_item_desc * 'res91
method value_binding : 'ctx92 -> value_binding -> value_binding * 'res92
method module_binding : 'ctx93 -> module_binding -> module_binding * 'res93
method toplevel_phrase : 'ctx94 -> toplevel_phrase -> toplevel_phrase * 'res94
method toplevel_directive : 'ctx95 -> + toplevel_directive -> + toplevel_directive * 'res95
method directive_argument : 'ctx96 -> + directive_argument -> + directive_argument * 'res96
method directive_argument_desc : 'ctx97 -> + directive_argument_desc -> + directive_argument_desc * 'res97
method cases : 'ctx98 -> cases -> cases * 'res98
diff --git a/findlib-1/ppxlib/Ppxlib/class-map/index.html b/findlib-1/ppxlib/Ppxlib/class-map/index.html new file mode 100644 index 000000000..58193549e --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/class-map/index.html @@ -0,0 +1,7 @@ + +map (docs.findlib-1.ppxlib.Ppxlib.map)

Class Ppxlib.map

method virtual bool : bool -> bool
method virtual char : char -> char
method virtual int : int -> int
method virtual list : 'a. ('a -> 'a) -> 'a list -> 'a list
method virtual option : 'a. ('a -> 'a) -> 'a option -> 'a option
method virtual string : string -> string
method position : position -> position
method location : location -> location
method location_stack : location_stack -> location_stack
method loc : 'a. ('a -> 'a) -> 'a loc -> 'a loc
method longident : longident -> longident
method longident_loc : longident_loc -> longident_loc
method rec_flag : rec_flag -> rec_flag
method direction_flag : direction_flag -> direction_flag
method private_flag : private_flag -> private_flag
method mutable_flag : mutable_flag -> mutable_flag
method virtual_flag : virtual_flag -> virtual_flag
method override_flag : override_flag -> override_flag
method closed_flag : closed_flag -> closed_flag
method label : label -> label
method arg_label : arg_label -> arg_label
method variance : variance -> variance
method injectivity : injectivity -> injectivity
method constant : constant -> constant
method attribute : attribute -> attribute
method extension : extension -> extension
method attributes : attributes -> attributes
method payload : payload -> payload
method core_type : core_type -> core_type
method core_type_desc : core_type_desc -> core_type_desc
method package_type : package_type -> package_type
method row_field : row_field -> row_field
method row_field_desc : row_field_desc -> row_field_desc
method object_field : object_field -> object_field
method object_field_desc : object_field_desc -> object_field_desc
method pattern : pattern -> pattern
method pattern_desc : pattern_desc -> pattern_desc
method expression : expression -> expression
method expression_desc : expression_desc -> expression_desc
method case : case -> case
method letop : letop -> letop
method binding_op : binding_op -> binding_op
method value_description : value_description -> value_description
method type_declaration : type_declaration -> type_declaration
method type_kind : type_kind -> type_kind
method label_declaration : label_declaration -> label_declaration
method constructor_declaration : constructor_declaration -> + constructor_declaration
method constructor_arguments : constructor_arguments -> constructor_arguments
method type_extension : type_extension -> type_extension
method extension_constructor : extension_constructor -> extension_constructor
method type_exception : type_exception -> type_exception
method extension_constructor_kind : extension_constructor_kind -> + extension_constructor_kind
method class_type : class_type -> class_type
method class_type_desc : class_type_desc -> class_type_desc
method class_signature : class_signature -> class_signature
method class_type_field : class_type_field -> class_type_field
method class_type_field_desc : class_type_field_desc -> class_type_field_desc
method class_infos : 'a. ('a -> 'a) -> 'a class_infos -> 'a class_infos
method class_description : class_description -> class_description
method class_type_declaration : class_type_declaration -> + class_type_declaration
method class_expr : class_expr -> class_expr
method class_expr_desc : class_expr_desc -> class_expr_desc
method class_structure : class_structure -> class_structure
method class_field : class_field -> class_field
method class_field_desc : class_field_desc -> class_field_desc
method class_field_kind : class_field_kind -> class_field_kind
method class_declaration : class_declaration -> class_declaration
method module_type : module_type -> module_type
method module_type_desc : module_type_desc -> module_type_desc
method functor_parameter : functor_parameter -> functor_parameter
method signature : signature -> signature
method signature_item : signature_item -> signature_item
method signature_item_desc : signature_item_desc -> signature_item_desc
method module_declaration : module_declaration -> module_declaration
method module_substitution : module_substitution -> module_substitution
method module_type_declaration : module_type_declaration -> + module_type_declaration
method open_infos : 'a. ('a -> 'a) -> 'a open_infos -> 'a open_infos
method open_description : open_description -> open_description
method open_declaration : open_declaration -> open_declaration
method include_infos : 'a. ('a -> 'a) -> 'a include_infos -> 'a include_infos
method include_description : include_description -> include_description
method include_declaration : include_declaration -> include_declaration
method with_constraint : with_constraint -> with_constraint
method module_expr : module_expr -> module_expr
method module_expr_desc : module_expr_desc -> module_expr_desc
method structure : structure -> structure
method structure_item : structure_item -> structure_item
method structure_item_desc : structure_item_desc -> structure_item_desc
method value_binding : value_binding -> value_binding
method module_binding : module_binding -> module_binding
method toplevel_phrase : toplevel_phrase -> toplevel_phrase
method toplevel_directive : toplevel_directive -> toplevel_directive
method directive_argument : directive_argument -> directive_argument
method directive_argument_desc : directive_argument_desc -> + directive_argument_desc
method cases : cases -> cases
diff --git a/findlib-1/ppxlib/Ppxlib/class-map_with_context/index.html b/findlib-1/ppxlib/Ppxlib/class-map_with_context/index.html new file mode 100644 index 000000000..4893bd7da --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/class-map_with_context/index.html @@ -0,0 +1,40 @@ + +map_with_context (docs.findlib-1.ppxlib.Ppxlib.map_with_context)

Class Ppxlib.map_with_context

method virtual bool : 'ctx0 -> bool -> bool
method virtual char : 'ctx1 -> char -> char
method virtual int : 'ctx2 -> int -> int
method virtual list : 'a. ('ctx3 -> 'a -> 'a) -> 'ctx3 -> 'a list -> 'a list
method virtual option : 'a. ('ctx4 -> 'a -> 'a) -> + 'ctx4 -> + 'a option -> + 'a option
method virtual string : 'ctx5 -> string -> string
method position : 'ctx6 -> position -> position
method location : 'ctx7 -> location -> location
method location_stack : 'ctx8 -> location_stack -> location_stack
method loc : 'a. ('ctx9 -> 'a -> 'a) -> 'ctx9 -> 'a loc -> 'a loc
method longident : 'ctx10 -> longident -> longident
method longident_loc : 'ctx11 -> longident_loc -> longident_loc
method rec_flag : 'ctx12 -> rec_flag -> rec_flag
method direction_flag : 'ctx13 -> direction_flag -> direction_flag
method private_flag : 'ctx14 -> private_flag -> private_flag
method mutable_flag : 'ctx15 -> mutable_flag -> mutable_flag
method virtual_flag : 'ctx16 -> virtual_flag -> virtual_flag
method override_flag : 'ctx17 -> override_flag -> override_flag
method closed_flag : 'ctx18 -> closed_flag -> closed_flag
method label : 'ctx19 -> label -> label
method arg_label : 'ctx20 -> arg_label -> arg_label
method variance : 'ctx21 -> variance -> variance
method injectivity : 'ctx22 -> injectivity -> injectivity
method constant : 'ctx23 -> constant -> constant
method attribute : 'ctx24 -> attribute -> attribute
method extension : 'ctx25 -> extension -> extension
method attributes : 'ctx26 -> attributes -> attributes
method payload : 'ctx27 -> payload -> payload
method core_type : 'ctx28 -> core_type -> core_type
method core_type_desc : 'ctx29 -> core_type_desc -> core_type_desc
method package_type : 'ctx30 -> package_type -> package_type
method row_field : 'ctx31 -> row_field -> row_field
method row_field_desc : 'ctx32 -> row_field_desc -> row_field_desc
method object_field : 'ctx33 -> object_field -> object_field
method object_field_desc : 'ctx34 -> object_field_desc -> object_field_desc
method pattern : 'ctx35 -> pattern -> pattern
method pattern_desc : 'ctx36 -> pattern_desc -> pattern_desc
method expression : 'ctx37 -> expression -> expression
method expression_desc : 'ctx38 -> expression_desc -> expression_desc
method case : 'ctx39 -> case -> case
method letop : 'ctx40 -> letop -> letop
method binding_op : 'ctx41 -> binding_op -> binding_op
method value_description : 'ctx42 -> value_description -> value_description
method type_declaration : 'ctx43 -> type_declaration -> type_declaration
method type_kind : 'ctx44 -> type_kind -> type_kind
method label_declaration : 'ctx45 -> label_declaration -> label_declaration
method constructor_declaration : 'ctx46 -> + constructor_declaration -> + constructor_declaration
method constructor_arguments : 'ctx47 -> + constructor_arguments -> + constructor_arguments
method type_extension : 'ctx48 -> type_extension -> type_extension
method extension_constructor : 'ctx49 -> + extension_constructor -> + extension_constructor
method type_exception : 'ctx50 -> type_exception -> type_exception
method extension_constructor_kind : 'ctx51 -> + extension_constructor_kind -> + extension_constructor_kind
method class_type : 'ctx52 -> class_type -> class_type
method class_type_desc : 'ctx53 -> class_type_desc -> class_type_desc
method class_signature : 'ctx54 -> class_signature -> class_signature
method class_type_field : 'ctx55 -> class_type_field -> class_type_field
method class_type_field_desc : 'ctx56 -> + class_type_field_desc -> + class_type_field_desc
method class_infos : 'a. ('ctx57 -> 'a -> 'a) -> + 'ctx57 -> + 'a class_infos -> + 'a class_infos
method class_description : 'ctx58 -> class_description -> class_description
method class_type_declaration : 'ctx59 -> + class_type_declaration -> + class_type_declaration
method class_expr : 'ctx60 -> class_expr -> class_expr
method class_expr_desc : 'ctx61 -> class_expr_desc -> class_expr_desc
method class_structure : 'ctx62 -> class_structure -> class_structure
method class_field : 'ctx63 -> class_field -> class_field
method class_field_desc : 'ctx64 -> class_field_desc -> class_field_desc
method class_field_kind : 'ctx65 -> class_field_kind -> class_field_kind
method class_declaration : 'ctx66 -> class_declaration -> class_declaration
method module_type : 'ctx67 -> module_type -> module_type
method module_type_desc : 'ctx68 -> module_type_desc -> module_type_desc
method functor_parameter : 'ctx69 -> functor_parameter -> functor_parameter
method signature : 'ctx70 -> signature -> signature
method signature_item : 'ctx71 -> signature_item -> signature_item
method signature_item_desc : 'ctx72 -> + signature_item_desc -> + signature_item_desc
method module_declaration : 'ctx73 -> module_declaration -> module_declaration
method module_substitution : 'ctx74 -> + module_substitution -> + module_substitution
method module_type_declaration : 'ctx75 -> + module_type_declaration -> + module_type_declaration
method open_infos : 'a. ('ctx76 -> 'a -> 'a) -> + 'ctx76 -> + 'a open_infos -> + 'a open_infos
method open_description : 'ctx77 -> open_description -> open_description
method open_declaration : 'ctx78 -> open_declaration -> open_declaration
method include_infos : 'a. ('ctx79 -> 'a -> 'a) -> + 'ctx79 -> + 'a include_infos -> + 'a include_infos
method include_description : 'ctx80 -> + include_description -> + include_description
method include_declaration : 'ctx81 -> + include_declaration -> + include_declaration
method with_constraint : 'ctx82 -> with_constraint -> with_constraint
method module_expr : 'ctx83 -> module_expr -> module_expr
method module_expr_desc : 'ctx84 -> module_expr_desc -> module_expr_desc
method structure : 'ctx85 -> structure -> structure
method structure_item : 'ctx86 -> structure_item -> structure_item
method structure_item_desc : 'ctx87 -> + structure_item_desc -> + structure_item_desc
method value_binding : 'ctx88 -> value_binding -> value_binding
method module_binding : 'ctx89 -> module_binding -> module_binding
method toplevel_phrase : 'ctx90 -> toplevel_phrase -> toplevel_phrase
method toplevel_directive : 'ctx91 -> toplevel_directive -> toplevel_directive
method directive_argument : 'ctx92 -> directive_argument -> directive_argument
method directive_argument_desc : 'ctx93 -> + directive_argument_desc -> + directive_argument_desc
method cases : 'ctx94 -> cases -> cases
diff --git a/findlib-1/ppxlib/Ppxlib/class-type_is_recursive/index.html b/findlib-1/ppxlib/Ppxlib/class-type_is_recursive/index.html new file mode 100644 index 000000000..c064ca3ef --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/class-type_is_recursive/index.html @@ -0,0 +1,2 @@ + +type_is_recursive (docs.findlib-1.ppxlib.Ppxlib.type_is_recursive)

Class Ppxlib.type_is_recursive

(new type_is_recursive rec_flag tds)#go () returns whether rec_flag, tds is really a recursive type. We disregard recursive occurrences appearing in arrow types. You can override the search for certain type expressions by inheriting from this class.

inherit Ppxlib__.Ast_traverse0.iter
val type_names : string list
method return_true : unit -> unit
method go : unit -> Ppxlib__.Import.rec_flag
diff --git a/findlib-1/ppxlib/Ppxlib/index.html b/findlib-1/ppxlib/Ppxlib/index.html new file mode 100644 index 000000000..0a35706ed --- /dev/null +++ b/findlib-1/ppxlib/Ppxlib/index.html @@ -0,0 +1,70 @@ + +Ppxlib (docs.findlib-1.ppxlib.Ppxlib)

Module Ppxlib

Standard library for ppx rewriters

ppxlib is meant to be opened globally in your PPX source files.

Opening it comes with two advantages. First, it will shadow the compiler-libs modules. The compiler-libs modules are unstable and aren't meant to be used, so shadowing them is a good protection mechanism. In case you don't want to open Ppxlib, you can open Ocaml_shadow to get the same protection. Second, it will bring several modules in scope, that are useful to have when writing a rewriter:

The core ppxlib entries

Manipulating the AST

module Ast_builder : sig ... end

Ast_builder is a module to generate OCaml AST fragments. It provides a shorter syntax than directly using the Parsetree constructors, as well as a better stability than the constructors.

module Ast_pattern : sig ... end

This module implements first class AST patterns. It allows to destruct and extract values from AST fragments. This gives the same functionality as a pattern-match, but with simpler syntax and more stability than directly pattern-matching on the Parsetree constructors.

module Ast_traverse : sig ... end

This module provides AST traversal classes, such as maps, iterations, folds, etc. on the Parsetree types.

Context-free rewriting

module Context_free : sig ... end

Context free rewriting, to define local rewriting rules that will all be applied at once by the driver.

module Deriving : sig ... end

Deriving code from type declarations.

module Extension : sig ... end

Declare extenders to rewrite extension nodes.

module Expansion_context : sig ... end

The context given to rewriting rules when expanding.

module Code_path : sig ... end

This module contains type and functions for representing and manipulating path to AST nodes.

Other helpers

module Expansion_helpers : sig ... end

Various helpers for expansion, such as quoting expressions in their context, or mangling names.

module Merlin_helpers : sig ... end

Some helpers to annotate the AST so merlin can decide which branches to look at and which branches to ignore.

module Spellcheck : sig ... end

Helpers to provide hints to PPX users for typos or spellchecks.

module Keyword : sig ... end

Small module to check if a string is an OCaml keyword.

module Driver : sig ... end

Interaction with the driver, such as getting/seeting cookies, adding arguments.

module Caller_id : sig ... end

Small helper to find out who is the caller of a function

module Ast_io : sig ... end

A small module to help read bin-annots generated files.

Checks

module Attribute : sig ... end

This module provides hygiene for attributes. The goal is to report misuses of attributes to the user as soon as possible so that no mistyped attribute get silently ignored.

module Reserved_namespaces : sig ... end

Small module to reserve namespaces in attribute names.

Common helper functions

val lident : string -> Longident.t
val gen_symbol : ?prefix:string -> unit -> string

gen_symbol ?prefix () generates a fresh variable name with prefix.

  • parameter prefix

    default = "_x"

val string_of_core_type : Astlib.Ast_500.Parsetree.core_type -> string
val assert_no_attributes : Astlib.Ast_500.Parsetree.attribute list -> unit
val assert_no_attributes_in : Ppxlib__.Ast_traverse0.iter
val attributes_errors : + Astlib.Ast_500.Parsetree.attribute list -> + Location.Error.t list
val collect_attributes_errors : + Location.Error.t list Ppxlib__.Ast_traverse0.fold

get_type_param_name_res tp returns the string identifier associated with tp if it is a type parameter, as a result.

See get_type_param_name_res. Raises a located error in case of failure.

(new type_is_recursive rec_flag tds)#go () returns whether rec_flag, tds is really a recursive type. We disregard recursive occurrences appearing in arrow types. You can override the search for certain type expressions by inheriting from this class.

really_recursive rec_flag tds = (new type_is_recursive rec_flag tds)#go ()

val loc_of_extension : + (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) -> + Location.t

convert multi-arg function applications into a cascade of 1-arg applications

val attribute_of_warning : + Location.t -> + string -> + Astlib.Ast_500.Parsetree.attribute

Encode a warning message into an 'ocaml.ppwarning' attribute which can be inserted in a generated Parsetree. The compiler will be responsible for reporting the warning.

val is_polymorphic_variant : + Astlib.Ast_500.Parsetree.type_declaration -> + sig_:bool -> + [> `Definitely | `Maybe | `Surely_not ]
val mk_named_sig : + loc:Location.t -> + sg_name:string -> + handle_polymorphic_variant:bool -> + Astlib.Ast_500.Parsetree.type_declaration list -> + Astlib.Ast_500.Parsetree.module_type Astlib.Ast_500.Parsetree.include_infos + option

mk_named_sig ~loc ~sg_name:"Foo" ~handle_polymorphic_variant tds will generate

include Foo (* or Foo1, Foo2, Foo3 *)
+  with type (* ('a, 'b, 'c) *) t := (* ('a, 'b, 'c) *) t

when:

  • there is only one type declaration
  • the type is named t
  • there are less than 4 type parameters
  • there are no constraints on the type parameters

It will take care of giving fresh names to unnamed type parameters.

val exn_to_loc_error : exn -> Location.Error.t

Convert exn to a located error if possible or reraise it otherwise

module With_errors : sig ... end

Modules from other libraries

Expose some modules from Ppxlib_ast.

module Ast = Ppxlib_ast.Ast
module Ast_helper = Ppxlib_ast.Ast_helper
module Asttypes = Ppxlib_ast.Asttypes
module Parse = Ppxlib_ast.Parse
module Parsetree = Ppxlib_ast.Parsetree
module Pprintast = Ppxlib_ast.Pprintast
module Selected_ast = Ppxlib_ast.Selected_ast
module Location : sig ... end

Overrides the Location module of OCaml

module Longident : sig ... end

Overrides the Longident module of OCaml

module Loc : sig ... end

Located items

The whole AST types

Include all the Ast definitions since we need them in every single ppx

include module type of struct include Ast end
type position = Lexing.position = {
  1. pos_fname : string;
  2. pos_lnum : int;
  3. pos_bol : int;
  4. pos_cnum : int;
}
and location = Astlib.Location.t = {
  1. loc_start : position;
  2. loc_end : position;
  3. loc_ghost : bool;
}
and location_stack = location list
and 'a loc = 'a Astlib.Location.loc = {
  1. txt : 'a;
  2. loc : location;
}
and longident = Astlib.Longident.t =
  1. | Lident of string
  2. | Ldot of longident * string
  3. | Lapply of longident * longident
and longident_loc = longident loc

Auxiliary AST types used by parsetree and typedtree.

and rec_flag = Astlib.Ast_500.Asttypes.rec_flag =
  1. | Nonrecursive
  2. | Recursive
and direction_flag = Astlib.Ast_500.Asttypes.direction_flag =
  1. | Upto
  2. | Downto
and private_flag = Astlib.Ast_500.Asttypes.private_flag =
  1. | Private
  2. | Public
and mutable_flag = Astlib.Ast_500.Asttypes.mutable_flag =
  1. | Immutable
  2. | Mutable
and virtual_flag = Astlib.Ast_500.Asttypes.virtual_flag =
  1. | Virtual
  2. | Concrete
and override_flag = Astlib.Ast_500.Asttypes.override_flag =
  1. | Override
  2. | Fresh
and closed_flag = Astlib.Ast_500.Asttypes.closed_flag =
  1. | Closed
  2. | Open
and label = string
and arg_label = Astlib.Ast_500.Asttypes.arg_label =
  1. | Nolabel
  2. | Labelled of string
    (*

    label:T -> ...

    *)
  3. | Optional of string
    (*

    ?label:T -> ...

    *)
and variance = Astlib.Ast_500.Asttypes.variance =
  1. | Covariant
  2. | Contravariant
  3. | NoVariance
and injectivity = Astlib.Ast_500.Asttypes.injectivity =
  1. | Injective
  2. | NoInjectivity

Abstract syntax tree produced by parsing

and constant = Astlib.Ast_500.Parsetree.constant =
  1. | Pconst_integer of string * char option
    (*

    Integer constants such as 3 3l 3L 3n.

    Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

    *)
  2. | Pconst_char of char
    (*

    Character such as 'c'.

    *)
  3. | Pconst_string of string * location * string option
    (*

    Constant string such as "constant" or {delim|other constant|delim}.

    The location span the content of the string, without the delimiters.

    *)
  4. | Pconst_float of string * char option
    (*

    Float constant such as 3.4, 2e5 or 1.4e-4.

    Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

    *)

Extension points

and attribute = Astlib.Ast_500.Parsetree.attribute = {
  1. attr_name : string loc;
  2. attr_payload : payload;
  3. attr_loc : location;
}

Attributes such as [@id ARG] and [@@id ARG].

Metadata containers passed around within the AST. The compiler ignores unknown attributes.

and extension = string loc * payload

Extension points such as [%id ARG] and [%%id ARG].

Sub-language placeholder -- rejected by the typechecker.

and attributes = attribute list
and payload = Astlib.Ast_500.Parsetree.payload =
  1. | PStr of structure
  2. | PSig of signature
    (*

    : SIG in an attribute or an extension point

    *)
  3. | PTyp of core_type
    (*

    : T in an attribute or an extension point

    *)
  4. | PPat of pattern * expression option
    (*

    ? P or ? P when E, in an attribute or an extension point

    *)

Core language

Type expressions

and core_type = Astlib.Ast_500.Parsetree.core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : location;
  3. ptyp_loc_stack : location_stack;
  4. ptyp_attributes : attributes;
    (*

    ... [@id1] [@id2]

    *)
}
and core_type_desc = Astlib.Ast_500.Parsetree.core_type_desc =
  1. | Ptyp_any
    (*

    _

    *)
  2. | Ptyp_var of string
    (*

    A type variable such as 'a

    *)
  3. | Ptyp_arrow of arg_label * core_type * core_type
    (*

    Ptyp_arrow(lbl, T1, T2) represents:

    *)
  4. | Ptyp_tuple of core_type list
    (*

    Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

    Invariant: n >= 2.

    *)
  5. | Ptyp_constr of longident_loc * core_type list
    (*

    Ptyp_constr(lident, l) represents:

    • tconstr when l=[],
    • T tconstr when l=[T],
    • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
    *)
  6. | Ptyp_object of object_field list * closed_flag
    (*

    Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

    • < l1:T1; ...; ln:Tn > when flag is Closed,
    • < l1:T1; ...; ln:Tn; .. > when flag is Open.
    *)
  7. | Ptyp_class of longident_loc * core_type list
    (*

    Ptyp_class(tconstr, l) represents:

    • #tconstr when l=[],
    • T #tconstr when l=[T],
    • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
    *)
  8. | Ptyp_alias of core_type * string
    (*

    T as 'a.

    *)
  9. | Ptyp_variant of row_field list * closed_flag * label list option
    (*

    Ptyp_variant([`A;`B], flag, labels) represents:

    • [ `A|`B ] when flag is Closed, and labels is None,
    • [> `A|`B ] when flag is Open, and labels is None,
    • [< `A|`B ] when flag is Closed, and labels is Some [],
    • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
    *)
  10. | Ptyp_poly of string loc list * core_type
    (*

    'a1 ... 'an. T

    Can only appear in the following context:

    let x : 'a1 ... 'an. T = e ...
    *)
  11. | Ptyp_package of package_type
    (*

    (module S).

    *)
  12. | Ptyp_extension of extension
    (*

    [%id].

    *)
and package_type = longident_loc * (longident_loc * core_type) list

As package_type typed values:

  • (S, []) represents (module S),
  • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
and row_field = Astlib.Ast_500.Parsetree.row_field = {
  1. prf_desc : row_field_desc;
  2. prf_loc : location;
  3. prf_attributes : attributes;
}
and row_field_desc = Astlib.Ast_500.Parsetree.row_field_desc =
  1. | Rtag of label loc * bool * core_type list
    (*

    Rtag(`A, b, l) represents:

    • `A when b is true and l is [],
    • `A of T when b is false and l is [T],
    • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
    • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
    • The bool field is true if the tag contains a constant (empty) constructor.
    • & occurs when several types are used for the same constructor (see 4.2 in the manual)
    *)
  2. | Rinherit of core_type
    (*

    [ | t ]

    *)
and object_field = Astlib.Ast_500.Parsetree.object_field = {
  1. pof_desc : object_field_desc;
  2. pof_loc : location;
  3. pof_attributes : attributes;
}
and object_field_desc = Astlib.Ast_500.Parsetree.object_field_desc =
  1. | Otag of label loc * core_type
  2. | Oinherit of core_type

Patterns

and pattern = Astlib.Ast_500.Parsetree.pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : location;
  3. ppat_loc_stack : location_stack;
  4. ppat_attributes : attributes;
    (*

    ... [@id1] [@id2]

    *)
}
and pattern_desc = Astlib.Ast_500.Parsetree.pattern_desc =
  1. | Ppat_any
    (*

    The pattern _.

    *)
  2. | Ppat_var of string loc
    (*

    A variable pattern such as x

    *)
  3. | Ppat_alias of pattern * string loc
    (*

    An alias pattern such as P as 'a

    *)
  4. | Ppat_constant of constant
    (*

    Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  5. | Ppat_interval of constant * constant
    (*

    Patterns such as 'a'..'z'.

    Other forms of interval are recognized by the parser but rejected by the type-checker.

    *)
  6. | Ppat_tuple of pattern list
    (*

    Patterns (P1, ..., Pn).

    Invariant: n >= 2

    *)
  7. | Ppat_construct of longident_loc * (string loc list * pattern) option
    (*

    Ppat_construct(C, args) represents:

    • C when args is None,
    • C P when args is Some ([], P)
    • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
    • C (type a b) P when args is Some ([a; b], P)
    *)
  8. | Ppat_variant of label * pattern option
    (*

    Ppat_variant(`A, pat) represents:

    • `A when pat is None,
    • `A P when pat is Some P
    *)
  9. | Ppat_record of (longident_loc * pattern) list * closed_flag
    (*

    Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

    • { l1=P1; ...; ln=Pn } when flag is Closed
    • { l1=P1; ...; ln=Pn; _} when flag is Open

    Invariant: n > 0

    *)
  10. | Ppat_array of pattern list
    (*

    Pattern [| P1; ...; Pn |]

    *)
  11. | Ppat_or of pattern * pattern
    (*

    Pattern P1 | P2

    *)
  12. | Ppat_constraint of pattern * core_type
    (*

    Pattern (P : T)

    *)
  13. | Ppat_type of longident_loc
    (*

    Pattern #tconst

    *)
  14. | Ppat_lazy of pattern
    (*

    Pattern lazy P

    *)
  15. | Ppat_unpack of string option loc
    (*

    Ppat_unpack(s) represents:

    • (module P) when s is Some "P"
    • (module _) when s is None

    Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

    *)
  16. | Ppat_exception of pattern
    (*

    Pattern exception P

    *)
  17. | Ppat_extension of extension
    (*

    Pattern [%id]

    *)
  18. | Ppat_open of longident_loc * pattern
    (*

    Pattern M.(P)

    *)

Value expressions

and expression = Astlib.Ast_500.Parsetree.expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : location;
  3. pexp_loc_stack : location_stack;
  4. pexp_attributes : attributes;
    (*

    ... [@id1] [@id2]

    *)
}
and expression_desc = Astlib.Ast_500.Parsetree.expression_desc =
  1. | Pexp_ident of longident_loc
    (*

    Identifiers such as x and M.x

    *)
  2. | Pexp_constant of constant
    (*

    Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  3. | Pexp_let of rec_flag * value_binding list * expression
    (*

    Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

    • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
    *)
  4. | Pexp_function of cases
    (*

    function P1 -> E1 | ... | Pn -> En

    *)
  5. | Pexp_fun of arg_label * expression option * pattern * expression
    (*

    Pexp_fun(lbl, exp0, P, E1) represents:

    • fun P -> E1 when lbl is Nolabel and exp0 is None
    • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
    • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
    • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

    Notes:

    • If E0 is provided, only Optional is allowed.
    • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
    • let f P = E is represented using Pexp_fun.
    *)
  6. | Pexp_apply of expression * (arg_label * expression) list
    (*

    Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

    li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

    Invariant: n > 0

    *)
  7. | Pexp_match of expression * cases
    (*

    match E0 with P1 -> E1 | ... | Pn -> En

    *)
  8. | Pexp_try of expression * cases
    (*

    try E0 with P1 -> E1 | ... | Pn -> En

    *)
  9. | Pexp_tuple of expression list
    (*

    Expressions (E1, ..., En)

    Invariant: n >= 2

    *)
  10. | Pexp_construct of longident_loc * expression option
    (*

    Pexp_construct(C, exp) represents:

    • C when exp is None,
    • C E when exp is Some E,
    • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
    *)
  11. | Pexp_variant of label * expression option
    (*

    Pexp_variant(`A, exp) represents

    • `A when exp is None
    • `A E when exp is Some E
    *)
  12. | Pexp_record of (longident_loc * expression) list * expression option
    (*

    Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

    • { l1=P1; ...; ln=Pn } when exp0 is None
    • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

    Invariant: n > 0

    *)
  13. | Pexp_field of expression * longident_loc
    (*

    E.l

    *)
  14. | Pexp_setfield of expression * longident_loc * expression
    (*

    E1.l <- E2

    *)
  15. | Pexp_array of expression list
    (*

    [| E1; ...; En |]

    *)
  16. | Pexp_ifthenelse of expression * expression * expression option
    (*

    if E1 then E2 else E3

    *)
  17. | Pexp_sequence of expression * expression
    (*

    E1; E2

    *)
  18. | Pexp_while of expression * expression
    (*

    while E1 do E2 done

    *)
  19. | Pexp_for of pattern * expression * expression * direction_flag * expression
    (*

    Pexp_for(i, E1, E2, direction, E3) represents:

    • for i = E1 to E2 do E3 done when direction is Upto
    • for i = E1 downto E2 do E3 done when direction is Downto
    *)
  20. | Pexp_constraint of expression * core_type
    (*

    (E : T)

    *)
  21. | Pexp_coerce of expression * core_type option * core_type
    (*

    Pexp_coerce(E, from, T) represents

    • (E :> T) when from is None,
    • (E : T0 :> T) when from is Some T0.
    *)
  22. | Pexp_send of expression * label loc
    (*

    E # m

    *)
  23. | Pexp_new of longident_loc
    (*

    new M.c

    *)
  24. | Pexp_setinstvar of label loc * expression
    (*

    x <- 2

    *)
  25. | Pexp_override of (label loc * expression) list
    (*

    {< x1 = E1; ...; xn = En >}

    *)
  26. | Pexp_letmodule of string option loc * module_expr * expression
    (*

    let module M = ME in E

    *)
  27. | Pexp_letexception of extension_constructor * expression
    (*

    let exception C in E

    *)
  28. | Pexp_assert of expression
    (*

    assert E.

    Note: assert false is treated in a special way by the type-checker.

    *)
  29. | Pexp_lazy of expression
    (*

    lazy E

    *)
  30. | Pexp_poly of expression * core_type option
    (*

    Used for method bodies.

    Can only be used as the expression under Cfk_concrete for methods (not values).

    *)
  31. | Pexp_object of class_structure
    (*

    object ... end

    *)
  32. | Pexp_newtype of string loc * expression
    (*

    fun (type t) -> E

    *)
  33. | Pexp_pack of module_expr
    (*

    (module ME).

    (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

    *)
  34. | Pexp_open of open_declaration * expression
    (*
    • M.(E)
    • let open M in E
    • let open! M in E
    *)
  35. | Pexp_letop of letop
    (*
    • let* P = E0 in E1
    • let* P0 = E00 and* P1 = E01 in E1
    *)
  36. | Pexp_extension of extension
    (*

    [%id]

    *)
  37. | Pexp_unreachable
    (*

    .

    *)
and case = Astlib.Ast_500.Parsetree.case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}

Values of type case represents (P -> E) or (P when E0 -> E)

and letop = Astlib.Ast_500.Parsetree.letop = {
  1. let_ : binding_op;
  2. ands : binding_op list;
  3. body : expression;
}
and binding_op = Astlib.Ast_500.Parsetree.binding_op = {
  1. pbop_op : string loc;
  2. pbop_pat : pattern;
  3. pbop_exp : expression;
  4. pbop_loc : location;
}

Value descriptions

and value_description = Astlib.Ast_500.Parsetree.value_description = {
  1. pval_name : string loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
  5. pval_loc : location;
}

Values of type value_description represents:

  • val x: T, when pval_prim is []
  • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

Type declarations

and type_declaration = Astlib.Ast_500.Parsetree.type_declaration = {
  1. ptype_name : string loc;
  2. ptype_params : (core_type * (variance * injectivity)) list;
    (*

    ('a1,...'an) t

    *)
  3. ptype_cstrs : (core_type * core_type * location) list;
    (*

    ... constraint T1=T1' ... constraint Tn=Tn'

    *)
  4. ptype_kind : type_kind;
  5. ptype_private : private_flag;
    (*

    for = private ...

    *)
  6. ptype_manifest : core_type option;
    (*

    represents = T

    *)
  7. ptype_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
  8. ptype_loc : location;
}

Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

  • type t when type_kind is Ptype_abstract, and manifest is None,
  • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
  • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
  • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
  • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
  • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
  • type t = .. when type_kind is Ptype_open, and manifest is None.
and type_kind = Astlib.Ast_500.Parsetree.type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
    (*

    Invariant: non-empty list

    *)
  4. | Ptype_open
and label_declaration = Astlib.Ast_500.Parsetree.label_declaration = {
  1. pld_name : string loc;
  2. pld_mutable : mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : location;
  5. pld_attributes : attributes;
    (*

    l : T [@id1] [@id2]

    *)
}

Note: T can be a Ptyp_poly.

and constructor_declaration = Astlib.Ast_500.Parsetree.constructor_declaration = + {
  1. pcd_name : string loc;
  2. pcd_vars : string loc list;
  3. pcd_args : constructor_arguments;
  4. pcd_res : core_type option;
  5. pcd_loc : location;
  6. pcd_attributes : attributes;
    (*

    C of ... [@id1] [@id2]

    *)
}
and constructor_arguments = Astlib.Ast_500.Parsetree.constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
    (*

    Values of type constructor_declaration represents the constructor arguments of:

    • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
    • C: T0 when res = Some T0, and args = Pcstr_tuple [],
    • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
    • C of {...} when res = None, and args = Pcstr_record [...],
    • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
    *)
and type_extension = Astlib.Ast_500.Parsetree.type_extension = {
  1. ptyext_path : longident_loc;
  2. ptyext_params : (core_type * (variance * injectivity)) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : private_flag;
  5. ptyext_loc : location;
  6. ptyext_attributes : attributes;
    (*

    ... @@id1 @@id2

    *)
}

Definition of new extensions constructors for the extensive sum type t (type t += ...).

and extension_constructor = Astlib.Ast_500.Parsetree.extension_constructor = {
  1. pext_name : string loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : location;
  4. pext_attributes : attributes;
    (*

    C of ... [@id1] [@id2]

    *)
}
and type_exception = Astlib.Ast_500.Parsetree.type_exception = {
  1. ptyexn_constructor : extension_constructor;
  2. ptyexn_loc : location;
  3. ptyexn_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
}

Definition of a new exception (exception E).

and extension_constructor_kind = + Astlib.Ast_500.Parsetree.extension_constructor_kind = +
  1. | Pext_decl of string loc list * constructor_arguments * core_type option
    (*

    Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

    • C of T1 * ... * Tn when:

      • existentials is [],
      • c_args is [T1; ...; Tn],
      • t_opt is None.
    • C: T0 when

      • existentials is [],
      • c_args is [],
      • t_opt is Some T0.
    • C: T1 * ... * Tn -> T0 when

      • existentials is [],
      • c_args is [T1; ...; Tn],
      • t_opt is Some T0.
    • C: 'a... . T1 * ... * Tn -> T0 when

      • existentials is ['a;...],
      • c_args is [T1; ... ; Tn],
      • t_opt is Some T0.
    *)
  2. | Pext_rebind of longident_loc
    (*

    Pext_rebind(D) re-export the constructor D with the new name C

    *)

Class language

Type expressions for the class language

and class_type = Astlib.Ast_500.Parsetree.class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : location;
  3. pcty_attributes : attributes;
    (*

    ... [@id1] [@id2]

    *)
}
and class_type_desc = Astlib.Ast_500.Parsetree.class_type_desc =
  1. | Pcty_constr of longident_loc * core_type list
    (*
    • c
    • ['a1, ..., 'an] c
    *)
  2. | Pcty_signature of class_signature
    (*

    object ... end

    *)
  3. | Pcty_arrow of arg_label * core_type * class_type
    (*

    Pcty_arrow(lbl, T, CT) represents:

    *)
  4. | Pcty_extension of extension
    (*

    %id

    *)
  5. | Pcty_open of open_description * class_type
    (*

    let open M in CT

    *)
and class_signature = Astlib.Ast_500.Parsetree.class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}

Values of type class_signature represents:

and class_type_field = Astlib.Ast_500.Parsetree.class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : location;
  3. pctf_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
}
and class_type_field_desc = Astlib.Ast_500.Parsetree.class_type_field_desc =
  1. | Pctf_inherit of class_type
    (*

    inherit CT

    *)
  2. | Pctf_val of label loc * mutable_flag * virtual_flag * core_type
    (*

    val x: T

    *)
  3. | Pctf_method of label loc * private_flag * virtual_flag * core_type
    (*

    method x: T

    Note: T can be a Ptyp_poly.

    *)
  4. | Pctf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  5. | Pctf_attribute of attribute
    (*

    [@@@id]

    *)
  6. | Pctf_extension of extension
    (*

    [%%id]

    *)
and 'a class_infos = 'a Astlib.Ast_500.Parsetree.class_infos = {
  1. pci_virt : virtual_flag;
  2. pci_params : (core_type * (variance * injectivity)) list;
  3. pci_name : string loc;
  4. pci_expr : 'a;
  5. pci_loc : location;
  6. pci_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
}

Values of type class_expr class_infos represents:

  • class c = ...
  • class ['a1,...,'an] c = ...
  • class virtual c = ...

They are also used for "class type" declaration.

and class_description = class_type class_infos
and class_type_declaration = class_type class_infos

Value expressions for the class language

and class_expr = Astlib.Ast_500.Parsetree.class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : location;
  3. pcl_attributes : attributes;
    (*

    ... [@id1] [@id2]

    *)
}
and class_expr_desc = Astlib.Ast_500.Parsetree.class_expr_desc =
  1. | Pcl_constr of longident_loc * core_type list
    (*

    c and ['a1, ..., 'an] c

    *)
  2. | Pcl_structure of class_structure
    (*

    object ... end

    *)
  3. | Pcl_fun of arg_label * expression option * pattern * class_expr
    (*

    Pcl_fun(lbl, exp0, P, CE) represents:

    • fun P -> CE when lbl is Nolabel and exp0 is None,
    • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
    • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
    • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
    *)
  4. | Pcl_apply of class_expr * (arg_label * expression) list
    (*

    Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

    Invariant: n > 0

    *)
  5. | Pcl_let of rec_flag * value_binding list * class_expr
    (*

    Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

    • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
    *)
  6. | Pcl_constraint of class_expr * class_type
    (*

    (CE : CT)

    *)
  7. | Pcl_extension of extension
    (*

    [%id]

    *)
  8. | Pcl_open of open_description * class_expr
    (*

    let open M in CE

    *)
and class_structure = Astlib.Ast_500.Parsetree.class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}

Values of type class_structure represents:

and class_field = Astlib.Ast_500.Parsetree.class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : location;
  3. pcf_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
}
and class_field_desc = Astlib.Ast_500.Parsetree.class_field_desc =
  1. | Pcf_inherit of override_flag * class_expr * string loc option
    (*

    Pcf_inherit(flag, CE, s) represents:

    • inherit CE when flag is Fresh and s is None,
    • inherit CE as x when flag is Fresh and s is Some x,
    • inherit! CE when flag is Override and s is None,
    • inherit! CE as x when flag is Override and s is Some x
    *)
  2. | Pcf_val of label loc * mutable_flag * class_field_kind
    (*

    Pcf_val(x,flag, kind) represents:

    *)
  3. | Pcf_method of label loc * private_flag * class_field_kind
    (**)
  4. | Pcf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  5. | Pcf_initializer of expression
    (*

    initializer E

    *)
  6. | Pcf_attribute of attribute
    (*

    [@@@id]

    *)
  7. | Pcf_extension of extension
    (*

    [%%id]

    *)
and class_field_kind = Astlib.Ast_500.Parsetree.class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of override_flag * expression
and class_declaration = class_expr class_infos

Module language

Type expressions for the module language

and module_type = Astlib.Ast_500.Parsetree.module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : location;
  3. pmty_attributes : attributes;
    (*

    ... [@id1] [@id2]

    *)
}
and module_type_desc = Astlib.Ast_500.Parsetree.module_type_desc =
  1. | Pmty_ident of longident_loc
    (*

    Pmty_ident(S) represents S

    *)
  2. | Pmty_signature of signature
    (*

    sig ... end

    *)
  3. | Pmty_functor of functor_parameter * module_type
    (*

    functor(X : MT1) -> MT2

    *)
  4. | Pmty_with of module_type * with_constraint list
    (*

    MT with ...

    *)
  5. | Pmty_typeof of module_expr
    (*

    module type of ME

    *)
  6. | Pmty_extension of extension
    (*

    [%id]

    *)
  7. | Pmty_alias of longident_loc
    (*

    (module M)

    *)
and functor_parameter = Astlib.Ast_500.Parsetree.functor_parameter =
  1. | Unit
    (*

    ()

    *)
  2. | Named of string option loc * module_type
    (*

    Named(name, MT) represents:

    • (X : MT) when name is Some X,
    • (_ : MT) when name is None
    *)
and signature = signature_item list
and signature_item = Astlib.Ast_500.Parsetree.signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : location;
}
and signature_item_desc = Astlib.Ast_500.Parsetree.signature_item_desc =
  1. | Psig_value of value_description
    (*
    • val x: T
    • external x: T = "s1" ... "sn"
    *)
  2. | Psig_type of rec_flag * type_declaration list
    (*

    type t1 = ... and ... and tn = ...

    *)
  3. | Psig_typesubst of type_declaration list
    (*

    type t1 := ... and ... and tn := ...

    *)
  4. | Psig_typext of type_extension
    (*

    type t1 += ...

    *)
  5. | Psig_exception of type_exception
    (*

    exception C of T

    *)
  6. | Psig_module of module_declaration
    (*

    module X = M and module X : MT

    *)
  7. | Psig_modsubst of module_substitution
    (*

    module X := M

    *)
  8. | Psig_recmodule of module_declaration list
    (*

    module rec X1 : MT1 and ... and Xn : MTn

    *)
  9. | Psig_modtype of module_type_declaration
    (*

    module type S = MT and module type S

    *)
  10. | Psig_modtypesubst of module_type_declaration
    (*

    module type S := ...

    *)
  11. | Psig_open of open_description
    (*

    open X

    *)
  12. | Psig_include of include_description
    (*

    include MT

    *)
  13. | Psig_class of class_description list
    (*

    class c1 : ... and ... and cn : ...

    *)
  14. | Psig_class_type of class_type_declaration list
    (*

    class type ct1 = ... and ... and ctn = ...

    *)
  15. | Psig_attribute of attribute
    (*

    [@@@id]

    *)
  16. | Psig_extension of extension * attributes
    (*

    [%%id]

    *)
and module_declaration = Astlib.Ast_500.Parsetree.module_declaration = {
  1. pmd_name : string option loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
  4. pmd_loc : location;
}

Values of type module_declaration represents S : MT

and module_substitution = Astlib.Ast_500.Parsetree.module_substitution = {
  1. pms_name : string loc;
  2. pms_manifest : longident_loc;
  3. pms_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
  4. pms_loc : location;
}

Values of type module_substitution represents S := M

and module_type_declaration = Astlib.Ast_500.Parsetree.module_type_declaration = + {
  1. pmtd_name : string loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
  4. pmtd_loc : location;
}

Values of type module_type_declaration represents:

  • S = MT,
  • S for abstract module type declaration, when pmtd_type is None.
and 'a open_infos = 'a Astlib.Ast_500.Parsetree.open_infos = {
  1. popen_expr : 'a;
  2. popen_override : override_flag;
  3. popen_loc : location;
  4. popen_attributes : attributes;
}

Values of type 'a open_infos represents:

and open_description = longident_loc open_infos

Values of type open_description represents:

  • open M.N
  • open M(N).O
and open_declaration = module_expr open_infos

Values of type open_declaration represents:

  • open M.N
  • open M(N).O
  • open struct ... end
and 'a include_infos = 'a Astlib.Ast_500.Parsetree.include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : location;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos

Values of type include_description represents include MT

and include_declaration = module_expr include_infos

Values of type include_declaration represents include ME

and with_constraint = Astlib.Ast_500.Parsetree.with_constraint =
  1. | Pwith_type of longident_loc * type_declaration
    (*

    with type X.t = ...

    Note: the last component of the longident must match the name of the type_declaration.

    *)
  2. | Pwith_module of longident_loc * longident_loc
    (*

    with module X.Y = Z

    *)
  3. | Pwith_modtype of longident_loc * module_type
    (*

    with module type X.Y = Z

    *)
  4. | Pwith_modtypesubst of longident_loc * module_type
    (*

    with module type X.Y := sig end

    *)
  5. | Pwith_typesubst of longident_loc * type_declaration
    (*

    with type X.t := ..., same format as [Pwith_type]

    *)
  6. | Pwith_modsubst of longident_loc * longident_loc
    (*

    with module X.Y := Z

    *)

Value expressions for the module language

and module_expr = Astlib.Ast_500.Parsetree.module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : location;
  3. pmod_attributes : attributes;
    (*

    ... [@id1] [@id2]

    *)
}
and module_expr_desc = Astlib.Ast_500.Parsetree.module_expr_desc =
  1. | Pmod_ident of longident_loc
    (*

    X

    *)
  2. | Pmod_structure of structure
    (*

    struct ... end

    *)
  3. | Pmod_functor of functor_parameter * module_expr
    (*

    functor(X : MT1) -> ME

    *)
  4. | Pmod_apply of module_expr * module_expr
    (*

    ME1(ME2)

    *)
  5. | Pmod_constraint of module_expr * module_type
    (*

    (ME : MT)

    *)
  6. | Pmod_unpack of expression
    (*

    (val E)

    *)
  7. | Pmod_extension of extension
    (*

    [%id]

    *)
and structure = structure_item list
and structure_item = Astlib.Ast_500.Parsetree.structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : location;
}
and structure_item_desc = Astlib.Ast_500.Parsetree.structure_item_desc =
  1. | Pstr_eval of expression * attributes
    (*

    E

    *)
  2. | Pstr_value of rec_flag * value_binding list
    (*

    Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

    • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
    *)
  3. | Pstr_primitive of value_description
    (*
    • val x: T
    • external x: T = "s1" ... "sn"
    *)
  4. | Pstr_type of rec_flag * type_declaration list
    (*

    type t1 = ... and ... and tn = ...

    *)
  5. | Pstr_typext of type_extension
    (*

    type t1 += ...

    *)
  6. | Pstr_exception of type_exception
    (*
    • exception C of T
    • exception C = M.X
    *)
  7. | Pstr_module of module_binding
    (*

    module X = ME

    *)
  8. | Pstr_recmodule of module_binding list
    (*

    module rec X1 = ME1 and ... and Xn = MEn

    *)
  9. | Pstr_modtype of module_type_declaration
    (*

    module type S = MT

    *)
  10. | Pstr_open of open_declaration
    (*

    open X

    *)
  11. | Pstr_class of class_declaration list
    (*

    class c1 = ... and ... and cn = ...

    *)
  12. | Pstr_class_type of class_type_declaration list
    (*

    class type ct1 = ... and ... and ctn = ...

    *)
  13. | Pstr_include of include_declaration
    (*

    include ME

    *)
  14. | Pstr_attribute of attribute
    (*

    [@@@id]

    *)
  15. | Pstr_extension of extension * attributes
    (*

    [%%id]

    *)
and value_binding = Astlib.Ast_500.Parsetree.value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_attributes : attributes;
  4. pvb_loc : location;
}
and module_binding = Astlib.Ast_500.Parsetree.module_binding = {
  1. pmb_name : string option loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : location;
}

Values of type module_binding represents module X = ME

Toplevel

Toplevel phrases

and toplevel_phrase = Astlib.Ast_500.Parsetree.toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of toplevel_directive
    (*

    #use, #load ...

    *)
and toplevel_directive = Astlib.Ast_500.Parsetree.toplevel_directive = {
  1. pdir_name : string loc;
  2. pdir_arg : directive_argument option;
  3. pdir_loc : location;
}
and directive_argument = Astlib.Ast_500.Parsetree.directive_argument = {
  1. pdira_desc : directive_argument_desc;
  2. pdira_loc : location;
}
and directive_argument_desc = Astlib.Ast_500.Parsetree.directive_argument_desc = +
  1. | Pdir_string of string
  2. | Pdir_int of string * char option
  3. | Pdir_ident of longident
  4. | Pdir_bool of bool
and cases = case list
class virtual map : object ... end
class virtual iter : object ... end
class virtual 'acc fold : object ... end
class virtual 'acc fold_map : object ... end
class virtual 'ctx map_with_context : object ... end
class virtual 'res lift : object ... end
class virtual ['ctx, 'res] lift_map_with_context : object ... end

Make sure code using Ppxlib doesn't refer to compiler-libs without being explicit about it:

include sig ... end
include module type of struct include Ocaml_shadow end + with module Ast_helper := Ocaml_shadow.Ast_helper + with module Asttypes := Ocaml_shadow.Asttypes + with module Docstrings := Ocaml_shadow.Docstrings + with module Identifiable := Ocaml_shadow.Identifiable + with module Lexer := Ocaml_shadow.Lexer + with module Location := Ocaml_shadow.Location + with module Longident := Ocaml_shadow.Longident + with module Parse := Ocaml_shadow.Parse + with module Parsetree := Ocaml_shadow.Parsetree + with module Pprintast := Ocaml_shadow.Pprintast + with module Syntaxerr := Ocaml_shadow.Syntaxerr
module Do_not_use_directly = Ocaml_shadow.Do_not_use_directly
module Afl_instrument = Ocaml_shadow.Afl_instrument
module Alias_analysis = Ocaml_shadow.Alias_analysis
module Allocated_const = Ocaml_shadow.Allocated_const
module Annot = Ocaml_shadow.Annot
module Arch = Ocaml_shadow.Arch
module Arg_helper = Ocaml_shadow.Arg_helper
module Asmgen = Ocaml_shadow.Asmgen
module Asmlibrarian = Ocaml_shadow.Asmlibrarian
module Asmpackager = Ocaml_shadow.Asmpackager
module Ast_invariants = Ocaml_shadow.Ast_invariants
module Ast_iterator = Ocaml_shadow.Ast_iterator
module Ast_mapper = Ocaml_shadow.Ast_mapper
module Attr_helper = Ocaml_shadow.Attr_helper
module Augment_specialised_args = Ocaml_shadow.Augment_specialised_args
module Backend_intf = Ocaml_shadow.Backend_intf
module Backend_var = Ocaml_shadow.Backend_var
module Binutils = Ocaml_shadow.Binutils
module Branch_relaxation = Ocaml_shadow.Branch_relaxation
module Branch_relaxation_intf = Ocaml_shadow.Branch_relaxation_intf
module Btype = Ocaml_shadow.Btype
module Build_export_info = Ocaml_shadow.Build_export_info
module Build_path_prefix_map = Ocaml_shadow.Build_path_prefix_map
module Builtin_attributes = Ocaml_shadow.Builtin_attributes
module Bytegen = Ocaml_shadow.Bytegen
module Bytelibrarian = Ocaml_shadow.Bytelibrarian
module Bytepackager = Ocaml_shadow.Bytepackager
module Bytesections = Ocaml_shadow.Bytesections
module CSE = Ocaml_shadow.CSE
module CSEgen = Ocaml_shadow.CSEgen
module CamlinternalMenhirLib = Ocaml_shadow.CamlinternalMenhirLib
module Ccomp = Ocaml_shadow.Ccomp
module Clambda = Ocaml_shadow.Clambda
module Clambda_primitives = Ocaml_shadow.Clambda_primitives
module Clflags = Ocaml_shadow.Clflags
module Closure = Ocaml_shadow.Closure
module Closure_conversion = Ocaml_shadow.Closure_conversion
module Closure_conversion_aux = Ocaml_shadow.Closure_conversion_aux
module Closure_element = Ocaml_shadow.Closure_element
module Closure_id = Ocaml_shadow.Closure_id
module Closure_middle_end = Ocaml_shadow.Closure_middle_end
module Closure_offsets = Ocaml_shadow.Closure_offsets
module Closure_origin = Ocaml_shadow.Closure_origin
module Cmi_format = Ocaml_shadow.Cmi_format
module Cmm = Ocaml_shadow.Cmm
module Cmm_helpers = Ocaml_shadow.Cmm_helpers
module Cmm_invariants = Ocaml_shadow.Cmm_invariants
module Cmmgen = Ocaml_shadow.Cmmgen
module Cmmgen_state = Ocaml_shadow.Cmmgen_state
module Cmo_format = Ocaml_shadow.Cmo_format
module Cmt2annot = Ocaml_shadow.Cmt2annot
module Cmt_format = Ocaml_shadow.Cmt_format
module Cmx_format = Ocaml_shadow.Cmx_format
module Cmxs_format = Ocaml_shadow.Cmxs_format
module Coloring = Ocaml_shadow.Coloring
module Comballoc = Ocaml_shadow.Comballoc
module Compenv = Ocaml_shadow.Compenv
module Compilation_unit = Ocaml_shadow.Compilation_unit
module Compile = Ocaml_shadow.Compile
module Compile_common = Ocaml_shadow.Compile_common
module Compilenv = Ocaml_shadow.Compilenv
module Compmisc = Ocaml_shadow.Compmisc
module Compression = Ocaml_shadow.Compression
module Config = Ocaml_shadow.Config
module Config_boot = Ocaml_shadow.Config_boot
module Config_main = Ocaml_shadow.Config_main
module Consistbl = Ocaml_shadow.Consistbl
module Convert_primitives = Ocaml_shadow.Convert_primitives
module Ctype = Ocaml_shadow.Ctype
module Dataflow = Ocaml_shadow.Dataflow
module Datarepr = Ocaml_shadow.Datarepr
module Deadcode = Ocaml_shadow.Deadcode
module Debuginfo = Ocaml_shadow.Debuginfo
module Depend = Ocaml_shadow.Depend
module Diffing = Ocaml_shadow.Diffing
module Diffing_with_keys = Ocaml_shadow.Diffing_with_keys
module Dll = Ocaml_shadow.Dll
module Domainstate = Ocaml_shadow.Domainstate
module Effect_analysis = Ocaml_shadow.Effect_analysis
module Emit = Ocaml_shadow.Emit
module Emitaux = Ocaml_shadow.Emitaux
module Emitcode = Ocaml_shadow.Emitcode
module Emitenv = Ocaml_shadow.Emitenv
module Env = Ocaml_shadow.Env
module Envaux = Ocaml_shadow.Envaux
module Errors = Ocaml_shadow.Errors
module Errortrace = Ocaml_shadow.Errortrace
module Export_id = Ocaml_shadow.Export_id
module Export_info = Ocaml_shadow.Export_info
module Export_info_for_pack = Ocaml_shadow.Export_info_for_pack
module Expunge = Ocaml_shadow.Expunge
module Extract_projections = Ocaml_shadow.Extract_projections
module Find_recursive_functions = Ocaml_shadow.Find_recursive_functions
module Flambda = Ocaml_shadow.Flambda
module Flambda_invariants = Ocaml_shadow.Flambda_invariants
module Flambda_iterators = Ocaml_shadow.Flambda_iterators
module Flambda_middle_end = Ocaml_shadow.Flambda_middle_end
module Flambda_to_clambda = Ocaml_shadow.Flambda_to_clambda
module Flambda_utils = Ocaml_shadow.Flambda_utils
module Freshening = Ocaml_shadow.Freshening
module Genprintval = Ocaml_shadow.Genprintval
module Id_types = Ocaml_shadow.Id_types
module Ident = Ocaml_shadow.Ident
module Import_approx = Ocaml_shadow.Import_approx
module Includeclass = Ocaml_shadow.Includeclass
module Includecore = Ocaml_shadow.Includecore
module Includemod = Ocaml_shadow.Includemod
module Includemod_errorprinter = Ocaml_shadow.Includemod_errorprinter
module Inconstant_idents = Ocaml_shadow.Inconstant_idents
module Initialize_symbol_to_let_symbol = + Ocaml_shadow.Initialize_symbol_to_let_symbol
module Inline_and_simplify = Ocaml_shadow.Inline_and_simplify
module Inline_and_simplify_aux = Ocaml_shadow.Inline_and_simplify_aux
module Inlining_cost = Ocaml_shadow.Inlining_cost
module Inlining_decision = Ocaml_shadow.Inlining_decision
module Inlining_decision_intf = Ocaml_shadow.Inlining_decision_intf
module Inlining_stats = Ocaml_shadow.Inlining_stats
module Inlining_stats_types = Ocaml_shadow.Inlining_stats_types
module Inlining_transforms = Ocaml_shadow.Inlining_transforms
module Instruct = Ocaml_shadow.Instruct
module Int_replace_polymorphic_compare = + Ocaml_shadow.Int_replace_polymorphic_compare
module Interf = Ocaml_shadow.Interf
module Internal_variable_names = Ocaml_shadow.Internal_variable_names
module Interval = Ocaml_shadow.Interval
module Invariant_params = Ocaml_shadow.Invariant_params
module Lambda = Ocaml_shadow.Lambda
module Lazy_backtrack = Ocaml_shadow.Lazy_backtrack
module Lift_code = Ocaml_shadow.Lift_code
module Lift_constants = Ocaml_shadow.Lift_constants
module Lift_let_to_initialize_symbol = + Ocaml_shadow.Lift_let_to_initialize_symbol
module Linear = Ocaml_shadow.Linear
module Linear_format = Ocaml_shadow.Linear_format
module Linearize = Ocaml_shadow.Linearize
module Linkage_name = Ocaml_shadow.Linkage_name
module Linscan = Ocaml_shadow.Linscan
module Liveness = Ocaml_shadow.Liveness
module Load_path = Ocaml_shadow.Load_path
module Local_store = Ocaml_shadow.Local_store
module Mach = Ocaml_shadow.Mach
module Main = Ocaml_shadow.Main
module Main_args = Ocaml_shadow.Main_args
module Maindriver = Ocaml_shadow.Maindriver
module Makedepend = Ocaml_shadow.Makedepend
module Matching = Ocaml_shadow.Matching
module Meta = Ocaml_shadow.Meta
module Misc = Ocaml_shadow.Misc
module Mtype = Ocaml_shadow.Mtype
module Mutable_variable = Ocaml_shadow.Mutable_variable
module Numbers = Ocaml_shadow.Numbers
module Opcodes = Ocaml_shadow.Opcodes
module Oprint = Ocaml_shadow.Oprint
module Optcompile = Ocaml_shadow.Optcompile
module Opterrors = Ocaml_shadow.Opterrors
module Optmain = Ocaml_shadow.Optmain
module Optmaindriver = Ocaml_shadow.Optmaindriver
module Outcometree = Ocaml_shadow.Outcometree
module Parameter = Ocaml_shadow.Parameter
module Parmatch = Ocaml_shadow.Parmatch
module Parser = Ocaml_shadow.Parser
module Pass_wrapper = Ocaml_shadow.Pass_wrapper
module Path = Ocaml_shadow.Path
module Patterns = Ocaml_shadow.Patterns
module Persistent_env = Ocaml_shadow.Persistent_env
module Polling = Ocaml_shadow.Polling
module Pparse = Ocaml_shadow.Pparse
module Predef = Ocaml_shadow.Predef
module Primitive = Ocaml_shadow.Primitive
module Printast = Ocaml_shadow.Printast
module Printclambda = Ocaml_shadow.Printclambda
module Printclambda_primitives = Ocaml_shadow.Printclambda_primitives
module Printcmm = Ocaml_shadow.Printcmm
module Printinstr = Ocaml_shadow.Printinstr
module Printlambda = Ocaml_shadow.Printlambda
module Printlinear = Ocaml_shadow.Printlinear
module Printmach = Ocaml_shadow.Printmach
module Printpat = Ocaml_shadow.Printpat
module Printtyp = Ocaml_shadow.Printtyp
module Printtyped = Ocaml_shadow.Printtyped
module Proc = Ocaml_shadow.Proc
module Profile = Ocaml_shadow.Profile
module Projection = Ocaml_shadow.Projection
module Rec_check = Ocaml_shadow.Rec_check
module Ref_to_variables = Ocaml_shadow.Ref_to_variables
module Reg = Ocaml_shadow.Reg
module Reload = Ocaml_shadow.Reload
module Reloadgen = Ocaml_shadow.Reloadgen
module Remove_free_vars_equal_to_args = + Ocaml_shadow.Remove_free_vars_equal_to_args
module Remove_unused_arguments = Ocaml_shadow.Remove_unused_arguments
module Remove_unused_closure_vars = Ocaml_shadow.Remove_unused_closure_vars
module Remove_unused_program_constructs = + Ocaml_shadow.Remove_unused_program_constructs
module Runtimedef = Ocaml_shadow.Runtimedef
module Schedgen = Ocaml_shadow.Schedgen
module Scheduling = Ocaml_shadow.Scheduling
module Selectgen = Ocaml_shadow.Selectgen
module Selection = Ocaml_shadow.Selection
module Semantics_of_primitives = Ocaml_shadow.Semantics_of_primitives
module Set_of_closures_id = Ocaml_shadow.Set_of_closures_id
module Set_of_closures_origin = Ocaml_shadow.Set_of_closures_origin
module Shape = Ocaml_shadow.Shape
module Share_constants = Ocaml_shadow.Share_constants
module Signature_group = Ocaml_shadow.Signature_group
module Simple_value_approx = Ocaml_shadow.Simple_value_approx
module Simplif = Ocaml_shadow.Simplif
module Simplify_boxed_integer_ops = Ocaml_shadow.Simplify_boxed_integer_ops
module Simplify_boxed_integer_ops_intf = + Ocaml_shadow.Simplify_boxed_integer_ops_intf
module Simplify_common = Ocaml_shadow.Simplify_common
module Simplify_primitives = Ocaml_shadow.Simplify_primitives
module Spill = Ocaml_shadow.Spill
module Split = Ocaml_shadow.Split
module Static_exception = Ocaml_shadow.Static_exception
module Strmatch = Ocaml_shadow.Strmatch
module Strongly_connected_components = + Ocaml_shadow.Strongly_connected_components
module Stypes = Ocaml_shadow.Stypes
module Subst = Ocaml_shadow.Subst
module Switch = Ocaml_shadow.Switch
module Symbol = Ocaml_shadow.Symbol
module Symtable = Ocaml_shadow.Symtable
module Tag = Ocaml_shadow.Tag
module Targetint = Ocaml_shadow.Targetint
module Tast_iterator = Ocaml_shadow.Tast_iterator
module Tast_mapper = Ocaml_shadow.Tast_mapper
module Terminfo = Ocaml_shadow.Terminfo
module Tmc = Ocaml_shadow.Tmc
module Topcommon = Ocaml_shadow.Topcommon
module Topdirs = Ocaml_shadow.Topdirs
module Topeval = Ocaml_shadow.Topeval
module Tophooks = Ocaml_shadow.Tophooks
module Toploop = Ocaml_shadow.Toploop
module Topmain = Ocaml_shadow.Topmain
module Topprinters = Ocaml_shadow.Topprinters
module Topstart = Ocaml_shadow.Topstart
module Trace = Ocaml_shadow.Trace
module Translattribute = Ocaml_shadow.Translattribute
module Translclass = Ocaml_shadow.Translclass
module Translcore = Ocaml_shadow.Translcore
module Translmod = Ocaml_shadow.Translmod
module Translobj = Ocaml_shadow.Translobj
module Translprim = Ocaml_shadow.Translprim
module Traverse_for_exported_symbols = + Ocaml_shadow.Traverse_for_exported_symbols
module Type_immediacy = Ocaml_shadow.Type_immediacy
module Typeclass = Ocaml_shadow.Typeclass
module Typecore = Ocaml_shadow.Typecore
module Typedecl = Ocaml_shadow.Typedecl
module Typedecl_immediacy = Ocaml_shadow.Typedecl_immediacy
module Typedecl_properties = Ocaml_shadow.Typedecl_properties
module Typedecl_separability = Ocaml_shadow.Typedecl_separability
module Typedecl_unboxed = Ocaml_shadow.Typedecl_unboxed
module Typedecl_variance = Ocaml_shadow.Typedecl_variance
module Typedtree = Ocaml_shadow.Typedtree
module Typemod = Ocaml_shadow.Typemod
module Typeopt = Ocaml_shadow.Typeopt
module Types = Ocaml_shadow.Types
module Typetexp = Ocaml_shadow.Typetexp
module Un_anf = Ocaml_shadow.Un_anf
module Unbox_closures = Ocaml_shadow.Unbox_closures
module Unbox_free_vars_of_closures = Ocaml_shadow.Unbox_free_vars_of_closures
module Unbox_specialised_args = Ocaml_shadow.Unbox_specialised_args
module Untypeast = Ocaml_shadow.Untypeast
module Var_within_closure = Ocaml_shadow.Var_within_closure
module Variable = Ocaml_shadow.Variable
module Warnings = Ocaml_shadow.Warnings
module X86_ast = Ocaml_shadow.X86_ast
module X86_dsl = Ocaml_shadow.X86_dsl
module X86_gas = Ocaml_shadow.X86_gas
module X86_masm = Ocaml_shadow.X86_masm
module X86_proc = Ocaml_shadow.X86_proc
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-fold/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-fold/index.html new file mode 100644 index 000000000..790db4188 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-fold/index.html @@ -0,0 +1,16 @@ + +fold (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast.fold)

Class Ast.fold

method virtual bool : bool -> 'acc0 -> 'acc0
method virtual char : char -> 'acc1 -> 'acc1
method virtual int : int -> 'acc2 -> 'acc2
method virtual list : 'a. ('a -> 'acc3 -> 'acc3) -> 'a list -> 'acc3 -> 'acc3
method virtual option : 'a. ('a -> 'acc4 -> 'acc4) -> + 'a option -> + 'acc4 -> + 'acc4
method virtual string : string -> 'acc5 -> 'acc5
method position : position -> 'acc6 -> 'acc6
method location : location -> 'acc7 -> 'acc7
method location_stack : location_stack -> 'acc8 -> 'acc8
method loc : 'a. ('a -> 'acc9 -> 'acc9) -> 'a loc -> 'acc9 -> 'acc9
method longident : longident -> 'acc10 -> 'acc10
method longident_loc : longident_loc -> 'acc11 -> 'acc11
method rec_flag : rec_flag -> 'acc12 -> 'acc12
method direction_flag : direction_flag -> 'acc13 -> 'acc13
method private_flag : private_flag -> 'acc14 -> 'acc14
method mutable_flag : mutable_flag -> 'acc15 -> 'acc15
method virtual_flag : virtual_flag -> 'acc16 -> 'acc16
method override_flag : override_flag -> 'acc17 -> 'acc17
method closed_flag : closed_flag -> 'acc18 -> 'acc18
method label : label -> 'acc19 -> 'acc19
method arg_label : arg_label -> 'acc20 -> 'acc20
method variance : variance -> 'acc21 -> 'acc21
method injectivity : injectivity -> 'acc22 -> 'acc22
method constant : constant -> 'acc23 -> 'acc23
method attribute : attribute -> 'acc24 -> 'acc24
method extension : extension -> 'acc25 -> 'acc25
method attributes : attributes -> 'acc26 -> 'acc26
method payload : payload -> 'acc27 -> 'acc27
method core_type : core_type -> 'acc28 -> 'acc28
method core_type_desc : core_type_desc -> 'acc29 -> 'acc29
method package_type : package_type -> 'acc30 -> 'acc30
method row_field : row_field -> 'acc31 -> 'acc31
method row_field_desc : row_field_desc -> 'acc32 -> 'acc32
method object_field : object_field -> 'acc33 -> 'acc33
method object_field_desc : object_field_desc -> 'acc34 -> 'acc34
method pattern : pattern -> 'acc35 -> 'acc35
method pattern_desc : pattern_desc -> 'acc36 -> 'acc36
method expression : expression -> 'acc37 -> 'acc37
method expression_desc : expression_desc -> 'acc38 -> 'acc38
method case : case -> 'acc39 -> 'acc39
method letop : letop -> 'acc40 -> 'acc40
method binding_op : binding_op -> 'acc41 -> 'acc41
method value_description : value_description -> 'acc42 -> 'acc42
method type_declaration : type_declaration -> 'acc43 -> 'acc43
method type_kind : type_kind -> 'acc44 -> 'acc44
method label_declaration : label_declaration -> 'acc45 -> 'acc45
method constructor_declaration : constructor_declaration -> 'acc46 -> 'acc46
method constructor_arguments : constructor_arguments -> 'acc47 -> 'acc47
method type_extension : type_extension -> 'acc48 -> 'acc48
method extension_constructor : extension_constructor -> 'acc49 -> 'acc49
method type_exception : type_exception -> 'acc50 -> 'acc50
method extension_constructor_kind : extension_constructor_kind -> + 'acc51 -> + 'acc51
method class_type : class_type -> 'acc52 -> 'acc52
method class_type_desc : class_type_desc -> 'acc53 -> 'acc53
method class_signature : class_signature -> 'acc54 -> 'acc54
method class_type_field : class_type_field -> 'acc55 -> 'acc55
method class_type_field_desc : class_type_field_desc -> 'acc56 -> 'acc56
method class_infos : 'a. ('a -> 'acc57 -> 'acc57) -> + 'a class_infos -> + 'acc57 -> + 'acc57
method class_description : class_description -> 'acc58 -> 'acc58
method class_type_declaration : class_type_declaration -> 'acc59 -> 'acc59
method class_expr : class_expr -> 'acc60 -> 'acc60
method class_expr_desc : class_expr_desc -> 'acc61 -> 'acc61
method class_structure : class_structure -> 'acc62 -> 'acc62
method class_field : class_field -> 'acc63 -> 'acc63
method class_field_desc : class_field_desc -> 'acc64 -> 'acc64
method class_field_kind : class_field_kind -> 'acc65 -> 'acc65
method class_declaration : class_declaration -> 'acc66 -> 'acc66
method module_type : module_type -> 'acc67 -> 'acc67
method module_type_desc : module_type_desc -> 'acc68 -> 'acc68
method functor_parameter : functor_parameter -> 'acc69 -> 'acc69
method signature : signature -> 'acc70 -> 'acc70
method signature_item : signature_item -> 'acc71 -> 'acc71
method signature_item_desc : signature_item_desc -> 'acc72 -> 'acc72
method module_declaration : module_declaration -> 'acc73 -> 'acc73
method module_substitution : module_substitution -> 'acc74 -> 'acc74
method module_type_declaration : module_type_declaration -> 'acc75 -> 'acc75
method open_infos : 'a. ('a -> 'acc76 -> 'acc76) -> + 'a open_infos -> + 'acc76 -> + 'acc76
method open_description : open_description -> 'acc77 -> 'acc77
method open_declaration : open_declaration -> 'acc78 -> 'acc78
method include_infos : 'a. ('a -> 'acc79 -> 'acc79) -> + 'a include_infos -> + 'acc79 -> + 'acc79
method include_description : include_description -> 'acc80 -> 'acc80
method include_declaration : include_declaration -> 'acc81 -> 'acc81
method with_constraint : with_constraint -> 'acc82 -> 'acc82
method module_expr : module_expr -> 'acc83 -> 'acc83
method module_expr_desc : module_expr_desc -> 'acc84 -> 'acc84
method structure : structure -> 'acc85 -> 'acc85
method structure_item : structure_item -> 'acc86 -> 'acc86
method structure_item_desc : structure_item_desc -> 'acc87 -> 'acc87
method value_binding : value_binding -> 'acc88 -> 'acc88
method module_binding : module_binding -> 'acc89 -> 'acc89
method toplevel_phrase : toplevel_phrase -> 'acc90 -> 'acc90
method toplevel_directive : toplevel_directive -> 'acc91 -> 'acc91
method directive_argument : directive_argument -> 'acc92 -> 'acc92
method directive_argument_desc : directive_argument_desc -> 'acc93 -> 'acc93
method cases : cases -> 'acc94 -> 'acc94
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-fold_map/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-fold_map/index.html new file mode 100644 index 000000000..ab912be55 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-fold_map/index.html @@ -0,0 +1,80 @@ + +fold_map (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast.fold_map)

Class Ast.fold_map

method virtual bool : bool -> 'acc0 -> bool * 'acc0
method virtual char : char -> 'acc1 -> char * 'acc1
method virtual int : int -> 'acc2 -> int * 'acc2
method virtual list : 'a. ('a -> 'acc3 -> 'a * 'acc3) -> + 'a list -> + 'acc3 -> + 'a list * 'acc3
method virtual option : 'a. ('a -> 'acc4 -> 'a * 'acc4) -> + 'a option -> + 'acc4 -> + 'a option * 'acc4
method virtual string : string -> 'acc5 -> string * 'acc5
method position : position -> 'acc6 -> position * 'acc6
method location : location -> 'acc7 -> location * 'acc7
method location_stack : location_stack -> 'acc8 -> location_stack * 'acc8
method loc : 'a. ('a -> 'acc9 -> 'a * 'acc9) -> + 'a loc -> + 'acc9 -> + 'a loc * 'acc9
method longident : longident -> 'acc10 -> longident * 'acc10
method longident_loc : longident_loc -> 'acc11 -> longident_loc * 'acc11
method rec_flag : rec_flag -> 'acc12 -> rec_flag * 'acc12
method direction_flag : direction_flag -> 'acc13 -> direction_flag * 'acc13
method private_flag : private_flag -> 'acc14 -> private_flag * 'acc14
method mutable_flag : mutable_flag -> 'acc15 -> mutable_flag * 'acc15
method virtual_flag : virtual_flag -> 'acc16 -> virtual_flag * 'acc16
method override_flag : override_flag -> 'acc17 -> override_flag * 'acc17
method closed_flag : closed_flag -> 'acc18 -> closed_flag * 'acc18
method label : label -> 'acc19 -> label * 'acc19
method arg_label : arg_label -> 'acc20 -> arg_label * 'acc20
method variance : variance -> 'acc21 -> variance * 'acc21
method injectivity : injectivity -> 'acc22 -> injectivity * 'acc22
method constant : constant -> 'acc23 -> constant * 'acc23
method attribute : attribute -> 'acc24 -> attribute * 'acc24
method extension : extension -> 'acc25 -> extension * 'acc25
method attributes : attributes -> 'acc26 -> attributes * 'acc26
method payload : payload -> 'acc27 -> payload * 'acc27
method core_type : core_type -> 'acc28 -> core_type * 'acc28
method core_type_desc : core_type_desc -> 'acc29 -> core_type_desc * 'acc29
method package_type : package_type -> 'acc30 -> package_type * 'acc30
method row_field : row_field -> 'acc31 -> row_field * 'acc31
method row_field_desc : row_field_desc -> 'acc32 -> row_field_desc * 'acc32
method object_field : object_field -> 'acc33 -> object_field * 'acc33
method object_field_desc : object_field_desc -> + 'acc34 -> + object_field_desc * 'acc34
method pattern : pattern -> 'acc35 -> pattern * 'acc35
method pattern_desc : pattern_desc -> 'acc36 -> pattern_desc * 'acc36
method expression : expression -> 'acc37 -> expression * 'acc37
method expression_desc : expression_desc -> 'acc38 -> expression_desc * 'acc38
method case : case -> 'acc39 -> case * 'acc39
method letop : letop -> 'acc40 -> letop * 'acc40
method binding_op : binding_op -> 'acc41 -> binding_op * 'acc41
method value_description : value_description -> + 'acc42 -> + value_description * 'acc42
method type_declaration : type_declaration -> + 'acc43 -> + type_declaration * 'acc43
method type_kind : type_kind -> 'acc44 -> type_kind * 'acc44
method label_declaration : label_declaration -> + 'acc45 -> + label_declaration * 'acc45
method constructor_declaration : constructor_declaration -> + 'acc46 -> + constructor_declaration * 'acc46
method constructor_arguments : constructor_arguments -> + 'acc47 -> + constructor_arguments * 'acc47
method type_extension : type_extension -> 'acc48 -> type_extension * 'acc48
method extension_constructor : extension_constructor -> + 'acc49 -> + extension_constructor * 'acc49
method type_exception : type_exception -> 'acc50 -> type_exception * 'acc50
method extension_constructor_kind : extension_constructor_kind -> + 'acc51 -> + extension_constructor_kind * 'acc51
method class_type : class_type -> 'acc52 -> class_type * 'acc52
method class_type_desc : class_type_desc -> 'acc53 -> class_type_desc * 'acc53
method class_signature : class_signature -> 'acc54 -> class_signature * 'acc54
method class_type_field : class_type_field -> + 'acc55 -> + class_type_field * 'acc55
method class_type_field_desc : class_type_field_desc -> + 'acc56 -> + class_type_field_desc * 'acc56
method class_infos : 'a. ('a -> 'acc57 -> 'a * 'acc57) -> + 'a class_infos -> + 'acc57 -> + 'a class_infos * 'acc57
method class_description : class_description -> + 'acc58 -> + class_description * 'acc58
method class_type_declaration : class_type_declaration -> + 'acc59 -> + class_type_declaration * 'acc59
method class_expr : class_expr -> 'acc60 -> class_expr * 'acc60
method class_expr_desc : class_expr_desc -> 'acc61 -> class_expr_desc * 'acc61
method class_structure : class_structure -> 'acc62 -> class_structure * 'acc62
method class_field : class_field -> 'acc63 -> class_field * 'acc63
method class_field_desc : class_field_desc -> + 'acc64 -> + class_field_desc * 'acc64
method class_field_kind : class_field_kind -> + 'acc65 -> + class_field_kind * 'acc65
method class_declaration : class_declaration -> + 'acc66 -> + class_declaration * 'acc66
method module_type : module_type -> 'acc67 -> module_type * 'acc67
method module_type_desc : module_type_desc -> + 'acc68 -> + module_type_desc * 'acc68
method functor_parameter : functor_parameter -> + 'acc69 -> + functor_parameter * 'acc69
method signature : signature -> 'acc70 -> signature * 'acc70
method signature_item : signature_item -> 'acc71 -> signature_item * 'acc71
method signature_item_desc : signature_item_desc -> + 'acc72 -> + signature_item_desc * 'acc72
method module_declaration : module_declaration -> + 'acc73 -> + module_declaration * 'acc73
method module_substitution : module_substitution -> + 'acc74 -> + module_substitution * 'acc74
method module_type_declaration : module_type_declaration -> + 'acc75 -> + module_type_declaration * 'acc75
method open_infos : 'a. ('a -> 'acc76 -> 'a * 'acc76) -> + 'a open_infos -> + 'acc76 -> + 'a open_infos * 'acc76
method open_description : open_description -> + 'acc77 -> + open_description * 'acc77
method open_declaration : open_declaration -> + 'acc78 -> + open_declaration * 'acc78
method include_infos : 'a. ('a -> 'acc79 -> 'a * 'acc79) -> + 'a include_infos -> + 'acc79 -> + 'a include_infos * 'acc79
method include_description : include_description -> + 'acc80 -> + include_description * 'acc80
method include_declaration : include_declaration -> + 'acc81 -> + include_declaration * 'acc81
method with_constraint : with_constraint -> 'acc82 -> with_constraint * 'acc82
method module_expr : module_expr -> 'acc83 -> module_expr * 'acc83
method module_expr_desc : module_expr_desc -> + 'acc84 -> + module_expr_desc * 'acc84
method structure : structure -> 'acc85 -> structure * 'acc85
method structure_item : structure_item -> 'acc86 -> structure_item * 'acc86
method structure_item_desc : structure_item_desc -> + 'acc87 -> + structure_item_desc * 'acc87
method value_binding : value_binding -> 'acc88 -> value_binding * 'acc88
method module_binding : module_binding -> 'acc89 -> module_binding * 'acc89
method toplevel_phrase : toplevel_phrase -> 'acc90 -> toplevel_phrase * 'acc90
method toplevel_directive : toplevel_directive -> + 'acc91 -> + toplevel_directive * 'acc91
method directive_argument : directive_argument -> + 'acc92 -> + directive_argument * 'acc92
method directive_argument_desc : directive_argument_desc -> + 'acc93 -> + directive_argument_desc * 'acc93
method cases : cases -> 'acc94 -> cases * 'acc94
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-iter/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-iter/index.html new file mode 100644 index 000000000..c55746f8e --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-iter/index.html @@ -0,0 +1,2 @@ + +iter (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast.iter)

Class Ast.iter

method virtual bool : bool -> unit
method virtual char : char -> unit
method virtual int : int -> unit
method virtual list : 'a. ('a -> unit) -> 'a list -> unit
method virtual option : 'a. ('a -> unit) -> 'a option -> unit
method virtual string : string -> unit
method position : position -> unit
method location : location -> unit
method location_stack : location_stack -> unit
method loc : 'a. ('a -> unit) -> 'a loc -> unit
method longident : longident -> unit
method longident_loc : longident_loc -> unit
method rec_flag : rec_flag -> unit
method direction_flag : direction_flag -> unit
method private_flag : private_flag -> unit
method mutable_flag : mutable_flag -> unit
method virtual_flag : virtual_flag -> unit
method override_flag : override_flag -> unit
method closed_flag : closed_flag -> unit
method label : label -> unit
method arg_label : arg_label -> unit
method variance : variance -> unit
method injectivity : injectivity -> unit
method constant : constant -> unit
method attribute : attribute -> unit
method extension : extension -> unit
method attributes : attributes -> unit
method payload : payload -> unit
method core_type : core_type -> unit
method core_type_desc : core_type_desc -> unit
method package_type : package_type -> unit
method row_field : row_field -> unit
method row_field_desc : row_field_desc -> unit
method object_field : object_field -> unit
method object_field_desc : object_field_desc -> unit
method pattern : pattern -> unit
method pattern_desc : pattern_desc -> unit
method expression : expression -> unit
method expression_desc : expression_desc -> unit
method case : case -> unit
method letop : letop -> unit
method binding_op : binding_op -> unit
method value_description : value_description -> unit
method type_declaration : type_declaration -> unit
method type_kind : type_kind -> unit
method label_declaration : label_declaration -> unit
method constructor_declaration : constructor_declaration -> unit
method constructor_arguments : constructor_arguments -> unit
method type_extension : type_extension -> unit
method extension_constructor : extension_constructor -> unit
method type_exception : type_exception -> unit
method extension_constructor_kind : extension_constructor_kind -> unit
method class_type : class_type -> unit
method class_type_desc : class_type_desc -> unit
method class_signature : class_signature -> unit
method class_type_field : class_type_field -> unit
method class_type_field_desc : class_type_field_desc -> unit
method class_infos : 'a. ('a -> unit) -> 'a class_infos -> unit
method class_description : class_description -> unit
method class_type_declaration : class_type_declaration -> unit
method class_expr : class_expr -> unit
method class_expr_desc : class_expr_desc -> unit
method class_structure : class_structure -> unit
method class_field : class_field -> unit
method class_field_desc : class_field_desc -> unit
method class_field_kind : class_field_kind -> unit
method class_declaration : class_declaration -> unit
method module_type : module_type -> unit
method module_type_desc : module_type_desc -> unit
method functor_parameter : functor_parameter -> unit
method signature : signature -> unit
method signature_item : signature_item -> unit
method signature_item_desc : signature_item_desc -> unit
method module_declaration : module_declaration -> unit
method module_substitution : module_substitution -> unit
method module_type_declaration : module_type_declaration -> unit
method open_infos : 'a. ('a -> unit) -> 'a open_infos -> unit
method open_description : open_description -> unit
method open_declaration : open_declaration -> unit
method include_infos : 'a. ('a -> unit) -> 'a include_infos -> unit
method include_description : include_description -> unit
method include_declaration : include_declaration -> unit
method with_constraint : with_constraint -> unit
method module_expr : module_expr -> unit
method module_expr_desc : module_expr_desc -> unit
method structure : structure -> unit
method structure_item : structure_item -> unit
method structure_item_desc : structure_item_desc -> unit
method value_binding : value_binding -> unit
method module_binding : module_binding -> unit
method toplevel_phrase : toplevel_phrase -> unit
method toplevel_directive : toplevel_directive -> unit
method directive_argument : directive_argument -> unit
method directive_argument_desc : directive_argument_desc -> unit
method cases : cases -> unit
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-lift/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-lift/index.html new file mode 100644 index 000000000..0281f3108 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-lift/index.html @@ -0,0 +1,2 @@ + +lift (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast.lift)

Class Ast.lift

method virtual record : (string * 'res0) list -> 'res0
method virtual constr : string -> 'res1 list -> 'res1
method virtual tuple : 'res2 list -> 'res2
method virtual bool : bool -> 'res3
method virtual char : char -> 'res4
method virtual int : int -> 'res5
method virtual list : 'a. ('a -> 'res6) -> 'a list -> 'res6
method virtual option : 'a. ('a -> 'res7) -> 'a option -> 'res7
method virtual string : string -> 'res8
method position : position -> 'res9
method location : location -> 'res10
method location_stack : location_stack -> 'res11
method loc : 'a. ('a -> 'res12) -> 'a loc -> 'res12
method longident : longident -> 'res13
method longident_loc : longident_loc -> 'res14
method rec_flag : rec_flag -> 'res15
method direction_flag : direction_flag -> 'res16
method private_flag : private_flag -> 'res17
method mutable_flag : mutable_flag -> 'res18
method virtual_flag : virtual_flag -> 'res19
method override_flag : override_flag -> 'res20
method closed_flag : closed_flag -> 'res21
method label : label -> 'res22
method arg_label : arg_label -> 'res23
method variance : variance -> 'res24
method injectivity : injectivity -> 'res25
method constant : constant -> 'res26
method attribute : attribute -> 'res27
method extension : extension -> 'res28
method attributes : attributes -> 'res29
method payload : payload -> 'res30
method core_type : core_type -> 'res31
method core_type_desc : core_type_desc -> 'res32
method package_type : package_type -> 'res33
method row_field : row_field -> 'res34
method row_field_desc : row_field_desc -> 'res35
method object_field : object_field -> 'res36
method object_field_desc : object_field_desc -> 'res37
method pattern : pattern -> 'res38
method pattern_desc : pattern_desc -> 'res39
method expression : expression -> 'res40
method expression_desc : expression_desc -> 'res41
method case : case -> 'res42
method letop : letop -> 'res43
method binding_op : binding_op -> 'res44
method value_description : value_description -> 'res45
method type_declaration : type_declaration -> 'res46
method type_kind : type_kind -> 'res47
method label_declaration : label_declaration -> 'res48
method constructor_declaration : constructor_declaration -> 'res49
method constructor_arguments : constructor_arguments -> 'res50
method type_extension : type_extension -> 'res51
method extension_constructor : extension_constructor -> 'res52
method type_exception : type_exception -> 'res53
method extension_constructor_kind : extension_constructor_kind -> 'res54
method class_type : class_type -> 'res55
method class_type_desc : class_type_desc -> 'res56
method class_signature : class_signature -> 'res57
method class_type_field : class_type_field -> 'res58
method class_type_field_desc : class_type_field_desc -> 'res59
method class_infos : 'a. ('a -> 'res60) -> 'a class_infos -> 'res60
method class_description : class_description -> 'res61
method class_type_declaration : class_type_declaration -> 'res62
method class_expr : class_expr -> 'res63
method class_expr_desc : class_expr_desc -> 'res64
method class_structure : class_structure -> 'res65
method class_field : class_field -> 'res66
method class_field_desc : class_field_desc -> 'res67
method class_field_kind : class_field_kind -> 'res68
method class_declaration : class_declaration -> 'res69
method module_type : module_type -> 'res70
method module_type_desc : module_type_desc -> 'res71
method functor_parameter : functor_parameter -> 'res72
method signature : signature -> 'res73
method signature_item : signature_item -> 'res74
method signature_item_desc : signature_item_desc -> 'res75
method module_declaration : module_declaration -> 'res76
method module_substitution : module_substitution -> 'res77
method module_type_declaration : module_type_declaration -> 'res78
method open_infos : 'a. ('a -> 'res79) -> 'a open_infos -> 'res79
method open_description : open_description -> 'res80
method open_declaration : open_declaration -> 'res81
method include_infos : 'a. ('a -> 'res82) -> 'a include_infos -> 'res82
method include_description : include_description -> 'res83
method include_declaration : include_declaration -> 'res84
method with_constraint : with_constraint -> 'res85
method module_expr : module_expr -> 'res86
method module_expr_desc : module_expr_desc -> 'res87
method structure : structure -> 'res88
method structure_item : structure_item -> 'res89
method structure_item_desc : structure_item_desc -> 'res90
method value_binding : value_binding -> 'res91
method module_binding : module_binding -> 'res92
method toplevel_phrase : toplevel_phrase -> 'res93
method toplevel_directive : toplevel_directive -> 'res94
method directive_argument : directive_argument -> 'res95
method directive_argument_desc : directive_argument_desc -> 'res96
method cases : cases -> 'res97
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-lift_map_with_context/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-lift_map_with_context/index.html new file mode 100644 index 000000000..189df1d9f --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-lift_map_with_context/index.html @@ -0,0 +1,80 @@ + +lift_map_with_context (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast.lift_map_with_context)

Class Ast.lift_map_with_context

method virtual record : 'ctx0 -> (string * 'res0) list -> 'res0
method virtual constr : 'ctx1 -> string -> 'res1 list -> 'res1
method virtual tuple : 'ctx2 -> 'res2 list -> 'res2
method virtual other : 'a. 'ctx3 -> 'a -> 'res3
method virtual bool : 'ctx4 -> bool -> bool * 'res4
method virtual char : 'ctx5 -> char -> char * 'res5
method virtual int : 'ctx6 -> int -> int * 'res6
method virtual list : 'a. ('ctx7 -> 'a -> 'a * 'res7) -> + 'ctx7 -> + 'a list -> + 'a list * 'res7
method virtual option : 'a. ('ctx8 -> 'a -> 'a * 'res8) -> + 'ctx8 -> + 'a option -> + 'a option * 'res8
method virtual string : 'ctx9 -> string -> string * 'res9
method position : 'ctx10 -> position -> position * 'res10
method location : 'ctx11 -> location -> location * 'res11
method location_stack : 'ctx12 -> location_stack -> location_stack * 'res12
method loc : 'a. ('ctx13 -> 'a -> 'a * 'res13) -> + 'ctx13 -> + 'a loc -> + 'a loc * 'res13
method longident : 'ctx14 -> longident -> longident * 'res14
method longident_loc : 'ctx15 -> longident_loc -> longident_loc * 'res15
method rec_flag : 'ctx16 -> rec_flag -> rec_flag * 'res16
method direction_flag : 'ctx17 -> direction_flag -> direction_flag * 'res17
method private_flag : 'ctx18 -> private_flag -> private_flag * 'res18
method mutable_flag : 'ctx19 -> mutable_flag -> mutable_flag * 'res19
method virtual_flag : 'ctx20 -> virtual_flag -> virtual_flag * 'res20
method override_flag : 'ctx21 -> override_flag -> override_flag * 'res21
method closed_flag : 'ctx22 -> closed_flag -> closed_flag * 'res22
method label : 'ctx23 -> label -> label * 'res23
method arg_label : 'ctx24 -> arg_label -> arg_label * 'res24
method variance : 'ctx25 -> variance -> variance * 'res25
method injectivity : 'ctx26 -> injectivity -> injectivity * 'res26
method constant : 'ctx27 -> constant -> constant * 'res27
method attribute : 'ctx28 -> attribute -> attribute * 'res28
method extension : 'ctx29 -> extension -> extension * 'res29
method attributes : 'ctx30 -> attributes -> attributes * 'res30
method payload : 'ctx31 -> payload -> payload * 'res31
method core_type : 'ctx32 -> core_type -> core_type * 'res32
method core_type_desc : 'ctx33 -> core_type_desc -> core_type_desc * 'res33
method package_type : 'ctx34 -> package_type -> package_type * 'res34
method row_field : 'ctx35 -> row_field -> row_field * 'res35
method row_field_desc : 'ctx36 -> row_field_desc -> row_field_desc * 'res36
method object_field : 'ctx37 -> object_field -> object_field * 'res37
method object_field_desc : 'ctx38 -> + object_field_desc -> + object_field_desc * 'res38
method pattern : 'ctx39 -> pattern -> pattern * 'res39
method pattern_desc : 'ctx40 -> pattern_desc -> pattern_desc * 'res40
method expression : 'ctx41 -> expression -> expression * 'res41
method expression_desc : 'ctx42 -> expression_desc -> expression_desc * 'res42
method case : 'ctx43 -> case -> case * 'res43
method letop : 'ctx44 -> letop -> letop * 'res44
method binding_op : 'ctx45 -> binding_op -> binding_op * 'res45
method value_description : 'ctx46 -> + value_description -> + value_description * 'res46
method type_declaration : 'ctx47 -> + type_declaration -> + type_declaration * 'res47
method type_kind : 'ctx48 -> type_kind -> type_kind * 'res48
method label_declaration : 'ctx49 -> + label_declaration -> + label_declaration * 'res49
method constructor_declaration : 'ctx50 -> + constructor_declaration -> + constructor_declaration * 'res50
method constructor_arguments : 'ctx51 -> + constructor_arguments -> + constructor_arguments * 'res51
method type_extension : 'ctx52 -> type_extension -> type_extension * 'res52
method extension_constructor : 'ctx53 -> + extension_constructor -> + extension_constructor * 'res53
method type_exception : 'ctx54 -> type_exception -> type_exception * 'res54
method extension_constructor_kind : 'ctx55 -> + extension_constructor_kind -> + extension_constructor_kind * 'res55
method class_type : 'ctx56 -> class_type -> class_type * 'res56
method class_type_desc : 'ctx57 -> class_type_desc -> class_type_desc * 'res57
method class_signature : 'ctx58 -> class_signature -> class_signature * 'res58
method class_type_field : 'ctx59 -> + class_type_field -> + class_type_field * 'res59
method class_type_field_desc : 'ctx60 -> + class_type_field_desc -> + class_type_field_desc * 'res60
method class_infos : 'a. ('ctx61 -> 'a -> 'a * 'res61) -> + 'ctx61 -> + 'a class_infos -> + 'a class_infos * 'res61
method class_description : 'ctx62 -> + class_description -> + class_description * 'res62
method class_type_declaration : 'ctx63 -> + class_type_declaration -> + class_type_declaration * 'res63
method class_expr : 'ctx64 -> class_expr -> class_expr * 'res64
method class_expr_desc : 'ctx65 -> class_expr_desc -> class_expr_desc * 'res65
method class_structure : 'ctx66 -> class_structure -> class_structure * 'res66
method class_field : 'ctx67 -> class_field -> class_field * 'res67
method class_field_desc : 'ctx68 -> + class_field_desc -> + class_field_desc * 'res68
method class_field_kind : 'ctx69 -> + class_field_kind -> + class_field_kind * 'res69
method class_declaration : 'ctx70 -> + class_declaration -> + class_declaration * 'res70
method module_type : 'ctx71 -> module_type -> module_type * 'res71
method module_type_desc : 'ctx72 -> + module_type_desc -> + module_type_desc * 'res72
method functor_parameter : 'ctx73 -> + functor_parameter -> + functor_parameter * 'res73
method signature : 'ctx74 -> signature -> signature * 'res74
method signature_item : 'ctx75 -> signature_item -> signature_item * 'res75
method signature_item_desc : 'ctx76 -> + signature_item_desc -> + signature_item_desc * 'res76
method module_declaration : 'ctx77 -> + module_declaration -> + module_declaration * 'res77
method module_substitution : 'ctx78 -> + module_substitution -> + module_substitution * 'res78
method module_type_declaration : 'ctx79 -> + module_type_declaration -> + module_type_declaration * 'res79
method open_infos : 'a. ('ctx80 -> 'a -> 'a * 'res80) -> + 'ctx80 -> + 'a open_infos -> + 'a open_infos * 'res80
method open_description : 'ctx81 -> + open_description -> + open_description * 'res81
method open_declaration : 'ctx82 -> + open_declaration -> + open_declaration * 'res82
method include_infos : 'a. ('ctx83 -> 'a -> 'a * 'res83) -> + 'ctx83 -> + 'a include_infos -> + 'a include_infos * 'res83
method include_description : 'ctx84 -> + include_description -> + include_description * 'res84
method include_declaration : 'ctx85 -> + include_declaration -> + include_declaration * 'res85
method with_constraint : 'ctx86 -> with_constraint -> with_constraint * 'res86
method module_expr : 'ctx87 -> module_expr -> module_expr * 'res87
method module_expr_desc : 'ctx88 -> + module_expr_desc -> + module_expr_desc * 'res88
method structure : 'ctx89 -> structure -> structure * 'res89
method structure_item : 'ctx90 -> structure_item -> structure_item * 'res90
method structure_item_desc : 'ctx91 -> + structure_item_desc -> + structure_item_desc * 'res91
method value_binding : 'ctx92 -> value_binding -> value_binding * 'res92
method module_binding : 'ctx93 -> module_binding -> module_binding * 'res93
method toplevel_phrase : 'ctx94 -> toplevel_phrase -> toplevel_phrase * 'res94
method toplevel_directive : 'ctx95 -> + toplevel_directive -> + toplevel_directive * 'res95
method directive_argument : 'ctx96 -> + directive_argument -> + directive_argument * 'res96
method directive_argument_desc : 'ctx97 -> + directive_argument_desc -> + directive_argument_desc * 'res97
method cases : 'ctx98 -> cases -> cases * 'res98
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-map/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-map/index.html new file mode 100644 index 000000000..8fba7567b --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-map/index.html @@ -0,0 +1,7 @@ + +map (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast.map)

Class Ast.map

method virtual bool : bool -> bool
method virtual char : char -> char
method virtual int : int -> int
method virtual list : 'a. ('a -> 'a) -> 'a list -> 'a list
method virtual option : 'a. ('a -> 'a) -> 'a option -> 'a option
method virtual string : string -> string
method position : position -> position
method location : location -> location
method location_stack : location_stack -> location_stack
method loc : 'a. ('a -> 'a) -> 'a loc -> 'a loc
method longident : longident -> longident
method longident_loc : longident_loc -> longident_loc
method rec_flag : rec_flag -> rec_flag
method direction_flag : direction_flag -> direction_flag
method private_flag : private_flag -> private_flag
method mutable_flag : mutable_flag -> mutable_flag
method virtual_flag : virtual_flag -> virtual_flag
method override_flag : override_flag -> override_flag
method closed_flag : closed_flag -> closed_flag
method label : label -> label
method arg_label : arg_label -> arg_label
method variance : variance -> variance
method injectivity : injectivity -> injectivity
method constant : constant -> constant
method attribute : attribute -> attribute
method extension : extension -> extension
method attributes : attributes -> attributes
method payload : payload -> payload
method core_type : core_type -> core_type
method core_type_desc : core_type_desc -> core_type_desc
method package_type : package_type -> package_type
method row_field : row_field -> row_field
method row_field_desc : row_field_desc -> row_field_desc
method object_field : object_field -> object_field
method object_field_desc : object_field_desc -> object_field_desc
method pattern : pattern -> pattern
method pattern_desc : pattern_desc -> pattern_desc
method expression : expression -> expression
method expression_desc : expression_desc -> expression_desc
method case : case -> case
method letop : letop -> letop
method binding_op : binding_op -> binding_op
method value_description : value_description -> value_description
method type_declaration : type_declaration -> type_declaration
method type_kind : type_kind -> type_kind
method label_declaration : label_declaration -> label_declaration
method constructor_declaration : constructor_declaration -> + constructor_declaration
method constructor_arguments : constructor_arguments -> constructor_arguments
method type_extension : type_extension -> type_extension
method extension_constructor : extension_constructor -> extension_constructor
method type_exception : type_exception -> type_exception
method extension_constructor_kind : extension_constructor_kind -> + extension_constructor_kind
method class_type : class_type -> class_type
method class_type_desc : class_type_desc -> class_type_desc
method class_signature : class_signature -> class_signature
method class_type_field : class_type_field -> class_type_field
method class_type_field_desc : class_type_field_desc -> class_type_field_desc
method class_infos : 'a. ('a -> 'a) -> 'a class_infos -> 'a class_infos
method class_description : class_description -> class_description
method class_type_declaration : class_type_declaration -> + class_type_declaration
method class_expr : class_expr -> class_expr
method class_expr_desc : class_expr_desc -> class_expr_desc
method class_structure : class_structure -> class_structure
method class_field : class_field -> class_field
method class_field_desc : class_field_desc -> class_field_desc
method class_field_kind : class_field_kind -> class_field_kind
method class_declaration : class_declaration -> class_declaration
method module_type : module_type -> module_type
method module_type_desc : module_type_desc -> module_type_desc
method functor_parameter : functor_parameter -> functor_parameter
method signature : signature -> signature
method signature_item : signature_item -> signature_item
method signature_item_desc : signature_item_desc -> signature_item_desc
method module_declaration : module_declaration -> module_declaration
method module_substitution : module_substitution -> module_substitution
method module_type_declaration : module_type_declaration -> + module_type_declaration
method open_infos : 'a. ('a -> 'a) -> 'a open_infos -> 'a open_infos
method open_description : open_description -> open_description
method open_declaration : open_declaration -> open_declaration
method include_infos : 'a. ('a -> 'a) -> 'a include_infos -> 'a include_infos
method include_description : include_description -> include_description
method include_declaration : include_declaration -> include_declaration
method with_constraint : with_constraint -> with_constraint
method module_expr : module_expr -> module_expr
method module_expr_desc : module_expr_desc -> module_expr_desc
method structure : structure -> structure
method structure_item : structure_item -> structure_item
method structure_item_desc : structure_item_desc -> structure_item_desc
method value_binding : value_binding -> value_binding
method module_binding : module_binding -> module_binding
method toplevel_phrase : toplevel_phrase -> toplevel_phrase
method toplevel_directive : toplevel_directive -> toplevel_directive
method directive_argument : directive_argument -> directive_argument
method directive_argument_desc : directive_argument_desc -> + directive_argument_desc
method cases : cases -> cases
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-map_with_context/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-map_with_context/index.html new file mode 100644 index 000000000..7c5de4058 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/class-map_with_context/index.html @@ -0,0 +1,40 @@ + +map_with_context (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast.map_with_context)

Class Ast.map_with_context

method virtual bool : 'ctx0 -> bool -> bool
method virtual char : 'ctx1 -> char -> char
method virtual int : 'ctx2 -> int -> int
method virtual list : 'a. ('ctx3 -> 'a -> 'a) -> 'ctx3 -> 'a list -> 'a list
method virtual option : 'a. ('ctx4 -> 'a -> 'a) -> + 'ctx4 -> + 'a option -> + 'a option
method virtual string : 'ctx5 -> string -> string
method position : 'ctx6 -> position -> position
method location : 'ctx7 -> location -> location
method location_stack : 'ctx8 -> location_stack -> location_stack
method loc : 'a. ('ctx9 -> 'a -> 'a) -> 'ctx9 -> 'a loc -> 'a loc
method longident : 'ctx10 -> longident -> longident
method longident_loc : 'ctx11 -> longident_loc -> longident_loc
method rec_flag : 'ctx12 -> rec_flag -> rec_flag
method direction_flag : 'ctx13 -> direction_flag -> direction_flag
method private_flag : 'ctx14 -> private_flag -> private_flag
method mutable_flag : 'ctx15 -> mutable_flag -> mutable_flag
method virtual_flag : 'ctx16 -> virtual_flag -> virtual_flag
method override_flag : 'ctx17 -> override_flag -> override_flag
method closed_flag : 'ctx18 -> closed_flag -> closed_flag
method label : 'ctx19 -> label -> label
method arg_label : 'ctx20 -> arg_label -> arg_label
method variance : 'ctx21 -> variance -> variance
method injectivity : 'ctx22 -> injectivity -> injectivity
method constant : 'ctx23 -> constant -> constant
method attribute : 'ctx24 -> attribute -> attribute
method extension : 'ctx25 -> extension -> extension
method attributes : 'ctx26 -> attributes -> attributes
method payload : 'ctx27 -> payload -> payload
method core_type : 'ctx28 -> core_type -> core_type
method core_type_desc : 'ctx29 -> core_type_desc -> core_type_desc
method package_type : 'ctx30 -> package_type -> package_type
method row_field : 'ctx31 -> row_field -> row_field
method row_field_desc : 'ctx32 -> row_field_desc -> row_field_desc
method object_field : 'ctx33 -> object_field -> object_field
method object_field_desc : 'ctx34 -> object_field_desc -> object_field_desc
method pattern : 'ctx35 -> pattern -> pattern
method pattern_desc : 'ctx36 -> pattern_desc -> pattern_desc
method expression : 'ctx37 -> expression -> expression
method expression_desc : 'ctx38 -> expression_desc -> expression_desc
method case : 'ctx39 -> case -> case
method letop : 'ctx40 -> letop -> letop
method binding_op : 'ctx41 -> binding_op -> binding_op
method value_description : 'ctx42 -> value_description -> value_description
method type_declaration : 'ctx43 -> type_declaration -> type_declaration
method type_kind : 'ctx44 -> type_kind -> type_kind
method label_declaration : 'ctx45 -> label_declaration -> label_declaration
method constructor_declaration : 'ctx46 -> + constructor_declaration -> + constructor_declaration
method constructor_arguments : 'ctx47 -> + constructor_arguments -> + constructor_arguments
method type_extension : 'ctx48 -> type_extension -> type_extension
method extension_constructor : 'ctx49 -> + extension_constructor -> + extension_constructor
method type_exception : 'ctx50 -> type_exception -> type_exception
method extension_constructor_kind : 'ctx51 -> + extension_constructor_kind -> + extension_constructor_kind
method class_type : 'ctx52 -> class_type -> class_type
method class_type_desc : 'ctx53 -> class_type_desc -> class_type_desc
method class_signature : 'ctx54 -> class_signature -> class_signature
method class_type_field : 'ctx55 -> class_type_field -> class_type_field
method class_type_field_desc : 'ctx56 -> + class_type_field_desc -> + class_type_field_desc
method class_infos : 'a. ('ctx57 -> 'a -> 'a) -> + 'ctx57 -> + 'a class_infos -> + 'a class_infos
method class_description : 'ctx58 -> class_description -> class_description
method class_type_declaration : 'ctx59 -> + class_type_declaration -> + class_type_declaration
method class_expr : 'ctx60 -> class_expr -> class_expr
method class_expr_desc : 'ctx61 -> class_expr_desc -> class_expr_desc
method class_structure : 'ctx62 -> class_structure -> class_structure
method class_field : 'ctx63 -> class_field -> class_field
method class_field_desc : 'ctx64 -> class_field_desc -> class_field_desc
method class_field_kind : 'ctx65 -> class_field_kind -> class_field_kind
method class_declaration : 'ctx66 -> class_declaration -> class_declaration
method module_type : 'ctx67 -> module_type -> module_type
method module_type_desc : 'ctx68 -> module_type_desc -> module_type_desc
method functor_parameter : 'ctx69 -> functor_parameter -> functor_parameter
method signature : 'ctx70 -> signature -> signature
method signature_item : 'ctx71 -> signature_item -> signature_item
method signature_item_desc : 'ctx72 -> + signature_item_desc -> + signature_item_desc
method module_declaration : 'ctx73 -> module_declaration -> module_declaration
method module_substitution : 'ctx74 -> + module_substitution -> + module_substitution
method module_type_declaration : 'ctx75 -> + module_type_declaration -> + module_type_declaration
method open_infos : 'a. ('ctx76 -> 'a -> 'a) -> + 'ctx76 -> + 'a open_infos -> + 'a open_infos
method open_description : 'ctx77 -> open_description -> open_description
method open_declaration : 'ctx78 -> open_declaration -> open_declaration
method include_infos : 'a. ('ctx79 -> 'a -> 'a) -> + 'ctx79 -> + 'a include_infos -> + 'a include_infos
method include_description : 'ctx80 -> + include_description -> + include_description
method include_declaration : 'ctx81 -> + include_declaration -> + include_declaration
method with_constraint : 'ctx82 -> with_constraint -> with_constraint
method module_expr : 'ctx83 -> module_expr -> module_expr
method module_expr_desc : 'ctx84 -> module_expr_desc -> module_expr_desc
method structure : 'ctx85 -> structure -> structure
method structure_item : 'ctx86 -> structure_item -> structure_item
method structure_item_desc : 'ctx87 -> + structure_item_desc -> + structure_item_desc
method value_binding : 'ctx88 -> value_binding -> value_binding
method module_binding : 'ctx89 -> module_binding -> module_binding
method toplevel_phrase : 'ctx90 -> toplevel_phrase -> toplevel_phrase
method toplevel_directive : 'ctx91 -> toplevel_directive -> toplevel_directive
method directive_argument : 'ctx92 -> directive_argument -> directive_argument
method directive_argument_desc : 'ctx93 -> + directive_argument_desc -> + directive_argument_desc
method cases : 'ctx94 -> cases -> cases
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/index.html new file mode 100644 index 000000000..23bc4eb3e --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast/index.html @@ -0,0 +1,7 @@ + +Ast (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast)

Module Ppxlib_ast.Ast

Definition of the OCaml AST

type position = Lexing.position = {
  1. pos_fname : string;
  2. pos_lnum : int;
  3. pos_bol : int;
  4. pos_cnum : int;
}
and location = Astlib.Location.t = {
  1. loc_start : position;
  2. loc_end : position;
  3. loc_ghost : bool;
}
and location_stack = location list
and 'a loc = 'a Astlib.Location.loc = {
  1. txt : 'a;
  2. loc : location;
}
and longident = Astlib.Longident.t =
  1. | Lident of string
  2. | Ldot of longident * string
  3. | Lapply of longident * longident
and longident_loc = longident loc

Auxiliary AST types used by parsetree and typedtree.

and rec_flag = Astlib.Ast_500.Asttypes.rec_flag =
  1. | Nonrecursive
  2. | Recursive
and direction_flag = Astlib.Ast_500.Asttypes.direction_flag =
  1. | Upto
  2. | Downto
and private_flag = Astlib.Ast_500.Asttypes.private_flag =
  1. | Private
  2. | Public
and mutable_flag = Astlib.Ast_500.Asttypes.mutable_flag =
  1. | Immutable
  2. | Mutable
and virtual_flag = Astlib.Ast_500.Asttypes.virtual_flag =
  1. | Virtual
  2. | Concrete
and override_flag = Astlib.Ast_500.Asttypes.override_flag =
  1. | Override
  2. | Fresh
and closed_flag = Astlib.Ast_500.Asttypes.closed_flag =
  1. | Closed
  2. | Open
and label = string
and arg_label = Astlib.Ast_500.Asttypes.arg_label =
  1. | Nolabel
  2. | Labelled of string
    (*

    label:T -> ...

    *)
  3. | Optional of string
    (*

    ?label:T -> ...

    *)
and variance = Astlib.Ast_500.Asttypes.variance =
  1. | Covariant
  2. | Contravariant
  3. | NoVariance
and injectivity = Astlib.Ast_500.Asttypes.injectivity =
  1. | Injective
  2. | NoInjectivity

Abstract syntax tree produced by parsing

and constant = Astlib.Ast_500.Parsetree.constant =
  1. | Pconst_integer of string * char option
    (*

    Integer constants such as 3 3l 3L 3n.

    Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

    *)
  2. | Pconst_char of char
    (*

    Character such as 'c'.

    *)
  3. | Pconst_string of string * location * string option
    (*

    Constant string such as "constant" or {delim|other constant|delim}.

    The location span the content of the string, without the delimiters.

    *)
  4. | Pconst_float of string * char option
    (*

    Float constant such as 3.4, 2e5 or 1.4e-4.

    Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

    *)

Extension points

and attribute = Astlib.Ast_500.Parsetree.attribute = {
  1. attr_name : string loc;
  2. attr_payload : payload;
  3. attr_loc : location;
}

Attributes such as [@id ARG] and [@@id ARG].

Metadata containers passed around within the AST. The compiler ignores unknown attributes.

and extension = string loc * payload

Extension points such as [%id ARG] and [%%id ARG].

Sub-language placeholder -- rejected by the typechecker.

and attributes = attribute list
and payload = Astlib.Ast_500.Parsetree.payload =
  1. | PStr of structure
  2. | PSig of signature
    (*

    : SIG in an attribute or an extension point

    *)
  3. | PTyp of core_type
    (*

    : T in an attribute or an extension point

    *)
  4. | PPat of pattern * expression option
    (*

    ? P or ? P when E, in an attribute or an extension point

    *)

Core language

Type expressions

and core_type = Astlib.Ast_500.Parsetree.core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : location;
  3. ptyp_loc_stack : location_stack;
  4. ptyp_attributes : attributes;
    (*

    ... [@id1] [@id2]

    *)
}
and core_type_desc = Astlib.Ast_500.Parsetree.core_type_desc =
  1. | Ptyp_any
    (*

    _

    *)
  2. | Ptyp_var of string
    (*

    A type variable such as 'a

    *)
  3. | Ptyp_arrow of arg_label * core_type * core_type
    (*

    Ptyp_arrow(lbl, T1, T2) represents:

    *)
  4. | Ptyp_tuple of core_type list
    (*

    Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

    Invariant: n >= 2.

    *)
  5. | Ptyp_constr of longident_loc * core_type list
    (*

    Ptyp_constr(lident, l) represents:

    • tconstr when l=[],
    • T tconstr when l=[T],
    • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
    *)
  6. | Ptyp_object of object_field list * closed_flag
    (*

    Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

    • < l1:T1; ...; ln:Tn > when flag is Closed,
    • < l1:T1; ...; ln:Tn; .. > when flag is Open.
    *)
  7. | Ptyp_class of longident_loc * core_type list
    (*

    Ptyp_class(tconstr, l) represents:

    • #tconstr when l=[],
    • T #tconstr when l=[T],
    • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
    *)
  8. | Ptyp_alias of core_type * string
    (*

    T as 'a.

    *)
  9. | Ptyp_variant of row_field list * closed_flag * label list option
    (*

    Ptyp_variant([`A;`B], flag, labels) represents:

    • [ `A|`B ] when flag is Closed, and labels is None,
    • [> `A|`B ] when flag is Open, and labels is None,
    • [< `A|`B ] when flag is Closed, and labels is Some [],
    • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
    *)
  10. | Ptyp_poly of string loc list * core_type
    (*

    'a1 ... 'an. T

    Can only appear in the following context:

    let x : 'a1 ... 'an. T = e ...
    *)
  11. | Ptyp_package of package_type
    (*

    (module S).

    *)
  12. | Ptyp_extension of extension
    (*

    [%id].

    *)
and package_type = longident_loc * (longident_loc * core_type) list

As package_type typed values:

  • (S, []) represents (module S),
  • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
and row_field = Astlib.Ast_500.Parsetree.row_field = {
  1. prf_desc : row_field_desc;
  2. prf_loc : location;
  3. prf_attributes : attributes;
}
and row_field_desc = Astlib.Ast_500.Parsetree.row_field_desc =
  1. | Rtag of label loc * bool * core_type list
    (*

    Rtag(`A, b, l) represents:

    • `A when b is true and l is [],
    • `A of T when b is false and l is [T],
    • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
    • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
    • The bool field is true if the tag contains a constant (empty) constructor.
    • & occurs when several types are used for the same constructor (see 4.2 in the manual)
    *)
  2. | Rinherit of core_type
    (*

    [ | t ]

    *)
and object_field = Astlib.Ast_500.Parsetree.object_field = {
  1. pof_desc : object_field_desc;
  2. pof_loc : location;
  3. pof_attributes : attributes;
}
and object_field_desc = Astlib.Ast_500.Parsetree.object_field_desc =
  1. | Otag of label loc * core_type
  2. | Oinherit of core_type

Patterns

and pattern = Astlib.Ast_500.Parsetree.pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : location;
  3. ppat_loc_stack : location_stack;
  4. ppat_attributes : attributes;
    (*

    ... [@id1] [@id2]

    *)
}
and pattern_desc = Astlib.Ast_500.Parsetree.pattern_desc =
  1. | Ppat_any
    (*

    The pattern _.

    *)
  2. | Ppat_var of string loc
    (*

    A variable pattern such as x

    *)
  3. | Ppat_alias of pattern * string loc
    (*

    An alias pattern such as P as 'a

    *)
  4. | Ppat_constant of constant
    (*

    Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  5. | Ppat_interval of constant * constant
    (*

    Patterns such as 'a'..'z'.

    Other forms of interval are recognized by the parser but rejected by the type-checker.

    *)
  6. | Ppat_tuple of pattern list
    (*

    Patterns (P1, ..., Pn).

    Invariant: n >= 2

    *)
  7. | Ppat_construct of longident_loc * (string loc list * pattern) option
    (*

    Ppat_construct(C, args) represents:

    • C when args is None,
    • C P when args is Some ([], P)
    • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
    • C (type a b) P when args is Some ([a; b], P)
    *)
  8. | Ppat_variant of label * pattern option
    (*

    Ppat_variant(`A, pat) represents:

    • `A when pat is None,
    • `A P when pat is Some P
    *)
  9. | Ppat_record of (longident_loc * pattern) list * closed_flag
    (*

    Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

    • { l1=P1; ...; ln=Pn } when flag is Closed
    • { l1=P1; ...; ln=Pn; _} when flag is Open

    Invariant: n > 0

    *)
  10. | Ppat_array of pattern list
    (*

    Pattern [| P1; ...; Pn |]

    *)
  11. | Ppat_or of pattern * pattern
    (*

    Pattern P1 | P2

    *)
  12. | Ppat_constraint of pattern * core_type
    (*

    Pattern (P : T)

    *)
  13. | Ppat_type of longident_loc
    (*

    Pattern #tconst

    *)
  14. | Ppat_lazy of pattern
    (*

    Pattern lazy P

    *)
  15. | Ppat_unpack of string option loc
    (*

    Ppat_unpack(s) represents:

    • (module P) when s is Some "P"
    • (module _) when s is None

    Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

    *)
  16. | Ppat_exception of pattern
    (*

    Pattern exception P

    *)
  17. | Ppat_extension of extension
    (*

    Pattern [%id]

    *)
  18. | Ppat_open of longident_loc * pattern
    (*

    Pattern M.(P)

    *)

Value expressions

and expression = Astlib.Ast_500.Parsetree.expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : location;
  3. pexp_loc_stack : location_stack;
  4. pexp_attributes : attributes;
    (*

    ... [@id1] [@id2]

    *)
}
and expression_desc = Astlib.Ast_500.Parsetree.expression_desc =
  1. | Pexp_ident of longident_loc
    (*

    Identifiers such as x and M.x

    *)
  2. | Pexp_constant of constant
    (*

    Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  3. | Pexp_let of rec_flag * value_binding list * expression
    (*

    Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

    • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
    *)
  4. | Pexp_function of cases
    (*

    function P1 -> E1 | ... | Pn -> En

    *)
  5. | Pexp_fun of arg_label * expression option * pattern * expression
    (*

    Pexp_fun(lbl, exp0, P, E1) represents:

    • fun P -> E1 when lbl is Nolabel and exp0 is None
    • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
    • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
    • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

    Notes:

    • If E0 is provided, only Optional is allowed.
    • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
    • let f P = E is represented using Pexp_fun.
    *)
  6. | Pexp_apply of expression * (arg_label * expression) list
    (*

    Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

    li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

    Invariant: n > 0

    *)
  7. | Pexp_match of expression * cases
    (*

    match E0 with P1 -> E1 | ... | Pn -> En

    *)
  8. | Pexp_try of expression * cases
    (*

    try E0 with P1 -> E1 | ... | Pn -> En

    *)
  9. | Pexp_tuple of expression list
    (*

    Expressions (E1, ..., En)

    Invariant: n >= 2

    *)
  10. | Pexp_construct of longident_loc * expression option
    (*

    Pexp_construct(C, exp) represents:

    • C when exp is None,
    • C E when exp is Some E,
    • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
    *)
  11. | Pexp_variant of label * expression option
    (*

    Pexp_variant(`A, exp) represents

    • `A when exp is None
    • `A E when exp is Some E
    *)
  12. | Pexp_record of (longident_loc * expression) list * expression option
    (*

    Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

    • { l1=P1; ...; ln=Pn } when exp0 is None
    • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

    Invariant: n > 0

    *)
  13. | Pexp_field of expression * longident_loc
    (*

    E.l

    *)
  14. | Pexp_setfield of expression * longident_loc * expression
    (*

    E1.l <- E2

    *)
  15. | Pexp_array of expression list
    (*

    [| E1; ...; En |]

    *)
  16. | Pexp_ifthenelse of expression * expression * expression option
    (*

    if E1 then E2 else E3

    *)
  17. | Pexp_sequence of expression * expression
    (*

    E1; E2

    *)
  18. | Pexp_while of expression * expression
    (*

    while E1 do E2 done

    *)
  19. | Pexp_for of pattern * expression * expression * direction_flag * expression
    (*

    Pexp_for(i, E1, E2, direction, E3) represents:

    • for i = E1 to E2 do E3 done when direction is Upto
    • for i = E1 downto E2 do E3 done when direction is Downto
    *)
  20. | Pexp_constraint of expression * core_type
    (*

    (E : T)

    *)
  21. | Pexp_coerce of expression * core_type option * core_type
    (*

    Pexp_coerce(E, from, T) represents

    • (E :> T) when from is None,
    • (E : T0 :> T) when from is Some T0.
    *)
  22. | Pexp_send of expression * label loc
    (*

    E # m

    *)
  23. | Pexp_new of longident_loc
    (*

    new M.c

    *)
  24. | Pexp_setinstvar of label loc * expression
    (*

    x <- 2

    *)
  25. | Pexp_override of (label loc * expression) list
    (*

    {< x1 = E1; ...; xn = En >}

    *)
  26. | Pexp_letmodule of string option loc * module_expr * expression
    (*

    let module M = ME in E

    *)
  27. | Pexp_letexception of extension_constructor * expression
    (*

    let exception C in E

    *)
  28. | Pexp_assert of expression
    (*

    assert E.

    Note: assert false is treated in a special way by the type-checker.

    *)
  29. | Pexp_lazy of expression
    (*

    lazy E

    *)
  30. | Pexp_poly of expression * core_type option
    (*

    Used for method bodies.

    Can only be used as the expression under Cfk_concrete for methods (not values).

    *)
  31. | Pexp_object of class_structure
    (*

    object ... end

    *)
  32. | Pexp_newtype of string loc * expression
    (*

    fun (type t) -> E

    *)
  33. | Pexp_pack of module_expr
    (*

    (module ME).

    (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

    *)
  34. | Pexp_open of open_declaration * expression
    (*
    • M.(E)
    • let open M in E
    • let open! M in E
    *)
  35. | Pexp_letop of letop
    (*
    • let* P = E0 in E1
    • let* P0 = E00 and* P1 = E01 in E1
    *)
  36. | Pexp_extension of extension
    (*

    [%id]

    *)
  37. | Pexp_unreachable
    (*

    .

    *)
and case = Astlib.Ast_500.Parsetree.case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}

Values of type case represents (P -> E) or (P when E0 -> E)

and letop = Astlib.Ast_500.Parsetree.letop = {
  1. let_ : binding_op;
  2. ands : binding_op list;
  3. body : expression;
}
and binding_op = Astlib.Ast_500.Parsetree.binding_op = {
  1. pbop_op : string loc;
  2. pbop_pat : pattern;
  3. pbop_exp : expression;
  4. pbop_loc : location;
}

Value descriptions

and value_description = Astlib.Ast_500.Parsetree.value_description = {
  1. pval_name : string loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
  5. pval_loc : location;
}

Values of type value_description represents:

  • val x: T, when pval_prim is []
  • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

Type declarations

and type_declaration = Astlib.Ast_500.Parsetree.type_declaration = {
  1. ptype_name : string loc;
  2. ptype_params : (core_type * (variance * injectivity)) list;
    (*

    ('a1,...'an) t

    *)
  3. ptype_cstrs : (core_type * core_type * location) list;
    (*

    ... constraint T1=T1' ... constraint Tn=Tn'

    *)
  4. ptype_kind : type_kind;
  5. ptype_private : private_flag;
    (*

    for = private ...

    *)
  6. ptype_manifest : core_type option;
    (*

    represents = T

    *)
  7. ptype_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
  8. ptype_loc : location;
}

Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

  • type t when type_kind is Ptype_abstract, and manifest is None,
  • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
  • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
  • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
  • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
  • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
  • type t = .. when type_kind is Ptype_open, and manifest is None.
and type_kind = Astlib.Ast_500.Parsetree.type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
    (*

    Invariant: non-empty list

    *)
  4. | Ptype_open
and label_declaration = Astlib.Ast_500.Parsetree.label_declaration = {
  1. pld_name : string loc;
  2. pld_mutable : mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : location;
  5. pld_attributes : attributes;
    (*

    l : T [@id1] [@id2]

    *)
}

Note: T can be a Ptyp_poly.

and constructor_declaration = Astlib.Ast_500.Parsetree.constructor_declaration = + {
  1. pcd_name : string loc;
  2. pcd_vars : string loc list;
  3. pcd_args : constructor_arguments;
  4. pcd_res : core_type option;
  5. pcd_loc : location;
  6. pcd_attributes : attributes;
    (*

    C of ... [@id1] [@id2]

    *)
}
and constructor_arguments = Astlib.Ast_500.Parsetree.constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
    (*

    Values of type constructor_declaration represents the constructor arguments of:

    • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
    • C: T0 when res = Some T0, and args = Pcstr_tuple [],
    • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
    • C of {...} when res = None, and args = Pcstr_record [...],
    • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
    *)
and type_extension = Astlib.Ast_500.Parsetree.type_extension = {
  1. ptyext_path : longident_loc;
  2. ptyext_params : (core_type * (variance * injectivity)) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : private_flag;
  5. ptyext_loc : location;
  6. ptyext_attributes : attributes;
    (*

    ... @@id1 @@id2

    *)
}

Definition of new extensions constructors for the extensive sum type t (type t += ...).

and extension_constructor = Astlib.Ast_500.Parsetree.extension_constructor = {
  1. pext_name : string loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : location;
  4. pext_attributes : attributes;
    (*

    C of ... [@id1] [@id2]

    *)
}
and type_exception = Astlib.Ast_500.Parsetree.type_exception = {
  1. ptyexn_constructor : extension_constructor;
  2. ptyexn_loc : location;
  3. ptyexn_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
}

Definition of a new exception (exception E).

and extension_constructor_kind = + Astlib.Ast_500.Parsetree.extension_constructor_kind = +
  1. | Pext_decl of string loc list * constructor_arguments * core_type option
    (*

    Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

    • C of T1 * ... * Tn when:

      • existentials is [],
      • c_args is [T1; ...; Tn],
      • t_opt is None.
    • C: T0 when

      • existentials is [],
      • c_args is [],
      • t_opt is Some T0.
    • C: T1 * ... * Tn -> T0 when

      • existentials is [],
      • c_args is [T1; ...; Tn],
      • t_opt is Some T0.
    • C: 'a... . T1 * ... * Tn -> T0 when

      • existentials is ['a;...],
      • c_args is [T1; ... ; Tn],
      • t_opt is Some T0.
    *)
  2. | Pext_rebind of longident_loc
    (*

    Pext_rebind(D) re-export the constructor D with the new name C

    *)

Class language

Type expressions for the class language

and class_type = Astlib.Ast_500.Parsetree.class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : location;
  3. pcty_attributes : attributes;
    (*

    ... [@id1] [@id2]

    *)
}
and class_type_desc = Astlib.Ast_500.Parsetree.class_type_desc =
  1. | Pcty_constr of longident_loc * core_type list
    (*
    • c
    • ['a1, ..., 'an] c
    *)
  2. | Pcty_signature of class_signature
    (*

    object ... end

    *)
  3. | Pcty_arrow of arg_label * core_type * class_type
    (*

    Pcty_arrow(lbl, T, CT) represents:

    *)
  4. | Pcty_extension of extension
    (*

    %id

    *)
  5. | Pcty_open of open_description * class_type
    (*

    let open M in CT

    *)
and class_signature = Astlib.Ast_500.Parsetree.class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}

Values of type class_signature represents:

and class_type_field = Astlib.Ast_500.Parsetree.class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : location;
  3. pctf_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
}
and class_type_field_desc = Astlib.Ast_500.Parsetree.class_type_field_desc =
  1. | Pctf_inherit of class_type
    (*

    inherit CT

    *)
  2. | Pctf_val of label loc * mutable_flag * virtual_flag * core_type
    (*

    val x: T

    *)
  3. | Pctf_method of label loc * private_flag * virtual_flag * core_type
    (*

    method x: T

    Note: T can be a Ptyp_poly.

    *)
  4. | Pctf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  5. | Pctf_attribute of attribute
    (*

    [@@@id]

    *)
  6. | Pctf_extension of extension
    (*

    [%%id]

    *)
and 'a class_infos = 'a Astlib.Ast_500.Parsetree.class_infos = {
  1. pci_virt : virtual_flag;
  2. pci_params : (core_type * (variance * injectivity)) list;
  3. pci_name : string loc;
  4. pci_expr : 'a;
  5. pci_loc : location;
  6. pci_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
}

Values of type class_expr class_infos represents:

  • class c = ...
  • class ['a1,...,'an] c = ...
  • class virtual c = ...

They are also used for "class type" declaration.

and class_description = class_type class_infos
and class_type_declaration = class_type class_infos

Value expressions for the class language

and class_expr = Astlib.Ast_500.Parsetree.class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : location;
  3. pcl_attributes : attributes;
    (*

    ... [@id1] [@id2]

    *)
}
and class_expr_desc = Astlib.Ast_500.Parsetree.class_expr_desc =
  1. | Pcl_constr of longident_loc * core_type list
    (*

    c and ['a1, ..., 'an] c

    *)
  2. | Pcl_structure of class_structure
    (*

    object ... end

    *)
  3. | Pcl_fun of arg_label * expression option * pattern * class_expr
    (*

    Pcl_fun(lbl, exp0, P, CE) represents:

    • fun P -> CE when lbl is Nolabel and exp0 is None,
    • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
    • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
    • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
    *)
  4. | Pcl_apply of class_expr * (arg_label * expression) list
    (*

    Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

    Invariant: n > 0

    *)
  5. | Pcl_let of rec_flag * value_binding list * class_expr
    (*

    Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

    • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
    *)
  6. | Pcl_constraint of class_expr * class_type
    (*

    (CE : CT)

    *)
  7. | Pcl_extension of extension
    (*

    [%id]

    *)
  8. | Pcl_open of open_description * class_expr
    (*

    let open M in CE

    *)
and class_structure = Astlib.Ast_500.Parsetree.class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}

Values of type class_structure represents:

and class_field = Astlib.Ast_500.Parsetree.class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : location;
  3. pcf_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
}
and class_field_desc = Astlib.Ast_500.Parsetree.class_field_desc =
  1. | Pcf_inherit of override_flag * class_expr * string loc option
    (*

    Pcf_inherit(flag, CE, s) represents:

    • inherit CE when flag is Fresh and s is None,
    • inherit CE as x when flag is Fresh and s is Some x,
    • inherit! CE when flag is Override and s is None,
    • inherit! CE as x when flag is Override and s is Some x
    *)
  2. | Pcf_val of label loc * mutable_flag * class_field_kind
    (*

    Pcf_val(x,flag, kind) represents:

    *)
  3. | Pcf_method of label loc * private_flag * class_field_kind
    (**)
  4. | Pcf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  5. | Pcf_initializer of expression
    (*

    initializer E

    *)
  6. | Pcf_attribute of attribute
    (*

    [@@@id]

    *)
  7. | Pcf_extension of extension
    (*

    [%%id]

    *)
and class_field_kind = Astlib.Ast_500.Parsetree.class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of override_flag * expression
and class_declaration = class_expr class_infos

Module language

Type expressions for the module language

and module_type = Astlib.Ast_500.Parsetree.module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : location;
  3. pmty_attributes : attributes;
    (*

    ... [@id1] [@id2]

    *)
}
and module_type_desc = Astlib.Ast_500.Parsetree.module_type_desc =
  1. | Pmty_ident of longident_loc
    (*

    Pmty_ident(S) represents S

    *)
  2. | Pmty_signature of signature
    (*

    sig ... end

    *)
  3. | Pmty_functor of functor_parameter * module_type
    (*

    functor(X : MT1) -> MT2

    *)
  4. | Pmty_with of module_type * with_constraint list
    (*

    MT with ...

    *)
  5. | Pmty_typeof of module_expr
    (*

    module type of ME

    *)
  6. | Pmty_extension of extension
    (*

    [%id]

    *)
  7. | Pmty_alias of longident_loc
    (*

    (module M)

    *)
and functor_parameter = Astlib.Ast_500.Parsetree.functor_parameter =
  1. | Unit
    (*

    ()

    *)
  2. | Named of string option loc * module_type
    (*

    Named(name, MT) represents:

    • (X : MT) when name is Some X,
    • (_ : MT) when name is None
    *)
and signature = signature_item list
and signature_item = Astlib.Ast_500.Parsetree.signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : location;
}
and signature_item_desc = Astlib.Ast_500.Parsetree.signature_item_desc =
  1. | Psig_value of value_description
    (*
    • val x: T
    • external x: T = "s1" ... "sn"
    *)
  2. | Psig_type of rec_flag * type_declaration list
    (*

    type t1 = ... and ... and tn = ...

    *)
  3. | Psig_typesubst of type_declaration list
    (*

    type t1 := ... and ... and tn := ...

    *)
  4. | Psig_typext of type_extension
    (*

    type t1 += ...

    *)
  5. | Psig_exception of type_exception
    (*

    exception C of T

    *)
  6. | Psig_module of module_declaration
    (*

    module X = M and module X : MT

    *)
  7. | Psig_modsubst of module_substitution
    (*

    module X := M

    *)
  8. | Psig_recmodule of module_declaration list
    (*

    module rec X1 : MT1 and ... and Xn : MTn

    *)
  9. | Psig_modtype of module_type_declaration
    (*

    module type S = MT and module type S

    *)
  10. | Psig_modtypesubst of module_type_declaration
    (*

    module type S := ...

    *)
  11. | Psig_open of open_description
    (*

    open X

    *)
  12. | Psig_include of include_description
    (*

    include MT

    *)
  13. | Psig_class of class_description list
    (*

    class c1 : ... and ... and cn : ...

    *)
  14. | Psig_class_type of class_type_declaration list
    (*

    class type ct1 = ... and ... and ctn = ...

    *)
  15. | Psig_attribute of attribute
    (*

    [@@@id]

    *)
  16. | Psig_extension of extension * attributes
    (*

    [%%id]

    *)
and module_declaration = Astlib.Ast_500.Parsetree.module_declaration = {
  1. pmd_name : string option loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
  4. pmd_loc : location;
}

Values of type module_declaration represents S : MT

and module_substitution = Astlib.Ast_500.Parsetree.module_substitution = {
  1. pms_name : string loc;
  2. pms_manifest : longident_loc;
  3. pms_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
  4. pms_loc : location;
}

Values of type module_substitution represents S := M

and module_type_declaration = Astlib.Ast_500.Parsetree.module_type_declaration = + {
  1. pmtd_name : string loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
    (*

    ... [@@id1] [@@id2]

    *)
  4. pmtd_loc : location;
}

Values of type module_type_declaration represents:

  • S = MT,
  • S for abstract module type declaration, when pmtd_type is None.
and 'a open_infos = 'a Astlib.Ast_500.Parsetree.open_infos = {
  1. popen_expr : 'a;
  2. popen_override : override_flag;
  3. popen_loc : location;
  4. popen_attributes : attributes;
}

Values of type 'a open_infos represents:

and open_description = longident_loc open_infos

Values of type open_description represents:

  • open M.N
  • open M(N).O
and open_declaration = module_expr open_infos

Values of type open_declaration represents:

  • open M.N
  • open M(N).O
  • open struct ... end
and 'a include_infos = 'a Astlib.Ast_500.Parsetree.include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : location;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos

Values of type include_description represents include MT

and include_declaration = module_expr include_infos

Values of type include_declaration represents include ME

and with_constraint = Astlib.Ast_500.Parsetree.with_constraint =
  1. | Pwith_type of longident_loc * type_declaration
    (*

    with type X.t = ...

    Note: the last component of the longident must match the name of the type_declaration.

    *)
  2. | Pwith_module of longident_loc * longident_loc
    (*

    with module X.Y = Z

    *)
  3. | Pwith_modtype of longident_loc * module_type
    (*

    with module type X.Y = Z

    *)
  4. | Pwith_modtypesubst of longident_loc * module_type
    (*

    with module type X.Y := sig end

    *)
  5. | Pwith_typesubst of longident_loc * type_declaration
    (*

    with type X.t := ..., same format as [Pwith_type]

    *)
  6. | Pwith_modsubst of longident_loc * longident_loc
    (*

    with module X.Y := Z

    *)

Value expressions for the module language

and module_expr = Astlib.Ast_500.Parsetree.module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : location;
  3. pmod_attributes : attributes;
    (*

    ... [@id1] [@id2]

    *)
}
and module_expr_desc = Astlib.Ast_500.Parsetree.module_expr_desc =
  1. | Pmod_ident of longident_loc
    (*

    X

    *)
  2. | Pmod_structure of structure
    (*

    struct ... end

    *)
  3. | Pmod_functor of functor_parameter * module_expr
    (*

    functor(X : MT1) -> ME

    *)
  4. | Pmod_apply of module_expr * module_expr
    (*

    ME1(ME2)

    *)
  5. | Pmod_constraint of module_expr * module_type
    (*

    (ME : MT)

    *)
  6. | Pmod_unpack of expression
    (*

    (val E)

    *)
  7. | Pmod_extension of extension
    (*

    [%id]

    *)
and structure = structure_item list
and structure_item = Astlib.Ast_500.Parsetree.structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : location;
}
and structure_item_desc = Astlib.Ast_500.Parsetree.structure_item_desc =
  1. | Pstr_eval of expression * attributes
    (*

    E

    *)
  2. | Pstr_value of rec_flag * value_binding list
    (*

    Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

    • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
    *)
  3. | Pstr_primitive of value_description
    (*
    • val x: T
    • external x: T = "s1" ... "sn"
    *)
  4. | Pstr_type of rec_flag * type_declaration list
    (*

    type t1 = ... and ... and tn = ...

    *)
  5. | Pstr_typext of type_extension
    (*

    type t1 += ...

    *)
  6. | Pstr_exception of type_exception
    (*
    • exception C of T
    • exception C = M.X
    *)
  7. | Pstr_module of module_binding
    (*

    module X = ME

    *)
  8. | Pstr_recmodule of module_binding list
    (*

    module rec X1 = ME1 and ... and Xn = MEn

    *)
  9. | Pstr_modtype of module_type_declaration
    (*

    module type S = MT

    *)
  10. | Pstr_open of open_declaration
    (*

    open X

    *)
  11. | Pstr_class of class_declaration list
    (*

    class c1 = ... and ... and cn = ...

    *)
  12. | Pstr_class_type of class_type_declaration list
    (*

    class type ct1 = ... and ... and ctn = ...

    *)
  13. | Pstr_include of include_declaration
    (*

    include ME

    *)
  14. | Pstr_attribute of attribute
    (*

    [@@@id]

    *)
  15. | Pstr_extension of extension * attributes
    (*

    [%%id]

    *)
and value_binding = Astlib.Ast_500.Parsetree.value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_attributes : attributes;
  4. pvb_loc : location;
}
and module_binding = Astlib.Ast_500.Parsetree.module_binding = {
  1. pmb_name : string option loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : location;
}

Values of type module_binding represents module X = ME

Toplevel

Toplevel phrases

and toplevel_phrase = Astlib.Ast_500.Parsetree.toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of toplevel_directive
    (*

    #use, #load ...

    *)
and toplevel_directive = Astlib.Ast_500.Parsetree.toplevel_directive = {
  1. pdir_name : string loc;
  2. pdir_arg : directive_argument option;
  3. pdir_loc : location;
}
and directive_argument = Astlib.Ast_500.Parsetree.directive_argument = {
  1. pdira_desc : directive_argument_desc;
  2. pdira_loc : location;
}
and directive_argument_desc = Astlib.Ast_500.Parsetree.directive_argument_desc = +
  1. | Pdir_string of string
  2. | Pdir_int of string * char option
  3. | Pdir_ident of longident
  4. | Pdir_bool of bool
and cases = case list
class virtual map : object ... end
class virtual iter : object ... end
class virtual 'acc fold : object ... end
class virtual 'acc fold_map : object ... end
class virtual 'ctx map_with_context : object ... end
class virtual 'res lift : object ... end
class virtual ['ctx, 'res] lift_map_with_context : object ... end
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Attr/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Attr/index.html new file mode 100644 index 000000000..bb834afa9 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Attr/index.html @@ -0,0 +1,6 @@ + +Attr (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Attr)

Module Ast_helper.Attr

Attributes

Attributes

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Cf/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Cf/index.html new file mode 100644 index 000000000..ef05da3dc --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Cf/index.html @@ -0,0 +1,48 @@ + +Cf (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Cf)

Module Ast_helper.Cf

Class fields

Class fields

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Ci/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Ci/index.html new file mode 100644 index 000000000..35a8b663c --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Ci/index.html @@ -0,0 +1,12 @@ + +Ci (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Ci)

Module Ast_helper.Ci

Classes

Classes

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Cl/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Cl/index.html new file mode 100644 index 000000000..d5430be21 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Cl/index.html @@ -0,0 +1,51 @@ + +Cl (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Cl)

Module Ast_helper.Cl

Class expressions

Class expressions

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Const/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Const/index.html new file mode 100644 index 000000000..e0fb3ea77 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Const/index.html @@ -0,0 +1,6 @@ + +Const (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Const)

Module Ast_helper.Const

val string : + ?quotation_delimiter:string -> + ?loc:Astlib.Location.t -> + string -> + Astlib.Ast_500.Parsetree.constant
val integer : ?suffix:char -> string -> Astlib.Ast_500.Parsetree.constant
val int : ?suffix:char -> int -> Astlib.Ast_500.Parsetree.constant
val int32 : ?suffix:char -> int32 -> Astlib.Ast_500.Parsetree.constant
val int64 : ?suffix:char -> int64 -> Astlib.Ast_500.Parsetree.constant
val nativeint : ?suffix:char -> nativeint -> Astlib.Ast_500.Parsetree.constant
val float : ?suffix:char -> string -> Astlib.Ast_500.Parsetree.constant
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Csig/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Csig/index.html new file mode 100644 index 000000000..6c5285ca3 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Csig/index.html @@ -0,0 +1,5 @@ + +Csig (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Csig)

Module Ast_helper.Csig

Class signatures

Class signatures

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Cstr/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Cstr/index.html new file mode 100644 index 000000000..23530df8b --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Cstr/index.html @@ -0,0 +1,5 @@ + +Cstr (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Cstr)

Module Ast_helper.Cstr

Class structures

Class structures

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Ctf/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Ctf/index.html new file mode 100644 index 000000000..c5f7a5c97 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Ctf/index.html @@ -0,0 +1,39 @@ + +Ctf (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Ctf)

Module Ast_helper.Ctf

Class type fields

Class type fields

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Cty/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Cty/index.html new file mode 100644 index 000000000..d1fae8039 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Cty/index.html @@ -0,0 +1,33 @@ + +Cty (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Cty)

Module Ast_helper.Cty

Class type expressions

Class type expressions

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Exp/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Exp/index.html new file mode 100644 index 000000000..6cb48a384 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Exp/index.html @@ -0,0 +1,203 @@ + +Exp (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Exp)

Module Ast_helper.Exp

Expressions

Expressions

val unreachable : + ?loc:Astlib.Location.t -> + ?attrs:Astlib.Ast_500.Parsetree.attribute list -> + unit -> + Astlib.Ast_500.Parsetree.expression
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Incl/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Incl/index.html new file mode 100644 index 000000000..6875f2385 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Incl/index.html @@ -0,0 +1,6 @@ + +Incl (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Incl)

Module Ast_helper.Incl

Includes

Includes

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Mb/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Mb/index.html new file mode 100644 index 000000000..628fc6974 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Mb/index.html @@ -0,0 +1,7 @@ + +Mb (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Mb)

Module Ast_helper.Mb

Module bindings

Module bindings

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Md/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Md/index.html new file mode 100644 index 000000000..4098cb5f7 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Md/index.html @@ -0,0 +1,7 @@ + +Md (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Md)

Module Ast_helper.Md

Module declarations

Module declarations

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Mod/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Mod/index.html new file mode 100644 index 000000000..6c5160c5d --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Mod/index.html @@ -0,0 +1,40 @@ + +Mod (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Mod)

Module Ast_helper.Mod

Module expressions

Module expressions

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Ms/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Ms/index.html new file mode 100644 index 000000000..8af60bef2 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Ms/index.html @@ -0,0 +1,7 @@ + +Ms (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Ms)

Module Ast_helper.Ms

Module substitutions

Module substitutions

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Mtd/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Mtd/index.html new file mode 100644 index 000000000..fa4983a55 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Mtd/index.html @@ -0,0 +1,7 @@ + +Mtd (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Mtd)

Module Ast_helper.Mtd

Module type declarations

Module type declarations

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Mty/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Mty/index.html new file mode 100644 index 000000000..0301be8ce --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Mty/index.html @@ -0,0 +1,39 @@ + +Mty (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Mty)

Module Ast_helper.Mty

Module type expressions

Module type expressions

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Of/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Of/index.html new file mode 100644 index 000000000..fe04148fe --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Of/index.html @@ -0,0 +1,14 @@ + +Of (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Of)

Module Ast_helper.Of

Object fields

Object fields

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Opn/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Opn/index.html new file mode 100644 index 000000000..172390fe8 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Opn/index.html @@ -0,0 +1,7 @@ + +Opn (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Opn)

Module Ast_helper.Opn

Opens

Opens

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Pat/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Pat/index.html new file mode 100644 index 000000000..0f0d42fbf --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Pat/index.html @@ -0,0 +1,90 @@ + +Pat (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Pat)

Module Ast_helper.Pat

Patterns

Patterns

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Rf/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Rf/index.html new file mode 100644 index 000000000..df7c0cd77 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Rf/index.html @@ -0,0 +1,15 @@ + +Rf (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Rf)

Module Ast_helper.Rf

Row fields

Row fields

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Sig/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Sig/index.html new file mode 100644 index 000000000..cdc8f4fb8 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Sig/index.html @@ -0,0 +1,52 @@ + +Sig (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Sig)

Module Ast_helper.Sig

Signature items

Signature items

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Str/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Str/index.html new file mode 100644 index 000000000..3cece2538 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Str/index.html @@ -0,0 +1,54 @@ + +Str (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Str)

Module Ast_helper.Str

Structure items

Structure items

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Te/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Te/index.html new file mode 100644 index 000000000..e8df8d0e3 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Te/index.html @@ -0,0 +1,33 @@ + +Te (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Te)

Module Ast_helper.Te

Type extensions

Type extensions

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Typ/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Typ/index.html new file mode 100644 index 000000000..4cec6b053 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Typ/index.html @@ -0,0 +1,73 @@ + +Typ (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Typ)

Module Ast_helper.Typ

Type expressions

Type expressions

varify_constructors newtypes te is type expression te, of which any of nullary type constructor tc is replaced by type variable of the same name, if tc's name appears in newtypes. Raise Syntaxerr.Variable_in_scope if any type variable inside te appears in newtypes.

  • since 4.05
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Type/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Type/index.html new file mode 100644 index 000000000..a6ac58edb --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Type/index.html @@ -0,0 +1,31 @@ + +Type (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Type)

Module Ast_helper.Type

Type declarations

Type declarations

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Val/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Val/index.html new file mode 100644 index 000000000..af0cb052e --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Val/index.html @@ -0,0 +1,8 @@ + +Val (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Val)

Module Ast_helper.Val

Value declarations

Value declarations

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Vb/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Vb/index.html new file mode 100644 index 000000000..2593207fb --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/Vb/index.html @@ -0,0 +1,7 @@ + +Vb (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper.Vb)

Module Ast_helper.Vb

Value bindings

Value bindings

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/index.html new file mode 100644 index 000000000..b88c1738e --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Ast_helper/index.html @@ -0,0 +1,2 @@ + +Ast_helper (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Ast_helper)

Module Ppxlib_ast.Ast_helper

Copy of Ast_helper from OCaml 4.14 with docstring related stuff removed

type 'a with_loc = 'a Astlib.Location.loc
type str = string with_loc
type str_opt = string option with_loc

Default locations

val default_loc : loc ref

Default value for all optional location arguments.

val with_default_loc : loc -> (unit -> 'a) -> 'a

Set the default_loc within the scope of the execution of the provided function.

Constants

module Const : sig ... end
module Attr : sig ... end

Core language

module Typ : sig ... end

Type expressions

module Pat : sig ... end

Patterns

module Exp : sig ... end

Expressions

module Val : sig ... end

Value declarations

module Type : sig ... end

Type declarations

module Te : sig ... end

Type extensions

Module language

module Mty : sig ... end

Module type expressions

module Mod : sig ... end

Module expressions

module Sig : sig ... end

Signature items

module Str : sig ... end

Structure items

module Md : sig ... end

Module declarations

module Ms : sig ... end

Module substitutions

module Mtd : sig ... end

Module type declarations

module Mb : sig ... end

Module bindings

module Opn : sig ... end

Opens

module Incl : sig ... end

Includes

module Vb : sig ... end

Value bindings

Class language

module Cty : sig ... end

Class type expressions

module Ctf : sig ... end

Class type fields

module Cl : sig ... end

Class expressions

module Cf : sig ... end

Class fields

module Ci : sig ... end

Classes

module Csig : sig ... end

Class signatures

module Cstr : sig ... end

Class structures

module Rf : sig ... end

Row fields

module Of : sig ... end

Object fields

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Compiler_version/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Compiler_version/index.html new file mode 100644 index 000000000..c6ea53b8e --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Compiler_version/index.html @@ -0,0 +1,21 @@ + +Compiler_version (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Compiler_version)

Module Ppxlib_ast.Compiler_version

module Ast = Astlib.Ast_501

Ast definition for this version

val version : int
val string_version : string
type types = + < structure : Ast.Parsetree.structure + ; signature : Ast.Parsetree.signature + ; toplevel_phrase : Ast.Parsetree.toplevel_phrase + ; core_type : Ast.Parsetree.core_type + ; expression : Ast.Parsetree.expression + ; pattern : Ast.Parsetree.pattern + ; case : Ast.Parsetree.case + ; type_declaration : Ast.Parsetree.type_declaration + ; type_extension : Ast.Parsetree.type_extension + ; extension_constructor : Ast.Parsetree.extension_constructor + ; class_expr : Ast.Parsetree.class_expr + ; class_field : Ast.Parsetree.class_field + ; class_type : Ast.Parsetree.class_type + ; class_signature : Ast.Parsetree.class_signature + ; class_type_field : Ast.Parsetree.class_type_field + ; module_expr : Ast.Parsetree.module_expr + ; module_type : Ast.Parsetree.module_type + ; signature_item : Ast.Parsetree.signature_item + ; structure_item : Ast.Parsetree.structure_item >

Shortcut for talking about Ast types

type Ppxlib_ast__.Versions.witnesses +=
  1. | Version : types Ppxlib_ast__.Versions.witnesses

A construtor for recovering type equalities between two arbitrary versions.

val migration_info : types Ppxlib_ast__.Versions.migration_info

Information used to derive migration functions, see below

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-1-A/Ast/Config/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-1-A/Ast/Config/index.html new file mode 100644 index 000000000..e391dddec --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-1-A/Ast/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Convert.A.Ast.Config)

Module Ast.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-1-A/Ast/Parsetree/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-1-A/Ast/Parsetree/index.html new file mode 100644 index 000000000..0738a4363 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-1-A/Ast/Parsetree/index.html @@ -0,0 +1,2 @@ + +Parsetree (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Convert.A.Ast.Parsetree)

Module Ast.Parsetree

type structure
type signature
type toplevel_phrase
type core_type
type expression
type pattern
type case
type type_declaration
type type_extension
type extension_constructor
type class_expr
type class_field
type class_type
type class_signature
type class_type_field
type module_expr
type module_type
type signature_item
type structure_item
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-1-A/Ast/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-1-A/Ast/index.html new file mode 100644 index 000000000..8b9e35721 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-1-A/Ast/index.html @@ -0,0 +1,2 @@ + +Ast (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Convert.A.Ast)

Module A.Ast

Ast definition for this version

module Parsetree : sig ... end
module Config : sig ... end
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-1-A/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-1-A/index.html new file mode 100644 index 000000000..c580bce06 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-1-A/index.html @@ -0,0 +1,21 @@ + +A (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Convert.A)

Parameter Convert.A

module Ast : sig ... end

Ast definition for this version

val version : int
val string_version : string
type types = + < structure : Ast.Parsetree.structure + ; signature : Ast.Parsetree.signature + ; toplevel_phrase : Ast.Parsetree.toplevel_phrase + ; core_type : Ast.Parsetree.core_type + ; expression : Ast.Parsetree.expression + ; pattern : Ast.Parsetree.pattern + ; case : Ast.Parsetree.case + ; type_declaration : Ast.Parsetree.type_declaration + ; type_extension : Ast.Parsetree.type_extension + ; extension_constructor : Ast.Parsetree.extension_constructor + ; class_expr : Ast.Parsetree.class_expr + ; class_field : Ast.Parsetree.class_field + ; class_type : Ast.Parsetree.class_type + ; class_signature : Ast.Parsetree.class_signature + ; class_type_field : Ast.Parsetree.class_type_field + ; module_expr : Ast.Parsetree.module_expr + ; module_type : Ast.Parsetree.module_type + ; signature_item : Ast.Parsetree.signature_item + ; structure_item : Ast.Parsetree.structure_item >

Shortcut for talking about Ast types

type Ppxlib_ast__.Versions.witnesses +=
  1. | Version : types Ppxlib_ast__.Versions.witnesses

A construtor for recovering type equalities between two arbitrary versions.

val migration_info : types Ppxlib_ast__.Versions.migration_info

Information used to derive migration functions, see below

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-2-B/Ast/Config/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-2-B/Ast/Config/index.html new file mode 100644 index 000000000..1ba0f948f --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-2-B/Ast/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Convert.B.Ast.Config)

Module Ast.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-2-B/Ast/Parsetree/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-2-B/Ast/Parsetree/index.html new file mode 100644 index 000000000..4dc528998 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-2-B/Ast/Parsetree/index.html @@ -0,0 +1,2 @@ + +Parsetree (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Convert.B.Ast.Parsetree)

Module Ast.Parsetree

type structure
type signature
type toplevel_phrase
type core_type
type expression
type pattern
type case
type type_declaration
type type_extension
type extension_constructor
type class_expr
type class_field
type class_type
type class_signature
type class_type_field
type module_expr
type module_type
type signature_item
type structure_item
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-2-B/Ast/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-2-B/Ast/index.html new file mode 100644 index 000000000..a44474321 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-2-B/Ast/index.html @@ -0,0 +1,2 @@ + +Ast (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Convert.B.Ast)

Module B.Ast

Ast definition for this version

module Parsetree : sig ... end
module Config : sig ... end
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-2-B/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-2-B/index.html new file mode 100644 index 000000000..a97b330e0 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/argument-2-B/index.html @@ -0,0 +1,21 @@ + +B (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Convert.B)

Parameter Convert.B

module Ast : sig ... end

Ast definition for this version

val version : int
val string_version : string
type types = + < structure : Ast.Parsetree.structure + ; signature : Ast.Parsetree.signature + ; toplevel_phrase : Ast.Parsetree.toplevel_phrase + ; core_type : Ast.Parsetree.core_type + ; expression : Ast.Parsetree.expression + ; pattern : Ast.Parsetree.pattern + ; case : Ast.Parsetree.case + ; type_declaration : Ast.Parsetree.type_declaration + ; type_extension : Ast.Parsetree.type_extension + ; extension_constructor : Ast.Parsetree.extension_constructor + ; class_expr : Ast.Parsetree.class_expr + ; class_field : Ast.Parsetree.class_field + ; class_type : Ast.Parsetree.class_type + ; class_signature : Ast.Parsetree.class_signature + ; class_type_field : Ast.Parsetree.class_type_field + ; module_expr : Ast.Parsetree.module_expr + ; module_type : Ast.Parsetree.module_type + ; signature_item : Ast.Parsetree.signature_item + ; structure_item : Ast.Parsetree.structure_item >

Shortcut for talking about Ast types

type Ppxlib_ast__.Versions.witnesses +=
  1. | Version : types Ppxlib_ast__.Versions.witnesses

A construtor for recovering type equalities between two arbitrary versions.

val migration_info : types Ppxlib_ast__.Versions.migration_info

Information used to derive migration functions, see below

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/index.html new file mode 100644 index 000000000..2b66c0edc --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Convert/index.html @@ -0,0 +1,24 @@ + +Convert (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Convert)

Module Ppxlib_ast.Convert

Parameters

module A : sig ... end
module B : sig ... end

Signature

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Extra_warnings/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Extra_warnings/index.html new file mode 100644 index 000000000..3dac0270b --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Extra_warnings/index.html @@ -0,0 +1,2 @@ + +Extra_warnings (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Extra_warnings)

Module Ppxlib_ast.Extra_warnings

val care_about_ite_branch : bool ref

Ignored -- kept for compatibility.

val about_ite_branch_ref : (Astlib.Location.t -> unit) ref

Ignored -- kept for compatibility.

val about_ite_branch : Astlib.Location.t -> unit

Ignored -- kept for compatibility.

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Find_version/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Find_version/index.html new file mode 100644 index 000000000..9ff2328e6 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Find_version/index.html @@ -0,0 +1,2 @@ + +Find_version (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Find_version)

Module Ppxlib_ast.Find_version

Helper to find the frontend corresponding to a given magic number

type t =
  1. | Impl of (module Ppxlib_ast__.Versions.OCaml_version)
  2. | Intf of (module Ppxlib_ast__.Versions.OCaml_version)
  3. | Unknown
val from_magic : string -> t
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Js/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Js/index.html new file mode 100644 index 000000000..eb0eaf004 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Js/index.html @@ -0,0 +1,21 @@ + +Js (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Js)

Module Ppxlib_ast.Js

module Ast = Astlib.Ast_500

Ast definition for this version

val version : int
val string_version : string
type types = + < structure : Ast.Parsetree.structure + ; signature : Ast.Parsetree.signature + ; toplevel_phrase : Ast.Parsetree.toplevel_phrase + ; core_type : Ast.Parsetree.core_type + ; expression : Ast.Parsetree.expression + ; pattern : Ast.Parsetree.pattern + ; case : Ast.Parsetree.case + ; type_declaration : Ast.Parsetree.type_declaration + ; type_extension : Ast.Parsetree.type_extension + ; extension_constructor : Ast.Parsetree.extension_constructor + ; class_expr : Ast.Parsetree.class_expr + ; class_field : Ast.Parsetree.class_field + ; class_type : Ast.Parsetree.class_type + ; class_signature : Ast.Parsetree.class_signature + ; class_type_field : Ast.Parsetree.class_type_field + ; module_expr : Ast.Parsetree.module_expr + ; module_type : Ast.Parsetree.module_type + ; signature_item : Ast.Parsetree.signature_item + ; structure_item : Ast.Parsetree.structure_item >

Shortcut for talking about Ast types

type Ppxlib_ast__.Versions.witnesses +=
  1. | Version : types Ppxlib_ast__.Versions.witnesses

A construtor for recovering type equalities between two arbitrary versions.

val migration_info : types Ppxlib_ast__.Versions.migration_info

Information used to derive migration functions, see below

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Location_error/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Location_error/index.html new file mode 100644 index 000000000..bf8a34f37 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Location_error/index.html @@ -0,0 +1,6 @@ + +Location_error (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Location_error)

Module Ppxlib_ast.Location_error

val of_exn : exn -> t option
val register_error_of_exn : (exn -> t option) -> unit
val message : t -> string
val set_message : t -> string -> t
val make : + loc:Astlib.Location.t -> + string -> + sub:(Astlib.Location.t * string) list -> + t
val raise : t -> 'a
val update_loc : t -> Astlib.Location.t -> t
val get_location : t -> Astlib.Location.t
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Parse/Of_ocaml/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Parse/Of_ocaml/index.html new file mode 100644 index 000000000..efe523e6c --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Parse/Of_ocaml/index.html @@ -0,0 +1,38 @@ + +Of_ocaml (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Parse.Of_ocaml)

Module Parse.Of_ocaml

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Parse/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Parse/index.html new file mode 100644 index 000000000..8d198ca65 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Parse/index.html @@ -0,0 +1,2 @@ + +Parse (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Parse)

Module Ppxlib_ast.Parse

include module type of struct include Astlib.Parse end
module Of_ocaml : sig ... end
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/Of_ocaml/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/Of_ocaml/index.html new file mode 100644 index 000000000..c26b47a4b --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/Of_ocaml/index.html @@ -0,0 +1,38 @@ + +Of_ocaml (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Select_ast.Of_ocaml)

Module Select_ast.Of_ocaml

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/To_ocaml/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/To_ocaml/index.html new file mode 100644 index 000000000..7f381a0bf --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/To_ocaml/index.html @@ -0,0 +1,38 @@ + +To_ocaml (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Select_ast.To_ocaml)

Module Select_ast.To_ocaml

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/Type/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/Type/index.html new file mode 100644 index 000000000..b0a28d70e --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/Type/index.html @@ -0,0 +1,33 @@ + +Type (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Select_ast.Type)

Module Select_ast.Type

type ('js, 'ocaml) t =
  1. | Structure : (Astlib.Ast_500.Parsetree.structure, Ocaml.Ast.Parsetree.structure) + t
  2. | Signature : (Astlib.Ast_500.Parsetree.signature, Ocaml.Ast.Parsetree.signature) + t
  3. | Toplevel_phrase : (Astlib.Ast_500.Parsetree.toplevel_phrase, + Ocaml.Ast.Parsetree.toplevel_phrase) + t
  4. | Core_type : (Astlib.Ast_500.Parsetree.core_type, Ocaml.Ast.Parsetree.core_type) + t
  5. | Expression : (Astlib.Ast_500.Parsetree.expression, + Ocaml.Ast.Parsetree.expression) + t
  6. | Pattern : (Astlib.Ast_500.Parsetree.pattern, Ocaml.Ast.Parsetree.pattern) t
  7. | Case : (Astlib.Ast_500.Parsetree.case, Ocaml.Ast.Parsetree.case) t
  8. | Type_declaration : (Astlib.Ast_500.Parsetree.type_declaration, + Ocaml.Ast.Parsetree.type_declaration) + t
  9. | Type_extension : (Astlib.Ast_500.Parsetree.type_extension, + Ocaml.Ast.Parsetree.type_extension) + t
  10. | Extension_constructor : (Astlib.Ast_500.Parsetree.extension_constructor, + Ocaml.Ast.Parsetree.extension_constructor) + t
  11. | Class_expr : (Astlib.Ast_500.Parsetree.class_expr, + Ocaml.Ast.Parsetree.class_expr) + t
  12. | Class_field : (Astlib.Ast_500.Parsetree.class_field, + Ocaml.Ast.Parsetree.class_field) + t
  13. | Class_type : (Astlib.Ast_500.Parsetree.class_type, + Ocaml.Ast.Parsetree.class_type) + t
  14. | Class_signature : (Astlib.Ast_500.Parsetree.class_signature, + Ocaml.Ast.Parsetree.class_signature) + t
  15. | Class_type_field : (Astlib.Ast_500.Parsetree.class_type_field, + Ocaml.Ast.Parsetree.class_type_field) + t
  16. | Module_expr : (Astlib.Ast_500.Parsetree.module_expr, + Ocaml.Ast.Parsetree.module_expr) + t
  17. | Module_type : (Astlib.Ast_500.Parsetree.module_type, + Ocaml.Ast.Parsetree.module_type) + t
  18. | Signature_item : (Astlib.Ast_500.Parsetree.signature_item, + Ocaml.Ast.Parsetree.signature_item) + t
  19. | Structure_item : (Astlib.Ast_500.Parsetree.structure_item, + Ocaml.Ast.Parsetree.structure_item) + t
  20. | List : ('a, 'b) t -> ('a list, 'b list) t
  21. | Pair : ('a, 'b) t * ('c, 'd) t -> ('a * 'c, 'b * 'd) t
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/Config/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/Config/index.html new file mode 100644 index 000000000..d255cd0b8 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Select_ast.Ocaml.Ast.Config)

Module Ast.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/Parsetree/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/Parsetree/index.html new file mode 100644 index 000000000..4b03cd4bd --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/Parsetree/index.html @@ -0,0 +1,2 @@ + +Parsetree (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Select_ast.Ocaml.Ast.Parsetree)

Module Ast.Parsetree

type structure
type signature
type toplevel_phrase
type core_type
type expression
type pattern
type case
type type_declaration
type type_extension
type extension_constructor
type class_expr
type class_field
type class_type
type class_signature
type class_type_field
type module_expr
type module_type
type signature_item
type structure_item
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/index.html new file mode 100644 index 000000000..c53b20d02 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/index.html @@ -0,0 +1,2 @@ + +Ast (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Select_ast.Ocaml.Ast)

Module Ocaml.Ast

Ast definition for this version

module Parsetree : sig ... end
module Config : sig ... end
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/argument-1-Ocaml/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/argument-1-Ocaml/index.html new file mode 100644 index 000000000..08164ec64 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/argument-1-Ocaml/index.html @@ -0,0 +1,21 @@ + +Ocaml (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Select_ast.Ocaml)

Parameter Select_ast.Ocaml

module Ast : sig ... end

Ast definition for this version

val version : int
val string_version : string
type types = + < structure : Ast.Parsetree.structure + ; signature : Ast.Parsetree.signature + ; toplevel_phrase : Ast.Parsetree.toplevel_phrase + ; core_type : Ast.Parsetree.core_type + ; expression : Ast.Parsetree.expression + ; pattern : Ast.Parsetree.pattern + ; case : Ast.Parsetree.case + ; type_declaration : Ast.Parsetree.type_declaration + ; type_extension : Ast.Parsetree.type_extension + ; extension_constructor : Ast.Parsetree.extension_constructor + ; class_expr : Ast.Parsetree.class_expr + ; class_field : Ast.Parsetree.class_field + ; class_type : Ast.Parsetree.class_type + ; class_signature : Ast.Parsetree.class_signature + ; class_type_field : Ast.Parsetree.class_type_field + ; module_expr : Ast.Parsetree.module_expr + ; module_type : Ast.Parsetree.module_type + ; signature_item : Ast.Parsetree.signature_item + ; structure_item : Ast.Parsetree.structure_item >

Shortcut for talking about Ast types

type Ppxlib_ast__.Versions.witnesses +=
  1. | Version : types Ppxlib_ast__.Versions.witnesses

A construtor for recovering type equalities between two arbitrary versions.

val migration_info : types Ppxlib_ast__.Versions.migration_info

Information used to derive migration functions, see below

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/index.html new file mode 100644 index 000000000..d14fcdb08 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Select_ast/index.html @@ -0,0 +1,21 @@ + +Select_ast (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Select_ast)

Module Ppxlib_ast.Select_ast

Parameters

module Ocaml : sig ... end

Signature

module Ast = Astlib.Ast_500

Ast definition for this version

val version : int
val string_version : string
type types = + < structure : Ast.Parsetree.structure + ; signature : Ast.Parsetree.signature + ; toplevel_phrase : Ast.Parsetree.toplevel_phrase + ; core_type : Ast.Parsetree.core_type + ; expression : Ast.Parsetree.expression + ; pattern : Ast.Parsetree.pattern + ; case : Ast.Parsetree.case + ; type_declaration : Ast.Parsetree.type_declaration + ; type_extension : Ast.Parsetree.type_extension + ; extension_constructor : Ast.Parsetree.extension_constructor + ; class_expr : Ast.Parsetree.class_expr + ; class_field : Ast.Parsetree.class_field + ; class_type : Ast.Parsetree.class_type + ; class_signature : Ast.Parsetree.class_signature + ; class_type_field : Ast.Parsetree.class_type_field + ; module_expr : Ast.Parsetree.module_expr + ; module_type : Ast.Parsetree.module_type + ; signature_item : Ast.Parsetree.signature_item + ; structure_item : Ast.Parsetree.structure_item >

Shortcut for talking about Ast types

type Ppxlib_ast__.Versions.witnesses +=
  1. | Version : types Ppxlib_ast__.Versions.witnesses

A construtor for recovering type equalities between two arbitrary versions.

val migration_info : types Ppxlib_ast__.Versions.migration_info

Information used to derive migration functions, see below

module Type : sig ... end
module Of_ocaml : sig ... end
module To_ocaml : sig ... end
val of_ocaml : 'ocaml 'js. ('js, 'ocaml) Type.t -> 'ocaml -> 'js
val to_ocaml : 'ocaml 'js. ('js, 'ocaml) Type.t -> 'js -> 'ocaml
val of_ocaml_mapper : ('a, 'b) Type.t -> ('c -> 'd -> 'e) -> 'f -> 'g -> 'h
val to_ocaml_mapper : ('a, 'b) Type.t -> ('c -> 'd -> 'e) -> 'f -> 'g -> 'h
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Selected_ast/Of_ocaml/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Selected_ast/Of_ocaml/index.html new file mode 100644 index 000000000..dfeb00bd5 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Selected_ast/Of_ocaml/index.html @@ -0,0 +1,38 @@ + +Of_ocaml (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Selected_ast.Of_ocaml)

Module Selected_ast.Of_ocaml

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Selected_ast/To_ocaml/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Selected_ast/To_ocaml/index.html new file mode 100644 index 000000000..68db6a4b6 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Selected_ast/To_ocaml/index.html @@ -0,0 +1,38 @@ + +To_ocaml (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Selected_ast.To_ocaml)

Module Selected_ast.To_ocaml

diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Selected_ast/Type/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Selected_ast/Type/index.html new file mode 100644 index 000000000..fbc517efe --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Selected_ast/Type/index.html @@ -0,0 +1,37 @@ + +Type (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Selected_ast.Type)

Module Selected_ast.Type

type (!'js, !'ocaml) t =
  1. | Structure : (Astlib.Ast_500.Parsetree.structure, + Astlib.Ast_501.Parsetree.structure) + t
  2. | Signature : (Astlib.Ast_500.Parsetree.signature, + Astlib.Ast_501.Parsetree.signature) + t
  3. | Toplevel_phrase : (Astlib.Ast_500.Parsetree.toplevel_phrase, + Astlib.Ast_501.Parsetree.toplevel_phrase) + t
  4. | Core_type : (Astlib.Ast_500.Parsetree.core_type, + Astlib.Ast_501.Parsetree.core_type) + t
  5. | Expression : (Astlib.Ast_500.Parsetree.expression, + Astlib.Ast_501.Parsetree.expression) + t
  6. | Pattern : (Astlib.Ast_500.Parsetree.pattern, Astlib.Ast_501.Parsetree.pattern) + t
  7. | Case : (Astlib.Ast_500.Parsetree.case, Astlib.Ast_501.Parsetree.case) t
  8. | Type_declaration : (Astlib.Ast_500.Parsetree.type_declaration, + Astlib.Ast_501.Parsetree.type_declaration) + t
  9. | Type_extension : (Astlib.Ast_500.Parsetree.type_extension, + Astlib.Ast_501.Parsetree.type_extension) + t
  10. | Extension_constructor : (Astlib.Ast_500.Parsetree.extension_constructor, + Astlib.Ast_501.Parsetree.extension_constructor) + t
  11. | Class_expr : (Astlib.Ast_500.Parsetree.class_expr, + Astlib.Ast_501.Parsetree.class_expr) + t
  12. | Class_field : (Astlib.Ast_500.Parsetree.class_field, + Astlib.Ast_501.Parsetree.class_field) + t
  13. | Class_type : (Astlib.Ast_500.Parsetree.class_type, + Astlib.Ast_501.Parsetree.class_type) + t
  14. | Class_signature : (Astlib.Ast_500.Parsetree.class_signature, + Astlib.Ast_501.Parsetree.class_signature) + t
  15. | Class_type_field : (Astlib.Ast_500.Parsetree.class_type_field, + Astlib.Ast_501.Parsetree.class_type_field) + t
  16. | Module_expr : (Astlib.Ast_500.Parsetree.module_expr, + Astlib.Ast_501.Parsetree.module_expr) + t
  17. | Module_type : (Astlib.Ast_500.Parsetree.module_type, + Astlib.Ast_501.Parsetree.module_type) + t
  18. | Signature_item : (Astlib.Ast_500.Parsetree.signature_item, + Astlib.Ast_501.Parsetree.signature_item) + t
  19. | Structure_item : (Astlib.Ast_500.Parsetree.structure_item, + Astlib.Ast_501.Parsetree.structure_item) + t
  20. | List : ('a, 'b) t -> ('a0 list, 'b0 list) t
  21. | Pair : ('a1, 'b1) t * ('c, 'd) t -> ('a2 * 'c0, 'b2 * 'd0) t
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/Selected_ast/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/Selected_ast/index.html new file mode 100644 index 000000000..471506dcb --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/Selected_ast/index.html @@ -0,0 +1,21 @@ + +Selected_ast (docs.findlib-1.ppxlib.ast.Ppxlib_ast.Selected_ast)

Module Ppxlib_ast.Selected_ast

module Ast = Astlib.Ast_500
val version : int
val string_version : string
type types = + < case : Ast.Parsetree.case + ; class_expr : Ast.Parsetree.class_expr + ; class_field : Ast.Parsetree.class_field + ; class_signature : Ast.Parsetree.class_signature + ; class_type : Ast.Parsetree.class_type + ; class_type_field : Ast.Parsetree.class_type_field + ; core_type : Ast.Parsetree.core_type + ; expression : Ast.Parsetree.expression + ; extension_constructor : Ast.Parsetree.extension_constructor + ; module_expr : Ast.Parsetree.module_expr + ; module_type : Ast.Parsetree.module_type + ; pattern : Ast.Parsetree.pattern + ; signature : Ast.Parsetree.signature + ; signature_item : Ast.Parsetree.signature_item + ; structure : Ast.Parsetree.structure + ; structure_item : Ast.Parsetree.structure_item + ; toplevel_phrase : Ast.Parsetree.toplevel_phrase + ; type_declaration : Ast.Parsetree.type_declaration + ; type_extension : Ast.Parsetree.type_extension >
type Ppxlib_ast__Versions.witnesses +=
  1. | Version : types Ppxlib_ast__Versions.witnesses
val migration_info : types Ppxlib_ast__Versions.migration_info
module Type : sig ... end
module Of_ocaml : sig ... end
module To_ocaml : sig ... end
val of_ocaml : ('js, 'ocaml) Type.t -> 'ocaml -> 'js
val to_ocaml : ('js, 'ocaml) Type.t -> 'js -> 'ocaml
val of_ocaml_mapper : ('a, 'b) Type.t -> ('c -> 'd -> 'e) -> 'f -> 'g -> 'h
val to_ocaml_mapper : ('a, 'b) Type.t -> ('c -> 'd -> 'e) -> 'f -> 'g -> 'h
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/index.html new file mode 100644 index 000000000..40369421f --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/index.html @@ -0,0 +1,2 @@ + +Ppxlib_ast (docs.findlib-1.ppxlib.ast.Ppxlib_ast)

Module Ppxlib_ast

module type OCaml_version = sig ... end
module Ast : sig ... end

Definition of the OCaml AST

module Ast_helper : sig ... end

Copy of Ast_helper from OCaml 4.14 with docstring related stuff removed

module Ast_magic = Astlib.Ast_500.Config
module Asttypes = Astlib.Ast_500.Asttypes
module Compiler_version : sig ... end
module Js : sig ... end
module Find_version : sig ... end
module Convert (A : sig ... end) (B : sig ... end) : sig ... end
module Extra_warnings : sig ... end
module Location_error : sig ... end
module Parse : sig ... end
module Parsetree = Astlib.Ast_500.Parsetree
module Pprintast = Astlib.Pprintast
module Select_ast (Ocaml : sig ... end) : sig ... end
module Selected_ast : sig ... end
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/module-type-OCaml_version/Ast/Config/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/module-type-OCaml_version/Ast/Config/index.html new file mode 100644 index 000000000..725dca7da --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/module-type-OCaml_version/Ast/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.ast.Ppxlib_ast.OCaml_version.Ast.Config)

Module Ast.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/module-type-OCaml_version/Ast/Parsetree/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/module-type-OCaml_version/Ast/Parsetree/index.html new file mode 100644 index 000000000..a949de37a --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/module-type-OCaml_version/Ast/Parsetree/index.html @@ -0,0 +1,2 @@ + +Parsetree (docs.findlib-1.ppxlib.ast.Ppxlib_ast.OCaml_version.Ast.Parsetree)

Module Ast.Parsetree

type structure
type signature
type toplevel_phrase
type core_type
type expression
type pattern
type case
type type_declaration
type type_extension
type extension_constructor
type class_expr
type class_field
type class_type
type class_signature
type class_type_field
type module_expr
type module_type
type signature_item
type structure_item
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/module-type-OCaml_version/Ast/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/module-type-OCaml_version/Ast/index.html new file mode 100644 index 000000000..4bf665627 --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/module-type-OCaml_version/Ast/index.html @@ -0,0 +1,2 @@ + +Ast (docs.findlib-1.ppxlib.ast.Ppxlib_ast.OCaml_version.Ast)

Module OCaml_version.Ast

Ast definition for this version

module Parsetree : sig ... end
module Config : sig ... end
diff --git a/findlib-1/ppxlib/ast/Ppxlib_ast/module-type-OCaml_version/index.html b/findlib-1/ppxlib/ast/Ppxlib_ast/module-type-OCaml_version/index.html new file mode 100644 index 000000000..cafc8117c --- /dev/null +++ b/findlib-1/ppxlib/ast/Ppxlib_ast/module-type-OCaml_version/index.html @@ -0,0 +1,21 @@ + +OCaml_version (docs.findlib-1.ppxlib.ast.Ppxlib_ast.OCaml_version)

Module type Ppxlib_ast.OCaml_version

module Ast : sig ... end

Ast definition for this version

val version : int
val string_version : string
type types = + < structure : Ast.Parsetree.structure + ; signature : Ast.Parsetree.signature + ; toplevel_phrase : Ast.Parsetree.toplevel_phrase + ; core_type : Ast.Parsetree.core_type + ; expression : Ast.Parsetree.expression + ; pattern : Ast.Parsetree.pattern + ; case : Ast.Parsetree.case + ; type_declaration : Ast.Parsetree.type_declaration + ; type_extension : Ast.Parsetree.type_extension + ; extension_constructor : Ast.Parsetree.extension_constructor + ; class_expr : Ast.Parsetree.class_expr + ; class_field : Ast.Parsetree.class_field + ; class_type : Ast.Parsetree.class_type + ; class_signature : Ast.Parsetree.class_signature + ; class_type_field : Ast.Parsetree.class_type_field + ; module_expr : Ast.Parsetree.module_expr + ; module_type : Ast.Parsetree.module_type + ; signature_item : Ast.Parsetree.signature_item + ; structure_item : Ast.Parsetree.structure_item >

Shortcut for talking about Ast types

type Ppxlib_ast__.Versions.witnesses +=
  1. | Version : types Ppxlib_ast__.Versions.witnesses

A construtor for recovering type equalities between two arbitrary versions.

val migration_info : types Ppxlib_ast__.Versions.migration_info

Information used to derive migration functions, see below

diff --git a/findlib-1/ppxlib/ast/index.html b/findlib-1/ppxlib/ast/index.html new file mode 100644 index 000000000..d754958c4 --- /dev/null +++ b/findlib-1/ppxlib/ast/index.html @@ -0,0 +1,2 @@ + +ast (docs.findlib-1.ppxlib.ast)

Package ppxlib.ast

Library ppxlib.ast

The entry point of this library is the module: Ppxlib_ast.

diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_402/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_402/Asttypes/index.html new file mode 100644 index 000000000..681e8273e --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_402/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_402.Asttypes)

Module Ast_402.Asttypes

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | Invariant
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_402/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_402/Config/index.html new file mode 100644 index 000000000..b3db5980c --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_402/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_402.Config)

Module Ast_402.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_402/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_402/Parsetree/index.html new file mode 100644 index 000000000..f61df24ca --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_402/Parsetree/index.html @@ -0,0 +1,12 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_402.Parsetree)

Module Ast_402.Parsetree

Abstract syntax tree produced by parsing

Extension points

type attribute = string Asttypes.loc * payload
and extension = string Asttypes.loc * payload
and attributes = attribute list
and payload =
  1. | PStr of structure
  2. | PTyp of core_type
  3. | PPat of pattern * expression option

Core language

and core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_attributes : attributes;
}
and core_type_desc =
  1. | Ptyp_any
  2. | Ptyp_var of string
  3. | Ptyp_arrow of Asttypes.label * core_type * core_type
  4. | Ptyp_tuple of core_type list
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
  6. | Ptyp_object of (string * attributes * core_type) list * Asttypes.closed_flag
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
  8. | Ptyp_alias of core_type * string
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
  10. | Ptyp_poly of string list * core_type
  11. | Ptyp_package of package_type
  12. | Ptyp_extension of extension
and row_field =
  1. | Rtag of Asttypes.label * attributes * bool * core_type list
  2. | Rinherit of core_type
and pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_attributes : attributes;
}
and pattern_desc =
  1. | Ppat_any
  2. | Ppat_var of string Asttypes.loc
  3. | Ppat_alias of pattern * string Asttypes.loc
  4. | Ppat_constant of Asttypes.constant
  5. | Ppat_interval of Asttypes.constant * Asttypes.constant
  6. | Ppat_tuple of pattern list
  7. | Ppat_construct of Longident.t Asttypes.loc * pattern option
  8. | Ppat_variant of Asttypes.label * pattern option
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
  10. | Ppat_array of pattern list
  11. | Ppat_or of pattern * pattern
  12. | Ppat_constraint of pattern * core_type
  13. | Ppat_type of Longident.t Asttypes.loc
  14. | Ppat_lazy of pattern
  15. | Ppat_unpack of string Asttypes.loc
  16. | Ppat_exception of pattern
  17. | Ppat_extension of extension
and expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_attributes : attributes;
}
and expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
  2. | Pexp_constant of Asttypes.constant
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
  4. | Pexp_function of case list
  5. | Pexp_fun of Asttypes.label * expression option * pattern * expression
  6. | Pexp_apply of expression * (Asttypes.label * expression) list
  7. | Pexp_match of expression * case list
  8. | Pexp_try of expression * case list
  9. | Pexp_tuple of expression list
  10. | Pexp_construct of Longident.t Asttypes.loc * expression option
  11. | Pexp_variant of Asttypes.label * expression option
  12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
  13. | Pexp_field of expression * Longident.t Asttypes.loc
  14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
  15. | Pexp_array of expression list
  16. | Pexp_ifthenelse of expression * expression * expression option
  17. | Pexp_sequence of expression * expression
  18. | Pexp_while of expression * expression
  19. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
  20. | Pexp_constraint of expression * core_type
  21. | Pexp_coerce of expression * core_type option * core_type
  22. | Pexp_send of expression * string
  23. | Pexp_new of Longident.t Asttypes.loc
  24. | Pexp_setinstvar of string Asttypes.loc * expression
  25. | Pexp_override of (string Asttypes.loc * expression) list
  26. | Pexp_letmodule of string Asttypes.loc * module_expr * expression
  27. | Pexp_assert of expression
  28. | Pexp_lazy of expression
  29. | Pexp_poly of expression * core_type option
  30. | Pexp_object of class_structure
  31. | Pexp_newtype of string * expression
  32. | Pexp_pack of module_expr
  33. | Pexp_open of Asttypes.override_flag * Longident.t Asttypes.loc * expression
  34. | Pexp_extension of extension
and case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}
and value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
  5. pval_loc : Location.t;
}
and type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * Asttypes.variance) list;
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
  6. ptype_manifest : core_type option;
  7. ptype_attributes : attributes;
  8. ptype_loc : Location.t;
}
and type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
  4. | Ptype_open
and label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
}
and constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_args : core_type list;
  3. pcd_res : core_type option;
  4. pcd_loc : Location.t;
  5. pcd_attributes : attributes;
}
and type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * Asttypes.variance) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_attributes : attributes;
}
and extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
}
and extension_constructor_kind =
  1. | Pext_decl of core_type list * core_type option
  2. | Pext_rebind of Longident.t Asttypes.loc

Class language

and class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
}
and class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcty_signature of class_signature
  3. | Pcty_arrow of Asttypes.label * core_type * class_type
  4. | Pcty_extension of extension
and class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}
and class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
}
and class_type_field_desc =
  1. | Pctf_inherit of class_type
  2. | Pctf_val of string * Asttypes.mutable_flag * Asttypes.virtual_flag * core_type
  3. | Pctf_method of string + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
  4. | Pctf_constraint of core_type * core_type
  5. | Pctf_attribute of attribute
  6. | Pctf_extension of extension
and 'a class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * Asttypes.variance) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
}
and class_description = class_type class_infos
and class_type_declaration = class_type class_infos
and class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
}
and class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcl_structure of class_structure
  3. | Pcl_fun of Asttypes.label * expression option * pattern * class_expr
  4. | Pcl_apply of class_expr * (Asttypes.label * expression) list
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
  6. | Pcl_constraint of class_expr * class_type
  7. | Pcl_extension of extension
and class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}
and class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
}
and class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string option
  2. | Pcf_val of string Asttypes.loc * Asttypes.mutable_flag * class_field_kind
  3. | Pcf_method of string Asttypes.loc * Asttypes.private_flag * class_field_kind
  4. | Pcf_constraint of core_type * core_type
  5. | Pcf_initializer of expression
  6. | Pcf_attribute of attribute
  7. | Pcf_extension of extension
and class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

and module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
}
and module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
  2. | Pmty_signature of signature
  3. | Pmty_functor of string Asttypes.loc * module_type option * module_type
  4. | Pmty_with of module_type * with_constraint list
  5. | Pmty_typeof of module_expr
  6. | Pmty_extension of extension
  7. | Pmty_alias of Longident.t Asttypes.loc
and signature = signature_item list
and signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc =
  1. | Psig_value of value_description
  2. | Psig_type of type_declaration list
  3. | Psig_typext of type_extension
  4. | Psig_exception of extension_constructor
  5. | Psig_module of module_declaration
  6. | Psig_recmodule of module_declaration list
  7. | Psig_modtype of module_type_declaration
  8. | Psig_open of open_description
  9. | Psig_include of include_description
  10. | Psig_class of class_description list
  11. | Psig_class_type of class_type_declaration list
  12. | Psig_attribute of attribute
  13. | Psig_extension of extension * attributes
and module_declaration = {
  1. pmd_name : string Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
  4. pmd_loc : Location.t;
}
and module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
  4. pmtd_loc : Location.t;
}
and open_description = {
  1. popen_lid : Longident.t Asttypes.loc;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}
and 'a include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos
and include_declaration = module_expr include_infos
and with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
  3. | Pwith_typesubst of type_declaration
  4. | Pwith_modsubst of string Asttypes.loc * Longident.t Asttypes.loc
and module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
}
and module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
  2. | Pmod_structure of structure
  3. | Pmod_functor of string Asttypes.loc * module_type option * module_expr
  4. | Pmod_apply of module_expr * module_expr
  5. | Pmod_constraint of module_expr * module_type
  6. | Pmod_unpack of expression
  7. | Pmod_extension of extension
and structure = structure_item list
and structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc =
  1. | Pstr_eval of expression * attributes
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
  3. | Pstr_primitive of value_description
  4. | Pstr_type of type_declaration list
  5. | Pstr_typext of type_extension
  6. | Pstr_exception of extension_constructor
  7. | Pstr_module of module_binding
  8. | Pstr_recmodule of module_binding list
  9. | Pstr_modtype of module_type_declaration
  10. | Pstr_open of open_description
  11. | Pstr_class of class_declaration list
  12. | Pstr_class_type of class_type_declaration list
  13. | Pstr_include of include_declaration
  14. | Pstr_attribute of attribute
  15. | Pstr_extension of extension * attributes
and value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_attributes : attributes;
  4. pvb_loc : Location.t;
}
and module_binding = {
  1. pmb_name : string Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Toplevel

type toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of string * directive_argument
and directive_argument =
  1. | Pdir_none
  2. | Pdir_string of string
  3. | Pdir_int of int
  4. | Pdir_ident of Longident.t
  5. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_402/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_402/index.html new file mode 100644 index 000000000..bafe5a423 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_402/index.html @@ -0,0 +1,2 @@ + +Ast_402 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_402)

Module Astlib.Ast_402

module Asttypes : sig ... end
module Parsetree : sig ... end

Abstract syntax tree produced by parsing

module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_403/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_403/Asttypes/index.html new file mode 100644 index 000000000..c17e6e002 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_403/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_403.Asttypes)

Module Ast_403.Asttypes

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
  3. | Optional of string
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | Invariant
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_403/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_403/Config/index.html new file mode 100644 index 000000000..827a474db --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_403/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_403.Config)

Module Ast_403.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_403/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_403/Parsetree/index.html new file mode 100644 index 000000000..236ea919d --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_403/Parsetree/index.html @@ -0,0 +1,12 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_403.Parsetree)

Module Ast_403.Parsetree

Abstract syntax tree produced by parsing

type constant =
  1. | Pconst_integer of string * char option
  2. | Pconst_char of char
  3. | Pconst_string of string * string option
  4. | Pconst_float of string * char option

Extension points

type attribute = string Asttypes.loc * payload
and extension = string Asttypes.loc * payload
and attributes = attribute list
and payload =
  1. | PStr of structure
  2. | PSig of signature
  3. | PTyp of core_type
  4. | PPat of pattern * expression option

Core language

and core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_attributes : attributes;
}
and core_type_desc =
  1. | Ptyp_any
  2. | Ptyp_var of string
  3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
  4. | Ptyp_tuple of core_type list
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
  6. | Ptyp_object of (string * attributes * core_type) list * Asttypes.closed_flag
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
  8. | Ptyp_alias of core_type * string
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
  10. | Ptyp_poly of string list * core_type
  11. | Ptyp_package of package_type
  12. | Ptyp_extension of extension
and row_field =
  1. | Rtag of Asttypes.label * attributes * bool * core_type list
  2. | Rinherit of core_type
and pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_attributes : attributes;
}
and pattern_desc =
  1. | Ppat_any
  2. | Ppat_var of string Asttypes.loc
  3. | Ppat_alias of pattern * string Asttypes.loc
  4. | Ppat_constant of constant
  5. | Ppat_interval of constant * constant
  6. | Ppat_tuple of pattern list
  7. | Ppat_construct of Longident.t Asttypes.loc * pattern option
  8. | Ppat_variant of Asttypes.label * pattern option
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
  10. | Ppat_array of pattern list
  11. | Ppat_or of pattern * pattern
  12. | Ppat_constraint of pattern * core_type
  13. | Ppat_type of Longident.t Asttypes.loc
  14. | Ppat_lazy of pattern
  15. | Ppat_unpack of string Asttypes.loc
  16. | Ppat_exception of pattern
  17. | Ppat_extension of extension
and expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_attributes : attributes;
}
and expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
  2. | Pexp_constant of constant
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
  4. | Pexp_function of case list
  5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
  6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
  7. | Pexp_match of expression * case list
  8. | Pexp_try of expression * case list
  9. | Pexp_tuple of expression list
  10. | Pexp_construct of Longident.t Asttypes.loc * expression option
  11. | Pexp_variant of Asttypes.label * expression option
  12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
  13. | Pexp_field of expression * Longident.t Asttypes.loc
  14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
  15. | Pexp_array of expression list
  16. | Pexp_ifthenelse of expression * expression * expression option
  17. | Pexp_sequence of expression * expression
  18. | Pexp_while of expression * expression
  19. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
  20. | Pexp_constraint of expression * core_type
  21. | Pexp_coerce of expression * core_type option * core_type
  22. | Pexp_send of expression * string
  23. | Pexp_new of Longident.t Asttypes.loc
  24. | Pexp_setinstvar of string Asttypes.loc * expression
  25. | Pexp_override of (string Asttypes.loc * expression) list
  26. | Pexp_letmodule of string Asttypes.loc * module_expr * expression
  27. | Pexp_assert of expression
  28. | Pexp_lazy of expression
  29. | Pexp_poly of expression * core_type option
  30. | Pexp_object of class_structure
  31. | Pexp_newtype of string * expression
  32. | Pexp_pack of module_expr
  33. | Pexp_open of Asttypes.override_flag * Longident.t Asttypes.loc * expression
  34. | Pexp_extension of extension
  35. | Pexp_unreachable
and case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}
and value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
  5. pval_loc : Location.t;
}
and type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * Asttypes.variance) list;
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
  6. ptype_manifest : core_type option;
  7. ptype_attributes : attributes;
  8. ptype_loc : Location.t;
}
and type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
  4. | Ptype_open
and label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
}
and constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_args : constructor_arguments;
  3. pcd_res : core_type option;
  4. pcd_loc : Location.t;
  5. pcd_attributes : attributes;
}
and constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
and type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * Asttypes.variance) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_attributes : attributes;
}
and extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
}
and extension_constructor_kind =
  1. | Pext_decl of constructor_arguments * core_type option
  2. | Pext_rebind of Longident.t Asttypes.loc

Class language

and class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
}
and class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcty_signature of class_signature
  3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
  4. | Pcty_extension of extension
and class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}
and class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
}
and class_type_field_desc =
  1. | Pctf_inherit of class_type
  2. | Pctf_val of string * Asttypes.mutable_flag * Asttypes.virtual_flag * core_type
  3. | Pctf_method of string + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
  4. | Pctf_constraint of core_type * core_type
  5. | Pctf_attribute of attribute
  6. | Pctf_extension of extension
and 'a class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * Asttypes.variance) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
}
and class_description = class_type class_infos
and class_type_declaration = class_type class_infos
and class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
}
and class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcl_structure of class_structure
  3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
  4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
  6. | Pcl_constraint of class_expr * class_type
  7. | Pcl_extension of extension
and class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}
and class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
}
and class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string option
  2. | Pcf_val of string Asttypes.loc * Asttypes.mutable_flag * class_field_kind
  3. | Pcf_method of string Asttypes.loc * Asttypes.private_flag * class_field_kind
  4. | Pcf_constraint of core_type * core_type
  5. | Pcf_initializer of expression
  6. | Pcf_attribute of attribute
  7. | Pcf_extension of extension
and class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

and module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
}
and module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
  2. | Pmty_signature of signature
  3. | Pmty_functor of string Asttypes.loc * module_type option * module_type
  4. | Pmty_with of module_type * with_constraint list
  5. | Pmty_typeof of module_expr
  6. | Pmty_extension of extension
  7. | Pmty_alias of Longident.t Asttypes.loc
and signature = signature_item list
and signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc =
  1. | Psig_value of value_description
  2. | Psig_type of Asttypes.rec_flag * type_declaration list
  3. | Psig_typext of type_extension
  4. | Psig_exception of extension_constructor
  5. | Psig_module of module_declaration
  6. | Psig_recmodule of module_declaration list
  7. | Psig_modtype of module_type_declaration
  8. | Psig_open of open_description
  9. | Psig_include of include_description
  10. | Psig_class of class_description list
  11. | Psig_class_type of class_type_declaration list
  12. | Psig_attribute of attribute
  13. | Psig_extension of extension * attributes
and module_declaration = {
  1. pmd_name : string Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
  4. pmd_loc : Location.t;
}
and module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
  4. pmtd_loc : Location.t;
}
and open_description = {
  1. popen_lid : Longident.t Asttypes.loc;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}
and 'a include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos
and include_declaration = module_expr include_infos
and with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
  3. | Pwith_typesubst of type_declaration
  4. | Pwith_modsubst of string Asttypes.loc * Longident.t Asttypes.loc
and module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
}
and module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
  2. | Pmod_structure of structure
  3. | Pmod_functor of string Asttypes.loc * module_type option * module_expr
  4. | Pmod_apply of module_expr * module_expr
  5. | Pmod_constraint of module_expr * module_type
  6. | Pmod_unpack of expression
  7. | Pmod_extension of extension
and structure = structure_item list
and structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc =
  1. | Pstr_eval of expression * attributes
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
  3. | Pstr_primitive of value_description
  4. | Pstr_type of Asttypes.rec_flag * type_declaration list
  5. | Pstr_typext of type_extension
  6. | Pstr_exception of extension_constructor
  7. | Pstr_module of module_binding
  8. | Pstr_recmodule of module_binding list
  9. | Pstr_modtype of module_type_declaration
  10. | Pstr_open of open_description
  11. | Pstr_class of class_declaration list
  12. | Pstr_class_type of class_type_declaration list
  13. | Pstr_include of include_declaration
  14. | Pstr_attribute of attribute
  15. | Pstr_extension of extension * attributes
and value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_attributes : attributes;
  4. pvb_loc : Location.t;
}
and module_binding = {
  1. pmb_name : string Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Toplevel

type toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of string * directive_argument
and directive_argument =
  1. | Pdir_none
  2. | Pdir_string of string
  3. | Pdir_int of string * char option
  4. | Pdir_ident of Longident.t
  5. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_403/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_403/index.html new file mode 100644 index 000000000..529932d1e --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_403/index.html @@ -0,0 +1,2 @@ + +Ast_403 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_403)

Module Astlib.Ast_403

module Asttypes : sig ... end
module Parsetree : sig ... end

Abstract syntax tree produced by parsing

module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_404/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_404/Asttypes/index.html new file mode 100644 index 000000000..9d226faa3 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_404/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_404.Asttypes)

Module Ast_404.Asttypes

Auxiliary AST types used by parsetree and typedtree.

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
  3. | Optional of string
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | Invariant
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_404/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_404/Config/index.html new file mode 100644 index 000000000..6d3e8fd6f --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_404/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_404.Config)

Module Ast_404.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_404/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_404/Parsetree/index.html new file mode 100644 index 000000000..05cc3483c --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_404/Parsetree/index.html @@ -0,0 +1,12 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_404.Parsetree)

Module Ast_404.Parsetree

Abstract syntax tree produced by parsing

type constant =
  1. | Pconst_integer of string * char option
  2. | Pconst_char of char
  3. | Pconst_string of string * string option
  4. | Pconst_float of string * char option

Extension points

type attribute = string Asttypes.loc * payload
and extension = string Asttypes.loc * payload
and attributes = attribute list
and payload =
  1. | PStr of structure
  2. | PSig of signature
  3. | PTyp of core_type
  4. | PPat of pattern * expression option

Core language

and core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_attributes : attributes;
}
and core_type_desc =
  1. | Ptyp_any
  2. | Ptyp_var of string
  3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
  4. | Ptyp_tuple of core_type list
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
  6. | Ptyp_object of (string * attributes * core_type) list * Asttypes.closed_flag
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
  8. | Ptyp_alias of core_type * string
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
  10. | Ptyp_poly of string list * core_type
  11. | Ptyp_package of package_type
  12. | Ptyp_extension of extension
and row_field =
  1. | Rtag of Asttypes.label * attributes * bool * core_type list
  2. | Rinherit of core_type
and pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_attributes : attributes;
}
and pattern_desc =
  1. | Ppat_any
  2. | Ppat_var of string Asttypes.loc
  3. | Ppat_alias of pattern * string Asttypes.loc
  4. | Ppat_constant of constant
  5. | Ppat_interval of constant * constant
  6. | Ppat_tuple of pattern list
  7. | Ppat_construct of Longident.t Asttypes.loc * pattern option
  8. | Ppat_variant of Asttypes.label * pattern option
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
  10. | Ppat_array of pattern list
  11. | Ppat_or of pattern * pattern
  12. | Ppat_constraint of pattern * core_type
  13. | Ppat_type of Longident.t Asttypes.loc
  14. | Ppat_lazy of pattern
  15. | Ppat_unpack of string Asttypes.loc
  16. | Ppat_exception of pattern
  17. | Ppat_extension of extension
  18. | Ppat_open of Longident.t Asttypes.loc * pattern
and expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_attributes : attributes;
}
and expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
  2. | Pexp_constant of constant
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
  4. | Pexp_function of case list
  5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
  6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
  7. | Pexp_match of expression * case list
  8. | Pexp_try of expression * case list
  9. | Pexp_tuple of expression list
  10. | Pexp_construct of Longident.t Asttypes.loc * expression option
  11. | Pexp_variant of Asttypes.label * expression option
  12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
  13. | Pexp_field of expression * Longident.t Asttypes.loc
  14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
  15. | Pexp_array of expression list
  16. | Pexp_ifthenelse of expression * expression * expression option
  17. | Pexp_sequence of expression * expression
  18. | Pexp_while of expression * expression
  19. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
  20. | Pexp_constraint of expression * core_type
  21. | Pexp_coerce of expression * core_type option * core_type
  22. | Pexp_send of expression * string
  23. | Pexp_new of Longident.t Asttypes.loc
  24. | Pexp_setinstvar of string Asttypes.loc * expression
  25. | Pexp_override of (string Asttypes.loc * expression) list
  26. | Pexp_letmodule of string Asttypes.loc * module_expr * expression
  27. | Pexp_letexception of extension_constructor * expression
  28. | Pexp_assert of expression
  29. | Pexp_lazy of expression
  30. | Pexp_poly of expression * core_type option
  31. | Pexp_object of class_structure
  32. | Pexp_newtype of string * expression
  33. | Pexp_pack of module_expr
  34. | Pexp_open of Asttypes.override_flag * Longident.t Asttypes.loc * expression
  35. | Pexp_extension of extension
  36. | Pexp_unreachable
and case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}
and value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
  5. pval_loc : Location.t;
}
and type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * Asttypes.variance) list;
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
  6. ptype_manifest : core_type option;
  7. ptype_attributes : attributes;
  8. ptype_loc : Location.t;
}
and type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
  4. | Ptype_open
and label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
}
and constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_args : constructor_arguments;
  3. pcd_res : core_type option;
  4. pcd_loc : Location.t;
  5. pcd_attributes : attributes;
}
and constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
and type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * Asttypes.variance) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_attributes : attributes;
}
and extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
}
and extension_constructor_kind =
  1. | Pext_decl of constructor_arguments * core_type option
  2. | Pext_rebind of Longident.t Asttypes.loc

Class language

and class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
}
and class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcty_signature of class_signature
  3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
  4. | Pcty_extension of extension
and class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}
and class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
}
and class_type_field_desc =
  1. | Pctf_inherit of class_type
  2. | Pctf_val of string * Asttypes.mutable_flag * Asttypes.virtual_flag * core_type
  3. | Pctf_method of string + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
  4. | Pctf_constraint of core_type * core_type
  5. | Pctf_attribute of attribute
  6. | Pctf_extension of extension
and 'a class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * Asttypes.variance) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
}
and class_description = class_type class_infos
and class_type_declaration = class_type class_infos
and class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
}
and class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcl_structure of class_structure
  3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
  4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
  6. | Pcl_constraint of class_expr * class_type
  7. | Pcl_extension of extension
and class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}
and class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
}
and class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string option
  2. | Pcf_val of string Asttypes.loc * Asttypes.mutable_flag * class_field_kind
  3. | Pcf_method of string Asttypes.loc * Asttypes.private_flag * class_field_kind
  4. | Pcf_constraint of core_type * core_type
  5. | Pcf_initializer of expression
  6. | Pcf_attribute of attribute
  7. | Pcf_extension of extension
and class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

and module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
}
and module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
  2. | Pmty_signature of signature
  3. | Pmty_functor of string Asttypes.loc * module_type option * module_type
  4. | Pmty_with of module_type * with_constraint list
  5. | Pmty_typeof of module_expr
  6. | Pmty_extension of extension
  7. | Pmty_alias of Longident.t Asttypes.loc
and signature = signature_item list
and signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc =
  1. | Psig_value of value_description
  2. | Psig_type of Asttypes.rec_flag * type_declaration list
  3. | Psig_typext of type_extension
  4. | Psig_exception of extension_constructor
  5. | Psig_module of module_declaration
  6. | Psig_recmodule of module_declaration list
  7. | Psig_modtype of module_type_declaration
  8. | Psig_open of open_description
  9. | Psig_include of include_description
  10. | Psig_class of class_description list
  11. | Psig_class_type of class_type_declaration list
  12. | Psig_attribute of attribute
  13. | Psig_extension of extension * attributes
and module_declaration = {
  1. pmd_name : string Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
  4. pmd_loc : Location.t;
}
and module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
  4. pmtd_loc : Location.t;
}
and open_description = {
  1. popen_lid : Longident.t Asttypes.loc;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}
and 'a include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos
and include_declaration = module_expr include_infos
and with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
  3. | Pwith_typesubst of type_declaration
  4. | Pwith_modsubst of string Asttypes.loc * Longident.t Asttypes.loc
and module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
}
and module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
  2. | Pmod_structure of structure
  3. | Pmod_functor of string Asttypes.loc * module_type option * module_expr
  4. | Pmod_apply of module_expr * module_expr
  5. | Pmod_constraint of module_expr * module_type
  6. | Pmod_unpack of expression
  7. | Pmod_extension of extension
and structure = structure_item list
and structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc =
  1. | Pstr_eval of expression * attributes
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
  3. | Pstr_primitive of value_description
  4. | Pstr_type of Asttypes.rec_flag * type_declaration list
  5. | Pstr_typext of type_extension
  6. | Pstr_exception of extension_constructor
  7. | Pstr_module of module_binding
  8. | Pstr_recmodule of module_binding list
  9. | Pstr_modtype of module_type_declaration
  10. | Pstr_open of open_description
  11. | Pstr_class of class_declaration list
  12. | Pstr_class_type of class_type_declaration list
  13. | Pstr_include of include_declaration
  14. | Pstr_attribute of attribute
  15. | Pstr_extension of extension * attributes
and value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_attributes : attributes;
  4. pvb_loc : Location.t;
}
and module_binding = {
  1. pmb_name : string Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Toplevel

type toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of string * directive_argument
and directive_argument =
  1. | Pdir_none
  2. | Pdir_string of string
  3. | Pdir_int of string * char option
  4. | Pdir_ident of Longident.t
  5. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_404/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_404/index.html new file mode 100644 index 000000000..d59b77e02 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_404/index.html @@ -0,0 +1,2 @@ + +Ast_404 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_404)

Module Astlib.Ast_404

module Asttypes : sig ... end

Auxiliary AST types used by parsetree and typedtree.

module Parsetree : sig ... end

Abstract syntax tree produced by parsing

module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_405/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_405/Asttypes/index.html new file mode 100644 index 000000000..4212e3885 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_405/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_405.Asttypes)

Module Ast_405.Asttypes

Auxiliary AST types used by parsetree and typedtree.

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
  3. | Optional of string
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | Invariant
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_405/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_405/Config/index.html new file mode 100644 index 000000000..9817705ee --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_405/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_405.Config)

Module Ast_405.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_405/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_405/Parsetree/index.html new file mode 100644 index 000000000..657bd81df --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_405/Parsetree/index.html @@ -0,0 +1,16 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_405.Parsetree)

Module Ast_405.Parsetree

Abstract syntax tree produced by parsing

type constant =
  1. | Pconst_integer of string * char option
  2. | Pconst_char of char
  3. | Pconst_string of string * string option
  4. | Pconst_float of string * char option

Extension points

type attribute = string Asttypes.loc * payload
and extension = string Asttypes.loc * payload
and attributes = attribute list
and payload =
  1. | PStr of structure
  2. | PSig of signature
  3. | PTyp of core_type
  4. | PPat of pattern * expression option

Core language

and core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_attributes : attributes;
}
and core_type_desc =
  1. | Ptyp_any
  2. | Ptyp_var of string
  3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
  4. | Ptyp_tuple of core_type list
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
  6. | Ptyp_object of (string Asttypes.loc * attributes * core_type) list + * Asttypes.closed_flag
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
  8. | Ptyp_alias of core_type * string
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
  10. | Ptyp_poly of string Asttypes.loc list * core_type
  11. | Ptyp_package of package_type
  12. | Ptyp_extension of extension
and row_field =
  1. | Rtag of Asttypes.label * attributes * bool * core_type list
  2. | Rinherit of core_type
and pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_attributes : attributes;
}
and pattern_desc =
  1. | Ppat_any
  2. | Ppat_var of string Asttypes.loc
  3. | Ppat_alias of pattern * string Asttypes.loc
  4. | Ppat_constant of constant
  5. | Ppat_interval of constant * constant
  6. | Ppat_tuple of pattern list
  7. | Ppat_construct of Longident.t Asttypes.loc * pattern option
  8. | Ppat_variant of Asttypes.label * pattern option
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
  10. | Ppat_array of pattern list
  11. | Ppat_or of pattern * pattern
  12. | Ppat_constraint of pattern * core_type
  13. | Ppat_type of Longident.t Asttypes.loc
  14. | Ppat_lazy of pattern
  15. | Ppat_unpack of string Asttypes.loc
  16. | Ppat_exception of pattern
  17. | Ppat_extension of extension
  18. | Ppat_open of Longident.t Asttypes.loc * pattern
and expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_attributes : attributes;
}
and expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
  2. | Pexp_constant of constant
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
  4. | Pexp_function of case list
  5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
  6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
  7. | Pexp_match of expression * case list
  8. | Pexp_try of expression * case list
  9. | Pexp_tuple of expression list
  10. | Pexp_construct of Longident.t Asttypes.loc * expression option
  11. | Pexp_variant of Asttypes.label * expression option
  12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
  13. | Pexp_field of expression * Longident.t Asttypes.loc
  14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
  15. | Pexp_array of expression list
  16. | Pexp_ifthenelse of expression * expression * expression option
  17. | Pexp_sequence of expression * expression
  18. | Pexp_while of expression * expression
  19. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
  20. | Pexp_constraint of expression * core_type
  21. | Pexp_coerce of expression * core_type option * core_type
  22. | Pexp_send of expression * string Asttypes.loc
  23. | Pexp_new of Longident.t Asttypes.loc
  24. | Pexp_setinstvar of string Asttypes.loc * expression
  25. | Pexp_override of (string Asttypes.loc * expression) list
  26. | Pexp_letmodule of string Asttypes.loc * module_expr * expression
  27. | Pexp_letexception of extension_constructor * expression
  28. | Pexp_assert of expression
  29. | Pexp_lazy of expression
  30. | Pexp_poly of expression * core_type option
  31. | Pexp_object of class_structure
  32. | Pexp_newtype of string Asttypes.loc * expression
  33. | Pexp_pack of module_expr
  34. | Pexp_open of Asttypes.override_flag * Longident.t Asttypes.loc * expression
  35. | Pexp_extension of extension
  36. | Pexp_unreachable
and case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}
and value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
  5. pval_loc : Location.t;
}
and type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * Asttypes.variance) list;
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
  6. ptype_manifest : core_type option;
  7. ptype_attributes : attributes;
  8. ptype_loc : Location.t;
}
and type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
  4. | Ptype_open
and label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
}
and constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_args : constructor_arguments;
  3. pcd_res : core_type option;
  4. pcd_loc : Location.t;
  5. pcd_attributes : attributes;
}
and constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
and type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * Asttypes.variance) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_attributes : attributes;
}
and extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
}
and extension_constructor_kind =
  1. | Pext_decl of constructor_arguments * core_type option
  2. | Pext_rebind of Longident.t Asttypes.loc

Class language

and class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
}
and class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcty_signature of class_signature
  3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
  4. | Pcty_extension of extension
and class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}
and class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
}
and class_type_field_desc =
  1. | Pctf_inherit of class_type
  2. | Pctf_val of string Asttypes.loc + * Asttypes.mutable_flag + * Asttypes.virtual_flag + * core_type
  3. | Pctf_method of string Asttypes.loc + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
  4. | Pctf_constraint of core_type * core_type
  5. | Pctf_attribute of attribute
  6. | Pctf_extension of extension
and 'a class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * Asttypes.variance) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
}
and class_description = class_type class_infos
and class_type_declaration = class_type class_infos
and class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
}
and class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcl_structure of class_structure
  3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
  4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
  6. | Pcl_constraint of class_expr * class_type
  7. | Pcl_extension of extension
and class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}
and class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
}
and class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
  2. | Pcf_val of string Asttypes.loc * Asttypes.mutable_flag * class_field_kind
  3. | Pcf_method of string Asttypes.loc * Asttypes.private_flag * class_field_kind
  4. | Pcf_constraint of core_type * core_type
  5. | Pcf_initializer of expression
  6. | Pcf_attribute of attribute
  7. | Pcf_extension of extension
and class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

and module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
}
and module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
  2. | Pmty_signature of signature
  3. | Pmty_functor of string Asttypes.loc * module_type option * module_type
  4. | Pmty_with of module_type * with_constraint list
  5. | Pmty_typeof of module_expr
  6. | Pmty_extension of extension
  7. | Pmty_alias of Longident.t Asttypes.loc
and signature = signature_item list
and signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc =
  1. | Psig_value of value_description
  2. | Psig_type of Asttypes.rec_flag * type_declaration list
  3. | Psig_typext of type_extension
  4. | Psig_exception of extension_constructor
  5. | Psig_module of module_declaration
  6. | Psig_recmodule of module_declaration list
  7. | Psig_modtype of module_type_declaration
  8. | Psig_open of open_description
  9. | Psig_include of include_description
  10. | Psig_class of class_description list
  11. | Psig_class_type of class_type_declaration list
  12. | Psig_attribute of attribute
  13. | Psig_extension of extension * attributes
and module_declaration = {
  1. pmd_name : string Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
  4. pmd_loc : Location.t;
}
and module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
  4. pmtd_loc : Location.t;
}
and open_description = {
  1. popen_lid : Longident.t Asttypes.loc;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}
and 'a include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos
and include_declaration = module_expr include_infos
and with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
  3. | Pwith_typesubst of type_declaration
  4. | Pwith_modsubst of string Asttypes.loc * Longident.t Asttypes.loc
and module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
}
and module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
  2. | Pmod_structure of structure
  3. | Pmod_functor of string Asttypes.loc * module_type option * module_expr
  4. | Pmod_apply of module_expr * module_expr
  5. | Pmod_constraint of module_expr * module_type
  6. | Pmod_unpack of expression
  7. | Pmod_extension of extension
and structure = structure_item list
and structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc =
  1. | Pstr_eval of expression * attributes
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
  3. | Pstr_primitive of value_description
  4. | Pstr_type of Asttypes.rec_flag * type_declaration list
  5. | Pstr_typext of type_extension
  6. | Pstr_exception of extension_constructor
  7. | Pstr_module of module_binding
  8. | Pstr_recmodule of module_binding list
  9. | Pstr_modtype of module_type_declaration
  10. | Pstr_open of open_description
  11. | Pstr_class of class_declaration list
  12. | Pstr_class_type of class_type_declaration list
  13. | Pstr_include of include_declaration
  14. | Pstr_attribute of attribute
  15. | Pstr_extension of extension * attributes
and value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_attributes : attributes;
  4. pvb_loc : Location.t;
}
and module_binding = {
  1. pmb_name : string Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Toplevel

type toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of string * directive_argument
and directive_argument =
  1. | Pdir_none
  2. | Pdir_string of string
  3. | Pdir_int of string * char option
  4. | Pdir_ident of Longident.t
  5. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_405/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_405/index.html new file mode 100644 index 000000000..70caefa60 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_405/index.html @@ -0,0 +1,2 @@ + +Ast_405 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_405)

Module Astlib.Ast_405

module Asttypes : sig ... end

Auxiliary AST types used by parsetree and typedtree.

module Parsetree : sig ... end

Abstract syntax tree produced by parsing

module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_406/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_406/Asttypes/index.html new file mode 100644 index 000000000..4d4bfd301 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_406/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_406.Asttypes)

Module Ast_406.Asttypes

Auxiliary AST types used by parsetree and typedtree.

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
  3. | Optional of string
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | Invariant
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_406/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_406/Config/index.html new file mode 100644 index 000000000..f4157ac25 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_406/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_406.Config)

Module Ast_406.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_406/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_406/Parsetree/index.html new file mode 100644 index 000000000..68a66923e --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_406/Parsetree/index.html @@ -0,0 +1,19 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_406.Parsetree)

Module Ast_406.Parsetree

Abstract syntax tree produced by parsing

type constant =
  1. | Pconst_integer of string * char option
  2. | Pconst_char of char
  3. | Pconst_string of string * string option
  4. | Pconst_float of string * char option

Extension points

type attribute = string Asttypes.loc * payload
and extension = string Asttypes.loc * payload
and attributes = attribute list
and payload =
  1. | PStr of structure
  2. | PSig of signature
  3. | PTyp of core_type
  4. | PPat of pattern * expression option

Core language

and core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_attributes : attributes;
}
and core_type_desc =
  1. | Ptyp_any
  2. | Ptyp_var of string
  3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
  4. | Ptyp_tuple of core_type list
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
  6. | Ptyp_object of object_field list * Asttypes.closed_flag
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
  8. | Ptyp_alias of core_type * string
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
  10. | Ptyp_poly of string Asttypes.loc list * core_type
  11. | Ptyp_package of package_type
  12. | Ptyp_extension of extension
and row_field =
  1. | Rtag of Asttypes.label Asttypes.loc * attributes * bool * core_type list
  2. | Rinherit of core_type
and object_field =
  1. | Otag of Asttypes.label Asttypes.loc * attributes * core_type
  2. | Oinherit of core_type
and pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_attributes : attributes;
}
and pattern_desc =
  1. | Ppat_any
  2. | Ppat_var of string Asttypes.loc
  3. | Ppat_alias of pattern * string Asttypes.loc
  4. | Ppat_constant of constant
  5. | Ppat_interval of constant * constant
  6. | Ppat_tuple of pattern list
  7. | Ppat_construct of Longident.t Asttypes.loc * pattern option
  8. | Ppat_variant of Asttypes.label * pattern option
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
  10. | Ppat_array of pattern list
  11. | Ppat_or of pattern * pattern
  12. | Ppat_constraint of pattern * core_type
  13. | Ppat_type of Longident.t Asttypes.loc
  14. | Ppat_lazy of pattern
  15. | Ppat_unpack of string Asttypes.loc
  16. | Ppat_exception of pattern
  17. | Ppat_extension of extension
  18. | Ppat_open of Longident.t Asttypes.loc * pattern
and expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_attributes : attributes;
}
and expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
  2. | Pexp_constant of constant
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
  4. | Pexp_function of case list
  5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
  6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
  7. | Pexp_match of expression * case list
  8. | Pexp_try of expression * case list
  9. | Pexp_tuple of expression list
  10. | Pexp_construct of Longident.t Asttypes.loc * expression option
  11. | Pexp_variant of Asttypes.label * expression option
  12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
  13. | Pexp_field of expression * Longident.t Asttypes.loc
  14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
  15. | Pexp_array of expression list
  16. | Pexp_ifthenelse of expression * expression * expression option
  17. | Pexp_sequence of expression * expression
  18. | Pexp_while of expression * expression
  19. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
  20. | Pexp_constraint of expression * core_type
  21. | Pexp_coerce of expression * core_type option * core_type
  22. | Pexp_send of expression * Asttypes.label Asttypes.loc
  23. | Pexp_new of Longident.t Asttypes.loc
  24. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
  25. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
  26. | Pexp_letmodule of string Asttypes.loc * module_expr * expression
  27. | Pexp_letexception of extension_constructor * expression
  28. | Pexp_assert of expression
  29. | Pexp_lazy of expression
  30. | Pexp_poly of expression * core_type option
  31. | Pexp_object of class_structure
  32. | Pexp_newtype of string Asttypes.loc * expression
  33. | Pexp_pack of module_expr
  34. | Pexp_open of Asttypes.override_flag * Longident.t Asttypes.loc * expression
  35. | Pexp_extension of extension
  36. | Pexp_unreachable
and case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}
and value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
  5. pval_loc : Location.t;
}
and type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * Asttypes.variance) list;
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
  6. ptype_manifest : core_type option;
  7. ptype_attributes : attributes;
  8. ptype_loc : Location.t;
}
and type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
  4. | Ptype_open
and label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
}
and constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_args : constructor_arguments;
  3. pcd_res : core_type option;
  4. pcd_loc : Location.t;
  5. pcd_attributes : attributes;
}
and constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
and type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * Asttypes.variance) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_attributes : attributes;
}
and extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
}
and extension_constructor_kind =
  1. | Pext_decl of constructor_arguments * core_type option
  2. | Pext_rebind of Longident.t Asttypes.loc

Class language

and class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
}
and class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcty_signature of class_signature
  3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
  4. | Pcty_extension of extension
  5. | Pcty_open of Asttypes.override_flag * Longident.t Asttypes.loc * class_type
and class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}
and class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
}
and class_type_field_desc =
  1. | Pctf_inherit of class_type
  2. | Pctf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * Asttypes.virtual_flag + * core_type
  3. | Pctf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
  4. | Pctf_constraint of core_type * core_type
  5. | Pctf_attribute of attribute
  6. | Pctf_extension of extension
and 'a class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * Asttypes.variance) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
}
and class_description = class_type class_infos
and class_type_declaration = class_type class_infos
and class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
}
and class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcl_structure of class_structure
  3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
  4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
  6. | Pcl_constraint of class_expr * class_type
  7. | Pcl_extension of extension
  8. | Pcl_open of Asttypes.override_flag * Longident.t Asttypes.loc * class_expr
and class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}
and class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
}
and class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
  2. | Pcf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * class_field_kind
  3. | Pcf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * class_field_kind
  4. | Pcf_constraint of core_type * core_type
  5. | Pcf_initializer of expression
  6. | Pcf_attribute of attribute
  7. | Pcf_extension of extension
and class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

and module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
}
and module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
  2. | Pmty_signature of signature
  3. | Pmty_functor of string Asttypes.loc * module_type option * module_type
  4. | Pmty_with of module_type * with_constraint list
  5. | Pmty_typeof of module_expr
  6. | Pmty_extension of extension
  7. | Pmty_alias of Longident.t Asttypes.loc
and signature = signature_item list
and signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc =
  1. | Psig_value of value_description
  2. | Psig_type of Asttypes.rec_flag * type_declaration list
  3. | Psig_typext of type_extension
  4. | Psig_exception of extension_constructor
  5. | Psig_module of module_declaration
  6. | Psig_recmodule of module_declaration list
  7. | Psig_modtype of module_type_declaration
  8. | Psig_open of open_description
  9. | Psig_include of include_description
  10. | Psig_class of class_description list
  11. | Psig_class_type of class_type_declaration list
  12. | Psig_attribute of attribute
  13. | Psig_extension of extension * attributes
and module_declaration = {
  1. pmd_name : string Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
  4. pmd_loc : Location.t;
}
and module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
  4. pmtd_loc : Location.t;
}
and open_description = {
  1. popen_lid : Longident.t Asttypes.loc;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}
and 'a include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos
and include_declaration = module_expr include_infos
and with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
  3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
  4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
and module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
}
and module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
  2. | Pmod_structure of structure
  3. | Pmod_functor of string Asttypes.loc * module_type option * module_expr
  4. | Pmod_apply of module_expr * module_expr
  5. | Pmod_constraint of module_expr * module_type
  6. | Pmod_unpack of expression
  7. | Pmod_extension of extension
and structure = structure_item list
and structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc =
  1. | Pstr_eval of expression * attributes
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
  3. | Pstr_primitive of value_description
  4. | Pstr_type of Asttypes.rec_flag * type_declaration list
  5. | Pstr_typext of type_extension
  6. | Pstr_exception of extension_constructor
  7. | Pstr_module of module_binding
  8. | Pstr_recmodule of module_binding list
  9. | Pstr_modtype of module_type_declaration
  10. | Pstr_open of open_description
  11. | Pstr_class of class_declaration list
  12. | Pstr_class_type of class_type_declaration list
  13. | Pstr_include of include_declaration
  14. | Pstr_attribute of attribute
  15. | Pstr_extension of extension * attributes
and value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_attributes : attributes;
  4. pvb_loc : Location.t;
}
and module_binding = {
  1. pmb_name : string Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Toplevel

type toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of string * directive_argument
and directive_argument =
  1. | Pdir_none
  2. | Pdir_string of string
  3. | Pdir_int of string * char option
  4. | Pdir_ident of Longident.t
  5. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_406/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_406/index.html new file mode 100644 index 000000000..84b41ed20 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_406/index.html @@ -0,0 +1,2 @@ + +Ast_406 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_406)

Module Astlib.Ast_406

module Asttypes : sig ... end

Auxiliary AST types used by parsetree and typedtree.

module Parsetree : sig ... end

Abstract syntax tree produced by parsing

module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_407/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_407/Asttypes/index.html new file mode 100644 index 000000000..a422e8c16 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_407/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_407.Asttypes)

Module Ast_407.Asttypes

Auxiliary AST types used by parsetree and typedtree.

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
  3. | Optional of string
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | Invariant
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_407/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_407/Config/index.html new file mode 100644 index 000000000..74d0a14f0 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_407/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_407.Config)

Module Ast_407.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_407/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_407/Parsetree/index.html new file mode 100644 index 000000000..3cd6d4a94 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_407/Parsetree/index.html @@ -0,0 +1,19 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_407.Parsetree)

Module Ast_407.Parsetree

Abstract syntax tree produced by parsing

type constant =
  1. | Pconst_integer of string * char option
  2. | Pconst_char of char
  3. | Pconst_string of string * string option
  4. | Pconst_float of string * char option

Extension points

type attribute = string Asttypes.loc * payload
and extension = string Asttypes.loc * payload
and attributes = attribute list
and payload =
  1. | PStr of structure
  2. | PSig of signature
  3. | PTyp of core_type
  4. | PPat of pattern * expression option

Core language

and core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_attributes : attributes;
}
and core_type_desc =
  1. | Ptyp_any
  2. | Ptyp_var of string
  3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
  4. | Ptyp_tuple of core_type list
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
  6. | Ptyp_object of object_field list * Asttypes.closed_flag
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
  8. | Ptyp_alias of core_type * string
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
  10. | Ptyp_poly of string Asttypes.loc list * core_type
  11. | Ptyp_package of package_type
  12. | Ptyp_extension of extension
and row_field =
  1. | Rtag of Asttypes.label Asttypes.loc * attributes * bool * core_type list
  2. | Rinherit of core_type
and object_field =
  1. | Otag of Asttypes.label Asttypes.loc * attributes * core_type
  2. | Oinherit of core_type
and pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_attributes : attributes;
}
and pattern_desc =
  1. | Ppat_any
  2. | Ppat_var of string Asttypes.loc
  3. | Ppat_alias of pattern * string Asttypes.loc
  4. | Ppat_constant of constant
  5. | Ppat_interval of constant * constant
  6. | Ppat_tuple of pattern list
  7. | Ppat_construct of Longident.t Asttypes.loc * pattern option
  8. | Ppat_variant of Asttypes.label * pattern option
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
  10. | Ppat_array of pattern list
  11. | Ppat_or of pattern * pattern
  12. | Ppat_constraint of pattern * core_type
  13. | Ppat_type of Longident.t Asttypes.loc
  14. | Ppat_lazy of pattern
  15. | Ppat_unpack of string Asttypes.loc
  16. | Ppat_exception of pattern
  17. | Ppat_extension of extension
  18. | Ppat_open of Longident.t Asttypes.loc * pattern
and expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_attributes : attributes;
}
and expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
  2. | Pexp_constant of constant
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
  4. | Pexp_function of case list
  5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
  6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
  7. | Pexp_match of expression * case list
  8. | Pexp_try of expression * case list
  9. | Pexp_tuple of expression list
  10. | Pexp_construct of Longident.t Asttypes.loc * expression option
  11. | Pexp_variant of Asttypes.label * expression option
  12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
  13. | Pexp_field of expression * Longident.t Asttypes.loc
  14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
  15. | Pexp_array of expression list
  16. | Pexp_ifthenelse of expression * expression * expression option
  17. | Pexp_sequence of expression * expression
  18. | Pexp_while of expression * expression
  19. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
  20. | Pexp_constraint of expression * core_type
  21. | Pexp_coerce of expression * core_type option * core_type
  22. | Pexp_send of expression * Asttypes.label Asttypes.loc
  23. | Pexp_new of Longident.t Asttypes.loc
  24. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
  25. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
  26. | Pexp_letmodule of string Asttypes.loc * module_expr * expression
  27. | Pexp_letexception of extension_constructor * expression
  28. | Pexp_assert of expression
  29. | Pexp_lazy of expression
  30. | Pexp_poly of expression * core_type option
  31. | Pexp_object of class_structure
  32. | Pexp_newtype of string Asttypes.loc * expression
  33. | Pexp_pack of module_expr
  34. | Pexp_open of Asttypes.override_flag * Longident.t Asttypes.loc * expression
  35. | Pexp_extension of extension
  36. | Pexp_unreachable
and case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}
and value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
  5. pval_loc : Location.t;
}
and type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * Asttypes.variance) list;
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
  6. ptype_manifest : core_type option;
  7. ptype_attributes : attributes;
  8. ptype_loc : Location.t;
}
and type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
  4. | Ptype_open
and label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
}
and constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_args : constructor_arguments;
  3. pcd_res : core_type option;
  4. pcd_loc : Location.t;
  5. pcd_attributes : attributes;
}
and constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
and type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * Asttypes.variance) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_attributes : attributes;
}
and extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
}
and extension_constructor_kind =
  1. | Pext_decl of constructor_arguments * core_type option
  2. | Pext_rebind of Longident.t Asttypes.loc

Class language

and class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
}
and class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcty_signature of class_signature
  3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
  4. | Pcty_extension of extension
  5. | Pcty_open of Asttypes.override_flag * Longident.t Asttypes.loc * class_type
and class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}
and class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
}
and class_type_field_desc =
  1. | Pctf_inherit of class_type
  2. | Pctf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * Asttypes.virtual_flag + * core_type
  3. | Pctf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
  4. | Pctf_constraint of core_type * core_type
  5. | Pctf_attribute of attribute
  6. | Pctf_extension of extension
and 'a class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * Asttypes.variance) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
}
and class_description = class_type class_infos
and class_type_declaration = class_type class_infos
and class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
}
and class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcl_structure of class_structure
  3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
  4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
  6. | Pcl_constraint of class_expr * class_type
  7. | Pcl_extension of extension
  8. | Pcl_open of Asttypes.override_flag * Longident.t Asttypes.loc * class_expr
and class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}
and class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
}
and class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
  2. | Pcf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * class_field_kind
  3. | Pcf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * class_field_kind
  4. | Pcf_constraint of core_type * core_type
  5. | Pcf_initializer of expression
  6. | Pcf_attribute of attribute
  7. | Pcf_extension of extension
and class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

and module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
}
and module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
  2. | Pmty_signature of signature
  3. | Pmty_functor of string Asttypes.loc * module_type option * module_type
  4. | Pmty_with of module_type * with_constraint list
  5. | Pmty_typeof of module_expr
  6. | Pmty_extension of extension
  7. | Pmty_alias of Longident.t Asttypes.loc
and signature = signature_item list
and signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc =
  1. | Psig_value of value_description
  2. | Psig_type of Asttypes.rec_flag * type_declaration list
  3. | Psig_typext of type_extension
  4. | Psig_exception of extension_constructor
  5. | Psig_module of module_declaration
  6. | Psig_recmodule of module_declaration list
  7. | Psig_modtype of module_type_declaration
  8. | Psig_open of open_description
  9. | Psig_include of include_description
  10. | Psig_class of class_description list
  11. | Psig_class_type of class_type_declaration list
  12. | Psig_attribute of attribute
  13. | Psig_extension of extension * attributes
and module_declaration = {
  1. pmd_name : string Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
  4. pmd_loc : Location.t;
}
and module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
  4. pmtd_loc : Location.t;
}
and open_description = {
  1. popen_lid : Longident.t Asttypes.loc;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}
and 'a include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos
and include_declaration = module_expr include_infos
and with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
  3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
  4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
and module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
}
and module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
  2. | Pmod_structure of structure
  3. | Pmod_functor of string Asttypes.loc * module_type option * module_expr
  4. | Pmod_apply of module_expr * module_expr
  5. | Pmod_constraint of module_expr * module_type
  6. | Pmod_unpack of expression
  7. | Pmod_extension of extension
and structure = structure_item list
and structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc =
  1. | Pstr_eval of expression * attributes
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
  3. | Pstr_primitive of value_description
  4. | Pstr_type of Asttypes.rec_flag * type_declaration list
  5. | Pstr_typext of type_extension
  6. | Pstr_exception of extension_constructor
  7. | Pstr_module of module_binding
  8. | Pstr_recmodule of module_binding list
  9. | Pstr_modtype of module_type_declaration
  10. | Pstr_open of open_description
  11. | Pstr_class of class_declaration list
  12. | Pstr_class_type of class_type_declaration list
  13. | Pstr_include of include_declaration
  14. | Pstr_attribute of attribute
  15. | Pstr_extension of extension * attributes
and value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_attributes : attributes;
  4. pvb_loc : Location.t;
}
and module_binding = {
  1. pmb_name : string Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Toplevel

type toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of string * directive_argument
and directive_argument =
  1. | Pdir_none
  2. | Pdir_string of string
  3. | Pdir_int of string * char option
  4. | Pdir_ident of Longident.t
  5. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_407/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_407/index.html new file mode 100644 index 000000000..6c5a6585c --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_407/index.html @@ -0,0 +1,2 @@ + +Ast_407 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_407)

Module Astlib.Ast_407

module Asttypes : sig ... end

Auxiliary AST types used by parsetree and typedtree.

module Parsetree : sig ... end

Abstract syntax tree produced by parsing

module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_408/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_408/Asttypes/index.html new file mode 100644 index 000000000..be2f47c21 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_408/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_408.Asttypes)

Module Ast_408.Asttypes

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
  3. | Optional of string
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | Invariant
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_408/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_408/Config/index.html new file mode 100644 index 000000000..b8dafe66a --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_408/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_408.Config)

Module Ast_408.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_408/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_408/Parsetree/index.html new file mode 100644 index 000000000..23124479c --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_408/Parsetree/index.html @@ -0,0 +1,19 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_408.Parsetree)

Module Ast_408.Parsetree

type constant =
  1. | Pconst_integer of string * char option
  2. | Pconst_char of char
  3. | Pconst_string of string * string option
  4. | Pconst_float of string * char option

Extension points

type attribute = {
  1. attr_name : string Asttypes.loc;
  2. attr_payload : payload;
  3. attr_loc : Location.t;
}
and extension = string Asttypes.loc * payload
and attributes = attribute list
and payload =
  1. | PStr of structure
  2. | PSig of signature
  3. | PTyp of core_type
  4. | PPat of pattern * expression option

Core language

and core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_loc_stack : Location.t list;
  4. ptyp_attributes : attributes;
}
and typ = core_type
and core_type_desc =
  1. | Ptyp_any
  2. | Ptyp_var of string
  3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
  4. | Ptyp_tuple of core_type list
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
  6. | Ptyp_object of object_field list * Asttypes.closed_flag
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
  8. | Ptyp_alias of core_type * string
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
  10. | Ptyp_poly of string Asttypes.loc list * core_type
  11. | Ptyp_package of package_type
  12. | Ptyp_extension of extension
and row_field = {
  1. prf_desc : row_field_desc;
  2. prf_loc : Location.t;
  3. prf_attributes : attributes;
}
and row_field_desc =
  1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
  2. | Rinherit of core_type
and object_field = {
  1. pof_desc : object_field_desc;
  2. pof_loc : Location.t;
  3. pof_attributes : attributes;
}
and object_field_desc =
  1. | Otag of Asttypes.label Asttypes.loc * core_type
  2. | Oinherit of core_type
and pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_loc_stack : Location.t list;
  4. ppat_attributes : attributes;
}
and pat = pattern
and pattern_desc =
  1. | Ppat_any
  2. | Ppat_var of string Asttypes.loc
  3. | Ppat_alias of pattern * string Asttypes.loc
  4. | Ppat_constant of constant
  5. | Ppat_interval of constant * constant
  6. | Ppat_tuple of pattern list
  7. | Ppat_construct of Longident.t Asttypes.loc * pattern option
  8. | Ppat_variant of Asttypes.label * pattern option
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
  10. | Ppat_array of pattern list
  11. | Ppat_or of pattern * pattern
  12. | Ppat_constraint of pattern * core_type
  13. | Ppat_type of Longident.t Asttypes.loc
  14. | Ppat_lazy of pattern
  15. | Ppat_unpack of string Asttypes.loc
  16. | Ppat_exception of pattern
  17. | Ppat_extension of extension
  18. | Ppat_open of Longident.t Asttypes.loc * pattern
and expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_loc_stack : Location.t list;
  4. pexp_attributes : attributes;
}
and expr = expression
and expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
  2. | Pexp_constant of constant
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
  4. | Pexp_function of cases
  5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
  6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
  7. | Pexp_match of expression * cases
  8. | Pexp_try of expression * cases
  9. | Pexp_tuple of expression list
  10. | Pexp_construct of Longident.t Asttypes.loc * expression option
  11. | Pexp_variant of Asttypes.label * expression option
  12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
  13. | Pexp_field of expression * Longident.t Asttypes.loc
  14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
  15. | Pexp_array of expression list
  16. | Pexp_ifthenelse of expression * expression * expression option
  17. | Pexp_sequence of expression * expression
  18. | Pexp_while of expression * expression
  19. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
  20. | Pexp_constraint of expression * core_type
  21. | Pexp_coerce of expression * core_type option * core_type
  22. | Pexp_send of expression * Asttypes.label Asttypes.loc
  23. | Pexp_new of Longident.t Asttypes.loc
  24. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
  25. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
  26. | Pexp_letmodule of string Asttypes.loc * module_expr * expression
  27. | Pexp_letexception of extension_constructor * expression
  28. | Pexp_assert of expression
  29. | Pexp_lazy of expression
  30. | Pexp_poly of expression * core_type option
  31. | Pexp_object of class_structure
  32. | Pexp_newtype of string Asttypes.loc * expression
  33. | Pexp_pack of module_expr
  34. | Pexp_open of open_declaration * expression
  35. | Pexp_letop of letop
  36. | Pexp_extension of extension
  37. | Pexp_unreachable
and case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}
and cases = case list
and letop = {
  1. let_ : binding_op;
  2. ands : binding_op list;
  3. body : expression;
}
and binding_op = {
  1. pbop_op : string Asttypes.loc;
  2. pbop_pat : pattern;
  3. pbop_exp : expression;
  4. pbop_loc : Location.t;
}
and value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
  5. pval_loc : Location.t;
}
and type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * Asttypes.variance) list;
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
  6. ptype_manifest : core_type option;
  7. ptype_attributes : attributes;
  8. ptype_loc : Location.t;
}
and type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
  4. | Ptype_open
and label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
}
and constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_args : constructor_arguments;
  3. pcd_res : core_type option;
  4. pcd_loc : Location.t;
  5. pcd_attributes : attributes;
}
and constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
and type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * Asttypes.variance) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_loc : Location.t;
  6. ptyext_attributes : attributes;
}
and extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
}
and type_exception = {
  1. ptyexn_constructor : extension_constructor;
  2. ptyexn_loc : Location.t;
  3. ptyexn_attributes : attributes;
}
and extension_constructor_kind =
  1. | Pext_decl of constructor_arguments * core_type option
  2. | Pext_rebind of Longident.t Asttypes.loc

Class language

and class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
}
and class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcty_signature of class_signature
  3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
  4. | Pcty_extension of extension
  5. | Pcty_open of open_description * class_type
and class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}
and class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
}
and class_type_field_desc =
  1. | Pctf_inherit of class_type
  2. | Pctf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * Asttypes.virtual_flag + * core_type
  3. | Pctf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
  4. | Pctf_constraint of core_type * core_type
  5. | Pctf_attribute of attribute
  6. | Pctf_extension of extension
and 'a class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * Asttypes.variance) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
}
and class_description = class_type class_infos
and class_type_declaration = class_type class_infos
and class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
}
and class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcl_structure of class_structure
  3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
  4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
  6. | Pcl_constraint of class_expr * class_type
  7. | Pcl_extension of extension
  8. | Pcl_open of open_description * class_expr
and class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}
and class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
}
and class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
  2. | Pcf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * class_field_kind
  3. | Pcf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * class_field_kind
  4. | Pcf_constraint of core_type * core_type
  5. | Pcf_initializer of expression
  6. | Pcf_attribute of attribute
  7. | Pcf_extension of extension
and class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

and module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
}
and module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
  2. | Pmty_signature of signature
  3. | Pmty_functor of string Asttypes.loc * module_type option * module_type
  4. | Pmty_with of module_type * with_constraint list
  5. | Pmty_typeof of module_expr
  6. | Pmty_extension of extension
  7. | Pmty_alias of Longident.t Asttypes.loc
and signature = signature_item list
and signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc =
  1. | Psig_value of value_description
  2. | Psig_type of Asttypes.rec_flag * type_declaration list
  3. | Psig_typesubst of type_declaration list
  4. | Psig_typext of type_extension
  5. | Psig_exception of type_exception
  6. | Psig_module of module_declaration
  7. | Psig_modsubst of module_substitution
  8. | Psig_recmodule of module_declaration list
  9. | Psig_modtype of module_type_declaration
  10. | Psig_open of open_description
  11. | Psig_include of include_description
  12. | Psig_class of class_description list
  13. | Psig_class_type of class_type_declaration list
  14. | Psig_attribute of attribute
  15. | Psig_extension of extension * attributes
and module_declaration = {
  1. pmd_name : string Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
  4. pmd_loc : Location.t;
}
and module_substitution = {
  1. pms_name : string Asttypes.loc;
  2. pms_manifest : Longident.t Asttypes.loc;
  3. pms_attributes : attributes;
  4. pms_loc : Location.t;
}
and module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
  4. pmtd_loc : Location.t;
}
and 'a open_infos = {
  1. popen_expr : 'a;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}
and open_description = Longident.t Asttypes.loc open_infos
and open_declaration = module_expr open_infos
and 'a include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos
and include_declaration = module_expr include_infos
and with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
  3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
  4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
and module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
}
and module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
  2. | Pmod_structure of structure
  3. | Pmod_functor of string Asttypes.loc * module_type option * module_expr
  4. | Pmod_apply of module_expr * module_expr
  5. | Pmod_constraint of module_expr * module_type
  6. | Pmod_unpack of expression
  7. | Pmod_extension of extension
and structure = structure_item list
and structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc =
  1. | Pstr_eval of expression * attributes
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
  3. | Pstr_primitive of value_description
  4. | Pstr_type of Asttypes.rec_flag * type_declaration list
  5. | Pstr_typext of type_extension
  6. | Pstr_exception of type_exception
  7. | Pstr_module of module_binding
  8. | Pstr_recmodule of module_binding list
  9. | Pstr_modtype of module_type_declaration
  10. | Pstr_open of open_declaration
  11. | Pstr_class of class_declaration list
  12. | Pstr_class_type of class_type_declaration list
  13. | Pstr_include of include_declaration
  14. | Pstr_attribute of attribute
  15. | Pstr_extension of extension * attributes
and value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_attributes : attributes;
  4. pvb_loc : Location.t;
}
and module_binding = {
  1. pmb_name : string Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Toplevel

type toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of toplevel_directive
and toplevel_directive = {
  1. pdir_name : string Asttypes.loc;
  2. pdir_arg : directive_argument option;
  3. pdir_loc : Location.t;
}
and directive_argument = {
  1. pdira_desc : directive_argument_desc;
  2. pdira_loc : Location.t;
}
and directive_argument_desc =
  1. | Pdir_string of string
  2. | Pdir_int of string * char option
  3. | Pdir_ident of Longident.t
  4. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_408/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_408/index.html new file mode 100644 index 000000000..177142e26 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_408/index.html @@ -0,0 +1,2 @@ + +Ast_408 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_408)

Module Astlib.Ast_408

module Asttypes : sig ... end
module Parsetree : sig ... end
module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_409/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_409/Asttypes/index.html new file mode 100644 index 000000000..a2e17b3fd --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_409/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_409.Asttypes)

Module Ast_409.Asttypes

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
  3. | Optional of string
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | Invariant
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_409/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_409/Config/index.html new file mode 100644 index 000000000..13bc1fa7f --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_409/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_409.Config)

Module Ast_409.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_409/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_409/Parsetree/index.html new file mode 100644 index 000000000..1ab4f80fc --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_409/Parsetree/index.html @@ -0,0 +1,19 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_409.Parsetree)

Module Ast_409.Parsetree

type constant =
  1. | Pconst_integer of string * char option
  2. | Pconst_char of char
  3. | Pconst_string of string * string option
  4. | Pconst_float of string * char option

Extension points

type attribute = {
  1. attr_name : string Asttypes.loc;
  2. attr_payload : payload;
  3. attr_loc : Location.t;
}
and extension = string Asttypes.loc * payload
and attributes = attribute list
and payload =
  1. | PStr of structure
  2. | PSig of signature
  3. | PTyp of core_type
  4. | PPat of pattern * expression option

Core language

and core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_loc_stack : Location.t list;
  4. ptyp_attributes : attributes;
}
and typ = core_type
and core_type_desc =
  1. | Ptyp_any
  2. | Ptyp_var of string
  3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
  4. | Ptyp_tuple of core_type list
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
  6. | Ptyp_object of object_field list * Asttypes.closed_flag
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
  8. | Ptyp_alias of core_type * string
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
  10. | Ptyp_poly of string Asttypes.loc list * core_type
  11. | Ptyp_package of package_type
  12. | Ptyp_extension of extension
and row_field = {
  1. prf_desc : row_field_desc;
  2. prf_loc : Location.t;
  3. prf_attributes : attributes;
}
and row_field_desc =
  1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
  2. | Rinherit of core_type
and object_field = {
  1. pof_desc : object_field_desc;
  2. pof_loc : Location.t;
  3. pof_attributes : attributes;
}
and object_field_desc =
  1. | Otag of Asttypes.label Asttypes.loc * core_type
  2. | Oinherit of core_type
and pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_loc_stack : Location.t list;
  4. ppat_attributes : attributes;
}
and pat = pattern
and pattern_desc =
  1. | Ppat_any
  2. | Ppat_var of string Asttypes.loc
  3. | Ppat_alias of pattern * string Asttypes.loc
  4. | Ppat_constant of constant
  5. | Ppat_interval of constant * constant
  6. | Ppat_tuple of pattern list
  7. | Ppat_construct of Longident.t Asttypes.loc * pattern option
  8. | Ppat_variant of Asttypes.label * pattern option
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
  10. | Ppat_array of pattern list
  11. | Ppat_or of pattern * pattern
  12. | Ppat_constraint of pattern * core_type
  13. | Ppat_type of Longident.t Asttypes.loc
  14. | Ppat_lazy of pattern
  15. | Ppat_unpack of string Asttypes.loc
  16. | Ppat_exception of pattern
  17. | Ppat_extension of extension
  18. | Ppat_open of Longident.t Asttypes.loc * pattern
and expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_loc_stack : Location.t list;
  4. pexp_attributes : attributes;
}
and expr = expression
and expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
  2. | Pexp_constant of constant
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
  4. | Pexp_function of cases
  5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
  6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
  7. | Pexp_match of expression * cases
  8. | Pexp_try of expression * cases
  9. | Pexp_tuple of expression list
  10. | Pexp_construct of Longident.t Asttypes.loc * expression option
  11. | Pexp_variant of Asttypes.label * expression option
  12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
  13. | Pexp_field of expression * Longident.t Asttypes.loc
  14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
  15. | Pexp_array of expression list
  16. | Pexp_ifthenelse of expression * expression * expression option
  17. | Pexp_sequence of expression * expression
  18. | Pexp_while of expression * expression
  19. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
  20. | Pexp_constraint of expression * core_type
  21. | Pexp_coerce of expression * core_type option * core_type
  22. | Pexp_send of expression * Asttypes.label Asttypes.loc
  23. | Pexp_new of Longident.t Asttypes.loc
  24. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
  25. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
  26. | Pexp_letmodule of string Asttypes.loc * module_expr * expression
  27. | Pexp_letexception of extension_constructor * expression
  28. | Pexp_assert of expression
  29. | Pexp_lazy of expression
  30. | Pexp_poly of expression * core_type option
  31. | Pexp_object of class_structure
  32. | Pexp_newtype of string Asttypes.loc * expression
  33. | Pexp_pack of module_expr
  34. | Pexp_open of open_declaration * expression
  35. | Pexp_letop of letop
  36. | Pexp_extension of extension
  37. | Pexp_unreachable
and case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}
and cases = case list
and letop = {
  1. let_ : binding_op;
  2. ands : binding_op list;
  3. body : expression;
}
and binding_op = {
  1. pbop_op : string Asttypes.loc;
  2. pbop_pat : pattern;
  3. pbop_exp : expression;
  4. pbop_loc : Location.t;
}
and value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
  5. pval_loc : Location.t;
}
and type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * Asttypes.variance) list;
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
  6. ptype_manifest : core_type option;
  7. ptype_attributes : attributes;
  8. ptype_loc : Location.t;
}
and type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
  4. | Ptype_open
and label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
}
and constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_args : constructor_arguments;
  3. pcd_res : core_type option;
  4. pcd_loc : Location.t;
  5. pcd_attributes : attributes;
}
and constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
and type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * Asttypes.variance) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_loc : Location.t;
  6. ptyext_attributes : attributes;
}
and extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
}
and type_exception = {
  1. ptyexn_constructor : extension_constructor;
  2. ptyexn_loc : Location.t;
  3. ptyexn_attributes : attributes;
}
and extension_constructor_kind =
  1. | Pext_decl of constructor_arguments * core_type option
  2. | Pext_rebind of Longident.t Asttypes.loc

Class language

and class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
}
and class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcty_signature of class_signature
  3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
  4. | Pcty_extension of extension
  5. | Pcty_open of open_description * class_type
and class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}
and class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
}
and class_type_field_desc =
  1. | Pctf_inherit of class_type
  2. | Pctf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * Asttypes.virtual_flag + * core_type
  3. | Pctf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
  4. | Pctf_constraint of core_type * core_type
  5. | Pctf_attribute of attribute
  6. | Pctf_extension of extension
and 'a class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * Asttypes.variance) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
}
and class_description = class_type class_infos
and class_type_declaration = class_type class_infos
and class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
}
and class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcl_structure of class_structure
  3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
  4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
  6. | Pcl_constraint of class_expr * class_type
  7. | Pcl_extension of extension
  8. | Pcl_open of open_description * class_expr
and class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}
and class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
}
and class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
  2. | Pcf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * class_field_kind
  3. | Pcf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * class_field_kind
  4. | Pcf_constraint of core_type * core_type
  5. | Pcf_initializer of expression
  6. | Pcf_attribute of attribute
  7. | Pcf_extension of extension
and class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

and module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
}
and module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
  2. | Pmty_signature of signature
  3. | Pmty_functor of string Asttypes.loc * module_type option * module_type
  4. | Pmty_with of module_type * with_constraint list
  5. | Pmty_typeof of module_expr
  6. | Pmty_extension of extension
  7. | Pmty_alias of Longident.t Asttypes.loc
and signature = signature_item list
and signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc =
  1. | Psig_value of value_description
  2. | Psig_type of Asttypes.rec_flag * type_declaration list
  3. | Psig_typesubst of type_declaration list
  4. | Psig_typext of type_extension
  5. | Psig_exception of type_exception
  6. | Psig_module of module_declaration
  7. | Psig_modsubst of module_substitution
  8. | Psig_recmodule of module_declaration list
  9. | Psig_modtype of module_type_declaration
  10. | Psig_open of open_description
  11. | Psig_include of include_description
  12. | Psig_class of class_description list
  13. | Psig_class_type of class_type_declaration list
  14. | Psig_attribute of attribute
  15. | Psig_extension of extension * attributes
and module_declaration = {
  1. pmd_name : string Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
  4. pmd_loc : Location.t;
}
and module_substitution = {
  1. pms_name : string Asttypes.loc;
  2. pms_manifest : Longident.t Asttypes.loc;
  3. pms_attributes : attributes;
  4. pms_loc : Location.t;
}
and module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
  4. pmtd_loc : Location.t;
}
and 'a open_infos = {
  1. popen_expr : 'a;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}
and open_description = Longident.t Asttypes.loc open_infos
and open_declaration = module_expr open_infos
and 'a include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos
and include_declaration = module_expr include_infos
and with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
  3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
  4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
and module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
}
and module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
  2. | Pmod_structure of structure
  3. | Pmod_functor of string Asttypes.loc * module_type option * module_expr
  4. | Pmod_apply of module_expr * module_expr
  5. | Pmod_constraint of module_expr * module_type
  6. | Pmod_unpack of expression
  7. | Pmod_extension of extension
and structure = structure_item list
and structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc =
  1. | Pstr_eval of expression * attributes
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
  3. | Pstr_primitive of value_description
  4. | Pstr_type of Asttypes.rec_flag * type_declaration list
  5. | Pstr_typext of type_extension
  6. | Pstr_exception of type_exception
  7. | Pstr_module of module_binding
  8. | Pstr_recmodule of module_binding list
  9. | Pstr_modtype of module_type_declaration
  10. | Pstr_open of open_declaration
  11. | Pstr_class of class_declaration list
  12. | Pstr_class_type of class_type_declaration list
  13. | Pstr_include of include_declaration
  14. | Pstr_attribute of attribute
  15. | Pstr_extension of extension * attributes
and value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_attributes : attributes;
  4. pvb_loc : Location.t;
}
and module_binding = {
  1. pmb_name : string Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Toplevel

type toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of toplevel_directive
and toplevel_directive = {
  1. pdir_name : string Asttypes.loc;
  2. pdir_arg : directive_argument option;
  3. pdir_loc : Location.t;
}
and directive_argument = {
  1. pdira_desc : directive_argument_desc;
  2. pdira_loc : Location.t;
}
and directive_argument_desc =
  1. | Pdir_string of string
  2. | Pdir_int of string * char option
  3. | Pdir_ident of Longident.t
  4. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_409/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_409/index.html new file mode 100644 index 000000000..e082374a5 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_409/index.html @@ -0,0 +1,2 @@ + +Ast_409 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_409)

Module Astlib.Ast_409

module Asttypes : sig ... end
module Parsetree : sig ... end
module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_410/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_410/Asttypes/index.html new file mode 100644 index 000000000..cbba394bb --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_410/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_410.Asttypes)

Module Ast_410.Asttypes

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
  3. | Optional of string
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | Invariant
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_410/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_410/Config/index.html new file mode 100644 index 000000000..1e80fff0d --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_410/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_410.Config)

Module Ast_410.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_410/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_410/Parsetree/index.html new file mode 100644 index 000000000..d39d4fc7a --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_410/Parsetree/index.html @@ -0,0 +1,19 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_410.Parsetree)

Module Ast_410.Parsetree

type constant =
  1. | Pconst_integer of string * char option
  2. | Pconst_char of char
  3. | Pconst_string of string * string option
  4. | Pconst_float of string * char option
type location_stack = Location.t list

Extension points

type attribute = {
  1. attr_name : string Asttypes.loc;
  2. attr_payload : payload;
  3. attr_loc : Location.t;
}
and extension = string Asttypes.loc * payload
and attributes = attribute list
and payload =
  1. | PStr of structure
  2. | PSig of signature
  3. | PTyp of core_type
  4. | PPat of pattern * expression option

Core language

and core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_loc_stack : location_stack;
  4. ptyp_attributes : attributes;
}
and core_type_desc =
  1. | Ptyp_any
  2. | Ptyp_var of string
  3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
  4. | Ptyp_tuple of core_type list
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
  6. | Ptyp_object of object_field list * Asttypes.closed_flag
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
  8. | Ptyp_alias of core_type * string
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
  10. | Ptyp_poly of string Asttypes.loc list * core_type
  11. | Ptyp_package of package_type
  12. | Ptyp_extension of extension
and row_field = {
  1. prf_desc : row_field_desc;
  2. prf_loc : Location.t;
  3. prf_attributes : attributes;
}
and row_field_desc =
  1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
  2. | Rinherit of core_type
and object_field = {
  1. pof_desc : object_field_desc;
  2. pof_loc : Location.t;
  3. pof_attributes : attributes;
}
and object_field_desc =
  1. | Otag of Asttypes.label Asttypes.loc * core_type
  2. | Oinherit of core_type
and pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_loc_stack : location_stack;
  4. ppat_attributes : attributes;
}
and pattern_desc =
  1. | Ppat_any
  2. | Ppat_var of string Asttypes.loc
  3. | Ppat_alias of pattern * string Asttypes.loc
  4. | Ppat_constant of constant
  5. | Ppat_interval of constant * constant
  6. | Ppat_tuple of pattern list
  7. | Ppat_construct of Longident.t Asttypes.loc * pattern option
  8. | Ppat_variant of Asttypes.label * pattern option
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
  10. | Ppat_array of pattern list
  11. | Ppat_or of pattern * pattern
  12. | Ppat_constraint of pattern * core_type
  13. | Ppat_type of Longident.t Asttypes.loc
  14. | Ppat_lazy of pattern
  15. | Ppat_unpack of string option Asttypes.loc
  16. | Ppat_exception of pattern
  17. | Ppat_extension of extension
  18. | Ppat_open of Longident.t Asttypes.loc * pattern
and expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_loc_stack : location_stack;
  4. pexp_attributes : attributes;
}
and expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
  2. | Pexp_constant of constant
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
  4. | Pexp_function of case list
  5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
  6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
  7. | Pexp_match of expression * case list
  8. | Pexp_try of expression * case list
  9. | Pexp_tuple of expression list
  10. | Pexp_construct of Longident.t Asttypes.loc * expression option
  11. | Pexp_variant of Asttypes.label * expression option
  12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
  13. | Pexp_field of expression * Longident.t Asttypes.loc
  14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
  15. | Pexp_array of expression list
  16. | Pexp_ifthenelse of expression * expression * expression option
  17. | Pexp_sequence of expression * expression
  18. | Pexp_while of expression * expression
  19. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
  20. | Pexp_constraint of expression * core_type
  21. | Pexp_coerce of expression * core_type option * core_type
  22. | Pexp_send of expression * Asttypes.label Asttypes.loc
  23. | Pexp_new of Longident.t Asttypes.loc
  24. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
  25. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
  26. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
  27. | Pexp_letexception of extension_constructor * expression
  28. | Pexp_assert of expression
  29. | Pexp_lazy of expression
  30. | Pexp_poly of expression * core_type option
  31. | Pexp_object of class_structure
  32. | Pexp_newtype of string Asttypes.loc * expression
  33. | Pexp_pack of module_expr
  34. | Pexp_open of open_declaration * expression
  35. | Pexp_letop of letop
  36. | Pexp_extension of extension
  37. | Pexp_unreachable
and case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}
and letop = {
  1. let_ : binding_op;
  2. ands : binding_op list;
  3. body : expression;
}
and binding_op = {
  1. pbop_op : string Asttypes.loc;
  2. pbop_pat : pattern;
  3. pbop_exp : expression;
  4. pbop_loc : Location.t;
}
and value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
  5. pval_loc : Location.t;
}
and type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * Asttypes.variance) list;
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
  6. ptype_manifest : core_type option;
  7. ptype_attributes : attributes;
  8. ptype_loc : Location.t;
}
and type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
  4. | Ptype_open
and label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
}
and constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_args : constructor_arguments;
  3. pcd_res : core_type option;
  4. pcd_loc : Location.t;
  5. pcd_attributes : attributes;
}
and constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
and type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * Asttypes.variance) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_loc : Location.t;
  6. ptyext_attributes : attributes;
}
and extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
}
and type_exception = {
  1. ptyexn_constructor : extension_constructor;
  2. ptyexn_loc : Location.t;
  3. ptyexn_attributes : attributes;
}
and extension_constructor_kind =
  1. | Pext_decl of constructor_arguments * core_type option
  2. | Pext_rebind of Longident.t Asttypes.loc

Class language

and class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
}
and class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcty_signature of class_signature
  3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
  4. | Pcty_extension of extension
  5. | Pcty_open of open_description * class_type
and class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}
and class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
}
and class_type_field_desc =
  1. | Pctf_inherit of class_type
  2. | Pctf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * Asttypes.virtual_flag + * core_type
  3. | Pctf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
  4. | Pctf_constraint of core_type * core_type
  5. | Pctf_attribute of attribute
  6. | Pctf_extension of extension
and 'a class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * Asttypes.variance) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
}
and class_description = class_type class_infos
and class_type_declaration = class_type class_infos
and class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
}
and class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcl_structure of class_structure
  3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
  4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
  6. | Pcl_constraint of class_expr * class_type
  7. | Pcl_extension of extension
  8. | Pcl_open of open_description * class_expr
and class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}
and class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
}
and class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
  2. | Pcf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * class_field_kind
  3. | Pcf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * class_field_kind
  4. | Pcf_constraint of core_type * core_type
  5. | Pcf_initializer of expression
  6. | Pcf_attribute of attribute
  7. | Pcf_extension of extension
and class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

and module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
}
and module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
  2. | Pmty_signature of signature
  3. | Pmty_functor of functor_parameter * module_type
  4. | Pmty_with of module_type * with_constraint list
  5. | Pmty_typeof of module_expr
  6. | Pmty_extension of extension
  7. | Pmty_alias of Longident.t Asttypes.loc
and functor_parameter =
  1. | Unit
  2. | Named of string option Asttypes.loc * module_type
and signature = signature_item list
and signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc =
  1. | Psig_value of value_description
  2. | Psig_type of Asttypes.rec_flag * type_declaration list
  3. | Psig_typesubst of type_declaration list
  4. | Psig_typext of type_extension
  5. | Psig_exception of type_exception
  6. | Psig_module of module_declaration
  7. | Psig_modsubst of module_substitution
  8. | Psig_recmodule of module_declaration list
  9. | Psig_modtype of module_type_declaration
  10. | Psig_open of open_description
  11. | Psig_include of include_description
  12. | Psig_class of class_description list
  13. | Psig_class_type of class_type_declaration list
  14. | Psig_attribute of attribute
  15. | Psig_extension of extension * attributes
and module_declaration = {
  1. pmd_name : string option Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
  4. pmd_loc : Location.t;
}
and module_substitution = {
  1. pms_name : string Asttypes.loc;
  2. pms_manifest : Longident.t Asttypes.loc;
  3. pms_attributes : attributes;
  4. pms_loc : Location.t;
}
and module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
  4. pmtd_loc : Location.t;
}
and 'a open_infos = {
  1. popen_expr : 'a;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}
and open_description = Longident.t Asttypes.loc open_infos
and open_declaration = module_expr open_infos
and 'a include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos
and include_declaration = module_expr include_infos
and with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
  3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
  4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
and module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
}
and module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
  2. | Pmod_structure of structure
  3. | Pmod_functor of functor_parameter * module_expr
  4. | Pmod_apply of module_expr * module_expr
  5. | Pmod_constraint of module_expr * module_type
  6. | Pmod_unpack of expression
  7. | Pmod_extension of extension
and structure = structure_item list
and structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc =
  1. | Pstr_eval of expression * attributes
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
  3. | Pstr_primitive of value_description
  4. | Pstr_type of Asttypes.rec_flag * type_declaration list
  5. | Pstr_typext of type_extension
  6. | Pstr_exception of type_exception
  7. | Pstr_module of module_binding
  8. | Pstr_recmodule of module_binding list
  9. | Pstr_modtype of module_type_declaration
  10. | Pstr_open of open_declaration
  11. | Pstr_class of class_declaration list
  12. | Pstr_class_type of class_type_declaration list
  13. | Pstr_include of include_declaration
  14. | Pstr_attribute of attribute
  15. | Pstr_extension of extension * attributes
and value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_attributes : attributes;
  4. pvb_loc : Location.t;
}
and module_binding = {
  1. pmb_name : string option Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Toplevel

type toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of toplevel_directive
and toplevel_directive = {
  1. pdir_name : string Asttypes.loc;
  2. pdir_arg : directive_argument option;
  3. pdir_loc : Location.t;
}
and directive_argument = {
  1. pdira_desc : directive_argument_desc;
  2. pdira_loc : Location.t;
}
and directive_argument_desc =
  1. | Pdir_string of string
  2. | Pdir_int of string * char option
  3. | Pdir_ident of Longident.t
  4. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_410/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_410/index.html new file mode 100644 index 000000000..95262ea22 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_410/index.html @@ -0,0 +1,2 @@ + +Ast_410 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_410)

Module Astlib.Ast_410

module Asttypes : sig ... end
module Parsetree : sig ... end
module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_411/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_411/Asttypes/index.html new file mode 100644 index 000000000..1e463368c --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_411/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_411.Asttypes)

Module Ast_411.Asttypes

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * Location.t * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
  3. | Optional of string
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | Invariant
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_411/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_411/Config/index.html new file mode 100644 index 000000000..87d6f9276 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_411/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_411.Config)

Module Ast_411.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_411/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_411/Parsetree/index.html new file mode 100644 index 000000000..70551c28b --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_411/Parsetree/index.html @@ -0,0 +1,19 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_411.Parsetree)

Module Ast_411.Parsetree

type constant =
  1. | Pconst_integer of string * char option
  2. | Pconst_char of char
  3. | Pconst_string of string * Location.t * string option
  4. | Pconst_float of string * char option
type location_stack = Location.t list

Extension points

type attribute = {
  1. attr_name : string Asttypes.loc;
  2. attr_payload : payload;
  3. attr_loc : Location.t;
}
and extension = string Asttypes.loc * payload
and attributes = attribute list
and payload =
  1. | PStr of structure
  2. | PSig of signature
  3. | PTyp of core_type
  4. | PPat of pattern * expression option

Core language

and core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_loc_stack : location_stack;
  4. ptyp_attributes : attributes;
}
and core_type_desc =
  1. | Ptyp_any
  2. | Ptyp_var of string
  3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
  4. | Ptyp_tuple of core_type list
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
  6. | Ptyp_object of object_field list * Asttypes.closed_flag
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
  8. | Ptyp_alias of core_type * string
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
  10. | Ptyp_poly of string Asttypes.loc list * core_type
  11. | Ptyp_package of package_type
  12. | Ptyp_extension of extension
and row_field = {
  1. prf_desc : row_field_desc;
  2. prf_loc : Location.t;
  3. prf_attributes : attributes;
}
and row_field_desc =
  1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
  2. | Rinherit of core_type
and object_field = {
  1. pof_desc : object_field_desc;
  2. pof_loc : Location.t;
  3. pof_attributes : attributes;
}
and object_field_desc =
  1. | Otag of Asttypes.label Asttypes.loc * core_type
  2. | Oinherit of core_type
and pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_loc_stack : location_stack;
  4. ppat_attributes : attributes;
}
and pattern_desc =
  1. | Ppat_any
  2. | Ppat_var of string Asttypes.loc
  3. | Ppat_alias of pattern * string Asttypes.loc
  4. | Ppat_constant of constant
  5. | Ppat_interval of constant * constant
  6. | Ppat_tuple of pattern list
  7. | Ppat_construct of Longident.t Asttypes.loc * pattern option
  8. | Ppat_variant of Asttypes.label * pattern option
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
  10. | Ppat_array of pattern list
  11. | Ppat_or of pattern * pattern
  12. | Ppat_constraint of pattern * core_type
  13. | Ppat_type of Longident.t Asttypes.loc
  14. | Ppat_lazy of pattern
  15. | Ppat_unpack of string option Asttypes.loc
  16. | Ppat_exception of pattern
  17. | Ppat_extension of extension
  18. | Ppat_open of Longident.t Asttypes.loc * pattern
and expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_loc_stack : location_stack;
  4. pexp_attributes : attributes;
}
and expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
  2. | Pexp_constant of constant
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
  4. | Pexp_function of case list
  5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
  6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
  7. | Pexp_match of expression * case list
  8. | Pexp_try of expression * case list
  9. | Pexp_tuple of expression list
  10. | Pexp_construct of Longident.t Asttypes.loc * expression option
  11. | Pexp_variant of Asttypes.label * expression option
  12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
  13. | Pexp_field of expression * Longident.t Asttypes.loc
  14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
  15. | Pexp_array of expression list
  16. | Pexp_ifthenelse of expression * expression * expression option
  17. | Pexp_sequence of expression * expression
  18. | Pexp_while of expression * expression
  19. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
  20. | Pexp_constraint of expression * core_type
  21. | Pexp_coerce of expression * core_type option * core_type
  22. | Pexp_send of expression * Asttypes.label Asttypes.loc
  23. | Pexp_new of Longident.t Asttypes.loc
  24. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
  25. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
  26. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
  27. | Pexp_letexception of extension_constructor * expression
  28. | Pexp_assert of expression
  29. | Pexp_lazy of expression
  30. | Pexp_poly of expression * core_type option
  31. | Pexp_object of class_structure
  32. | Pexp_newtype of string Asttypes.loc * expression
  33. | Pexp_pack of module_expr
  34. | Pexp_open of open_declaration * expression
  35. | Pexp_letop of letop
  36. | Pexp_extension of extension
  37. | Pexp_unreachable
and case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}
and letop = {
  1. let_ : binding_op;
  2. ands : binding_op list;
  3. body : expression;
}
and binding_op = {
  1. pbop_op : string Asttypes.loc;
  2. pbop_pat : pattern;
  3. pbop_exp : expression;
  4. pbop_loc : Location.t;
}
and value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
  5. pval_loc : Location.t;
}
and type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * Asttypes.variance) list;
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
  6. ptype_manifest : core_type option;
  7. ptype_attributes : attributes;
  8. ptype_loc : Location.t;
}
and type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
  4. | Ptype_open
and label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
}
and constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_args : constructor_arguments;
  3. pcd_res : core_type option;
  4. pcd_loc : Location.t;
  5. pcd_attributes : attributes;
}
and constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
and type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * Asttypes.variance) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_loc : Location.t;
  6. ptyext_attributes : attributes;
}
and extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
}
and type_exception = {
  1. ptyexn_constructor : extension_constructor;
  2. ptyexn_loc : Location.t;
  3. ptyexn_attributes : attributes;
}
and extension_constructor_kind =
  1. | Pext_decl of constructor_arguments * core_type option
  2. | Pext_rebind of Longident.t Asttypes.loc

Class language

and class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
}
and class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcty_signature of class_signature
  3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
  4. | Pcty_extension of extension
  5. | Pcty_open of open_description * class_type
and class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}
and class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
}
and class_type_field_desc =
  1. | Pctf_inherit of class_type
  2. | Pctf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * Asttypes.virtual_flag + * core_type
  3. | Pctf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
  4. | Pctf_constraint of core_type * core_type
  5. | Pctf_attribute of attribute
  6. | Pctf_extension of extension
and 'a class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * Asttypes.variance) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
}
and class_description = class_type class_infos
and class_type_declaration = class_type class_infos
and class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
}
and class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcl_structure of class_structure
  3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
  4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
  6. | Pcl_constraint of class_expr * class_type
  7. | Pcl_extension of extension
  8. | Pcl_open of open_description * class_expr
and class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}
and class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
}
and class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
  2. | Pcf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * class_field_kind
  3. | Pcf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * class_field_kind
  4. | Pcf_constraint of core_type * core_type
  5. | Pcf_initializer of expression
  6. | Pcf_attribute of attribute
  7. | Pcf_extension of extension
and class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

and module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
}
and module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
  2. | Pmty_signature of signature
  3. | Pmty_functor of functor_parameter * module_type
  4. | Pmty_with of module_type * with_constraint list
  5. | Pmty_typeof of module_expr
  6. | Pmty_extension of extension
  7. | Pmty_alias of Longident.t Asttypes.loc
and functor_parameter =
  1. | Unit
  2. | Named of string option Asttypes.loc * module_type
and signature = signature_item list
and signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc =
  1. | Psig_value of value_description
  2. | Psig_type of Asttypes.rec_flag * type_declaration list
  3. | Psig_typesubst of type_declaration list
  4. | Psig_typext of type_extension
  5. | Psig_exception of type_exception
  6. | Psig_module of module_declaration
  7. | Psig_modsubst of module_substitution
  8. | Psig_recmodule of module_declaration list
  9. | Psig_modtype of module_type_declaration
  10. | Psig_open of open_description
  11. | Psig_include of include_description
  12. | Psig_class of class_description list
  13. | Psig_class_type of class_type_declaration list
  14. | Psig_attribute of attribute
  15. | Psig_extension of extension * attributes
and module_declaration = {
  1. pmd_name : string option Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
  4. pmd_loc : Location.t;
}
and module_substitution = {
  1. pms_name : string Asttypes.loc;
  2. pms_manifest : Longident.t Asttypes.loc;
  3. pms_attributes : attributes;
  4. pms_loc : Location.t;
}
and module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
  4. pmtd_loc : Location.t;
}
and 'a open_infos = {
  1. popen_expr : 'a;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}
and open_description = Longident.t Asttypes.loc open_infos
and open_declaration = module_expr open_infos
and 'a include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos
and include_declaration = module_expr include_infos
and with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
  3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
  4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
and module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
}
and module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
  2. | Pmod_structure of structure
  3. | Pmod_functor of functor_parameter * module_expr
  4. | Pmod_apply of module_expr * module_expr
  5. | Pmod_constraint of module_expr * module_type
  6. | Pmod_unpack of expression
  7. | Pmod_extension of extension
and structure = structure_item list
and structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc =
  1. | Pstr_eval of expression * attributes
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
  3. | Pstr_primitive of value_description
  4. | Pstr_type of Asttypes.rec_flag * type_declaration list
  5. | Pstr_typext of type_extension
  6. | Pstr_exception of type_exception
  7. | Pstr_module of module_binding
  8. | Pstr_recmodule of module_binding list
  9. | Pstr_modtype of module_type_declaration
  10. | Pstr_open of open_declaration
  11. | Pstr_class of class_declaration list
  12. | Pstr_class_type of class_type_declaration list
  13. | Pstr_include of include_declaration
  14. | Pstr_attribute of attribute
  15. | Pstr_extension of extension * attributes
and value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_attributes : attributes;
  4. pvb_loc : Location.t;
}
and module_binding = {
  1. pmb_name : string option Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Toplevel

type toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of toplevel_directive
and toplevel_directive = {
  1. pdir_name : string Asttypes.loc;
  2. pdir_arg : directive_argument option;
  3. pdir_loc : Location.t;
}
and directive_argument = {
  1. pdira_desc : directive_argument_desc;
  2. pdira_loc : Location.t;
}
and directive_argument_desc =
  1. | Pdir_string of string
  2. | Pdir_int of string * char option
  3. | Pdir_ident of Longident.t
  4. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_411/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_411/index.html new file mode 100644 index 000000000..a1a21d0dc --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_411/index.html @@ -0,0 +1,2 @@ + +Ast_411 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_411)

Module Astlib.Ast_411

module Asttypes : sig ... end
module Parsetree : sig ... end
module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_412/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_412/Asttypes/index.html new file mode 100644 index 000000000..4b0dc4b90 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_412/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_412.Asttypes)

Module Ast_412.Asttypes

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * Location.t * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
  3. | Optional of string
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | NoVariance
type injectivity =
  1. | Injective
  2. | NoInjectivity
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_412/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_412/Config/index.html new file mode 100644 index 000000000..6c8f2b119 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_412/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_412.Config)

Module Ast_412.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_412/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_412/Parsetree/index.html new file mode 100644 index 000000000..7f67f1e37 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_412/Parsetree/index.html @@ -0,0 +1,19 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_412.Parsetree)

Module Ast_412.Parsetree

type constant =
  1. | Pconst_integer of string * char option
  2. | Pconst_char of char
  3. | Pconst_string of string * Location.t * string option
  4. | Pconst_float of string * char option
type location_stack = Location.t list

Extension points

type attribute = {
  1. attr_name : string Asttypes.loc;
  2. attr_payload : payload;
  3. attr_loc : Location.t;
}
and extension = string Asttypes.loc * payload
and attributes = attribute list
and payload =
  1. | PStr of structure
  2. | PSig of signature
  3. | PTyp of core_type
  4. | PPat of pattern * expression option

Core language

and core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_loc_stack : location_stack;
  4. ptyp_attributes : attributes;
}
and core_type_desc =
  1. | Ptyp_any
  2. | Ptyp_var of string
  3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
  4. | Ptyp_tuple of core_type list
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
  6. | Ptyp_object of object_field list * Asttypes.closed_flag
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
  8. | Ptyp_alias of core_type * string
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
  10. | Ptyp_poly of string Asttypes.loc list * core_type
  11. | Ptyp_package of package_type
  12. | Ptyp_extension of extension
and row_field = {
  1. prf_desc : row_field_desc;
  2. prf_loc : Location.t;
  3. prf_attributes : attributes;
}
and row_field_desc =
  1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
  2. | Rinherit of core_type
and object_field = {
  1. pof_desc : object_field_desc;
  2. pof_loc : Location.t;
  3. pof_attributes : attributes;
}
and object_field_desc =
  1. | Otag of Asttypes.label Asttypes.loc * core_type
  2. | Oinherit of core_type
and pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_loc_stack : location_stack;
  4. ppat_attributes : attributes;
}
and pattern_desc =
  1. | Ppat_any
  2. | Ppat_var of string Asttypes.loc
  3. | Ppat_alias of pattern * string Asttypes.loc
  4. | Ppat_constant of constant
  5. | Ppat_interval of constant * constant
  6. | Ppat_tuple of pattern list
  7. | Ppat_construct of Longident.t Asttypes.loc * pattern option
  8. | Ppat_variant of Asttypes.label * pattern option
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
  10. | Ppat_array of pattern list
  11. | Ppat_or of pattern * pattern
  12. | Ppat_constraint of pattern * core_type
  13. | Ppat_type of Longident.t Asttypes.loc
  14. | Ppat_lazy of pattern
  15. | Ppat_unpack of string option Asttypes.loc
  16. | Ppat_exception of pattern
  17. | Ppat_extension of extension
  18. | Ppat_open of Longident.t Asttypes.loc * pattern
and expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_loc_stack : location_stack;
  4. pexp_attributes : attributes;
}
and expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
  2. | Pexp_constant of constant
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
  4. | Pexp_function of case list
  5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
  6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
  7. | Pexp_match of expression * case list
  8. | Pexp_try of expression * case list
  9. | Pexp_tuple of expression list
  10. | Pexp_construct of Longident.t Asttypes.loc * expression option
  11. | Pexp_variant of Asttypes.label * expression option
  12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
  13. | Pexp_field of expression * Longident.t Asttypes.loc
  14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
  15. | Pexp_array of expression list
  16. | Pexp_ifthenelse of expression * expression * expression option
  17. | Pexp_sequence of expression * expression
  18. | Pexp_while of expression * expression
  19. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
  20. | Pexp_constraint of expression * core_type
  21. | Pexp_coerce of expression * core_type option * core_type
  22. | Pexp_send of expression * Asttypes.label Asttypes.loc
  23. | Pexp_new of Longident.t Asttypes.loc
  24. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
  25. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
  26. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
  27. | Pexp_letexception of extension_constructor * expression
  28. | Pexp_assert of expression
  29. | Pexp_lazy of expression
  30. | Pexp_poly of expression * core_type option
  31. | Pexp_object of class_structure
  32. | Pexp_newtype of string Asttypes.loc * expression
  33. | Pexp_pack of module_expr
  34. | Pexp_open of open_declaration * expression
  35. | Pexp_letop of letop
  36. | Pexp_extension of extension
  37. | Pexp_unreachable
and case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}
and letop = {
  1. let_ : binding_op;
  2. ands : binding_op list;
  3. body : expression;
}
and binding_op = {
  1. pbop_op : string Asttypes.loc;
  2. pbop_pat : pattern;
  3. pbop_exp : expression;
  4. pbop_loc : Location.t;
}
and value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
  5. pval_loc : Location.t;
}
and type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
  6. ptype_manifest : core_type option;
  7. ptype_attributes : attributes;
  8. ptype_loc : Location.t;
}
and type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
  4. | Ptype_open
and label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
}
and constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_args : constructor_arguments;
  3. pcd_res : core_type option;
  4. pcd_loc : Location.t;
  5. pcd_attributes : attributes;
}
and constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
and type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_loc : Location.t;
  6. ptyext_attributes : attributes;
}
and extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
}
and type_exception = {
  1. ptyexn_constructor : extension_constructor;
  2. ptyexn_loc : Location.t;
  3. ptyexn_attributes : attributes;
}
and extension_constructor_kind =
  1. | Pext_decl of constructor_arguments * core_type option
  2. | Pext_rebind of Longident.t Asttypes.loc

Class language

and class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
}
and class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcty_signature of class_signature
  3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
  4. | Pcty_extension of extension
  5. | Pcty_open of open_description * class_type
and class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}
and class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
}
and class_type_field_desc =
  1. | Pctf_inherit of class_type
  2. | Pctf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * Asttypes.virtual_flag + * core_type
  3. | Pctf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
  4. | Pctf_constraint of core_type * core_type
  5. | Pctf_attribute of attribute
  6. | Pctf_extension of extension
and 'a class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
}
and class_description = class_type class_infos
and class_type_declaration = class_type class_infos
and class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
}
and class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcl_structure of class_structure
  3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
  4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
  6. | Pcl_constraint of class_expr * class_type
  7. | Pcl_extension of extension
  8. | Pcl_open of open_description * class_expr
and class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}
and class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
}
and class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
  2. | Pcf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * class_field_kind
  3. | Pcf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * class_field_kind
  4. | Pcf_constraint of core_type * core_type
  5. | Pcf_initializer of expression
  6. | Pcf_attribute of attribute
  7. | Pcf_extension of extension
and class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

and module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
}
and module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
  2. | Pmty_signature of signature
  3. | Pmty_functor of functor_parameter * module_type
  4. | Pmty_with of module_type * with_constraint list
  5. | Pmty_typeof of module_expr
  6. | Pmty_extension of extension
  7. | Pmty_alias of Longident.t Asttypes.loc
and functor_parameter =
  1. | Unit
  2. | Named of string option Asttypes.loc * module_type
and signature = signature_item list
and signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc =
  1. | Psig_value of value_description
  2. | Psig_type of Asttypes.rec_flag * type_declaration list
  3. | Psig_typesubst of type_declaration list
  4. | Psig_typext of type_extension
  5. | Psig_exception of type_exception
  6. | Psig_module of module_declaration
  7. | Psig_modsubst of module_substitution
  8. | Psig_recmodule of module_declaration list
  9. | Psig_modtype of module_type_declaration
  10. | Psig_open of open_description
  11. | Psig_include of include_description
  12. | Psig_class of class_description list
  13. | Psig_class_type of class_type_declaration list
  14. | Psig_attribute of attribute
  15. | Psig_extension of extension * attributes
and module_declaration = {
  1. pmd_name : string option Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
  4. pmd_loc : Location.t;
}
and module_substitution = {
  1. pms_name : string Asttypes.loc;
  2. pms_manifest : Longident.t Asttypes.loc;
  3. pms_attributes : attributes;
  4. pms_loc : Location.t;
}
and module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
  4. pmtd_loc : Location.t;
}
and 'a open_infos = {
  1. popen_expr : 'a;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}
and open_description = Longident.t Asttypes.loc open_infos
and open_declaration = module_expr open_infos
and 'a include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos
and include_declaration = module_expr include_infos
and with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
  3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
  4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
and module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
}
and module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
  2. | Pmod_structure of structure
  3. | Pmod_functor of functor_parameter * module_expr
  4. | Pmod_apply of module_expr * module_expr
  5. | Pmod_constraint of module_expr * module_type
  6. | Pmod_unpack of expression
  7. | Pmod_extension of extension
and structure = structure_item list
and structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc =
  1. | Pstr_eval of expression * attributes
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
  3. | Pstr_primitive of value_description
  4. | Pstr_type of Asttypes.rec_flag * type_declaration list
  5. | Pstr_typext of type_extension
  6. | Pstr_exception of type_exception
  7. | Pstr_module of module_binding
  8. | Pstr_recmodule of module_binding list
  9. | Pstr_modtype of module_type_declaration
  10. | Pstr_open of open_declaration
  11. | Pstr_class of class_declaration list
  12. | Pstr_class_type of class_type_declaration list
  13. | Pstr_include of include_declaration
  14. | Pstr_attribute of attribute
  15. | Pstr_extension of extension * attributes
and value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_attributes : attributes;
  4. pvb_loc : Location.t;
}
and module_binding = {
  1. pmb_name : string option Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Toplevel

type toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of toplevel_directive
and toplevel_directive = {
  1. pdir_name : string Asttypes.loc;
  2. pdir_arg : directive_argument option;
  3. pdir_loc : Location.t;
}
and directive_argument = {
  1. pdira_desc : directive_argument_desc;
  2. pdira_loc : Location.t;
}
and directive_argument_desc =
  1. | Pdir_string of string
  2. | Pdir_int of string * char option
  3. | Pdir_ident of Longident.t
  4. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_412/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_412/index.html new file mode 100644 index 000000000..e08bc9659 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_412/index.html @@ -0,0 +1,2 @@ + +Ast_412 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_412)

Module Astlib.Ast_412

module Asttypes : sig ... end
module Parsetree : sig ... end
module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_413/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_413/Asttypes/index.html new file mode 100644 index 000000000..391763244 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_413/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_413.Asttypes)

Module Ast_413.Asttypes

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * Location.t * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
  3. | Optional of string
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | NoVariance
type injectivity =
  1. | Injective
  2. | NoInjectivity
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_413/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_413/Config/index.html new file mode 100644 index 000000000..be1080eab --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_413/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_413.Config)

Module Ast_413.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_413/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_413/Parsetree/index.html new file mode 100644 index 000000000..592e46ad6 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_413/Parsetree/index.html @@ -0,0 +1,20 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_413.Parsetree)

Module Ast_413.Parsetree

type constant =
  1. | Pconst_integer of string * char option
  2. | Pconst_char of char
  3. | Pconst_string of string * Location.t * string option
  4. | Pconst_float of string * char option
type location_stack = Location.t list

Extension points

type attribute = {
  1. attr_name : string Asttypes.loc;
  2. attr_payload : payload;
  3. attr_loc : Location.t;
}
and extension = string Asttypes.loc * payload
and attributes = attribute list
and payload =
  1. | PStr of structure
  2. | PSig of signature
  3. | PTyp of core_type
  4. | PPat of pattern * expression option

Core language

and core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_loc_stack : location_stack;
  4. ptyp_attributes : attributes;
}
and core_type_desc =
  1. | Ptyp_any
  2. | Ptyp_var of string
  3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
  4. | Ptyp_tuple of core_type list
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
  6. | Ptyp_object of object_field list * Asttypes.closed_flag
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
  8. | Ptyp_alias of core_type * string
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
  10. | Ptyp_poly of string Asttypes.loc list * core_type
  11. | Ptyp_package of package_type
  12. | Ptyp_extension of extension
and row_field = {
  1. prf_desc : row_field_desc;
  2. prf_loc : Location.t;
  3. prf_attributes : attributes;
}
and row_field_desc =
  1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
  2. | Rinherit of core_type
and object_field = {
  1. pof_desc : object_field_desc;
  2. pof_loc : Location.t;
  3. pof_attributes : attributes;
}
and object_field_desc =
  1. | Otag of Asttypes.label Asttypes.loc * core_type
  2. | Oinherit of core_type
and pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_loc_stack : location_stack;
  4. ppat_attributes : attributes;
}
and pattern_desc =
  1. | Ppat_any
  2. | Ppat_var of string Asttypes.loc
  3. | Ppat_alias of pattern * string Asttypes.loc
  4. | Ppat_constant of constant
  5. | Ppat_interval of constant * constant
  6. | Ppat_tuple of pattern list
  7. | Ppat_construct of Longident.t Asttypes.loc + * (string Asttypes.loc list * pattern) option
  8. | Ppat_variant of Asttypes.label * pattern option
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
  10. | Ppat_array of pattern list
  11. | Ppat_or of pattern * pattern
  12. | Ppat_constraint of pattern * core_type
  13. | Ppat_type of Longident.t Asttypes.loc
  14. | Ppat_lazy of pattern
  15. | Ppat_unpack of string option Asttypes.loc
  16. | Ppat_exception of pattern
  17. | Ppat_extension of extension
  18. | Ppat_open of Longident.t Asttypes.loc * pattern
and expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_loc_stack : location_stack;
  4. pexp_attributes : attributes;
}
and expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
  2. | Pexp_constant of constant
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
  4. | Pexp_function of case list
  5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
  6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
  7. | Pexp_match of expression * case list
  8. | Pexp_try of expression * case list
  9. | Pexp_tuple of expression list
  10. | Pexp_construct of Longident.t Asttypes.loc * expression option
  11. | Pexp_variant of Asttypes.label * expression option
  12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
  13. | Pexp_field of expression * Longident.t Asttypes.loc
  14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
  15. | Pexp_array of expression list
  16. | Pexp_ifthenelse of expression * expression * expression option
  17. | Pexp_sequence of expression * expression
  18. | Pexp_while of expression * expression
  19. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
  20. | Pexp_constraint of expression * core_type
  21. | Pexp_coerce of expression * core_type option * core_type
  22. | Pexp_send of expression * Asttypes.label Asttypes.loc
  23. | Pexp_new of Longident.t Asttypes.loc
  24. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
  25. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
  26. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
  27. | Pexp_letexception of extension_constructor * expression
  28. | Pexp_assert of expression
  29. | Pexp_lazy of expression
  30. | Pexp_poly of expression * core_type option
  31. | Pexp_object of class_structure
  32. | Pexp_newtype of string Asttypes.loc * expression
  33. | Pexp_pack of module_expr
  34. | Pexp_open of open_declaration * expression
  35. | Pexp_letop of letop
  36. | Pexp_extension of extension
  37. | Pexp_unreachable
and case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}
and letop = {
  1. let_ : binding_op;
  2. ands : binding_op list;
  3. body : expression;
}
and binding_op = {
  1. pbop_op : string Asttypes.loc;
  2. pbop_pat : pattern;
  3. pbop_exp : expression;
  4. pbop_loc : Location.t;
}
and value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
  5. pval_loc : Location.t;
}
and type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
  6. ptype_manifest : core_type option;
  7. ptype_attributes : attributes;
  8. ptype_loc : Location.t;
}
and type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
  4. | Ptype_open
and label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
}
and constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_args : constructor_arguments;
  3. pcd_res : core_type option;
  4. pcd_loc : Location.t;
  5. pcd_attributes : attributes;
}
and constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
and type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_loc : Location.t;
  6. ptyext_attributes : attributes;
}
and extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
}
and type_exception = {
  1. ptyexn_constructor : extension_constructor;
  2. ptyexn_loc : Location.t;
  3. ptyexn_attributes : attributes;
}
and extension_constructor_kind =
  1. | Pext_decl of constructor_arguments * core_type option
  2. | Pext_rebind of Longident.t Asttypes.loc

Class language

and class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
}
and class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcty_signature of class_signature
  3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
  4. | Pcty_extension of extension
  5. | Pcty_open of open_description * class_type
and class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}
and class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
}
and class_type_field_desc =
  1. | Pctf_inherit of class_type
  2. | Pctf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * Asttypes.virtual_flag + * core_type
  3. | Pctf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
  4. | Pctf_constraint of core_type * core_type
  5. | Pctf_attribute of attribute
  6. | Pctf_extension of extension
and 'a class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
}
and class_description = class_type class_infos
and class_type_declaration = class_type class_infos
and class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
}
and class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
  2. | Pcl_structure of class_structure
  3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
  4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
  6. | Pcl_constraint of class_expr * class_type
  7. | Pcl_extension of extension
  8. | Pcl_open of open_description * class_expr
and class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}
and class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
}
and class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
  2. | Pcf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * class_field_kind
  3. | Pcf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * class_field_kind
  4. | Pcf_constraint of core_type * core_type
  5. | Pcf_initializer of expression
  6. | Pcf_attribute of attribute
  7. | Pcf_extension of extension
and class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

and module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
}
and module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
  2. | Pmty_signature of signature
  3. | Pmty_functor of functor_parameter * module_type
  4. | Pmty_with of module_type * with_constraint list
  5. | Pmty_typeof of module_expr
  6. | Pmty_extension of extension
  7. | Pmty_alias of Longident.t Asttypes.loc
and functor_parameter =
  1. | Unit
  2. | Named of string option Asttypes.loc * module_type
and signature = signature_item list
and signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc =
  1. | Psig_value of value_description
  2. | Psig_type of Asttypes.rec_flag * type_declaration list
  3. | Psig_typesubst of type_declaration list
  4. | Psig_typext of type_extension
  5. | Psig_exception of type_exception
  6. | Psig_module of module_declaration
  7. | Psig_modsubst of module_substitution
  8. | Psig_recmodule of module_declaration list
  9. | Psig_modtype of module_type_declaration
  10. | Psig_modtypesubst of module_type_declaration
  11. | Psig_open of open_description
  12. | Psig_include of include_description
  13. | Psig_class of class_description list
  14. | Psig_class_type of class_type_declaration list
  15. | Psig_attribute of attribute
  16. | Psig_extension of extension * attributes
and module_declaration = {
  1. pmd_name : string option Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
  4. pmd_loc : Location.t;
}
and module_substitution = {
  1. pms_name : string Asttypes.loc;
  2. pms_manifest : Longident.t Asttypes.loc;
  3. pms_attributes : attributes;
  4. pms_loc : Location.t;
}
and module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
  4. pmtd_loc : Location.t;
}
and 'a open_infos = {
  1. popen_expr : 'a;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}
and open_description = Longident.t Asttypes.loc open_infos
and open_declaration = module_expr open_infos
and 'a include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos
and include_declaration = module_expr include_infos
and with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
  3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
  4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
  5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
  6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
and module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
}
and module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
  2. | Pmod_structure of structure
  3. | Pmod_functor of functor_parameter * module_expr
  4. | Pmod_apply of module_expr * module_expr
  5. | Pmod_constraint of module_expr * module_type
  6. | Pmod_unpack of expression
  7. | Pmod_extension of extension
and structure = structure_item list
and structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc =
  1. | Pstr_eval of expression * attributes
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
  3. | Pstr_primitive of value_description
  4. | Pstr_type of Asttypes.rec_flag * type_declaration list
  5. | Pstr_typext of type_extension
  6. | Pstr_exception of type_exception
  7. | Pstr_module of module_binding
  8. | Pstr_recmodule of module_binding list
  9. | Pstr_modtype of module_type_declaration
  10. | Pstr_open of open_declaration
  11. | Pstr_class of class_declaration list
  12. | Pstr_class_type of class_type_declaration list
  13. | Pstr_include of include_declaration
  14. | Pstr_attribute of attribute
  15. | Pstr_extension of extension * attributes
and value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_attributes : attributes;
  4. pvb_loc : Location.t;
}
and module_binding = {
  1. pmb_name : string option Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Toplevel

type toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of toplevel_directive
and toplevel_directive = {
  1. pdir_name : string Asttypes.loc;
  2. pdir_arg : directive_argument option;
  3. pdir_loc : Location.t;
}
and directive_argument = {
  1. pdira_desc : directive_argument_desc;
  2. pdira_loc : Location.t;
}
and directive_argument_desc =
  1. | Pdir_string of string
  2. | Pdir_int of string * char option
  3. | Pdir_ident of Longident.t
  4. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_413/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_413/index.html new file mode 100644 index 000000000..48655dbbd --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_413/index.html @@ -0,0 +1,2 @@ + +Ast_413 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_413)

Module Astlib.Ast_413

module Asttypes : sig ... end
module Parsetree : sig ... end
module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_414/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_414/Asttypes/index.html new file mode 100644 index 000000000..ea0960d5b --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_414/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_414.Asttypes)

Module Ast_414.Asttypes

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * Location.t * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
    (*

    label:T -> ...

    *)
  3. | Optional of string
    (*

    ?label:T -> ...

    *)
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | NoVariance
type injectivity =
  1. | Injective
  2. | NoInjectivity
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_414/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_414/Config/index.html new file mode 100644 index 000000000..931b25bf0 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_414/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_414.Config)

Module Ast_414.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_414/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_414/Parsetree/index.html new file mode 100644 index 000000000..e2eb0b01d --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_414/Parsetree/index.html @@ -0,0 +1,22 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_414.Parsetree)

Module Ast_414.Parsetree

type constant =
  1. | Pconst_integer of string * char option
    (*

    Integer constants such as 3 3l 3L 3n.

    Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

    *)
  2. | Pconst_char of char
    (*

    Character such as 'c'.

    *)
  3. | Pconst_string of string * Location.t * string option
    (*

    Constant string such as "constant" or {delim|other constant|delim}.

    The location span the content of the string, without the delimiters.

    *)
  4. | Pconst_float of string * char option
    (*

    Float constant such as 3.4, 2e5 or 1.4e-4.

    Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

    *)
type location_stack = Location.t list

Extension points

type attribute = {
  1. attr_name : string Asttypes.loc;
  2. attr_payload : payload;
  3. attr_loc : Location.t;
}

Attributes such as [\@id ARG] and [\@\@id ARG].

Metadata containers passed around within the AST. The compiler ignores unknown attributes.

and extension = string Asttypes.loc * payload

Extension points such as [%id ARG] and [%%id ARG].

Sub-language placeholder -- rejected by the typechecker.

and attributes = attribute list
and payload =
  1. | PStr of structure
  2. | PSig of signature
    (*

    : SIG in an attribute or an extension point

    *)
  3. | PTyp of core_type
    (*

    : T in an attribute or an extension point

    *)
  4. | PPat of pattern * expression option
    (*

    ? P or ? P when E, in an attribute or an extension point

    *)

Core language

Type expressions

and core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_loc_stack : location_stack;
  4. ptyp_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and core_type_desc =
  1. | Ptyp_any
    (*

    _

    *)
  2. | Ptyp_var of string
    (*

    A type variable such as 'a

    *)
  3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
    (*

    Ptyp_arrow(lbl, T1, T2) represents:

    *)
  4. | Ptyp_tuple of core_type list
    (*

    Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

    Invariant: n >= 2.

    *)
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
    (*

    Ptyp_constr(lident, l) represents:

    • tconstr when l=[],
    • T tconstr when l=[T],
    • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
    *)
  6. | Ptyp_object of object_field list * Asttypes.closed_flag
    (*

    Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

    • < l1:T1; ...; ln:Tn > when flag is Closed,
    • < l1:T1; ...; ln:Tn; .. > when flag is Open.
    *)
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
    (*

    Ptyp_class(tconstr, l) represents:

    • #tconstr when l=[],
    • T #tconstr when l=[T],
    • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
    *)
  8. | Ptyp_alias of core_type * string
    (*

    T as 'a.

    *)
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
    (*

    Ptyp_variant([`A;`B], flag, labels) represents:

    • [ `A|`B ] when flag is Closed, and labels is None,
    • [> `A|`B ] when flag is Open, and labels is None,
    • [< `A|`B ] when flag is Closed, and labels is Some [],
    • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
    *)
  10. | Ptyp_poly of string Asttypes.loc list * core_type
    (*

    'a1 ... 'an. T

    Can only appear in the following context:

    let x : 'a1 ... 'an. T = e ...
    *)
  11. | Ptyp_package of package_type
    (*

    (module S).

    *)
  12. | Ptyp_extension of extension
    (*

    [%id].

    *)

As package_type typed values:

  • (S, []) represents (module S),
  • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
and row_field = {
  1. prf_desc : row_field_desc;
  2. prf_loc : Location.t;
  3. prf_attributes : attributes;
}
and row_field_desc =
  1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
    (*

    Rtag(`A, b, l) represents:

    • `A when b is true and l is [],
    • `A of T when b is false and l is [T],
    • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
    • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
    • The bool field is true if the tag contains a constant (empty) constructor.
    • & occurs when several types are used for the same constructor (see 4.2 in the manual)
    *)
  2. | Rinherit of core_type
    (*

    [ | t ]

    *)
and object_field = {
  1. pof_desc : object_field_desc;
  2. pof_loc : Location.t;
  3. pof_attributes : attributes;
}
and object_field_desc =
  1. | Otag of Asttypes.label Asttypes.loc * core_type
  2. | Oinherit of core_type

Patterns

and pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_loc_stack : location_stack;
  4. ppat_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and pattern_desc =
  1. | Ppat_any
    (*

    The pattern _.

    *)
  2. | Ppat_var of string Asttypes.loc
    (*

    A variable pattern such as x

    *)
  3. | Ppat_alias of pattern * string Asttypes.loc
    (*

    An alias pattern such as P as 'a

    *)
  4. | Ppat_constant of constant
    (*

    Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  5. | Ppat_interval of constant * constant
    (*

    Patterns such as 'a'..'z'.

    Other forms of interval are recognized by the parser but rejected by the type-checker.

    *)
  6. | Ppat_tuple of pattern list
    (*

    Patterns (P1, ..., Pn).

    Invariant: n >= 2

    *)
  7. | Ppat_construct of Longident.t Asttypes.loc + * (string Asttypes.loc list * pattern) option
    (*

    Ppat_construct(C, args) represents:

    • C when args is None,
    • C P when args is Some ([], P)
    • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
    • C (type a b) P when args is Some ([a; b], P)
    *)
  8. | Ppat_variant of Asttypes.label * pattern option
    (*

    Ppat_variant(`A, pat) represents:

    • `A when pat is None,
    • `A P when pat is Some P
    *)
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
    (*

    Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

    • { l1=P1; ...; ln=Pn } when flag is Closed
    • { l1=P1; ...; ln=Pn; _} when flag is Open

    Invariant: n > 0

    *)
  10. | Ppat_array of pattern list
    (*

    Pattern [| P1; ...; Pn |]

    *)
  11. | Ppat_or of pattern * pattern
    (*

    Pattern P1 | P2

    *)
  12. | Ppat_constraint of pattern * core_type
    (*

    Pattern (P : T)

    *)
  13. | Ppat_type of Longident.t Asttypes.loc
    (*

    Pattern #tconst

    *)
  14. | Ppat_lazy of pattern
    (*

    Pattern lazy P

    *)
  15. | Ppat_unpack of string option Asttypes.loc
    (*

    Ppat_unpack(s) represents:

    • (module P) when s is Some "P"
    • (module _) when s is None

    Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

    *)
  16. | Ppat_exception of pattern
    (*

    Pattern exception P

    *)
  17. | Ppat_extension of extension
    (*

    Pattern [%id]

    *)
  18. | Ppat_open of Longident.t Asttypes.loc * pattern
    (*

    Pattern M.(P)

    *)

Value expressions

and expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_loc_stack : location_stack;
  4. pexp_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
    (*

    Identifiers such as x and M.x

    *)
  2. | Pexp_constant of constant
    (*

    Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
    (*

    Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

    • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
    *)
  4. | Pexp_function of case list
    (*

    function P1 -> E1 | ... | Pn -> En

    *)
  5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
    (*

    Pexp_fun(lbl, exp0, P, E1) represents:

    • fun P -> E1 when lbl is Nolabel and exp0 is None
    • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
    • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
    • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

    Notes:

    • If E0 is provided, only Optional is allowed.
    • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
    • let f P = E is represented using Pexp_fun.
    *)
  6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
    (*

    Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

    li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

    Invariant: n > 0

    *)
  7. | Pexp_match of expression * case list
    (*

    match E0 with P1 -> E1 | ... | Pn -> En

    *)
  8. | Pexp_try of expression * case list
    (*

    try E0 with P1 -> E1 | ... | Pn -> En

    *)
  9. | Pexp_tuple of expression list
    (*

    Expressions (E1, ..., En)

    Invariant: n >= 2

    *)
  10. | Pexp_construct of Longident.t Asttypes.loc * expression option
    (*

    Pexp_construct(C, exp) represents:

    • C when exp is None,
    • C E when exp is Some E,
    • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
    *)
  11. | Pexp_variant of Asttypes.label * expression option
    (*

    Pexp_variant(`A, exp) represents

    • `A when exp is None
    • `A E when exp is Some E
    *)
  12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
    (*

    Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

    • { l1=P1; ...; ln=Pn } when exp0 is None
    • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

    Invariant: n > 0

    *)
  13. | Pexp_field of expression * Longident.t Asttypes.loc
    (*

    E.l

    *)
  14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
    (*

    E1.l <- E2

    *)
  15. | Pexp_array of expression list
    (*

    [| E1; ...; En |]

    *)
  16. | Pexp_ifthenelse of expression * expression * expression option
    (*

    if E1 then E2 else E3

    *)
  17. | Pexp_sequence of expression * expression
    (*

    E1; E2

    *)
  18. | Pexp_while of expression * expression
    (*

    while E1 do E2 done

    *)
  19. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
    (*

    Pexp_for(i, E1, E2, direction, E3) represents:

    • for i = E1 to E2 do E3 done when direction is Upto
    • for i = E1 downto E2 do E3 done when direction is Downto
    *)
  20. | Pexp_constraint of expression * core_type
    (*

    (E : T)

    *)
  21. | Pexp_coerce of expression * core_type option * core_type
    (*

    Pexp_coerce(E, from, T) represents

    • (E :> T) when from is None,
    • (E : T0 :> T) when from is Some T0.
    *)
  22. | Pexp_send of expression * Asttypes.label Asttypes.loc
    (*

    E # m

    *)
  23. | Pexp_new of Longident.t Asttypes.loc
    (*

    new M.c

    *)
  24. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
    (*

    x <- 2

    *)
  25. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
    (*

    {< x1 = E1; ...; xn = En >}

    *)
  26. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
    (*

    let module M = ME in E

    *)
  27. | Pexp_letexception of extension_constructor * expression
    (*

    let exception C in E

    *)
  28. | Pexp_assert of expression
    (*

    assert E.

    Note: assert false is treated in a special way by the type-checker.

    *)
  29. | Pexp_lazy of expression
    (*

    lazy E

    *)
  30. | Pexp_poly of expression * core_type option
    (*

    Used for method bodies.

    Can only be used as the expression under Cfk_concrete for methods (not values).

    *)
  31. | Pexp_object of class_structure
    (*

    object ... end

    *)
  32. | Pexp_newtype of string Asttypes.loc * expression
    (*

    fun (type t) -> E

    *)
  33. | Pexp_pack of module_expr
    (*

    (module ME).

    (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

    *)
  34. | Pexp_open of open_declaration * expression
    (*
    • M.(E)
    • let open M in E
    • let open! M in E
    *)
  35. | Pexp_letop of letop
    (*
    • let* P = E0 in E1
    • let* P0 = E00 and* P1 = E01 in E1
    *)
  36. | Pexp_extension of extension
    (*

    [%id]

    *)
  37. | Pexp_unreachable
    (*

    .

    *)
and case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}

Values of type case represents (P -> E) or (P when E0 -> E)

and letop = {
  1. let_ : binding_op;
  2. ands : binding_op list;
  3. body : expression;
}
and binding_op = {
  1. pbop_op : string Asttypes.loc;
  2. pbop_pat : pattern;
  3. pbop_exp : expression;
  4. pbop_loc : Location.t;
}

Value descriptions

and value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  5. pval_loc : Location.t;
}

Values of type value_description represents:

  • val x: T, when pval_prim is []
  • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

Type declarations

and type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    (*

    ('a1,...'an) t

    *)
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
    (*

    ... constraint T1=T1' ... constraint Tn=Tn'

    *)
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
    (*

    for = private ...

    *)
  6. ptype_manifest : core_type option;
    (*

    represents = T

    *)
  7. ptype_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  8. ptype_loc : Location.t;
}

Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

  • type t when type_kind is Ptype_abstract, and manifest is None,
  • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
  • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
  • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
  • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
  • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
  • type t = .. when type_kind is Ptype_open, and manifest is None.
and type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
    (*

    Invariant: non-empty list

    *)
  4. | Ptype_open
and label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
    (*

    l : T [\@id1] [\@id2]

    *)
}

Note: T can be a Ptyp_poly.

and constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_vars : string Asttypes.loc list;
  3. pcd_args : constructor_arguments;
  4. pcd_res : core_type option;
  5. pcd_loc : Location.t;
  6. pcd_attributes : attributes;
    (*

    C of ... [\@id1] [\@id2]

    *)
}
and constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
    (*

    Values of type constructor_declaration represents the constructor arguments of:

    • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
    • C: T0 when res = Some T0, and args = Pcstr_tuple [],
    • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
    • C of {...} when res = None, and args = Pcstr_record [...],
    • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
    *)
and type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_loc : Location.t;
  6. ptyext_attributes : attributes;
    (*

    ... \@\@id1 \@\@id2

    *)
}

Definition of new extensions constructors for the extensive sum type t (type t += ...).

and extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
    (*

    C of ... [\@id1] [\@id2]

    *)
}
and type_exception = {
  1. ptyexn_constructor : extension_constructor;
  2. ptyexn_loc : Location.t;
  3. ptyexn_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}

Definition of a new exception (exception E).

and extension_constructor_kind =
  1. | Pext_decl of string Asttypes.loc list + * constructor_arguments + * core_type option
    (*

    Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

    • C of T1 * ... * Tn when:

      • existentials is [],
      • c_args is [T1; ...; Tn],
      • t_opt is None.
    • C: T0 when

      • existentials is [],
      • c_args is [],
      • t_opt is Some T0.
    • C: T1 * ... * Tn -> T0 when

      • existentials is [],
      • c_args is [T1; ...; Tn],
      • t_opt is Some T0.
    • C: 'a... . T1 * ... * Tn -> T0 when

      • existentials is ['a;...],
      • c_args is [T1; ... ; Tn],
      • t_opt is Some T0.
    *)
  2. | Pext_rebind of Longident.t Asttypes.loc
    (*

    Pext_rebind(D) re-export the constructor D with the new name C

    *)

Class language

Type expressions for the class language

and class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
    (*
    • c
    • ['a1, ..., 'an] c
    *)
  2. | Pcty_signature of class_signature
    (*

    object ... end

    *)
  3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
    (*

    Pcty_arrow(lbl, T, CT) represents:

    *)
  4. | Pcty_extension of extension
    (*

    %id

    *)
  5. | Pcty_open of open_description * class_type
    (*

    let open M in CT

    *)
and class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}

Values of type class_signature represents:

and class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}
and class_type_field_desc =
  1. | Pctf_inherit of class_type
    (*

    inherit CT

    *)
  2. | Pctf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * Asttypes.virtual_flag + * core_type
    (*

    val x: T

    *)
  3. | Pctf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
    (*

    method x: T

    Note: T can be a Ptyp_poly.

    *)
  4. | Pctf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  5. | Pctf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  6. | Pctf_extension of extension
    (*

    [%%id]

    *)
and 'a class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}

Values of type class_expr class_infos represents:

  • class c = ...
  • class ['a1,...,'an] c = ...
  • class virtual c = ...

They are also used for "class type" declaration.

and class_description = class_type class_infos
and class_type_declaration = class_type class_infos

Value expressions for the class language

and class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
    (*

    c and ['a1, ..., 'an] c

    *)
  2. | Pcl_structure of class_structure
    (*

    object ... end

    *)
  3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
    (*

    Pcl_fun(lbl, exp0, P, CE) represents:

    • fun P -> CE when lbl is Nolabel and exp0 is None,
    • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
    • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
    • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
    *)
  4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
    (*

    Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

    Invariant: n > 0

    *)
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
    (*

    Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

    • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
    *)
  6. | Pcl_constraint of class_expr * class_type
    (*

    (CE : CT)

    *)
  7. | Pcl_extension of extension
    (*

    [%id]

    *)
  8. | Pcl_open of open_description * class_expr
    (*

    let open M in CE

    *)
and class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}

Values of type class_structure represents:

and class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}
and class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
    (*

    Pcf_inherit(flag, CE, s) represents:

    • inherit CE when flag is Fresh and s is None,
    • inherit CE as x when flag is Fresh and s is Some x,
    • inherit! CE when flag is Override and s is None,
    • inherit! CE as x when flag is Override and s is Some x
    *)
  2. | Pcf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * class_field_kind
    (*

    Pcf_val(x,flag, kind) represents:

    *)
  3. | Pcf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * class_field_kind
    (**)
  4. | Pcf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  5. | Pcf_initializer of expression
    (*

    initializer E

    *)
  6. | Pcf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  7. | Pcf_extension of extension
    (*

    [%%id]

    *)
and class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

Type expressions for the module language

and module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
    (*

    Pmty_ident(S) represents S

    *)
  2. | Pmty_signature of signature
    (*

    sig ... end

    *)
  3. | Pmty_functor of functor_parameter * module_type
    (*

    functor(X : MT1) -> MT2

    *)
  4. | Pmty_with of module_type * with_constraint list
    (*

    MT with ...

    *)
  5. | Pmty_typeof of module_expr
    (*

    module type of ME

    *)
  6. | Pmty_extension of extension
    (*

    [%id]

    *)
  7. | Pmty_alias of Longident.t Asttypes.loc
    (*

    (module M)

    *)
and functor_parameter =
  1. | Unit
    (*

    ()

    *)
  2. | Named of string option Asttypes.loc * module_type
    (*

    Named(name, MT) represents:

    • (X : MT) when name is Some X,
    • (_ : MT) when name is None
    *)
and signature = signature_item list
and signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc =
  1. | Psig_value of value_description
    (*
    • val x: T
    • external x: T = "s1" ... "sn"
    *)
  2. | Psig_type of Asttypes.rec_flag * type_declaration list
    (*

    type t1 = ... and ... and tn = ...

    *)
  3. | Psig_typesubst of type_declaration list
    (*

    type t1 := ... and ... and tn := ...

    *)
  4. | Psig_typext of type_extension
    (*

    type t1 += ...

    *)
  5. | Psig_exception of type_exception
    (*

    exception C of T

    *)
  6. | Psig_module of module_declaration
    (*

    module X = M and module X : MT

    *)
  7. | Psig_modsubst of module_substitution
    (*

    module X := M

    *)
  8. | Psig_recmodule of module_declaration list
    (*

    module rec X1 : MT1 and ... and Xn : MTn

    *)
  9. | Psig_modtype of module_type_declaration
    (*

    module type S = MT and module type S

    *)
  10. | Psig_modtypesubst of module_type_declaration
    (*

    module type S := ...

    *)
  11. | Psig_open of open_description
    (*

    open X

    *)
  12. | Psig_include of include_description
    (*

    include MT

    *)
  13. | Psig_class of class_description list
    (*

    class c1 : ... and ... and cn : ...

    *)
  14. | Psig_class_type of class_type_declaration list
    (*

    class type ct1 = ... and ... and ctn = ...

    *)
  15. | Psig_attribute of attribute
    (*

    [\@\@\@id]

    *)
  16. | Psig_extension of extension * attributes
    (*

    [%%id]

    *)
and module_declaration = {
  1. pmd_name : string option Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pmd_loc : Location.t;
}

Values of type module_declaration represents S : MT

and module_substitution = {
  1. pms_name : string Asttypes.loc;
  2. pms_manifest : Longident.t Asttypes.loc;
  3. pms_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pms_loc : Location.t;
}

Values of type module_substitution represents S := M

and module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pmtd_loc : Location.t;
}

Values of type module_type_declaration represents:

  • S = MT,
  • S for abstract module type declaration, when pmtd_type is None.
and 'a open_infos = {
  1. popen_expr : 'a;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}

Values of type 'a open_infos represents:

and open_description = Longident.t Asttypes.loc open_infos

Values of type open_description represents:

  • open M.N
  • open M(N).O
and open_declaration = module_expr open_infos

Values of type open_declaration represents:

  • open M.N
  • open M(N).O
  • open struct ... end
and 'a include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos

Values of type include_description represents include MT

and include_declaration = module_expr include_infos

Values of type include_declaration represents include ME

and with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
    (*

    with type X.t = ...

    Note: the last component of the longident must match the name of the type_declaration.

    *)
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    (*

    with module X.Y = Z

    *)
  3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
    (*

    with module type X.Y = Z

    *)
  4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
    (*

    with module type X.Y := sig end

    *)
  5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
    (*

    with type X.t := ..., same format as [Pwith_type]

    *)
  6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    (*

    with module X.Y := Z

    *)

Value expressions for the module language

and module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
    (*

    X

    *)
  2. | Pmod_structure of structure
    (*

    struct ... end

    *)
  3. | Pmod_functor of functor_parameter * module_expr
    (*

    functor(X : MT1) -> ME

    *)
  4. | Pmod_apply of module_expr * module_expr
    (*

    ME1(ME2)

    *)
  5. | Pmod_constraint of module_expr * module_type
    (*

    (ME : MT)

    *)
  6. | Pmod_unpack of expression
    (*

    (val E)

    *)
  7. | Pmod_extension of extension
    (*

    [%id]

    *)
and structure = structure_item list
and structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc =
  1. | Pstr_eval of expression * attributes
    (*

    E

    *)
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
    (*

    Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

    • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
    *)
  3. | Pstr_primitive of value_description
    (*
    • val x: T
    • external x: T = "s1" ... "sn"
    *)
  4. | Pstr_type of Asttypes.rec_flag * type_declaration list
    (*

    type t1 = ... and ... and tn = ...

    *)
  5. | Pstr_typext of type_extension
    (*

    type t1 += ...

    *)
  6. | Pstr_exception of type_exception
    (*
    • exception C of T
    • exception C = M.X
    *)
  7. | Pstr_module of module_binding
    (*

    module X = ME

    *)
  8. | Pstr_recmodule of module_binding list
    (*

    module rec X1 = ME1 and ... and Xn = MEn

    *)
  9. | Pstr_modtype of module_type_declaration
    (*

    module type S = MT

    *)
  10. | Pstr_open of open_declaration
    (*

    open X

    *)
  11. | Pstr_class of class_declaration list
    (*

    class c1 = ... and ... and cn = ...

    *)
  12. | Pstr_class_type of class_type_declaration list
    (*

    class type ct1 = ... and ... and ctn = ...

    *)
  13. | Pstr_include of include_declaration
    (*

    include ME

    *)
  14. | Pstr_attribute of attribute
    (*

    [\@\@\@id]

    *)
  15. | Pstr_extension of extension * attributes
    (*

    [%%id]

    *)
and value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_attributes : attributes;
  4. pvb_loc : Location.t;
}
and module_binding = {
  1. pmb_name : string option Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Values of type module_binding represents module X = ME

Toplevel

Toplevel phrases

type toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of toplevel_directive
    (*

    #use, #load ...

    *)
and toplevel_directive = {
  1. pdir_name : string Asttypes.loc;
  2. pdir_arg : directive_argument option;
  3. pdir_loc : Location.t;
}
and directive_argument = {
  1. pdira_desc : directive_argument_desc;
  2. pdira_loc : Location.t;
}
and directive_argument_desc =
  1. | Pdir_string of string
  2. | Pdir_int of string * char option
  3. | Pdir_ident of Longident.t
  4. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_414/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_414/index.html new file mode 100644 index 000000000..e6cc2b796 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_414/index.html @@ -0,0 +1,2 @@ + +Ast_414 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_414)

Module Astlib.Ast_414

module Asttypes : sig ... end
module Parsetree : sig ... end
module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_500/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_500/Asttypes/index.html new file mode 100644 index 000000000..f674ea439 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_500/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_500.Asttypes)

Module Ast_500.Asttypes

include module type of struct include Ast_414.Asttypes end
type constant = Ast_414.Asttypes.constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * Location.t * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag = Ast_414.Asttypes.rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag = Ast_414.Asttypes.direction_flag =
  1. | Upto
  2. | Downto
type private_flag = Ast_414.Asttypes.private_flag =
  1. | Private
  2. | Public
type mutable_flag = Ast_414.Asttypes.mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag = Ast_414.Asttypes.virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag = Ast_414.Asttypes.override_flag =
  1. | Override
  2. | Fresh
type closed_flag = Ast_414.Asttypes.closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label = Ast_414.Asttypes.arg_label =
  1. | Nolabel
  2. | Labelled of string
    (*

    label:T -> ...

    *)
  3. | Optional of string
    (*

    ?label:T -> ...

    *)
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance = Ast_414.Asttypes.variance =
  1. | Covariant
  2. | Contravariant
  3. | NoVariance
type injectivity = Ast_414.Asttypes.injectivity =
  1. | Injective
  2. | NoInjectivity
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_500/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_500/Config/index.html new file mode 100644 index 000000000..040df50f2 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_500/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_500.Config)

Module Ast_500.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_500/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_500/Parsetree/index.html new file mode 100644 index 000000000..2b306d87f --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_500/Parsetree/index.html @@ -0,0 +1,42 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_500.Parsetree)

Module Ast_500.Parsetree

include module type of struct include Ast_414.Parsetree end
type constant = Ast_414.Parsetree.constant =
  1. | Pconst_integer of string * char option
    (*

    Integer constants such as 3 3l 3L 3n.

    Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

    *)
  2. | Pconst_char of char
    (*

    Character such as 'c'.

    *)
  3. | Pconst_string of string * Location.t * string option
    (*

    Constant string such as "constant" or {delim|other constant|delim}.

    The location span the content of the string, without the delimiters.

    *)
  4. | Pconst_float of string * char option
    (*

    Float constant such as 3.4, 2e5 or 1.4e-4.

    Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

    *)
type location_stack = Location.t list

Extension points

type attribute = Ast_414.Parsetree.attribute = {
  1. attr_name : string Ast_414.Asttypes.loc;
  2. attr_payload : payload;
  3. attr_loc : Location.t;
}

Attributes such as [\@id ARG] and [\@\@id ARG].

Metadata containers passed around within the AST. The compiler ignores unknown attributes.

and extension = string Ast_414.Asttypes.loc * payload

Extension points such as [%id ARG] and [%%id ARG].

Sub-language placeholder -- rejected by the typechecker.

and attributes = attribute list
and payload = Ast_414.Parsetree.payload =
  1. | PStr of structure
  2. | PSig of signature
    (*

    : SIG in an attribute or an extension point

    *)
  3. | PTyp of core_type
    (*

    : T in an attribute or an extension point

    *)
  4. | PPat of pattern * expression option
    (*

    ? P or ? P when E, in an attribute or an extension point

    *)

Core language

Type expressions

and core_type = Ast_414.Parsetree.core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_loc_stack : location_stack;
  4. ptyp_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and core_type_desc = Ast_414.Parsetree.core_type_desc =
  1. | Ptyp_any
    (*

    _

    *)
  2. | Ptyp_var of string
    (*

    A type variable such as 'a

    *)
  3. | Ptyp_arrow of Ast_414.Asttypes.arg_label * core_type * core_type
    (*

    Ptyp_arrow(lbl, T1, T2) represents:

    *)
  4. | Ptyp_tuple of core_type list
    (*

    Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

    Invariant: n >= 2.

    *)
  5. | Ptyp_constr of Longident.t Ast_414.Asttypes.loc * core_type list
    (*

    Ptyp_constr(lident, l) represents:

    • tconstr when l=[],
    • T tconstr when l=[T],
    • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
    *)
  6. | Ptyp_object of object_field list * Ast_414.Asttypes.closed_flag
    (*

    Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

    • < l1:T1; ...; ln:Tn > when flag is Closed,
    • < l1:T1; ...; ln:Tn; .. > when flag is Open.
    *)
  7. | Ptyp_class of Longident.t Ast_414.Asttypes.loc * core_type list
    (*

    Ptyp_class(tconstr, l) represents:

    • #tconstr when l=[],
    • T #tconstr when l=[T],
    • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
    *)
  8. | Ptyp_alias of core_type * string
    (*

    T as 'a.

    *)
  9. | Ptyp_variant of row_field list + * Ast_414.Asttypes.closed_flag + * Ast_414.Asttypes.label list option
    (*

    Ptyp_variant([`A;`B], flag, labels) represents:

    • [ `A|`B ] when flag is Closed, and labels is None,
    • [> `A|`B ] when flag is Open, and labels is None,
    • [< `A|`B ] when flag is Closed, and labels is Some [],
    • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
    *)
  10. | Ptyp_poly of string Ast_414.Asttypes.loc list * core_type
    (*

    'a1 ... 'an. T

    Can only appear in the following context:

    let x : 'a1 ... 'an. T = e ...
    *)
  11. | Ptyp_package of package_type
    (*

    (module S).

    *)
  12. | Ptyp_extension of extension
    (*

    [%id].

    *)

As package_type typed values:

  • (S, []) represents (module S),
  • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
and row_field = Ast_414.Parsetree.row_field = {
  1. prf_desc : row_field_desc;
  2. prf_loc : Location.t;
  3. prf_attributes : attributes;
}
and row_field_desc = Ast_414.Parsetree.row_field_desc =
  1. | Rtag of Ast_414.Asttypes.label Ast_414.Asttypes.loc * bool * core_type list
    (*

    Rtag(`A, b, l) represents:

    • `A when b is true and l is [],
    • `A of T when b is false and l is [T],
    • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
    • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
    • The bool field is true if the tag contains a constant (empty) constructor.
    • & occurs when several types are used for the same constructor (see 4.2 in the manual)
    *)
  2. | Rinherit of core_type
    (*

    [ | t ]

    *)
and object_field = Ast_414.Parsetree.object_field = {
  1. pof_desc : object_field_desc;
  2. pof_loc : Location.t;
  3. pof_attributes : attributes;
}

Patterns

and pattern = Ast_414.Parsetree.pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_loc_stack : location_stack;
  4. ppat_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and pattern_desc = Ast_414.Parsetree.pattern_desc =
  1. | Ppat_any
    (*

    The pattern _.

    *)
  2. | Ppat_var of string Ast_414.Asttypes.loc
    (*

    A variable pattern such as x

    *)
  3. | Ppat_alias of pattern * string Ast_414.Asttypes.loc
    (*

    An alias pattern such as P as 'a

    *)
  4. | Ppat_constant of constant
    (*

    Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  5. | Ppat_interval of constant * constant
    (*

    Patterns such as 'a'..'z'.

    Other forms of interval are recognized by the parser but rejected by the type-checker.

    *)
  6. | Ppat_tuple of pattern list
    (*

    Patterns (P1, ..., Pn).

    Invariant: n >= 2

    *)
  7. | Ppat_construct of Longident.t Ast_414.Asttypes.loc + * (string Ast_414.Asttypes.loc list * pattern) option
    (*

    Ppat_construct(C, args) represents:

    • C when args is None,
    • C P when args is Some ([], P)
    • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
    • C (type a b) P when args is Some ([a; b], P)
    *)
  8. | Ppat_variant of Ast_414.Asttypes.label * pattern option
    (*

    Ppat_variant(`A, pat) represents:

    • `A when pat is None,
    • `A P when pat is Some P
    *)
  9. | Ppat_record of (Longident.t Ast_414.Asttypes.loc * pattern) list + * Ast_414.Asttypes.closed_flag
    (*

    Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

    • { l1=P1; ...; ln=Pn } when flag is Closed
    • { l1=P1; ...; ln=Pn; _} when flag is Open

    Invariant: n > 0

    *)
  10. | Ppat_array of pattern list
    (*

    Pattern [| P1; ...; Pn |]

    *)
  11. | Ppat_or of pattern * pattern
    (*

    Pattern P1 | P2

    *)
  12. | Ppat_constraint of pattern * core_type
    (*

    Pattern (P : T)

    *)
  13. | Ppat_type of Longident.t Ast_414.Asttypes.loc
    (*

    Pattern #tconst

    *)
  14. | Ppat_lazy of pattern
    (*

    Pattern lazy P

    *)
  15. | Ppat_unpack of string option Ast_414.Asttypes.loc
    (*

    Ppat_unpack(s) represents:

    • (module P) when s is Some "P"
    • (module _) when s is None

    Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

    *)
  16. | Ppat_exception of pattern
    (*

    Pattern exception P

    *)
  17. | Ppat_extension of extension
    (*

    Pattern [%id]

    *)
  18. | Ppat_open of Longident.t Ast_414.Asttypes.loc * pattern
    (*

    Pattern M.(P)

    *)

Value expressions

and expression = Ast_414.Parsetree.expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_loc_stack : location_stack;
  4. pexp_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and expression_desc = Ast_414.Parsetree.expression_desc =
  1. | Pexp_ident of Longident.t Ast_414.Asttypes.loc
    (*

    Identifiers such as x and M.x

    *)
  2. | Pexp_constant of constant
    (*

    Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  3. | Pexp_let of Ast_414.Asttypes.rec_flag * value_binding list * expression
    (*

    Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

    • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
    *)
  4. | Pexp_function of case list
    (*

    function P1 -> E1 | ... | Pn -> En

    *)
  5. | Pexp_fun of Ast_414.Asttypes.arg_label + * expression option + * pattern + * expression
    (*

    Pexp_fun(lbl, exp0, P, E1) represents:

    • fun P -> E1 when lbl is Nolabel and exp0 is None
    • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
    • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
    • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

    Notes:

    • If E0 is provided, only Optional is allowed.
    • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
    • let f P = E is represented using Pexp_fun.
    *)
  6. | Pexp_apply of expression * (Ast_414.Asttypes.arg_label * expression) list
    (*

    Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

    li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

    Invariant: n > 0

    *)
  7. | Pexp_match of expression * case list
    (*

    match E0 with P1 -> E1 | ... | Pn -> En

    *)
  8. | Pexp_try of expression * case list
    (*

    try E0 with P1 -> E1 | ... | Pn -> En

    *)
  9. | Pexp_tuple of expression list
    (*

    Expressions (E1, ..., En)

    Invariant: n >= 2

    *)
  10. | Pexp_construct of Longident.t Ast_414.Asttypes.loc * expression option
    (*

    Pexp_construct(C, exp) represents:

    • C when exp is None,
    • C E when exp is Some E,
    • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
    *)
  11. | Pexp_variant of Ast_414.Asttypes.label * expression option
    (*

    Pexp_variant(`A, exp) represents

    • `A when exp is None
    • `A E when exp is Some E
    *)
  12. | Pexp_record of (Longident.t Ast_414.Asttypes.loc * expression) list + * expression option
    (*

    Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

    • { l1=P1; ...; ln=Pn } when exp0 is None
    • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

    Invariant: n > 0

    *)
  13. | Pexp_field of expression * Longident.t Ast_414.Asttypes.loc
    (*

    E.l

    *)
  14. | Pexp_setfield of expression * Longident.t Ast_414.Asttypes.loc * expression
    (*

    E1.l <- E2

    *)
  15. | Pexp_array of expression list
    (*

    [| E1; ...; En |]

    *)
  16. | Pexp_ifthenelse of expression * expression * expression option
    (*

    if E1 then E2 else E3

    *)
  17. | Pexp_sequence of expression * expression
    (*

    E1; E2

    *)
  18. | Pexp_while of expression * expression
    (*

    while E1 do E2 done

    *)
  19. | Pexp_for of pattern + * expression + * expression + * Ast_414.Asttypes.direction_flag + * expression
    (*

    Pexp_for(i, E1, E2, direction, E3) represents:

    • for i = E1 to E2 do E3 done when direction is Upto
    • for i = E1 downto E2 do E3 done when direction is Downto
    *)
  20. | Pexp_constraint of expression * core_type
    (*

    (E : T)

    *)
  21. | Pexp_coerce of expression * core_type option * core_type
    (*

    Pexp_coerce(E, from, T) represents

    • (E :> T) when from is None,
    • (E : T0 :> T) when from is Some T0.
    *)
  22. | Pexp_send of expression * Ast_414.Asttypes.label Ast_414.Asttypes.loc
    (*

    E # m

    *)
  23. | Pexp_new of Longident.t Ast_414.Asttypes.loc
    (*

    new M.c

    *)
  24. | Pexp_setinstvar of Ast_414.Asttypes.label Ast_414.Asttypes.loc * expression
    (*

    x <- 2

    *)
  25. | Pexp_override of (Ast_414.Asttypes.label Ast_414.Asttypes.loc * expression) + list
    (*

    {< x1 = E1; ...; xn = En >}

    *)
  26. | Pexp_letmodule of string option Ast_414.Asttypes.loc * module_expr * expression
    (*

    let module M = ME in E

    *)
  27. | Pexp_letexception of extension_constructor * expression
    (*

    let exception C in E

    *)
  28. | Pexp_assert of expression
    (*

    assert E.

    Note: assert false is treated in a special way by the type-checker.

    *)
  29. | Pexp_lazy of expression
    (*

    lazy E

    *)
  30. | Pexp_poly of expression * core_type option
    (*

    Used for method bodies.

    Can only be used as the expression under Cfk_concrete for methods (not values).

    *)
  31. | Pexp_object of class_structure
    (*

    object ... end

    *)
  32. | Pexp_newtype of string Ast_414.Asttypes.loc * expression
    (*

    fun (type t) -> E

    *)
  33. | Pexp_pack of module_expr
    (*

    (module ME).

    (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

    *)
  34. | Pexp_open of open_declaration * expression
    (*
    • M.(E)
    • let open M in E
    • let open! M in E
    *)
  35. | Pexp_letop of letop
    (*
    • let* P = E0 in E1
    • let* P0 = E00 and* P1 = E01 in E1
    *)
  36. | Pexp_extension of extension
    (*

    [%id]

    *)
  37. | Pexp_unreachable
    (*

    .

    *)
and case = Ast_414.Parsetree.case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}

Values of type case represents (P -> E) or (P when E0 -> E)

and letop = Ast_414.Parsetree.letop = {
  1. let_ : binding_op;
  2. ands : binding_op list;
  3. body : expression;
}
and binding_op = Ast_414.Parsetree.binding_op = {
  1. pbop_op : string Ast_414.Asttypes.loc;
  2. pbop_pat : pattern;
  3. pbop_exp : expression;
  4. pbop_loc : Location.t;
}

Value descriptions

and value_description = Ast_414.Parsetree.value_description = {
  1. pval_name : string Ast_414.Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  5. pval_loc : Location.t;
}

Values of type value_description represents:

  • val x: T, when pval_prim is []
  • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

Type declarations

and type_declaration = Ast_414.Parsetree.type_declaration = {
  1. ptype_name : string Ast_414.Asttypes.loc;
  2. ptype_params : (core_type + * (Ast_414.Asttypes.variance * Ast_414.Asttypes.injectivity)) + list;
    (*

    ('a1,...'an) t

    *)
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
    (*

    ... constraint T1=T1' ... constraint Tn=Tn'

    *)
  4. ptype_kind : type_kind;
  5. ptype_private : Ast_414.Asttypes.private_flag;
    (*

    for = private ...

    *)
  6. ptype_manifest : core_type option;
    (*

    represents = T

    *)
  7. ptype_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  8. ptype_loc : Location.t;
}

Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

  • type t when type_kind is Ptype_abstract, and manifest is None,
  • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
  • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
  • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
  • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
  • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
  • type t = .. when type_kind is Ptype_open, and manifest is None.
and type_kind = Ast_414.Parsetree.type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
    (*

    Invariant: non-empty list

    *)
  4. | Ptype_open
and label_declaration = Ast_414.Parsetree.label_declaration = {
  1. pld_name : string Ast_414.Asttypes.loc;
  2. pld_mutable : Ast_414.Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
    (*

    l : T [\@id1] [\@id2]

    *)
}

Note: T can be a Ptyp_poly.

and constructor_declaration = Ast_414.Parsetree.constructor_declaration = {
  1. pcd_name : string Ast_414.Asttypes.loc;
  2. pcd_vars : string Ast_414.Asttypes.loc list;
  3. pcd_args : constructor_arguments;
  4. pcd_res : core_type option;
  5. pcd_loc : Location.t;
  6. pcd_attributes : attributes;
    (*

    C of ... [\@id1] [\@id2]

    *)
}
and constructor_arguments = Ast_414.Parsetree.constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
    (*

    Values of type constructor_declaration represents the constructor arguments of:

    • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
    • C: T0 when res = Some T0, and args = Pcstr_tuple [],
    • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
    • C of {...} when res = None, and args = Pcstr_record [...],
    • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
    *)
and type_extension = Ast_414.Parsetree.type_extension = {
  1. ptyext_path : Longident.t Ast_414.Asttypes.loc;
  2. ptyext_params : (core_type + * (Ast_414.Asttypes.variance * Ast_414.Asttypes.injectivity)) + list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Ast_414.Asttypes.private_flag;
  5. ptyext_loc : Location.t;
  6. ptyext_attributes : attributes;
    (*

    ... \@\@id1 \@\@id2

    *)
}

Definition of new extensions constructors for the extensive sum type t (type t += ...).

and extension_constructor = Ast_414.Parsetree.extension_constructor = {
  1. pext_name : string Ast_414.Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
    (*

    C of ... [\@id1] [\@id2]

    *)
}
and type_exception = Ast_414.Parsetree.type_exception = {
  1. ptyexn_constructor : extension_constructor;
  2. ptyexn_loc : Location.t;
  3. ptyexn_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}

Definition of a new exception (exception E).

and extension_constructor_kind = Ast_414.Parsetree.extension_constructor_kind =
  1. | Pext_decl of string Ast_414.Asttypes.loc list + * constructor_arguments + * core_type option
    (*

    Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

    • C of T1 * ... * Tn when:

      • existentials is [],
      • c_args is [T1; ...; Tn],
      • t_opt is None.
    • C: T0 when

      • existentials is [],
      • c_args is [],
      • t_opt is Some T0.
    • C: T1 * ... * Tn -> T0 when

      • existentials is [],
      • c_args is [T1; ...; Tn],
      • t_opt is Some T0.
    • C: 'a... . T1 * ... * Tn -> T0 when

      • existentials is ['a;...],
      • c_args is [T1; ... ; Tn],
      • t_opt is Some T0.
    *)
  2. | Pext_rebind of Longident.t Ast_414.Asttypes.loc
    (*

    Pext_rebind(D) re-export the constructor D with the new name C

    *)

Class language

Type expressions for the class language

and class_type = Ast_414.Parsetree.class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and class_type_desc = Ast_414.Parsetree.class_type_desc =
  1. | Pcty_constr of Longident.t Ast_414.Asttypes.loc * core_type list
    (*
    • c
    • ['a1, ..., 'an] c
    *)
  2. | Pcty_signature of class_signature
    (*

    object ... end

    *)
  3. | Pcty_arrow of Ast_414.Asttypes.arg_label * core_type * class_type
    (*

    Pcty_arrow(lbl, T, CT) represents:

    *)
  4. | Pcty_extension of extension
    (*

    %id

    *)
  5. | Pcty_open of open_description * class_type
    (*

    let open M in CT

    *)
and class_signature = Ast_414.Parsetree.class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}

Values of type class_signature represents:

and class_type_field = Ast_414.Parsetree.class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}
and class_type_field_desc = Ast_414.Parsetree.class_type_field_desc =
  1. | Pctf_inherit of class_type
    (*

    inherit CT

    *)
  2. | Pctf_val of Ast_414.Asttypes.label Ast_414.Asttypes.loc + * Ast_414.Asttypes.mutable_flag + * Ast_414.Asttypes.virtual_flag + * core_type
    (*

    val x: T

    *)
  3. | Pctf_method of Ast_414.Asttypes.label Ast_414.Asttypes.loc + * Ast_414.Asttypes.private_flag + * Ast_414.Asttypes.virtual_flag + * core_type
    (*

    method x: T

    Note: T can be a Ptyp_poly.

    *)
  4. | Pctf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  5. | Pctf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  6. | Pctf_extension of extension
    (*

    [%%id]

    *)
and 'a class_infos = 'a Ast_414.Parsetree.class_infos = {
  1. pci_virt : Ast_414.Asttypes.virtual_flag;
  2. pci_params : (core_type + * (Ast_414.Asttypes.variance * Ast_414.Asttypes.injectivity)) + list;
  3. pci_name : string Ast_414.Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}

Values of type class_expr class_infos represents:

  • class c = ...
  • class ['a1,...,'an] c = ...
  • class virtual c = ...

They are also used for "class type" declaration.

and class_description = class_type class_infos
and class_type_declaration = class_type class_infos

Value expressions for the class language

and class_expr = Ast_414.Parsetree.class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and class_expr_desc = Ast_414.Parsetree.class_expr_desc =
  1. | Pcl_constr of Longident.t Ast_414.Asttypes.loc * core_type list
    (*

    c and ['a1, ..., 'an] c

    *)
  2. | Pcl_structure of class_structure
    (*

    object ... end

    *)
  3. | Pcl_fun of Ast_414.Asttypes.arg_label + * expression option + * pattern + * class_expr
    (*

    Pcl_fun(lbl, exp0, P, CE) represents:

    • fun P -> CE when lbl is Nolabel and exp0 is None,
    • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
    • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
    • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
    *)
  4. | Pcl_apply of class_expr * (Ast_414.Asttypes.arg_label * expression) list
    (*

    Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

    Invariant: n > 0

    *)
  5. | Pcl_let of Ast_414.Asttypes.rec_flag * value_binding list * class_expr
    (*

    Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

    • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
    *)
  6. | Pcl_constraint of class_expr * class_type
    (*

    (CE : CT)

    *)
  7. | Pcl_extension of extension
    (*

    [%id]

    *)
  8. | Pcl_open of open_description * class_expr
    (*

    let open M in CE

    *)
and class_structure = Ast_414.Parsetree.class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}

Values of type class_structure represents:

and class_field = Ast_414.Parsetree.class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}
and class_field_desc = Ast_414.Parsetree.class_field_desc =
  1. | Pcf_inherit of Ast_414.Asttypes.override_flag + * class_expr + * string Ast_414.Asttypes.loc option
    (*

    Pcf_inherit(flag, CE, s) represents:

    • inherit CE when flag is Fresh and s is None,
    • inherit CE as x when flag is Fresh and s is Some x,
    • inherit! CE when flag is Override and s is None,
    • inherit! CE as x when flag is Override and s is Some x
    *)
  2. | Pcf_val of Ast_414.Asttypes.label Ast_414.Asttypes.loc + * Ast_414.Asttypes.mutable_flag + * class_field_kind
    (*

    Pcf_val(x,flag, kind) represents:

    *)
  3. | Pcf_method of Ast_414.Asttypes.label Ast_414.Asttypes.loc + * Ast_414.Asttypes.private_flag + * class_field_kind
    (**)
  4. | Pcf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  5. | Pcf_initializer of expression
    (*

    initializer E

    *)
  6. | Pcf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  7. | Pcf_extension of extension
    (*

    [%%id]

    *)
and class_field_kind = Ast_414.Parsetree.class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Ast_414.Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

Type expressions for the module language

and module_type = Ast_414.Parsetree.module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and module_type_desc = Ast_414.Parsetree.module_type_desc =
  1. | Pmty_ident of Longident.t Ast_414.Asttypes.loc
    (*

    Pmty_ident(S) represents S

    *)
  2. | Pmty_signature of signature
    (*

    sig ... end

    *)
  3. | Pmty_functor of functor_parameter * module_type
    (*

    functor(X : MT1) -> MT2

    *)
  4. | Pmty_with of module_type * with_constraint list
    (*

    MT with ...

    *)
  5. | Pmty_typeof of module_expr
    (*

    module type of ME

    *)
  6. | Pmty_extension of extension
    (*

    [%id]

    *)
  7. | Pmty_alias of Longident.t Ast_414.Asttypes.loc
    (*

    (module M)

    *)
and functor_parameter = Ast_414.Parsetree.functor_parameter =
  1. | Unit
    (*

    ()

    *)
  2. | Named of string option Ast_414.Asttypes.loc * module_type
    (*

    Named(name, MT) represents:

    • (X : MT) when name is Some X,
    • (_ : MT) when name is None
    *)
and signature = signature_item list
and signature_item = Ast_414.Parsetree.signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc = Ast_414.Parsetree.signature_item_desc =
  1. | Psig_value of value_description
    (*
    • val x: T
    • external x: T = "s1" ... "sn"
    *)
  2. | Psig_type of Ast_414.Asttypes.rec_flag * type_declaration list
    (*

    type t1 = ... and ... and tn = ...

    *)
  3. | Psig_typesubst of type_declaration list
    (*

    type t1 := ... and ... and tn := ...

    *)
  4. | Psig_typext of type_extension
    (*

    type t1 += ...

    *)
  5. | Psig_exception of type_exception
    (*

    exception C of T

    *)
  6. | Psig_module of module_declaration
    (*

    module X = M and module X : MT

    *)
  7. | Psig_modsubst of module_substitution
    (*

    module X := M

    *)
  8. | Psig_recmodule of module_declaration list
    (*

    module rec X1 : MT1 and ... and Xn : MTn

    *)
  9. | Psig_modtype of module_type_declaration
    (*

    module type S = MT and module type S

    *)
  10. | Psig_modtypesubst of module_type_declaration
    (*

    module type S := ...

    *)
  11. | Psig_open of open_description
    (*

    open X

    *)
  12. | Psig_include of include_description
    (*

    include MT

    *)
  13. | Psig_class of class_description list
    (*

    class c1 : ... and ... and cn : ...

    *)
  14. | Psig_class_type of class_type_declaration list
    (*

    class type ct1 = ... and ... and ctn = ...

    *)
  15. | Psig_attribute of attribute
    (*

    [\@\@\@id]

    *)
  16. | Psig_extension of extension * attributes
    (*

    [%%id]

    *)
and module_declaration = Ast_414.Parsetree.module_declaration = {
  1. pmd_name : string option Ast_414.Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pmd_loc : Location.t;
}

Values of type module_declaration represents S : MT

and module_substitution = Ast_414.Parsetree.module_substitution = {
  1. pms_name : string Ast_414.Asttypes.loc;
  2. pms_manifest : Longident.t Ast_414.Asttypes.loc;
  3. pms_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pms_loc : Location.t;
}

Values of type module_substitution represents S := M

and module_type_declaration = Ast_414.Parsetree.module_type_declaration = {
  1. pmtd_name : string Ast_414.Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pmtd_loc : Location.t;
}

Values of type module_type_declaration represents:

  • S = MT,
  • S for abstract module type declaration, when pmtd_type is None.
and 'a open_infos = 'a Ast_414.Parsetree.open_infos = {
  1. popen_expr : 'a;
  2. popen_override : Ast_414.Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}

Values of type 'a open_infos represents:

Values of type open_description represents:

  • open M.N
  • open M(N).O
and open_declaration = module_expr open_infos

Values of type open_declaration represents:

  • open M.N
  • open M(N).O
  • open struct ... end
and 'a include_infos = 'a Ast_414.Parsetree.include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos

Values of type include_description represents include MT

and include_declaration = module_expr include_infos

Values of type include_declaration represents include ME

and with_constraint = Ast_414.Parsetree.with_constraint =
  1. | Pwith_type of Longident.t Ast_414.Asttypes.loc * type_declaration
    (*

    with type X.t = ...

    Note: the last component of the longident must match the name of the type_declaration.

    *)
  2. | Pwith_module of Longident.t Ast_414.Asttypes.loc + * Longident.t Ast_414.Asttypes.loc
    (*

    with module X.Y = Z

    *)
  3. | Pwith_modtype of Longident.t Ast_414.Asttypes.loc * module_type
    (*

    with module type X.Y = Z

    *)
  4. | Pwith_modtypesubst of Longident.t Ast_414.Asttypes.loc * module_type
    (*

    with module type X.Y := sig end

    *)
  5. | Pwith_typesubst of Longident.t Ast_414.Asttypes.loc * type_declaration
    (*

    with type X.t := ..., same format as [Pwith_type]

    *)
  6. | Pwith_modsubst of Longident.t Ast_414.Asttypes.loc + * Longident.t Ast_414.Asttypes.loc
    (*

    with module X.Y := Z

    *)

Value expressions for the module language

and module_expr = Ast_414.Parsetree.module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and module_expr_desc = Ast_414.Parsetree.module_expr_desc =
  1. | Pmod_ident of Longident.t Ast_414.Asttypes.loc
    (*

    X

    *)
  2. | Pmod_structure of structure
    (*

    struct ... end

    *)
  3. | Pmod_functor of functor_parameter * module_expr
    (*

    functor(X : MT1) -> ME

    *)
  4. | Pmod_apply of module_expr * module_expr
    (*

    ME1(ME2)

    *)
  5. | Pmod_constraint of module_expr * module_type
    (*

    (ME : MT)

    *)
  6. | Pmod_unpack of expression
    (*

    (val E)

    *)
  7. | Pmod_extension of extension
    (*

    [%id]

    *)
and structure = structure_item list
and structure_item = Ast_414.Parsetree.structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc = Ast_414.Parsetree.structure_item_desc =
  1. | Pstr_eval of expression * attributes
    (*

    E

    *)
  2. | Pstr_value of Ast_414.Asttypes.rec_flag * value_binding list
    (*

    Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

    • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
    *)
  3. | Pstr_primitive of value_description
    (*
    • val x: T
    • external x: T = "s1" ... "sn"
    *)
  4. | Pstr_type of Ast_414.Asttypes.rec_flag * type_declaration list
    (*

    type t1 = ... and ... and tn = ...

    *)
  5. | Pstr_typext of type_extension
    (*

    type t1 += ...

    *)
  6. | Pstr_exception of type_exception
    (*
    • exception C of T
    • exception C = M.X
    *)
  7. | Pstr_module of module_binding
    (*

    module X = ME

    *)
  8. | Pstr_recmodule of module_binding list
    (*

    module rec X1 = ME1 and ... and Xn = MEn

    *)
  9. | Pstr_modtype of module_type_declaration
    (*

    module type S = MT

    *)
  10. | Pstr_open of open_declaration
    (*

    open X

    *)
  11. | Pstr_class of class_declaration list
    (*

    class c1 = ... and ... and cn = ...

    *)
  12. | Pstr_class_type of class_type_declaration list
    (*

    class type ct1 = ... and ... and ctn = ...

    *)
  13. | Pstr_include of include_declaration
    (*

    include ME

    *)
  14. | Pstr_attribute of attribute
    (*

    [\@\@\@id]

    *)
  15. | Pstr_extension of extension * attributes
    (*

    [%%id]

    *)
and value_binding = Ast_414.Parsetree.value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_attributes : attributes;
  4. pvb_loc : Location.t;
}
and module_binding = Ast_414.Parsetree.module_binding = {
  1. pmb_name : string option Ast_414.Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Values of type module_binding represents module X = ME

Toplevel

Toplevel phrases

type toplevel_phrase = Ast_414.Parsetree.toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of toplevel_directive
    (*

    #use, #load ...

    *)
and toplevel_directive = Ast_414.Parsetree.toplevel_directive = {
  1. pdir_name : string Ast_414.Asttypes.loc;
  2. pdir_arg : directive_argument option;
  3. pdir_loc : Location.t;
}
and directive_argument = Ast_414.Parsetree.directive_argument = {
  1. pdira_desc : directive_argument_desc;
  2. pdira_loc : Location.t;
}
and directive_argument_desc = Ast_414.Parsetree.directive_argument_desc =
  1. | Pdir_string of string
  2. | Pdir_int of string * char option
  3. | Pdir_ident of Longident.t
  4. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_500/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_500/index.html new file mode 100644 index 000000000..085b27ac5 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_500/index.html @@ -0,0 +1,2 @@ + +Ast_500 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_500)

Module Astlib.Ast_500

module Asttypes : sig ... end
module Parsetree : sig ... end
module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_501/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_501/Asttypes/index.html new file mode 100644 index 000000000..c9c4e991f --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_501/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_501.Asttypes)

Module Ast_501.Asttypes

type constant = Asttypes.constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * Location.t * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag = Asttypes.rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag = Asttypes.direction_flag =
  1. | Upto
  2. | Downto
type private_flag = Asttypes.private_flag =
  1. | Private
  2. | Public
type mutable_flag = Asttypes.mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag = Asttypes.virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag = Asttypes.override_flag =
  1. | Override
  2. | Fresh
type closed_flag = Asttypes.closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label = Asttypes.arg_label =
  1. | Nolabel
  2. | Labelled of string
    (*

    label:T -> ...

    *)
  3. | Optional of string
    (*

    ?label:T -> ...

    *)
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance = Asttypes.variance =
  1. | Covariant
  2. | Contravariant
  3. | NoVariance
type injectivity = Asttypes.injectivity =
  1. | Injective
  2. | NoInjectivity
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_501/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_501/Config/index.html new file mode 100644 index 000000000..f255d7faf --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_501/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_501.Config)

Module Ast_501.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_501/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_501/Parsetree/index.html new file mode 100644 index 000000000..f0b530a67 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_501/Parsetree/index.html @@ -0,0 +1,22 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_501.Parsetree)

Module Ast_501.Parsetree

type constant = Parsetree.constant =
  1. | Pconst_integer of string * char option
    (*

    Integer constants such as 3 3l 3L 3n.

    Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

    *)
  2. | Pconst_char of char
    (*

    Character such as 'c'.

    *)
  3. | Pconst_string of string * Location.t * string option
    (*

    Constant string such as "constant" or {delim|other constant|delim}.

    The location span the content of the string, without the delimiters.

    *)
  4. | Pconst_float of string * char option
    (*

    Float constant such as 3.4, 2e5 or 1.4e-4.

    Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

    *)
type location_stack = Location.t list

Extension points

type attribute = Parsetree.attribute = {
  1. attr_name : string Asttypes.loc;
  2. attr_payload : payload;
  3. attr_loc : Location.t;
}

Attributes such as [\@id ARG] and [\@\@id ARG].

Metadata containers passed around within the AST. The compiler ignores unknown attributes.

and extension = string Asttypes.loc * payload

Extension points such as [%id ARG] and [%%id ARG].

Sub-language placeholder -- rejected by the typechecker.

and attributes = attribute list
and payload = Parsetree.payload =
  1. | PStr of structure
  2. | PSig of signature
    (*

    : SIG in an attribute or an extension point

    *)
  3. | PTyp of core_type
    (*

    : T in an attribute or an extension point

    *)
  4. | PPat of pattern * expression option
    (*

    ? P or ? P when E, in an attribute or an extension point

    *)

Core language

Type expressions

and core_type = Parsetree.core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_loc_stack : location_stack;
  4. ptyp_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and core_type_desc = Parsetree.core_type_desc =
  1. | Ptyp_any
    (*

    _

    *)
  2. | Ptyp_var of string
    (*

    A type variable such as 'a

    *)
  3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
    (*

    Ptyp_arrow(lbl, T1, T2) represents:

    *)
  4. | Ptyp_tuple of core_type list
    (*

    Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

    Invariant: n >= 2.

    *)
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
    (*

    Ptyp_constr(lident, l) represents:

    • tconstr when l=[],
    • T tconstr when l=[T],
    • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
    *)
  6. | Ptyp_object of object_field list * Asttypes.closed_flag
    (*

    Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

    • < l1:T1; ...; ln:Tn > when flag is Closed,
    • < l1:T1; ...; ln:Tn; .. > when flag is Open.
    *)
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
    (*

    Ptyp_class(tconstr, l) represents:

    • #tconstr when l=[],
    • T #tconstr when l=[T],
    • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
    *)
  8. | Ptyp_alias of core_type * string
    (*

    T as 'a.

    *)
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
    (*

    Ptyp_variant([`A;`B], flag, labels) represents:

    • [ `A|`B ] when flag is Closed, and labels is None,
    • [> `A|`B ] when flag is Open, and labels is None,
    • [< `A|`B ] when flag is Closed, and labels is Some [],
    • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
    *)
  10. | Ptyp_poly of string Asttypes.loc list * core_type
    (*

    'a1 ... 'an. T

    Can only appear in the following context:

    let x : 'a1 ... 'an. T = e ...
    *)
  11. | Ptyp_package of package_type
    (*

    (module S).

    *)
  12. | Ptyp_extension of extension
    (*

    [%id].

    *)

As package_type typed values:

  • (S, []) represents (module S),
  • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
and row_field = Parsetree.row_field = {
  1. prf_desc : row_field_desc;
  2. prf_loc : Location.t;
  3. prf_attributes : attributes;
}
and row_field_desc = Parsetree.row_field_desc =
  1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
    (*

    Rtag(`A, b, l) represents:

    • `A when b is true and l is [],
    • `A of T when b is false and l is [T],
    • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
    • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
    • The bool field is true if the tag contains a constant (empty) constructor.
    • & occurs when several types are used for the same constructor (see 4.2 in the manual)
    *)
  2. | Rinherit of core_type
    (*

    [ | t ]

    *)
and object_field = Parsetree.object_field = {
  1. pof_desc : object_field_desc;
  2. pof_loc : Location.t;
  3. pof_attributes : attributes;
}
and object_field_desc = Parsetree.object_field_desc =
  1. | Otag of Asttypes.label Asttypes.loc * core_type
  2. | Oinherit of core_type

Patterns

and pattern = Parsetree.pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_loc_stack : location_stack;
  4. ppat_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and pattern_desc = Parsetree.pattern_desc =
  1. | Ppat_any
    (*

    The pattern _.

    *)
  2. | Ppat_var of string Asttypes.loc
    (*

    A variable pattern such as x

    *)
  3. | Ppat_alias of pattern * string Asttypes.loc
    (*

    An alias pattern such as P as 'a

    *)
  4. | Ppat_constant of constant
    (*

    Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  5. | Ppat_interval of constant * constant
    (*

    Patterns such as 'a'..'z'.

    Other forms of interval are recognized by the parser but rejected by the type-checker.

    *)
  6. | Ppat_tuple of pattern list
    (*

    Patterns (P1, ..., Pn).

    Invariant: n >= 2

    *)
  7. | Ppat_construct of Longident.t Asttypes.loc + * (string Asttypes.loc list * pattern) option
    (*

    Ppat_construct(C, args) represents:

    • C when args is None,
    • C P when args is Some ([], P)
    • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
    • C (type a b) P when args is Some ([a; b], P)
    *)
  8. | Ppat_variant of Asttypes.label * pattern option
    (*

    Ppat_variant(`A, pat) represents:

    • `A when pat is None,
    • `A P when pat is Some P
    *)
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
    (*

    Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

    • { l1=P1; ...; ln=Pn } when flag is Closed
    • { l1=P1; ...; ln=Pn; _} when flag is Open

    Invariant: n > 0

    *)
  10. | Ppat_array of pattern list
    (*

    Pattern [| P1; ...; Pn |]

    *)
  11. | Ppat_or of pattern * pattern
    (*

    Pattern P1 | P2

    *)
  12. | Ppat_constraint of pattern * core_type
    (*

    Pattern (P : T)

    *)
  13. | Ppat_type of Longident.t Asttypes.loc
    (*

    Pattern #tconst

    *)
  14. | Ppat_lazy of pattern
    (*

    Pattern lazy P

    *)
  15. | Ppat_unpack of string option Asttypes.loc
    (*

    Ppat_unpack(s) represents:

    • (module P) when s is Some "P"
    • (module _) when s is None

    Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

    *)
  16. | Ppat_exception of pattern
    (*

    Pattern exception P

    *)
  17. | Ppat_extension of extension
    (*

    Pattern [%id]

    *)
  18. | Ppat_open of Longident.t Asttypes.loc * pattern
    (*

    Pattern M.(P)

    *)

Value expressions

and expression = Parsetree.expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_loc_stack : location_stack;
  4. pexp_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and expression_desc = Parsetree.expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
    (*

    Identifiers such as x and M.x

    *)
  2. | Pexp_constant of constant
    (*

    Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
    (*

    Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

    • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
    *)
  4. | Pexp_function of case list
    (*

    function P1 -> E1 | ... | Pn -> En

    *)
  5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
    (*

    Pexp_fun(lbl, exp0, P, E1) represents:

    • fun P -> E1 when lbl is Nolabel and exp0 is None
    • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
    • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
    • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

    Notes:

    • If E0 is provided, only Optional is allowed.
    • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
    • let f P = E is represented using Pexp_fun.
    *)
  6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
    (*

    Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

    li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

    Invariant: n > 0

    *)
  7. | Pexp_match of expression * case list
    (*

    match E0 with P1 -> E1 | ... | Pn -> En

    *)
  8. | Pexp_try of expression * case list
    (*

    try E0 with P1 -> E1 | ... | Pn -> En

    *)
  9. | Pexp_tuple of expression list
    (*

    Expressions (E1, ..., En)

    Invariant: n >= 2

    *)
  10. | Pexp_construct of Longident.t Asttypes.loc * expression option
    (*

    Pexp_construct(C, exp) represents:

    • C when exp is None,
    • C E when exp is Some E,
    • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
    *)
  11. | Pexp_variant of Asttypes.label * expression option
    (*

    Pexp_variant(`A, exp) represents

    • `A when exp is None
    • `A E when exp is Some E
    *)
  12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
    (*

    Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

    • { l1=P1; ...; ln=Pn } when exp0 is None
    • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

    Invariant: n > 0

    *)
  13. | Pexp_field of expression * Longident.t Asttypes.loc
    (*

    E.l

    *)
  14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
    (*

    E1.l <- E2

    *)
  15. | Pexp_array of expression list
    (*

    [| E1; ...; En |]

    *)
  16. | Pexp_ifthenelse of expression * expression * expression option
    (*

    if E1 then E2 else E3

    *)
  17. | Pexp_sequence of expression * expression
    (*

    E1; E2

    *)
  18. | Pexp_while of expression * expression
    (*

    while E1 do E2 done

    *)
  19. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
    (*

    Pexp_for(i, E1, E2, direction, E3) represents:

    • for i = E1 to E2 do E3 done when direction is Upto
    • for i = E1 downto E2 do E3 done when direction is Downto
    *)
  20. | Pexp_constraint of expression * core_type
    (*

    (E : T)

    *)
  21. | Pexp_coerce of expression * core_type option * core_type
    (*

    Pexp_coerce(E, from, T) represents

    • (E :> T) when from is None,
    • (E : T0 :> T) when from is Some T0.
    *)
  22. | Pexp_send of expression * Asttypes.label Asttypes.loc
    (*

    E # m

    *)
  23. | Pexp_new of Longident.t Asttypes.loc
    (*

    new M.c

    *)
  24. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
    (*

    x <- 2

    *)
  25. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
    (*

    {< x1 = E1; ...; xn = En >}

    *)
  26. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
    (*

    let module M = ME in E

    *)
  27. | Pexp_letexception of extension_constructor * expression
    (*

    let exception C in E

    *)
  28. | Pexp_assert of expression
    (*

    assert E.

    Note: assert false is treated in a special way by the type-checker.

    *)
  29. | Pexp_lazy of expression
    (*

    lazy E

    *)
  30. | Pexp_poly of expression * core_type option
    (*

    Used for method bodies.

    Can only be used as the expression under Cfk_concrete for methods (not values).

    *)
  31. | Pexp_object of class_structure
    (*

    object ... end

    *)
  32. | Pexp_newtype of string Asttypes.loc * expression
    (*

    fun (type t) -> E

    *)
  33. | Pexp_pack of module_expr
    (*

    (module ME).

    (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

    *)
  34. | Pexp_open of open_declaration * expression
    (*
    • M.(E)
    • let open M in E
    • let open! M in E
    *)
  35. | Pexp_letop of letop
    (*
    • let* P = E0 in E1
    • let* P0 = E00 and* P1 = E01 in E1
    *)
  36. | Pexp_extension of extension
    (*

    [%id]

    *)
  37. | Pexp_unreachable
    (*

    .

    *)
and case = Parsetree.case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}

Values of type case represents (P -> E) or (P when E0 -> E)

and letop = Parsetree.letop = {
  1. let_ : binding_op;
  2. ands : binding_op list;
  3. body : expression;
}
and binding_op = Parsetree.binding_op = {
  1. pbop_op : string Asttypes.loc;
  2. pbop_pat : pattern;
  3. pbop_exp : expression;
  4. pbop_loc : Location.t;
}

Value descriptions

and value_description = Parsetree.value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  5. pval_loc : Location.t;
}

Values of type value_description represents:

  • val x: T, when pval_prim is []
  • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

Type declarations

and type_declaration = Parsetree.type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    (*

    ('a1,...'an) t

    *)
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
    (*

    ... constraint T1=T1' ... constraint Tn=Tn'

    *)
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
    (*

    for = private ...

    *)
  6. ptype_manifest : core_type option;
    (*

    represents = T

    *)
  7. ptype_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  8. ptype_loc : Location.t;
}

Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

  • type t when type_kind is Ptype_abstract, and manifest is None,
  • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
  • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
  • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
  • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
  • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
  • type t = .. when type_kind is Ptype_open, and manifest is None.
and type_kind = Parsetree.type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
    (*

    Invariant: non-empty list

    *)
  4. | Ptype_open
and label_declaration = Parsetree.label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
    (*

    l : T [\@id1] [\@id2]

    *)
}

Note: T can be a Ptyp_poly.

and constructor_declaration = Parsetree.constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_vars : string Asttypes.loc list;
  3. pcd_args : constructor_arguments;
  4. pcd_res : core_type option;
  5. pcd_loc : Location.t;
  6. pcd_attributes : attributes;
    (*

    C of ... [\@id1] [\@id2]

    *)
}
and constructor_arguments = Parsetree.constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
    (*

    Values of type constructor_declaration represents the constructor arguments of:

    • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
    • C: T0 when res = Some T0, and args = Pcstr_tuple [],
    • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
    • C of {...} when res = None, and args = Pcstr_record [...],
    • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
    *)
and type_extension = Parsetree.type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_loc : Location.t;
  6. ptyext_attributes : attributes;
    (*

    ... \@\@id1 \@\@id2

    *)
}

Definition of new extensions constructors for the extensive sum type t (type t += ...).

and extension_constructor = Parsetree.extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
    (*

    C of ... [\@id1] [\@id2]

    *)
}
and type_exception = Parsetree.type_exception = {
  1. ptyexn_constructor : extension_constructor;
  2. ptyexn_loc : Location.t;
  3. ptyexn_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}

Definition of a new exception (exception E).

and extension_constructor_kind = Parsetree.extension_constructor_kind =
  1. | Pext_decl of string Asttypes.loc list + * constructor_arguments + * core_type option
    (*

    Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

    • C of T1 * ... * Tn when:

      • existentials is [],
      • c_args is [T1; ...; Tn],
      • t_opt is None.
    • C: T0 when

      • existentials is [],
      • c_args is [],
      • t_opt is Some T0.
    • C: T1 * ... * Tn -> T0 when

      • existentials is [],
      • c_args is [T1; ...; Tn],
      • t_opt is Some T0.
    • C: 'a... . T1 * ... * Tn -> T0 when

      • existentials is ['a;...],
      • c_args is [T1; ... ; Tn],
      • t_opt is Some T0.
    *)
  2. | Pext_rebind of Longident.t Asttypes.loc
    (*

    Pext_rebind(D) re-export the constructor D with the new name C

    *)

Class language

Type expressions for the class language

and class_type = Parsetree.class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and class_type_desc = Parsetree.class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
    (*
    • c
    • ['a1, ..., 'an] c
    *)
  2. | Pcty_signature of class_signature
    (*

    object ... end

    *)
  3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
    (*

    Pcty_arrow(lbl, T, CT) represents:

    *)
  4. | Pcty_extension of extension
    (*

    %id

    *)
  5. | Pcty_open of open_description * class_type
    (*

    let open M in CT

    *)
and class_signature = Parsetree.class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}

Values of type class_signature represents:

and class_type_field = Parsetree.class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}
and class_type_field_desc = Parsetree.class_type_field_desc =
  1. | Pctf_inherit of class_type
    (*

    inherit CT

    *)
  2. | Pctf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * Asttypes.virtual_flag + * core_type
    (*

    val x: T

    *)
  3. | Pctf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
    (*

    method x: T

    Note: T can be a Ptyp_poly.

    *)
  4. | Pctf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  5. | Pctf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  6. | Pctf_extension of extension
    (*

    [%%id]

    *)
and 'a class_infos = 'a Parsetree.class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}

Values of type class_expr class_infos represents:

  • class c = ...
  • class ['a1,...,'an] c = ...
  • class virtual c = ...

They are also used for "class type" declaration.

and class_description = class_type class_infos
and class_type_declaration = class_type class_infos

Value expressions for the class language

and class_expr = Parsetree.class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and class_expr_desc = Parsetree.class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
    (*

    c and ['a1, ..., 'an] c

    *)
  2. | Pcl_structure of class_structure
    (*

    object ... end

    *)
  3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
    (*

    Pcl_fun(lbl, exp0, P, CE) represents:

    • fun P -> CE when lbl is Nolabel and exp0 is None,
    • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
    • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
    • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
    *)
  4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
    (*

    Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

    Invariant: n > 0

    *)
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
    (*

    Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

    • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
    *)
  6. | Pcl_constraint of class_expr * class_type
    (*

    (CE : CT)

    *)
  7. | Pcl_extension of extension
    (*

    [%id]

    *)
  8. | Pcl_open of open_description * class_expr
    (*

    let open M in CE

    *)
and class_structure = Parsetree.class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}

Values of type class_structure represents:

and class_field = Parsetree.class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}
and class_field_desc = Parsetree.class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
    (*

    Pcf_inherit(flag, CE, s) represents:

    • inherit CE when flag is Fresh and s is None,
    • inherit CE as x when flag is Fresh and s is Some x,
    • inherit! CE when flag is Override and s is None,
    • inherit! CE as x when flag is Override and s is Some x
    *)
  2. | Pcf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * class_field_kind
    (*

    Pcf_val(x,flag, kind) represents:

    *)
  3. | Pcf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * class_field_kind
    (**)
  4. | Pcf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  5. | Pcf_initializer of expression
    (*

    initializer E

    *)
  6. | Pcf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  7. | Pcf_extension of extension
    (*

    [%%id]

    *)
and class_field_kind = Parsetree.class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

Type expressions for the module language

and module_type = Parsetree.module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and module_type_desc = Parsetree.module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
    (*

    Pmty_ident(S) represents S

    *)
  2. | Pmty_signature of signature
    (*

    sig ... end

    *)
  3. | Pmty_functor of functor_parameter * module_type
    (*

    functor(X : MT1) -> MT2

    *)
  4. | Pmty_with of module_type * with_constraint list
    (*

    MT with ...

    *)
  5. | Pmty_typeof of module_expr
    (*

    module type of ME

    *)
  6. | Pmty_extension of extension
    (*

    [%id]

    *)
  7. | Pmty_alias of Longident.t Asttypes.loc
    (*

    (module M)

    *)
and functor_parameter = Parsetree.functor_parameter =
  1. | Unit
    (*

    ()

    *)
  2. | Named of string option Asttypes.loc * module_type
    (*

    Named(name, MT) represents:

    • (X : MT) when name is Some X,
    • (_ : MT) when name is None
    *)
and signature = signature_item list
and signature_item = Parsetree.signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc = Parsetree.signature_item_desc =
  1. | Psig_value of value_description
    (*
    • val x: T
    • external x: T = "s1" ... "sn"
    *)
  2. | Psig_type of Asttypes.rec_flag * type_declaration list
    (*

    type t1 = ... and ... and tn = ...

    *)
  3. | Psig_typesubst of type_declaration list
    (*

    type t1 := ... and ... and tn := ...

    *)
  4. | Psig_typext of type_extension
    (*

    type t1 += ...

    *)
  5. | Psig_exception of type_exception
    (*

    exception C of T

    *)
  6. | Psig_module of module_declaration
    (*

    module X = M and module X : MT

    *)
  7. | Psig_modsubst of module_substitution
    (*

    module X := M

    *)
  8. | Psig_recmodule of module_declaration list
    (*

    module rec X1 : MT1 and ... and Xn : MTn

    *)
  9. | Psig_modtype of module_type_declaration
    (*

    module type S = MT and module type S

    *)
  10. | Psig_modtypesubst of module_type_declaration
    (*

    module type S := ...

    *)
  11. | Psig_open of open_description
    (*

    open X

    *)
  12. | Psig_include of include_description
    (*

    include MT

    *)
  13. | Psig_class of class_description list
    (*

    class c1 : ... and ... and cn : ...

    *)
  14. | Psig_class_type of class_type_declaration list
    (*

    class type ct1 = ... and ... and ctn = ...

    *)
  15. | Psig_attribute of attribute
    (*

    [\@\@\@id]

    *)
  16. | Psig_extension of extension * attributes
    (*

    [%%id]

    *)
and module_declaration = Parsetree.module_declaration = {
  1. pmd_name : string option Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pmd_loc : Location.t;
}

Values of type module_declaration represents S : MT

and module_substitution = Parsetree.module_substitution = {
  1. pms_name : string Asttypes.loc;
  2. pms_manifest : Longident.t Asttypes.loc;
  3. pms_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pms_loc : Location.t;
}

Values of type module_substitution represents S := M

and module_type_declaration = Parsetree.module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pmtd_loc : Location.t;
}

Values of type module_type_declaration represents:

  • S = MT,
  • S for abstract module type declaration, when pmtd_type is None.
and 'a open_infos = 'a Parsetree.open_infos = {
  1. popen_expr : 'a;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}

Values of type 'a open_infos represents:

and open_description = Longident.t Asttypes.loc open_infos

Values of type open_description represents:

  • open M.N
  • open M(N).O
and open_declaration = module_expr open_infos

Values of type open_declaration represents:

  • open M.N
  • open M(N).O
  • open struct ... end
and 'a include_infos = 'a Parsetree.include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos

Values of type include_description represents include MT

and include_declaration = module_expr include_infos

Values of type include_declaration represents include ME

and with_constraint = Parsetree.with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
    (*

    with type X.t = ...

    Note: the last component of the longident must match the name of the type_declaration.

    *)
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    (*

    with module X.Y = Z

    *)
  3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
    (*

    with module type X.Y = Z

    *)
  4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
    (*

    with module type X.Y := sig end

    *)
  5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
    (*

    with type X.t := ..., same format as [Pwith_type]

    *)
  6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    (*

    with module X.Y := Z

    *)

Value expressions for the module language

and module_expr = Parsetree.module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and module_expr_desc = Parsetree.module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
    (*

    X

    *)
  2. | Pmod_structure of structure
    (*

    struct ... end

    *)
  3. | Pmod_functor of functor_parameter * module_expr
    (*

    functor(X : MT1) -> ME

    *)
  4. | Pmod_apply of module_expr * module_expr
    (*

    ME1(ME2)

    *)
  5. | Pmod_apply_unit of module_expr
    (*

    ME1()

    *)
  6. | Pmod_constraint of module_expr * module_type
    (*

    (ME : MT)

    *)
  7. | Pmod_unpack of expression
    (*

    (val E)

    *)
  8. | Pmod_extension of extension
    (*

    [%id]

    *)
and structure = structure_item list
and structure_item = Parsetree.structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc = Parsetree.structure_item_desc =
  1. | Pstr_eval of expression * attributes
    (*

    E

    *)
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
    (*

    Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

    • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
    *)
  3. | Pstr_primitive of value_description
    (*
    • val x: T
    • external x: T = "s1" ... "sn"
    *)
  4. | Pstr_type of Asttypes.rec_flag * type_declaration list
    (*

    type t1 = ... and ... and tn = ...

    *)
  5. | Pstr_typext of type_extension
    (*

    type t1 += ...

    *)
  6. | Pstr_exception of type_exception
    (*
    • exception C of T
    • exception C = M.X
    *)
  7. | Pstr_module of module_binding
    (*

    module X = ME

    *)
  8. | Pstr_recmodule of module_binding list
    (*

    module rec X1 = ME1 and ... and Xn = MEn

    *)
  9. | Pstr_modtype of module_type_declaration
    (*

    module type S = MT

    *)
  10. | Pstr_open of open_declaration
    (*

    open X

    *)
  11. | Pstr_class of class_declaration list
    (*

    class c1 = ... and ... and cn = ...

    *)
  12. | Pstr_class_type of class_type_declaration list
    (*

    class type ct1 = ... and ... and ctn = ...

    *)
  13. | Pstr_include of include_declaration
    (*

    include ME

    *)
  14. | Pstr_attribute of attribute
    (*

    [\@\@\@id]

    *)
  15. | Pstr_extension of extension * attributes
    (*

    [%%id]

    *)
and value_constraint = Parsetree.value_constraint =
  1. | Pvc_constraint of {
    1. locally_abstract_univars : string Asttypes.loc list;
    2. typ : core_type;
    }
  2. | Pvc_coercion of {
    1. ground : core_type option;
    2. coercion : core_type;
    }
and value_binding = Parsetree.value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_constraint : value_constraint option;
  4. pvb_attributes : attributes;
  5. pvb_loc : Location.t;
}
and module_binding = Parsetree.module_binding = {
  1. pmb_name : string option Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Values of type module_binding represents module X = ME

Toplevel

Toplevel phrases

type toplevel_phrase = Parsetree.toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of toplevel_directive
    (*

    #use, #load ...

    *)
and toplevel_directive = Parsetree.toplevel_directive = {
  1. pdir_name : string Asttypes.loc;
  2. pdir_arg : directive_argument option;
  3. pdir_loc : Location.t;
}
and directive_argument = Parsetree.directive_argument = {
  1. pdira_desc : directive_argument_desc;
  2. pdira_loc : Location.t;
}
and directive_argument_desc = Parsetree.directive_argument_desc =
  1. | Pdir_string of string
  2. | Pdir_int of string * char option
  3. | Pdir_ident of Longident.t
  4. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_501/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_501/index.html new file mode 100644 index 000000000..2affa008c --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_501/index.html @@ -0,0 +1,2 @@ + +Ast_501 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_501)

Module Astlib.Ast_501

module Asttypes : sig ... end
module Parsetree : sig ... end
module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_502/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_502/Asttypes/index.html new file mode 100644 index 000000000..e3d08f05f --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_502/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_502.Asttypes)

Module Ast_502.Asttypes

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * Location.t * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
    (*

    label:T -> ...

    *)
  3. | Optional of string
    (*

    ?label:T -> ...

    *)
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | NoVariance
type injectivity =
  1. | Injective
  2. | NoInjectivity
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_502/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_502/Config/index.html new file mode 100644 index 000000000..216633329 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_502/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_502.Config)

Module Ast_502.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_502/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_502/Parsetree/index.html new file mode 100644 index 000000000..f10ac5daa --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_502/Parsetree/index.html @@ -0,0 +1,25 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_502.Parsetree)

Module Ast_502.Parsetree

type constant =
  1. | Pconst_integer of string * char option
    (*

    Integer constants such as 3 3l 3L 3n.

    Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

    *)
  2. | Pconst_char of char
    (*

    Character such as 'c'.

    *)
  3. | Pconst_string of string * Location.t * string option
    (*

    Constant string such as "constant" or {delim|other constant|delim}.

    The location span the content of the string, without the delimiters.

    *)
  4. | Pconst_float of string * char option
    (*

    Float constant such as 3.4, 2e5 or 1.4e-4.

    Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

    *)
type location_stack = Location.t list

Extension points

type attribute = {
  1. attr_name : string Asttypes.loc;
  2. attr_payload : payload;
  3. attr_loc : Location.t;
}

Attributes such as [\@id ARG] and [\@\@id ARG].

Metadata containers passed around within the AST. The compiler ignores unknown attributes.

and extension = string Asttypes.loc * payload

Extension points such as [%id ARG] and [%%id ARG].

Sub-language placeholder -- rejected by the typechecker.

and attributes = attribute list
and payload =
  1. | PStr of structure
  2. | PSig of signature
    (*

    : SIG in an attribute or an extension point

    *)
  3. | PTyp of core_type
    (*

    : T in an attribute or an extension point

    *)
  4. | PPat of pattern * expression option
    (*

    ? P or ? P when E, in an attribute or an extension point

    *)

Core language

Type expressions

and core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_loc_stack : location_stack;
  4. ptyp_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and core_type_desc =
  1. | Ptyp_any
    (*

    _

    *)
  2. | Ptyp_var of string
    (*

    A type variable such as 'a

    *)
  3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
    (*

    Ptyp_arrow(lbl, T1, T2) represents:

    *)
  4. | Ptyp_tuple of core_type list
    (*

    Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

    Invariant: n >= 2.

    *)
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
    (*

    Ptyp_constr(lident, l) represents:

    • tconstr when l=[],
    • T tconstr when l=[T],
    • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
    *)
  6. | Ptyp_object of object_field list * Asttypes.closed_flag
    (*

    Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

    • < l1:T1; ...; ln:Tn > when flag is Closed,
    • < l1:T1; ...; ln:Tn; .. > when flag is Open.
    *)
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
    (*

    Ptyp_class(tconstr, l) represents:

    • #tconstr when l=[],
    • T #tconstr when l=[T],
    • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
    *)
  8. | Ptyp_alias of core_type * string Asttypes.loc
    (*

    T as 'a.

    *)
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
    (*

    Ptyp_variant([`A;`B], flag, labels) represents:

    • [ `A|`B ] when flag is Closed, and labels is None,
    • [> `A|`B ] when flag is Open, and labels is None,
    • [< `A|`B ] when flag is Closed, and labels is Some [],
    • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
    *)
  10. | Ptyp_poly of string Asttypes.loc list * core_type
    (*

    'a1 ... 'an. T

    Can only appear in the following context:

    let x : 'a1 ... 'an. T = e ...
    *)
  11. | Ptyp_package of package_type
    (*

    (module S).

    *)
  12. | Ptyp_open of Longident.t Asttypes.loc * core_type
    (*

    M.(T)

    *)
  13. | Ptyp_extension of extension
    (*

    [%id].

    *)

As package_type typed values:

  • (S, []) represents (module S),
  • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
and row_field = {
  1. prf_desc : row_field_desc;
  2. prf_loc : Location.t;
  3. prf_attributes : attributes;
}
and row_field_desc =
  1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
    (*

    Rtag(`A, b, l) represents:

    • `A when b is true and l is [],
    • `A of T when b is false and l is [T],
    • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
    • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
    • The bool field is true if the tag contains a constant (empty) constructor.
    • & occurs when several types are used for the same constructor (see 4.2 in the manual)
    *)
  2. | Rinherit of core_type
    (*

    [ | t ]

    *)
and object_field = {
  1. pof_desc : object_field_desc;
  2. pof_loc : Location.t;
  3. pof_attributes : attributes;
}
and object_field_desc =
  1. | Otag of Asttypes.label Asttypes.loc * core_type
  2. | Oinherit of core_type

Patterns

and pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_loc_stack : location_stack;
  4. ppat_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and pattern_desc =
  1. | Ppat_any
    (*

    The pattern _.

    *)
  2. | Ppat_var of string Asttypes.loc
    (*

    A variable pattern such as x

    *)
  3. | Ppat_alias of pattern * string Asttypes.loc
    (*

    An alias pattern such as P as 'a

    *)
  4. | Ppat_constant of constant
    (*

    Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  5. | Ppat_interval of constant * constant
    (*

    Patterns such as 'a'..'z'.

    Other forms of interval are recognized by the parser but rejected by the type-checker.

    *)
  6. | Ppat_tuple of pattern list
    (*

    Patterns (P1, ..., Pn).

    Invariant: n >= 2

    *)
  7. | Ppat_construct of Longident.t Asttypes.loc + * (string Asttypes.loc list * pattern) option
    (*

    Ppat_construct(C, args) represents:

    • C when args is None,
    • C P when args is Some ([], P)
    • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
    • C (type a b) P when args is Some ([a; b], P)
    *)
  8. | Ppat_variant of Asttypes.label * pattern option
    (*

    Ppat_variant(`A, pat) represents:

    • `A when pat is None,
    • `A P when pat is Some P
    *)
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
    (*

    Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

    • { l1=P1; ...; ln=Pn } when flag is Closed
    • { l1=P1; ...; ln=Pn; _} when flag is Open

    Invariant: n > 0

    *)
  10. | Ppat_array of pattern list
    (*

    Pattern [| P1; ...; Pn |]

    *)
  11. | Ppat_or of pattern * pattern
    (*

    Pattern P1 | P2

    *)
  12. | Ppat_constraint of pattern * core_type
    (*

    Pattern (P : T)

    *)
  13. | Ppat_type of Longident.t Asttypes.loc
    (*

    Pattern #tconst

    *)
  14. | Ppat_lazy of pattern
    (*

    Pattern lazy P

    *)
  15. | Ppat_unpack of string option Asttypes.loc
    (*

    Ppat_unpack(s) represents:

    • (module P) when s is Some "P"
    • (module _) when s is None

    Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

    *)
  16. | Ppat_exception of pattern
    (*

    Pattern exception P

    *)
  17. | Ppat_extension of extension
    (*

    Pattern [%id]

    *)
  18. | Ppat_open of Longident.t Asttypes.loc * pattern
    (*

    Pattern M.(P)

    *)

Value expressions

and expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_loc_stack : location_stack;
  4. pexp_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
    (*

    Identifiers such as x and M.x

    *)
  2. | Pexp_constant of constant
    (*

    Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
    (*

    Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

    • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
    *)
  4. | Pexp_function of function_param list * type_constraint option * function_body
    (*

    Pexp_function ([P1; ...; Pn], C, body) represents any construct involving fun or function, including:

    • fun P1 ... Pn -> E when body = Pfunction_body E
    • fun P1 ... Pn -> function p1 -> e1 | ... | pm -> em when body = Pfunction_cases [ p1 -> e1; ...; pm -> em ] C represents a type constraint or coercion placed immediately before the arrow, e.g. fun P1 ... Pn : ty -> ... when C = Some (Pconstraint ty). A function must have parameters. Pexp_function (params, _, body) must have non-empty params or a Pfunction_cases _ body.
    *)
  5. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
    (*

    Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

    li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

    Invariant: n > 0

    *)
  6. | Pexp_match of expression * case list
    (*

    match E0 with P1 -> E1 | ... | Pn -> En

    *)
  7. | Pexp_try of expression * case list
    (*

    try E0 with P1 -> E1 | ... | Pn -> En

    *)
  8. | Pexp_tuple of expression list
    (*

    Expressions (E1, ..., En)

    Invariant: n >= 2

    *)
  9. | Pexp_construct of Longident.t Asttypes.loc * expression option
    (*

    Pexp_construct(C, exp) represents:

    • C when exp is None,
    • C E when exp is Some E,
    • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
    *)
  10. | Pexp_variant of Asttypes.label * expression option
    (*

    Pexp_variant(`A, exp) represents

    • `A when exp is None
    • `A E when exp is Some E
    *)
  11. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
    (*

    Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

    • { l1=P1; ...; ln=Pn } when exp0 is None
    • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

    Invariant: n > 0

    *)
  12. | Pexp_field of expression * Longident.t Asttypes.loc
    (*

    E.l

    *)
  13. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
    (*

    E1.l <- E2

    *)
  14. | Pexp_array of expression list
    (*

    [| E1; ...; En |]

    *)
  15. | Pexp_ifthenelse of expression * expression * expression option
    (*

    if E1 then E2 else E3

    *)
  16. | Pexp_sequence of expression * expression
    (*

    E1; E2

    *)
  17. | Pexp_while of expression * expression
    (*

    while E1 do E2 done

    *)
  18. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
    (*

    Pexp_for(i, E1, E2, direction, E3) represents:

    • for i = E1 to E2 do E3 done when direction is Upto
    • for i = E1 downto E2 do E3 done when direction is Downto
    *)
  19. | Pexp_constraint of expression * core_type
    (*

    (E : T)

    *)
  20. | Pexp_coerce of expression * core_type option * core_type
    (*

    Pexp_coerce(E, from, T) represents

    • (E :> T) when from is None,
    • (E : T0 :> T) when from is Some T0.
    *)
  21. | Pexp_send of expression * Asttypes.label Asttypes.loc
    (*

    E # m

    *)
  22. | Pexp_new of Longident.t Asttypes.loc
    (*

    new M.c

    *)
  23. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
    (*

    x <- 2

    *)
  24. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
    (*

    {< x1 = E1; ...; xn = En >}

    *)
  25. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
    (*

    let module M = ME in E

    *)
  26. | Pexp_letexception of extension_constructor * expression
    (*

    let exception C in E

    *)
  27. | Pexp_assert of expression
    (*

    assert E.

    Note: assert false is treated in a special way by the type-checker.

    *)
  28. | Pexp_lazy of expression
    (*

    lazy E

    *)
  29. | Pexp_poly of expression * core_type option
    (*

    Used for method bodies.

    Can only be used as the expression under Cfk_concrete for methods (not values).

    *)
  30. | Pexp_object of class_structure
    (*

    object ... end

    *)
  31. | Pexp_newtype of string Asttypes.loc * expression
    (*

    fun (type t) -> E

    *)
  32. | Pexp_pack of module_expr
    (*

    (module ME).

    (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

    *)
  33. | Pexp_open of open_declaration * expression
    (*
    • M.(E)
    • let open M in E
    • let open! M in E
    *)
  34. | Pexp_letop of letop
    (*
    • let* P = E0 in E1
    • let* P0 = E00 and* P1 = E01 in E1
    *)
  35. | Pexp_extension of extension
    (*

    [%id]

    *)
  36. | Pexp_unreachable
    (*

    .

    *)
and case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}

Values of type case represents (P -> E) or (P when E0 -> E)

and letop = {
  1. let_ : binding_op;
  2. ands : binding_op list;
  3. body : expression;
}
and binding_op = {
  1. pbop_op : string Asttypes.loc;
  2. pbop_pat : pattern;
  3. pbop_exp : expression;
  4. pbop_loc : Location.t;
}
and function_param_desc =
  1. | Pparam_val of Asttypes.arg_label * expression option * pattern
    (*

    Pparam_val (lbl, exp0, P) represents the parameter:

    Note: If E0 is provided, only Optional is allowed.

    *)
  2. | Pparam_newtype of string Asttypes.loc
    (*

    Pparam_newtype x represents the parameter (type x). x carries the location of the identifier, whereas the pparam_loc on the enclosing function_param node is the location of the (type x) as a whole.

    Multiple parameters (type a b c) are represented as multiple Pparam_newtype nodes, let's say:

    [ { pparam_kind = Pparam_newtype a; pparam_loc = loc1 };
    +  { pparam_kind = Pparam_newtype b; pparam_loc = loc2 };
    +  { pparam_kind = Pparam_newtype c; pparam_loc = loc3 };
    +]

    Here, the first loc loc1 is the location of (type a b c), and the subsequent locs loc2 and loc3 are the same as loc1, except marked as ghost locations. The locations on a, b, c, correspond to the variables a, b, and c in the source code.

    *)
and function_param = {
  1. pparam_loc : Location.t;
  2. pparam_desc : function_param_desc;
}
and function_body =
  1. | Pfunction_body of expression
  2. | Pfunction_cases of case list * Location.t * attributes
    (*

    In Pfunction_cases (_, loc, attrs), the location extends from the start of the function keyword to the end of the last case. The compiler will only use typechecking-related attributes from attrs, e.g. enabling or disabling a warning.

    *)

See the comment on Pexp_function.

and type_constraint =
  1. | Pconstraint of core_type
  2. | Pcoerce of core_type option * core_type
    (*

    See the comment on Pexp_function.

    *)

Value descriptions

and value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  5. pval_loc : Location.t;
}

Values of type value_description represents:

  • val x: T, when pval_prim is []
  • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

Type declarations

and type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    (*

    ('a1,...'an) t

    *)
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
    (*

    ... constraint T1=T1' ... constraint Tn=Tn'

    *)
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
    (*

    for = private ...

    *)
  6. ptype_manifest : core_type option;
    (*

    represents = T

    *)
  7. ptype_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  8. ptype_loc : Location.t;
}

Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

  • type t when type_kind is Ptype_abstract, and manifest is None,
  • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
  • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
  • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
  • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
  • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
  • type t = .. when type_kind is Ptype_open, and manifest is None.
and type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
    (*

    Invariant: non-empty list

    *)
  4. | Ptype_open
and label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
    (*

    l : T [\@id1] [\@id2]

    *)
}

Note: T can be a Ptyp_poly.

and constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_vars : string Asttypes.loc list;
  3. pcd_args : constructor_arguments;
  4. pcd_res : core_type option;
  5. pcd_loc : Location.t;
  6. pcd_attributes : attributes;
    (*

    C of ... [\@id1] [\@id2]

    *)
}
and constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
    (*

    Values of type constructor_declaration represents the constructor arguments of:

    • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
    • C: T0 when res = Some T0, and args = Pcstr_tuple [],
    • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
    • C of {...} when res = None, and args = Pcstr_record [...],
    • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
    *)
and type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_loc : Location.t;
  6. ptyext_attributes : attributes;
    (*

    ... \@\@id1 \@\@id2

    *)
}

Definition of new extensions constructors for the extensive sum type t (type t += ...).

and extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
    (*

    C of ... [\@id1] [\@id2]

    *)
}
and type_exception = {
  1. ptyexn_constructor : extension_constructor;
  2. ptyexn_loc : Location.t;
  3. ptyexn_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}

Definition of a new exception (exception E).

and extension_constructor_kind =
  1. | Pext_decl of string Asttypes.loc list + * constructor_arguments + * core_type option
    (*

    Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

    • C of T1 * ... * Tn when:

      • existentials is [],
      • c_args is [T1; ...; Tn],
      • t_opt is None.
    • C: T0 when

      • existentials is [],
      • c_args is [],
      • t_opt is Some T0.
    • C: T1 * ... * Tn -> T0 when

      • existentials is [],
      • c_args is [T1; ...; Tn],
      • t_opt is Some T0.
    • C: 'a... . T1 * ... * Tn -> T0 when

      • existentials is ['a;...],
      • c_args is [T1; ... ; Tn],
      • t_opt is Some T0.
    *)
  2. | Pext_rebind of Longident.t Asttypes.loc
    (*

    Pext_rebind(D) re-export the constructor D with the new name C

    *)

Class language

Type expressions for the class language

and class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
    (*
    • c
    • ['a1, ..., 'an] c
    *)
  2. | Pcty_signature of class_signature
    (*

    object ... end

    *)
  3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
    (*

    Pcty_arrow(lbl, T, CT) represents:

    *)
  4. | Pcty_extension of extension
    (*

    %id

    *)
  5. | Pcty_open of open_description * class_type
    (*

    let open M in CT

    *)
and class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}

Values of type class_signature represents:

and class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}
and class_type_field_desc =
  1. | Pctf_inherit of class_type
    (*

    inherit CT

    *)
  2. | Pctf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * Asttypes.virtual_flag + * core_type
    (*

    val x: T

    *)
  3. | Pctf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
    (*

    method x: T

    Note: T can be a Ptyp_poly.

    *)
  4. | Pctf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  5. | Pctf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  6. | Pctf_extension of extension
    (*

    [%%id]

    *)
and 'a class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}

Values of type class_expr class_infos represents:

  • class c = ...
  • class ['a1,...,'an] c = ...
  • class virtual c = ...

They are also used for "class type" declaration.

and class_description = class_type class_infos
and class_type_declaration = class_type class_infos

Value expressions for the class language

and class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
    (*

    c and ['a1, ..., 'an] c

    *)
  2. | Pcl_structure of class_structure
    (*

    object ... end

    *)
  3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
    (*

    Pcl_fun(lbl, exp0, P, CE) represents:

    • fun P -> CE when lbl is Nolabel and exp0 is None,
    • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
    • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
    • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
    *)
  4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
    (*

    Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

    Invariant: n > 0

    *)
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
    (*

    Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

    • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
    *)
  6. | Pcl_constraint of class_expr * class_type
    (*

    (CE : CT)

    *)
  7. | Pcl_extension of extension
    (*

    [%id]

    *)
  8. | Pcl_open of open_description * class_expr
    (*

    let open M in CE

    *)
and class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}

Values of type class_structure represents:

and class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}
and class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
    (*

    Pcf_inherit(flag, CE, s) represents:

    • inherit CE when flag is Fresh and s is None,
    • inherit CE as x when flag is Fresh and s is Some x,
    • inherit! CE when flag is Override and s is None,
    • inherit! CE as x when flag is Override and s is Some x
    *)
  2. | Pcf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * class_field_kind
    (*

    Pcf_val(x,flag, kind) represents:

    *)
  3. | Pcf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * class_field_kind
    (**)
  4. | Pcf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  5. | Pcf_initializer of expression
    (*

    initializer E

    *)
  6. | Pcf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  7. | Pcf_extension of extension
    (*

    [%%id]

    *)
and class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

Type expressions for the module language

and module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
    (*

    Pmty_ident(S) represents S

    *)
  2. | Pmty_signature of signature
    (*

    sig ... end

    *)
  3. | Pmty_functor of functor_parameter * module_type
    (*

    functor(X : MT1) -> MT2

    *)
  4. | Pmty_with of module_type * with_constraint list
    (*

    MT with ...

    *)
  5. | Pmty_typeof of module_expr
    (*

    module type of ME

    *)
  6. | Pmty_extension of extension
    (*

    [%id]

    *)
  7. | Pmty_alias of Longident.t Asttypes.loc
    (*

    (module M)

    *)
and functor_parameter =
  1. | Unit
    (*

    ()

    *)
  2. | Named of string option Asttypes.loc * module_type
    (*

    Named(name, MT) represents:

    • (X : MT) when name is Some X,
    • (_ : MT) when name is None
    *)
and signature = signature_item list
and signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc =
  1. | Psig_value of value_description
    (*
    • val x: T
    • external x: T = "s1" ... "sn"
    *)
  2. | Psig_type of Asttypes.rec_flag * type_declaration list
    (*

    type t1 = ... and ... and tn = ...

    *)
  3. | Psig_typesubst of type_declaration list
    (*

    type t1 := ... and ... and tn := ...

    *)
  4. | Psig_typext of type_extension
    (*

    type t1 += ...

    *)
  5. | Psig_exception of type_exception
    (*

    exception C of T

    *)
  6. | Psig_module of module_declaration
    (*

    module X = M and module X : MT

    *)
  7. | Psig_modsubst of module_substitution
    (*

    module X := M

    *)
  8. | Psig_recmodule of module_declaration list
    (*

    module rec X1 : MT1 and ... and Xn : MTn

    *)
  9. | Psig_modtype of module_type_declaration
    (*

    module type S = MT and module type S

    *)
  10. | Psig_modtypesubst of module_type_declaration
    (*

    module type S := ...

    *)
  11. | Psig_open of open_description
    (*

    open X

    *)
  12. | Psig_include of include_description
    (*

    include MT

    *)
  13. | Psig_class of class_description list
    (*

    class c1 : ... and ... and cn : ...

    *)
  14. | Psig_class_type of class_type_declaration list
    (*

    class type ct1 = ... and ... and ctn = ...

    *)
  15. | Psig_attribute of attribute
    (*

    [\@\@\@id]

    *)
  16. | Psig_extension of extension * attributes
    (*

    [%%id]

    *)
and module_declaration = {
  1. pmd_name : string option Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pmd_loc : Location.t;
}

Values of type module_declaration represents S : MT

and module_substitution = {
  1. pms_name : string Asttypes.loc;
  2. pms_manifest : Longident.t Asttypes.loc;
  3. pms_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pms_loc : Location.t;
}

Values of type module_substitution represents S := M

and module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pmtd_loc : Location.t;
}

Values of type module_type_declaration represents:

  • S = MT,
  • S for abstract module type declaration, when pmtd_type is None.
and 'a open_infos = {
  1. popen_expr : 'a;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}

Values of type 'a open_infos represents:

and open_description = Longident.t Asttypes.loc open_infos

Values of type open_description represents:

  • open M.N
  • open M(N).O
and open_declaration = module_expr open_infos

Values of type open_declaration represents:

  • open M.N
  • open M(N).O
  • open struct ... end
and 'a include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos

Values of type include_description represents include MT

and include_declaration = module_expr include_infos

Values of type include_declaration represents include ME

and with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
    (*

    with type X.t = ...

    Note: the last component of the longident must match the name of the type_declaration.

    *)
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    (*

    with module X.Y = Z

    *)
  3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
    (*

    with module type X.Y = Z

    *)
  4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
    (*

    with module type X.Y := sig end

    *)
  5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
    (*

    with type X.t := ..., same format as [Pwith_type]

    *)
  6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    (*

    with module X.Y := Z

    *)

Value expressions for the module language

and module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
    (*

    X

    *)
  2. | Pmod_structure of structure
    (*

    struct ... end

    *)
  3. | Pmod_functor of functor_parameter * module_expr
    (*

    functor(X : MT1) -> ME

    *)
  4. | Pmod_apply of module_expr * module_expr
    (*

    ME1(ME2)

    *)
  5. | Pmod_apply_unit of module_expr
    (*

    ME1()

    *)
  6. | Pmod_constraint of module_expr * module_type
    (*

    (ME : MT)

    *)
  7. | Pmod_unpack of expression
    (*

    (val E)

    *)
  8. | Pmod_extension of extension
    (*

    [%id]

    *)
and structure = structure_item list
and structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc =
  1. | Pstr_eval of expression * attributes
    (*

    E

    *)
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
    (*

    Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

    • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
    *)
  3. | Pstr_primitive of value_description
    (*
    • val x: T
    • external x: T = "s1" ... "sn"
    *)
  4. | Pstr_type of Asttypes.rec_flag * type_declaration list
    (*

    type t1 = ... and ... and tn = ...

    *)
  5. | Pstr_typext of type_extension
    (*

    type t1 += ...

    *)
  6. | Pstr_exception of type_exception
    (*
    • exception C of T
    • exception C = M.X
    *)
  7. | Pstr_module of module_binding
    (*

    module X = ME

    *)
  8. | Pstr_recmodule of module_binding list
    (*

    module rec X1 = ME1 and ... and Xn = MEn

    *)
  9. | Pstr_modtype of module_type_declaration
    (*

    module type S = MT

    *)
  10. | Pstr_open of open_declaration
    (*

    open X

    *)
  11. | Pstr_class of class_declaration list
    (*

    class c1 = ... and ... and cn = ...

    *)
  12. | Pstr_class_type of class_type_declaration list
    (*

    class type ct1 = ... and ... and ctn = ...

    *)
  13. | Pstr_include of include_declaration
    (*

    include ME

    *)
  14. | Pstr_attribute of attribute
    (*

    [\@\@\@id]

    *)
  15. | Pstr_extension of extension * attributes
    (*

    [%%id]

    *)
and value_constraint =
  1. | Pvc_constraint of {
    1. locally_abstract_univars : string Asttypes.loc list;
    2. typ : core_type;
    }
  2. | Pvc_coercion of {
    1. ground : core_type option;
    2. coercion : core_type;
    }
and value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_constraint : value_constraint option;
  4. pvb_attributes : attributes;
  5. pvb_loc : Location.t;
}
and module_binding = {
  1. pmb_name : string option Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Values of type module_binding represents module X = ME

Toplevel

Toplevel phrases

type toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of toplevel_directive
    (*

    #use, #load ...

    *)
and toplevel_directive = {
  1. pdir_name : string Asttypes.loc;
  2. pdir_arg : directive_argument option;
  3. pdir_loc : Location.t;
}
and directive_argument = {
  1. pdira_desc : directive_argument_desc;
  2. pdira_loc : Location.t;
}
and directive_argument_desc =
  1. | Pdir_string of string
  2. | Pdir_int of string * char option
  3. | Pdir_ident of Longident.t
  4. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_502/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_502/index.html new file mode 100644 index 000000000..95eb03bf0 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_502/index.html @@ -0,0 +1,2 @@ + +Ast_502 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_502)

Module Astlib.Ast_502

module Asttypes : sig ... end
module Parsetree : sig ... end
module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_503/Asttypes/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_503/Asttypes/index.html new file mode 100644 index 000000000..a784cd05a --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_503/Asttypes/index.html @@ -0,0 +1,2 @@ + +Asttypes (docs.findlib-1.ppxlib.astlib.Astlib.Ast_503.Asttypes)

Module Ast_503.Asttypes

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * Location.t * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
    (*

    label:T -> ...

    *)
  3. | Optional of string
    (*

    ?label:T -> ...

    *)
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | NoVariance
type injectivity =
  1. | Injective
  2. | NoInjectivity
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_503/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_503/Config/index.html new file mode 100644 index 000000000..81193de71 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_503/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Ast_503.Config)

Module Ast_503.Config

val ast_impl_magic_number : string
val ast_intf_magic_number : string
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_503/Parsetree/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_503/Parsetree/index.html new file mode 100644 index 000000000..662be4e1d --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_503/Parsetree/index.html @@ -0,0 +1,25 @@ + +Parsetree (docs.findlib-1.ppxlib.astlib.Astlib.Ast_503.Parsetree)

Module Ast_503.Parsetree

type constant = {
  1. pconst_desc : constant_desc;
  2. pconst_loc : Location.t;
}
and constant_desc =
  1. | Pconst_integer of string * char option
    (*

    Integer constants such as 3 3l 3L 3n.

    Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

    *)
  2. | Pconst_char of char
    (*

    Character such as 'c'.

    *)
  3. | Pconst_string of string * Location.t * string option
    (*

    Constant string such as "constant" or {delim|other constant|delim}.

    The location span the content of the string, without the delimiters.

    *)
  4. | Pconst_float of string * char option
    (*

    Float constant such as 3.4, 2e5 or 1.4e-4.

    Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

    *)
type location_stack = Location.t list

Extension points

type attribute = {
  1. attr_name : string Asttypes.loc;
  2. attr_payload : payload;
  3. attr_loc : Location.t;
}

Attributes such as [\@id ARG] and [\@\@id ARG].

Metadata containers passed around within the AST. The compiler ignores unknown attributes.

and extension = string Asttypes.loc * payload

Extension points such as [%id ARG] and [%%id ARG].

Sub-language placeholder -- rejected by the typechecker.

and attributes = attribute list
and payload =
  1. | PStr of structure
  2. | PSig of signature
    (*

    : SIG in an attribute or an extension point

    *)
  3. | PTyp of core_type
    (*

    : T in an attribute or an extension point

    *)
  4. | PPat of pattern * expression option
    (*

    ? P or ? P when E, in an attribute or an extension point

    *)

Core language

Type expressions

and core_type = {
  1. ptyp_desc : core_type_desc;
  2. ptyp_loc : Location.t;
  3. ptyp_loc_stack : location_stack;
  4. ptyp_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and core_type_desc =
  1. | Ptyp_any
    (*

    _

    *)
  2. | Ptyp_var of string
    (*

    A type variable such as 'a

    *)
  3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
    (*

    Ptyp_arrow(lbl, T1, T2) represents:

    *)
  4. | Ptyp_tuple of core_type list
    (*

    Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

    Invariant: n >= 2.

    *)
  5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
    (*

    Ptyp_constr(lident, l) represents:

    • tconstr when l=[],
    • T tconstr when l=[T],
    • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
    *)
  6. | Ptyp_object of object_field list * Asttypes.closed_flag
    (*

    Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

    • < l1:T1; ...; ln:Tn > when flag is Closed,
    • < l1:T1; ...; ln:Tn; .. > when flag is Open.
    *)
  7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
    (*

    Ptyp_class(tconstr, l) represents:

    • #tconstr when l=[],
    • T #tconstr when l=[T],
    • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
    *)
  8. | Ptyp_alias of core_type * string Asttypes.loc
    (*

    T as 'a.

    *)
  9. | Ptyp_variant of row_field list + * Asttypes.closed_flag + * Asttypes.label list option
    (*

    Ptyp_variant([`A;`B], flag, labels) represents:

    • [ `A|`B ] when flag is Closed, and labels is None,
    • [> `A|`B ] when flag is Open, and labels is None,
    • [< `A|`B ] when flag is Closed, and labels is Some [],
    • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
    *)
  10. | Ptyp_poly of string Asttypes.loc list * core_type
    (*

    'a1 ... 'an. T

    Can only appear in the following context:

    • As the core_type of a Ppat_constraint node corresponding to a constraint on a let-binding:

      let x : 'a1 ... 'an. T = e ...
    *)
  11. | Ptyp_package of package_type
    (*

    (module S).

    *)
  12. | Ptyp_open of Longident.t Asttypes.loc * core_type
    (*

    M.(T)

    *)
  13. | Ptyp_extension of extension
    (*

    [%id].

    *)

As package_type typed values:

  • (S, []) represents (module S),
  • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
and row_field = {
  1. prf_desc : row_field_desc;
  2. prf_loc : Location.t;
  3. prf_attributes : attributes;
}
and row_field_desc =
  1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
    (*

    Rtag(`A, b, l) represents:

    • `A when b is true and l is [],
    • `A of T when b is false and l is [T],
    • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
    • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
    • The bool field is true if the tag contains a constant (empty) constructor.
    • & occurs when several types are used for the same constructor (see 4.2 in the manual)
    *)
  2. | Rinherit of core_type
    (*

    [ | t ]

    *)
and object_field = {
  1. pof_desc : object_field_desc;
  2. pof_loc : Location.t;
  3. pof_attributes : attributes;
}
and object_field_desc =
  1. | Otag of Asttypes.label Asttypes.loc * core_type
  2. | Oinherit of core_type

Patterns

and pattern = {
  1. ppat_desc : pattern_desc;
  2. ppat_loc : Location.t;
  3. ppat_loc_stack : location_stack;
  4. ppat_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and pattern_desc =
  1. | Ppat_any
    (*

    The pattern _.

    *)
  2. | Ppat_var of string Asttypes.loc
    (*

    A variable pattern such as x

    *)
  3. | Ppat_alias of pattern * string Asttypes.loc
    (*

    An alias pattern such as P as 'a

    *)
  4. | Ppat_constant of constant
    (*

    Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  5. | Ppat_interval of constant * constant
    (*

    Patterns such as 'a'..'z'.

    Other forms of interval are recognized by the parser but rejected by the type-checker.

    *)
  6. | Ppat_tuple of pattern list
    (*

    Patterns (P1, ..., Pn).

    Invariant: n >= 2

    *)
  7. | Ppat_construct of Longident.t Asttypes.loc + * (string Asttypes.loc list * pattern) option
    (*

    Ppat_construct(C, args) represents:

    • C when args is None,
    • C P when args is Some ([], P)
    • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
    • C (type a b) P when args is Some ([a; b], P)
    *)
  8. | Ppat_variant of Asttypes.label * pattern option
    (*

    Ppat_variant(`A, pat) represents:

    • `A when pat is None,
    • `A P when pat is Some P
    *)
  9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
    (*

    Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

    • { l1=P1; ...; ln=Pn } when flag is Closed
    • { l1=P1; ...; ln=Pn; _} when flag is Open

    Invariant: n > 0

    *)
  10. | Ppat_array of pattern list
    (*

    Pattern [| P1; ...; Pn |]

    *)
  11. | Ppat_or of pattern * pattern
    (*

    Pattern P1 | P2

    *)
  12. | Ppat_constraint of pattern * core_type
    (*

    Pattern (P : T)

    *)
  13. | Ppat_type of Longident.t Asttypes.loc
    (*

    Pattern #tconst

    *)
  14. | Ppat_lazy of pattern
    (*

    Pattern lazy P

    *)
  15. | Ppat_unpack of string option Asttypes.loc
    (*

    Ppat_unpack(s) represents:

    • (module P) when s is Some "P"
    • (module _) when s is None

    Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

    *)
  16. | Ppat_exception of pattern
    (*

    Pattern exception P

    *)
  17. | Ppat_effect of pattern * pattern
  18. | Ppat_extension of extension
    (*

    Pattern [%id]

    *)
  19. | Ppat_open of Longident.t Asttypes.loc * pattern
    (*

    Pattern M.(P)

    *)

Value expressions

and expression = {
  1. pexp_desc : expression_desc;
  2. pexp_loc : Location.t;
  3. pexp_loc_stack : location_stack;
  4. pexp_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and expression_desc =
  1. | Pexp_ident of Longident.t Asttypes.loc
    (*

    Identifiers such as x and M.x

    *)
  2. | Pexp_constant of constant
    (*

    Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
    (*

    Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

    • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
    *)
  4. | Pexp_function of function_param list * type_constraint option * function_body
    (*

    Pexp_function ([P1; ...; Pn], C, body) represents any construct involving fun or function, including:

    • fun P1 ... Pn -> E when body = Pfunction_body E
    • fun P1 ... Pn -> function p1 -> e1 | ... | pm -> em when body = Pfunction_cases [ p1 -> e1; ...; pm -> em ]

    C represents a type constraint or coercion placed immediately before the arrow, e.g. fun P1 ... Pn : ty -> ... when C = Some (Pconstraint ty).

    A function must have parameters. Pexp_function (params, _, body) must have non-empty params or a Pfunction_cases _ body.

    *)
  5. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
    (*

    Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

    li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

    Invariant: n > 0

    *)
  6. | Pexp_match of expression * case list
    (*

    match E0 with P1 -> E1 | ... | Pn -> En

    *)
  7. | Pexp_try of expression * case list
    (*

    try E0 with P1 -> E1 | ... | Pn -> En

    *)
  8. | Pexp_tuple of expression list
    (*

    Expressions (E1, ..., En)

    Invariant: n >= 2

    *)
  9. | Pexp_construct of Longident.t Asttypes.loc * expression option
    (*

    Pexp_construct(C, exp) represents:

    • C when exp is None,
    • C E when exp is Some E,
    • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
    *)
  10. | Pexp_variant of Asttypes.label * expression option
    (*

    Pexp_variant(`A, exp) represents

    • `A when exp is None
    • `A E when exp is Some E
    *)
  11. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
    (*

    Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

    • { l1=P1; ...; ln=Pn } when exp0 is None
    • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

    Invariant: n > 0

    *)
  12. | Pexp_field of expression * Longident.t Asttypes.loc
    (*

    E.l

    *)
  13. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
    (*

    E1.l <- E2

    *)
  14. | Pexp_array of expression list
    (*

    [| E1; ...; En |]

    *)
  15. | Pexp_ifthenelse of expression * expression * expression option
    (*

    if E1 then E2 else E3

    *)
  16. | Pexp_sequence of expression * expression
    (*

    E1; E2

    *)
  17. | Pexp_while of expression * expression
    (*

    while E1 do E2 done

    *)
  18. | Pexp_for of pattern + * expression + * expression + * Asttypes.direction_flag + * expression
    (*

    Pexp_for(i, E1, E2, direction, E3) represents:

    • for i = E1 to E2 do E3 done when direction is Upto
    • for i = E1 downto E2 do E3 done when direction is Downto
    *)
  19. | Pexp_constraint of expression * core_type
    (*

    (E : T)

    *)
  20. | Pexp_coerce of expression * core_type option * core_type
    (*

    Pexp_coerce(E, from, T) represents

    • (E :> T) when from is None,
    • (E : T0 :> T) when from is Some T0.
    *)
  21. | Pexp_send of expression * Asttypes.label Asttypes.loc
    (*

    E # m

    *)
  22. | Pexp_new of Longident.t Asttypes.loc
    (*

    new M.c

    *)
  23. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
    (*

    x <- 2

    *)
  24. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
    (*

    {< x1 = E1; ...; xn = En >}

    *)
  25. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
    (*

    let module M = ME in E

    *)
  26. | Pexp_letexception of extension_constructor * expression
    (*

    let exception C in E

    *)
  27. | Pexp_assert of expression
    (*

    assert E.

    Note: assert false is treated in a special way by the type-checker.

    *)
  28. | Pexp_lazy of expression
    (*

    lazy E

    *)
  29. | Pexp_poly of expression * core_type option
    (*

    Used for method bodies.

    Can only be used as the expression under Cfk_concrete for methods (not values).

    *)
  30. | Pexp_object of class_structure
    (*

    object ... end

    *)
  31. | Pexp_newtype of string Asttypes.loc * expression
    (*

    fun (type t) -> E

    *)
  32. | Pexp_pack of module_expr
    (*

    (module ME).

    (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

    *)
  33. | Pexp_open of open_declaration * expression
    (*
    • M.(E)
    • let open M in E
    • let open! M in E
    *)
  34. | Pexp_letop of letop
    (*
    • let* P = E0 in E1
    • let* P0 = E00 and* P1 = E01 in E1
    *)
  35. | Pexp_extension of extension
    (*

    [%id]

    *)
  36. | Pexp_unreachable
    (*

    .

    *)
and case = {
  1. pc_lhs : pattern;
  2. pc_guard : expression option;
  3. pc_rhs : expression;
}

Values of type case represents (P -> E) or (P when E0 -> E)

and letop = {
  1. let_ : binding_op;
  2. ands : binding_op list;
  3. body : expression;
}
and binding_op = {
  1. pbop_op : string Asttypes.loc;
  2. pbop_pat : pattern;
  3. pbop_exp : expression;
  4. pbop_loc : Location.t;
}
and function_param_desc =
  1. | Pparam_val of Asttypes.arg_label * expression option * pattern
    (*

    Pparam_val (lbl, exp0, P) represents the parameter:

    Note: If E0 is provided, only Optional is allowed.

    *)
  2. | Pparam_newtype of string Asttypes.loc
    (*

    Pparam_newtype x represents the parameter (type x). x carries the location of the identifier, whereas the pparam_loc on the enclosing function_param node is the location of the (type x) as a whole.

    Multiple parameters (type a b c) are represented as multiple Pparam_newtype nodes, let's say:

    [ { pparam_kind = Pparam_newtype a; pparam_loc = loc1 };
    +  { pparam_kind = Pparam_newtype b; pparam_loc = loc2 };
    +  { pparam_kind = Pparam_newtype c; pparam_loc = loc3 };
    +]

    Here, the first loc loc1 is the location of (type a b c), and the subsequent locs loc2 and loc3 are the same as loc1, except marked as ghost locations. The locations on a, b, c, correspond to the variables a, b, and c in the source code.

    *)
and function_param = {
  1. pparam_loc : Location.t;
  2. pparam_desc : function_param_desc;
}
and function_body =
  1. | Pfunction_body of expression
  2. | Pfunction_cases of case list * Location.t * attributes
    (*

    In Pfunction_cases (_, loc, attrs), the location extends from the start of the function keyword to the end of the last case. The compiler will only use typechecking-related attributes from attrs, e.g. enabling or disabling a warning.

    *)

See the comment on Pexp_function.

and type_constraint =
  1. | Pconstraint of core_type
  2. | Pcoerce of core_type option * core_type
    (*

    See the comment on Pexp_function.

    *)

Value descriptions

and value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : core_type;
  3. pval_prim : string list;
  4. pval_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  5. pval_loc : Location.t;
}

Values of type value_description represents:

  • val x: T, when pval_prim is []
  • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

Type declarations

and type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    (*

    ('a1,...'an) t

    *)
  3. ptype_cstrs : (core_type * core_type * Location.t) list;
    (*

    ... constraint T1=T1' ... constraint Tn=Tn'

    *)
  4. ptype_kind : type_kind;
  5. ptype_private : Asttypes.private_flag;
    (*

    for = private ...

    *)
  6. ptype_manifest : core_type option;
    (*

    represents = T

    *)
  7. ptype_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  8. ptype_loc : Location.t;
}

Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

  • type t when type_kind is Ptype_abstract, and manifest is None,
  • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
  • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
  • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
  • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
  • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
  • type t = .. when type_kind is Ptype_open, and manifest is None.
and type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of constructor_declaration list
  3. | Ptype_record of label_declaration list
    (*

    Invariant: non-empty list

    *)
  4. | Ptype_open
and label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : core_type;
  4. pld_loc : Location.t;
  5. pld_attributes : attributes;
    (*

    l : T [\@id1] [\@id2]

    *)
}

Note: T can be a Ptyp_poly.

and constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_vars : string Asttypes.loc list;
  3. pcd_args : constructor_arguments;
  4. pcd_res : core_type option;
  5. pcd_loc : Location.t;
  6. pcd_attributes : attributes;
    (*

    C of ... [\@id1] [\@id2]

    *)
}
and constructor_arguments =
  1. | Pcstr_tuple of core_type list
  2. | Pcstr_record of label_declaration list
    (*

    Values of type constructor_declaration represents the constructor arguments of:

    • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
    • C: T0 when res = Some T0, and args = Pcstr_tuple [],
    • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
    • C of {...} when res = None, and args = Pcstr_record [...],
    • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
    *)
and type_extension = {
  1. ptyext_path : Longident.t Asttypes.loc;
  2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. ptyext_constructors : extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_loc : Location.t;
  6. ptyext_attributes : attributes;
    (*

    ... \@\@id1 \@\@id2

    *)
}

Definition of new extensions constructors for the extensive sum type t (type t += ...).

and extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : extension_constructor_kind;
  3. pext_loc : Location.t;
  4. pext_attributes : attributes;
    (*

    C of ... [\@id1] [\@id2]

    *)
}
and type_exception = {
  1. ptyexn_constructor : extension_constructor;
  2. ptyexn_loc : Location.t;
  3. ptyexn_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}

Definition of a new exception (exception E).

and extension_constructor_kind =
  1. | Pext_decl of string Asttypes.loc list + * constructor_arguments + * core_type option
    (*

    Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

    • C of T1 * ... * Tn when:

      • existentials is [],
      • c_args is [T1; ...; Tn],
      • t_opt is None
    • C: T0 when

      • existentials is [],
      • c_args is [],
      • t_opt is Some T0.
    • C: T1 * ... * Tn -> T0 when

      • existentials is [],
      • c_args is [T1; ...; Tn],
      • t_opt is Some T0.
    • C: 'a... . T1 * ... * Tn -> T0 when

      • existentials is ['a;...],
      • c_args is [T1; ... ; Tn],
      • t_opt is Some T0.
    *)
  2. | Pext_rebind of Longident.t Asttypes.loc
    (*

    Pext_rebind(D) re-export the constructor D with the new name C

    *)

Class language

Type expressions for the class language

and class_type = {
  1. pcty_desc : class_type_desc;
  2. pcty_loc : Location.t;
  3. pcty_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and class_type_desc =
  1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
    (*
    • c
    • ['a1, ..., 'an] c
    *)
  2. | Pcty_signature of class_signature
    (*

    object ... end

    *)
  3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
    (*

    Pcty_arrow(lbl, T, CT) represents:

    *)
  4. | Pcty_extension of extension
    (*

    %id

    *)
  5. | Pcty_open of open_description * class_type
    (*

    let open M in CT

    *)
and class_signature = {
  1. pcsig_self : core_type;
  2. pcsig_fields : class_type_field list;
}

Values of type class_signature represents:

and class_type_field = {
  1. pctf_desc : class_type_field_desc;
  2. pctf_loc : Location.t;
  3. pctf_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}
and class_type_field_desc =
  1. | Pctf_inherit of class_type
    (*

    inherit CT

    *)
  2. | Pctf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * Asttypes.virtual_flag + * core_type
    (*

    val x: T

    *)
  3. | Pctf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * Asttypes.virtual_flag + * core_type
    (*

    method x: T

    Note: T can be a Ptyp_poly.

    *)
  4. | Pctf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  5. | Pctf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  6. | Pctf_extension of extension
    (*

    [%%id]

    *)
and 'a class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location.t;
  6. pci_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}

Values of type class_expr class_infos represents:

  • class c = ...
  • class ['a1,...,'an] c = ...
  • class virtual c = ...

They are also used for "class type" declaration.

and class_description = class_type class_infos
and class_type_declaration = class_type class_infos

Value expressions for the class language

and class_expr = {
  1. pcl_desc : class_expr_desc;
  2. pcl_loc : Location.t;
  3. pcl_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and class_expr_desc =
  1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
    (*

    c and ['a1, ..., 'an] c

    *)
  2. | Pcl_structure of class_structure
    (*

    object ... end

    *)
  3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
    (*

    Pcl_fun(lbl, exp0, P, CE) represents:

    • fun P -> CE when lbl is Nolabel and exp0 is None,
    • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
    • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
    • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
    *)
  4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
    (*

    Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

    Invariant: n > 0

    *)
  5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
    (*

    Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

    • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
    *)
  6. | Pcl_constraint of class_expr * class_type
    (*

    (CE : CT)

    *)
  7. | Pcl_extension of extension
    (*

    [%id]

    *)
  8. | Pcl_open of open_description * class_expr
    (*

    let open M in CE

    *)
and class_structure = {
  1. pcstr_self : pattern;
  2. pcstr_fields : class_field list;
}

Values of type class_structure represents:

and class_field = {
  1. pcf_desc : class_field_desc;
  2. pcf_loc : Location.t;
  3. pcf_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
}
and class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
    (*

    Pcf_inherit(flag, CE, s) represents:

    • inherit CE when flag is Fresh and s is None,
    • inherit CE as x when flag is Fresh and s is Some x,
    • inherit! CE when flag is Override and s is None,
    • inherit! CE as x when flag is Override and s is Some x
    *)
  2. | Pcf_val of Asttypes.label Asttypes.loc + * Asttypes.mutable_flag + * class_field_kind
    (*

    Pcf_val(x,flag, kind) represents:

    *)
  3. | Pcf_method of Asttypes.label Asttypes.loc + * Asttypes.private_flag + * class_field_kind
    (**)
  4. | Pcf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  5. | Pcf_initializer of expression
    (*

    initializer E

    *)
  6. | Pcf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  7. | Pcf_extension of extension
    (*

    [%%id]

    *)
and class_field_kind =
  1. | Cfk_virtual of core_type
  2. | Cfk_concrete of Asttypes.override_flag * expression
and class_declaration = class_expr class_infos

Module language

Type expressions for the module language

and module_type = {
  1. pmty_desc : module_type_desc;
  2. pmty_loc : Location.t;
  3. pmty_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and module_type_desc =
  1. | Pmty_ident of Longident.t Asttypes.loc
    (*

    Pmty_ident(S) represents S

    *)
  2. | Pmty_signature of signature
    (*

    sig ... end

    *)
  3. | Pmty_functor of functor_parameter * module_type
    (*

    functor(X : MT1) -> MT2

    *)
  4. | Pmty_with of module_type * with_constraint list
    (*

    MT with ...

    *)
  5. | Pmty_typeof of module_expr
    (*

    module type of ME

    *)
  6. | Pmty_extension of extension
    (*

    [%id]

    *)
  7. | Pmty_alias of Longident.t Asttypes.loc
    (*

    (module M)

    *)
and functor_parameter =
  1. | Unit
    (*

    ()

    *)
  2. | Named of string option Asttypes.loc * module_type
    (*

    Named(name, MT) represents:

    • (X : MT) when name is Some X,
    • (_ : MT) when name is None
    *)
and signature = signature_item list
and signature_item = {
  1. psig_desc : signature_item_desc;
  2. psig_loc : Location.t;
}
and signature_item_desc =
  1. | Psig_value of value_description
    (*
    • val x: T
    • external x: T = "s1" ... "sn"
    *)
  2. | Psig_type of Asttypes.rec_flag * type_declaration list
    (*

    type t1 = ... and ... and tn = ...

    *)
  3. | Psig_typesubst of type_declaration list
    (*

    type t1 := ... and ... and tn := ...

    *)
  4. | Psig_typext of type_extension
    (*

    type t1 += ...

    *)
  5. | Psig_exception of type_exception
    (*

    exception C of T

    *)
  6. | Psig_module of module_declaration
    (*

    module X = M and module X : MT

    *)
  7. | Psig_modsubst of module_substitution
    (*

    module X := M

    *)
  8. | Psig_recmodule of module_declaration list
    (*

    module rec X1 : MT1 and ... and Xn : MTn

    *)
  9. | Psig_modtype of module_type_declaration
    (*

    module type S = MT and module type S

    *)
  10. | Psig_modtypesubst of module_type_declaration
    (*

    module type S := ...

    *)
  11. | Psig_open of open_description
    (*

    open X

    *)
  12. | Psig_include of include_description
    (*

    include MT

    *)
  13. | Psig_class of class_description list
    (*

    class c1 : ... and ... and cn : ...

    *)
  14. | Psig_class_type of class_type_declaration list
    (*

    class type ct1 = ... and ... and ctn = ...

    *)
  15. | Psig_attribute of attribute
    (*

    [\@\@\@id]

    *)
  16. | Psig_extension of extension * attributes
    (*

    [%%id]

    *)
and module_declaration = {
  1. pmd_name : string option Asttypes.loc;
  2. pmd_type : module_type;
  3. pmd_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pmd_loc : Location.t;
}

Values of type module_declaration represents S : MT

and module_substitution = {
  1. pms_name : string Asttypes.loc;
  2. pms_manifest : Longident.t Asttypes.loc;
  3. pms_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pms_loc : Location.t;
}

Values of type module_substitution represents S := M

and module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : module_type option;
  3. pmtd_attributes : attributes;
    (*

    ... [\@\@id1] [\@\@id2]

    *)
  4. pmtd_loc : Location.t;
}

Values of type module_type_declaration represents:

  • S = MT,
  • S for abstract module type declaration, when pmtd_type is None.
and 'a open_infos = {
  1. popen_expr : 'a;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location.t;
  4. popen_attributes : attributes;
}

Values of type 'a open_infos represents:

and open_description = Longident.t Asttypes.loc open_infos

Values of type open_description represents:

  • open M.N
  • open M(N).O
and open_declaration = module_expr open_infos

Values of type open_declaration represents:

  • open M.N
  • open M(N).O
  • open struct ... end
and 'a include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location.t;
  3. pincl_attributes : attributes;
}
and include_description = module_type include_infos

Values of type include_description represents include MT

and include_declaration = module_expr include_infos

Values of type include_declaration represents include ME

and with_constraint =
  1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
    (*

    with type X.t = ...

    Note: the last component of the longident must match the name of the type_declaration.

    *)
  2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    (*

    with module X.Y = Z

    *)
  3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
    (*

    with module type X.Y = Z

    *)
  4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
    (*

    with module type X.Y := sig end

    *)
  5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
    (*

    with type X.t := ..., same format as [Pwith_type]

    *)
  6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    (*

    with module X.Y := Z

    *)

Value expressions for the module language

and module_expr = {
  1. pmod_desc : module_expr_desc;
  2. pmod_loc : Location.t;
  3. pmod_attributes : attributes;
    (*

    ... [\@id1] [\@id2]

    *)
}
and module_expr_desc =
  1. | Pmod_ident of Longident.t Asttypes.loc
    (*

    X

    *)
  2. | Pmod_structure of structure
    (*

    struct ... end

    *)
  3. | Pmod_functor of functor_parameter * module_expr
    (*

    functor(X : MT1) -> ME

    *)
  4. | Pmod_apply of module_expr * module_expr
    (*

    ME1(ME2)

    *)
  5. | Pmod_apply_unit of module_expr
    (*

    ME1()

    *)
  6. | Pmod_constraint of module_expr * module_type
    (*

    (ME : MT)

    *)
  7. | Pmod_unpack of expression
    (*

    (val E)

    *)
  8. | Pmod_extension of extension
    (*

    [%id]

    *)
and structure = structure_item list
and structure_item = {
  1. pstr_desc : structure_item_desc;
  2. pstr_loc : Location.t;
}
and structure_item_desc =
  1. | Pstr_eval of expression * attributes
    (*

    E

    *)
  2. | Pstr_value of Asttypes.rec_flag * value_binding list
    (*

    Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

    • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
    *)
  3. | Pstr_primitive of value_description
    (*
    • val x: T
    • external x: T = "s1" ... "sn"
    *)
  4. | Pstr_type of Asttypes.rec_flag * type_declaration list
    (*

    type t1 = ... and ... and tn = ...

    *)
  5. | Pstr_typext of type_extension
    (*

    type t1 += ...

    *)
  6. | Pstr_exception of type_exception
    (*
    • exception C of T
    • exception C = M.X
    *)
  7. | Pstr_module of module_binding
    (*

    module X = ME

    *)
  8. | Pstr_recmodule of module_binding list
    (*

    module rec X1 = ME1 and ... and Xn = MEn

    *)
  9. | Pstr_modtype of module_type_declaration
    (*

    module type S = MT

    *)
  10. | Pstr_open of open_declaration
    (*

    open X

    *)
  11. | Pstr_class of class_declaration list
    (*

    class c1 = ... and ... and cn = ...

    *)
  12. | Pstr_class_type of class_type_declaration list
    (*

    class type ct1 = ... and ... and ctn = ...

    *)
  13. | Pstr_include of include_declaration
    (*

    include ME

    *)
  14. | Pstr_attribute of attribute
    (*

    [\@\@\@id]

    *)
  15. | Pstr_extension of extension * attributes
    (*

    [%%id]

    *)
and value_constraint =
  1. | Pvc_constraint of {
    1. locally_abstract_univars : string Asttypes.loc list;
    2. typ : core_type;
    }
  2. | Pvc_coercion of {
    1. ground : core_type option;
    2. coercion : core_type;
    }
    (*
    • Pvc_constraint { locally_abstract_univars=[]; typ} is a simple type constraint on a value binding: let x : typ
    • More generally, in Pvc_constraint { locally_abstract_univars; typ} locally_abstract_univars is the list of locally abstract type variables in let x: type a ... . typ
    • Pvc_coercion { ground=None; coercion } represents let x :> typ
    • Pvc_coercion { ground=Some g; coercion } represents let x : g :> typ
    *)
and value_binding = {
  1. pvb_pat : pattern;
  2. pvb_expr : expression;
  3. pvb_constraint : value_constraint option;
  4. pvb_attributes : attributes;
  5. pvb_loc : Location.t;
}

let pat : type_constraint = exp

and module_binding = {
  1. pmb_name : string option Asttypes.loc;
  2. pmb_expr : module_expr;
  3. pmb_attributes : attributes;
  4. pmb_loc : Location.t;
}

Values of type module_binding represents module X = ME

Toplevel

Toplevel phrases

type toplevel_phrase =
  1. | Ptop_def of structure
  2. | Ptop_dir of toplevel_directive
    (*

    #use, #load ...

    *)
and toplevel_directive = {
  1. pdir_name : string Asttypes.loc;
  2. pdir_arg : directive_argument option;
  3. pdir_loc : Location.t;
}
and directive_argument = {
  1. pdira_desc : directive_argument_desc;
  2. pdira_loc : Location.t;
}
and directive_argument_desc =
  1. | Pdir_string of string
  2. | Pdir_int of string * char option
  3. | Pdir_ident of Longident.t
  4. | Pdir_bool of bool
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_503/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_503/index.html new file mode 100644 index 000000000..9d8ef9929 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_503/index.html @@ -0,0 +1,2 @@ + +Ast_503 (docs.findlib-1.ppxlib.astlib.Astlib.Ast_503)

Module Astlib.Ast_503

module Asttypes : sig ... end
module Parsetree : sig ... end
module Config : sig ... end
diff --git a/findlib-1/ppxlib/astlib/Astlib/Ast_metadata/index.html b/findlib-1/ppxlib/astlib/Astlib/Ast_metadata/index.html new file mode 100644 index 000000000..2658daa66 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Ast_metadata/index.html @@ -0,0 +1,14 @@ + +Ast_metadata (docs.findlib-1.ppxlib.astlib.Astlib.Ast_metadata)

Module Astlib.Ast_metadata

Meta data related interface for a ppx rewriter

val add_ppx_context_str : + tool_name:string -> + Parsetree.structure_item list -> + Parsetree.structure_item list

Extract information from the current environment and encode it into an attribute which is prepended to the list of structure items in order to pass the information to an external processor.

val drop_ppx_context_str : + restore:bool -> + Parsetree.structure_item list -> + Parsetree.structure_item list

Drop the ocaml.ppx.context attribute from a structure. If restore is true, also restore the associated data in the current process.

val add_ppx_context_sig : + tool_name:string -> + Parsetree.signature_item list -> + Parsetree.signature_item list

Same as add_ppx_context_str, but for signatures.

val drop_ppx_context_sig : + restore:bool -> + Parsetree.signature_item list -> + Parsetree.signature_item list

Same as drop_ppx_context_str, but for signatures.

val tool_name : unit -> string

Can be used within a ppx preprocessor to know which tool is calling it "ocamlc", "ocamlopt", "ocamldoc", "ocamldep", "ocaml", ...

Cookies

Cookies are used to pass information from a ppx processor to a further invocation of itself, when called from the OCaml toplevel (or other tools that support cookies).

diff --git a/findlib-1/ppxlib/astlib/Astlib/Config/index.html b/findlib-1/ppxlib/astlib/Astlib/Config/index.html new file mode 100644 index 000000000..9208768cf --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Config/index.html @@ -0,0 +1,2 @@ + +Config (docs.findlib-1.ppxlib.astlib.Astlib.Config)

Module Astlib.Config

Magic numbers

val ast_intf_magic_number : string

Magic number for file holding an interface syntax tree

val ast_impl_magic_number : string

Magic number for file holding an implementation syntax tree

diff --git a/findlib-1/ppxlib/astlib/Astlib/Keyword/index.html b/findlib-1/ppxlib/astlib/Astlib/Keyword/index.html new file mode 100644 index 000000000..174da76a4 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Keyword/index.html @@ -0,0 +1,2 @@ + +Keyword (docs.findlib-1.ppxlib.astlib.Astlib.Keyword)

Module Astlib.Keyword

val is_keyword : string -> bool

Check if a string is an OCaml keyword.

diff --git a/findlib-1/ppxlib/astlib/Astlib/Location/Error/index.html b/findlib-1/ppxlib/astlib/Astlib/Location/Error/index.html new file mode 100644 index 000000000..e99d58331 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Location/Error/index.html @@ -0,0 +1,2 @@ + +Error (docs.findlib-1.ppxlib.astlib.Astlib.Location.Error)

Module Location.Error

type t

The location error type. It contains a located main message and a (possibly empty) list of located submessages.

val is_well_formed : t -> bool

A location error constructed via make is always well-formed. A malformed location error is a value of type location_report on compilers >= 4.08, whose kind is different from Report_error. Notice that location_report does not explicitly form part of Astlib.

val main_msg : t -> string loc

Get the located error main message.

val sub_msgs : t -> string loc list

Get the located error sub-messages.

val set_main_msg : t -> string -> t

Set the text of the error's main message. The location stays as is.

val set_main_loc : t -> t -> t

Set the location of the error's main message. The text satys as is.

val make : sub:string loc list -> string loc -> t

Construct a location error.

val of_exn : exn -> t option

Turn an exception into a location error, if possible.

diff --git a/findlib-1/ppxlib/astlib/Astlib/Location/index.html b/findlib-1/ppxlib/astlib/Astlib/Location/index.html new file mode 100644 index 000000000..dbb50b133 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Location/index.html @@ -0,0 +1,2 @@ + +Location (docs.findlib-1.ppxlib.astlib.Astlib.Location)

Module Astlib.Location

Source code locations (ranges of positions), used in parsetrees

type t = Ocaml_common.Location.t = {
  1. loc_start : Lexing.position;
  2. loc_end : Lexing.position;
  3. loc_ghost : bool;
}

The location type

type 'a loc = 'a Ocaml_common.Location.loc = {
  1. txt : 'a;
  2. loc : t;
}

A located type

module Error : sig ... end
val set_input_name : string -> unit

Set the name of the input source, e.g. the file name.

val set_input_lexbuf : Lexing.lexbuf option -> unit

Set the name of the input source, e.g. the file name.

val none : t

An arbitrary value of type t; describes an empty ghost range.

Automatically reporting errors for raised exceptions

val register_error_of_exn : (exn -> Error.t option) -> unit

Each compiler module which defines a custom type of exception which can surface as a user-visible error should register a "printer" for this exception using register_error_of_exn. The result of the printer is an error value containing a location, a message, and optionally sub-messages (each of them being located as well).

exception Error of Error.t

Located exception.

val raise_errorf : ?loc:t -> ('a, Format.formatter, unit, 'b) format4 -> 'a

Raise a located exception.

val report_exception : Format.formatter -> exn -> unit

Report an exception on the given formatter

diff --git a/findlib-1/ppxlib/astlib/Astlib/Longident/index.html b/findlib-1/ppxlib/astlib/Astlib/Longident/index.html new file mode 100644 index 000000000..5a5475635 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Longident/index.html @@ -0,0 +1,2 @@ + +Longident (docs.findlib-1.ppxlib.astlib.Astlib.Longident)

Module Astlib.Longident

Long identifiers, used in parsetrees.

type t = Ocaml_common.Longident.t =
  1. | Lident of string
  2. | Ldot of t * string
  3. | Lapply of t * t

The long identifier type

val flatten : t -> string list

Flatten a long identifier built upon Lident and Ldot. Raise when hitting Lapply.

val parse : string -> t

Parse a string into a long identifier built upon Lident and Ldot.

diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_402_403/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_402_403/index.html new file mode 100644 index 000000000..19220e8f4 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_402_403/index.html @@ -0,0 +1,96 @@ + +Migrate_402_403 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_402_403)

Module Astlib.Migrate_402_403

module From = Ast_402
module To = Ast_403
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos
val copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option
val copy_longident : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Asttypes.loc -> + 'g0 To.Asttypes.loc
val copy_location : Location.t -> Location.t
val copy_bool : bool -> bool
val copy_cases : From.Parsetree.case list -> To.Parsetree.case list
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_403_402/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_403_402/index.html new file mode 100644 index 000000000..fcbc28d72 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_403_402/index.html @@ -0,0 +1,106 @@ + +Migrate_403_402 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_403_402)

Module Astlib.Migrate_403_402

module From = Ast_403
module To = Ast_402
val from_loc : 'a Location.loc -> Location.t
val migration_error : Location.t -> string -> 'a
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos
val copy_constructor_arguments : + Location.t -> + From.Parsetree.constructor_arguments -> + To.Parsetree.core_type list
val copy_arg_label : From.Asttypes.arg_label -> string
val copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option
val copy_longident : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Asttypes.loc -> + 'g0 To.Asttypes.loc
val copy_location : Location.t -> Location.t
val copy_bool : bool -> bool
val type_declarations : + Astlib__Ast_403.Asttypes.rec_flag -> + From.Parsetree.type_declaration list -> + To.Parsetree.type_declaration list
val copy_cases : From.Parsetree.case list -> To.Parsetree.case list
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_403_404/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_403_404/index.html new file mode 100644 index 000000000..5ad1937d2 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_403_404/index.html @@ -0,0 +1,93 @@ + +Migrate_403_404 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_403_404)

Module Astlib.Migrate_403_404

module From = Ast_403
module To = Ast_404
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos
val copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option
val copy_longident : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Asttypes.loc -> + 'g0 To.Asttypes.loc
val copy_location : Location.t -> Location.t
val copy_bool : bool -> bool
val copy_cases : From.Parsetree.case list -> To.Parsetree.case list
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_404_403/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_404_403/index.html new file mode 100644 index 000000000..110bde18b --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_404_403/index.html @@ -0,0 +1,95 @@ + +Migrate_404_403 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_404_403)

Module Astlib.Migrate_404_403

module From = Ast_404
module To = Ast_403
val from_loc : 'a Location.loc -> Location.t
val migration_error : Location.t -> string -> 'a
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos
val copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option
val copy_longident : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Asttypes.loc -> + 'g0 To.Asttypes.loc
val copy_location : Location.t -> Location.t
val copy_bool : bool -> bool
val copy_cases : From.Parsetree.case list -> To.Parsetree.case list
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_404_405/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_404_405/index.html new file mode 100644 index 000000000..173a345c9 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_404_405/index.html @@ -0,0 +1,93 @@ + +Migrate_404_405 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_404_405)

Module Astlib.Migrate_404_405

module From = Ast_404
module To = Ast_405
val noloc : 'a -> 'b Location.loc
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos
val copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option
val copy_longident : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Asttypes.loc -> + 'g0 To.Asttypes.loc
val copy_location : Location.t -> Location.t
val copy_bool : bool -> bool
val copy_cases : From.Parsetree.case list -> To.Parsetree.case list
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_405_404/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_405_404/index.html new file mode 100644 index 000000000..0b391dc92 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_405_404/index.html @@ -0,0 +1,93 @@ + +Migrate_405_404 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_405_404)

Module Astlib.Migrate_405_404

module From = Ast_405
module To = Ast_404
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos
val copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option
val copy_longident : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Asttypes.loc -> + 'g0 To.Asttypes.loc
val copy_location : Location.t -> Location.t
val copy_bool : bool -> bool
val copy_cases : From.Parsetree.case list -> To.Parsetree.case list
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_405_406/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_405_406/index.html new file mode 100644 index 000000000..3f7d2e079 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_405_406/index.html @@ -0,0 +1,93 @@ + +Migrate_405_406 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_405_406)

Module Astlib.Migrate_405_406

module From = Ast_405
module To = Ast_406
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos
val copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option
val copy_longident : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Asttypes.loc -> + 'g0 To.Asttypes.loc
val copy_location : Location.t -> Location.t
val copy_bool : bool -> bool
val copy_cases : From.Parsetree.case list -> To.Parsetree.case list
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_406_405/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_406_405/index.html new file mode 100644 index 000000000..899eac560 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_406_405/index.html @@ -0,0 +1,93 @@ + +Migrate_406_405 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_406_405)

Module Astlib.Migrate_406_405

module From = Ast_406
module To = Ast_405
val migration_error : Location.t -> string -> 'a
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos
val copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option
val copy_longident : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Asttypes.loc -> + 'g0 To.Asttypes.loc
val copy_location : Location.t -> Location.t
val copy_bool : bool -> bool
val copy_cases : From.Parsetree.case list -> To.Parsetree.case list
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_406_407/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_406_407/index.html new file mode 100644 index 000000000..097876205 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_406_407/index.html @@ -0,0 +1,95 @@ + +Migrate_406_407 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_406_407)

Module Astlib.Migrate_406_407

module From = Ast_406
module To = Ast_407
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos
val copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option
val copy_longident : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Asttypes.loc -> + 'g0 To.Asttypes.loc
val copy_location : Location.t -> Location.t
val copy_bool : bool -> bool
val copy_cases : From.Parsetree.case list -> To.Parsetree.case list
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_407_406/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_407_406/index.html new file mode 100644 index 000000000..52e5bf4be --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_407_406/index.html @@ -0,0 +1,95 @@ + +Migrate_407_406 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_407_406)

Module Astlib.Migrate_407_406

module From = Ast_407
module To = Ast_406
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos
val copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option
val copy_longident : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Asttypes.loc -> + 'g0 To.Asttypes.loc
val copy_location : Location.t -> Location.t
val copy_bool : bool -> bool
val copy_cases : From.Parsetree.case list -> To.Parsetree.case list
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_407_408/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_407_408/index.html new file mode 100644 index 000000000..5d942e58c --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_407_408/index.html @@ -0,0 +1,95 @@ + +Migrate_407_408 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_407_408)

Module Astlib.Migrate_407_408

module From = Ast_407
module To = Ast_408
val copy_directive_argument : + From.Parsetree.directive_argument -> + To.Parsetree.directive_argument option
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos
val copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option
val copy_longident : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Asttypes.loc -> + 'g0 To.Asttypes.loc
val copy_location : Location.t -> Location.t
val copy_bool : bool -> bool
val copy_cases : From.Parsetree.case list -> To.Parsetree.case list
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_408_407/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_408_407/index.html new file mode 100644 index 000000000..f66b0826d --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_408_407/index.html @@ -0,0 +1,97 @@ + +Migrate_408_407 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_408_407)

Module Astlib.Migrate_408_407

module From = Ast_408
module To = Ast_407
val migration_error : Location.t -> string -> 'a
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos
val copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option
val copy_longident : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 From.Asttypes.loc -> + 'g0 To.Asttypes.loc
val copy_location : Location.t -> Location.t
val copy_bool : bool -> bool
val copy_cases : From.Parsetree.case list -> To.Parsetree.case list
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_408_409/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_408_409/index.html new file mode 100644 index 000000000..11a66590e --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_408_409/index.html @@ -0,0 +1,136 @@ + +Migrate_408_409 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_408_409)

Module Astlib.Migrate_408_409

module From = Ast_408
module To = Ast_409
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_408.Parsetree.class_infos -> + 'g0 Ast_409.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_408.Parsetree.include_infos -> + 'g0 Ast_409.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_408.Parsetree.open_infos -> + 'g0 Ast_409.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_408.Asttypes.loc -> + 'g0 Ast_409.Asttypes.loc
val copy_location : Location.t -> Location.t
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_409_408/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_409_408/index.html new file mode 100644 index 000000000..54b6b0c6f --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_409_408/index.html @@ -0,0 +1,136 @@ + +Migrate_409_408 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_409_408)

Module Astlib.Migrate_409_408

module From = Ast_409
module To = Ast_408
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_409.Parsetree.class_infos -> + 'g0 Ast_408.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_409.Parsetree.include_infos -> + 'g0 Ast_408.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_409.Parsetree.open_infos -> + 'g0 Ast_408.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_409.Asttypes.loc -> + 'g0 Ast_408.Asttypes.loc
val copy_location : Location.t -> Location.t
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_409_410/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_409_410/index.html new file mode 100644 index 000000000..3c3c131cc --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_409_410/index.html @@ -0,0 +1,136 @@ + +Migrate_409_410 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_409_410)

Module Astlib.Migrate_409_410

module From = Ast_409
module To = Ast_410
val map_option : ('a -> 'b) -> 'c option -> 'd option
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_409.Parsetree.class_infos -> + 'g0 Ast_410.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_409.Parsetree.include_infos -> + 'g0 Ast_410.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_409.Parsetree.open_infos -> + 'g0 Ast_410.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_409.Asttypes.loc -> + 'g0 Ast_410.Asttypes.loc
val copy_location : Location.t -> Location.t
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_410_409/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_410_409/index.html new file mode 100644 index 000000000..c9243b044 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_410_409/index.html @@ -0,0 +1,138 @@ + +Migrate_410_409 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_410_409)

Module Astlib.Migrate_410_409

module From = Ast_410
module To = Ast_409
val migration_error : Location.t -> string -> 'a
val map_option : ('a -> 'b) -> 'c option -> 'd option
val copy_location_stack : Ast_410.Parsetree.location_stack -> Location.t list
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_410.Parsetree.class_infos -> + 'g0 Ast_409.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_410.Parsetree.include_infos -> + 'g0 Ast_409.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_410.Parsetree.open_infos -> + 'g0 Ast_409.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_410.Asttypes.loc -> + 'g0 Ast_409.Asttypes.loc
val copy_location : Location.t -> Location.t
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_410_411/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_410_411/index.html new file mode 100644 index 000000000..561c84e16 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_410_411/index.html @@ -0,0 +1,140 @@ + +Migrate_410_411 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_410_411)

Module Astlib.Migrate_410_411

module From = Ast_410
module To = Ast_411
val copy_cases : Ast_410.Parsetree.case list -> Ast_411.Parsetree.case list
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_410.Parsetree.class_infos -> + 'g0 Ast_411.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_410.Parsetree.include_infos -> + 'g0 Ast_411.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_410.Parsetree.open_infos -> + 'g0 Ast_411.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_410.Asttypes.loc -> + 'g0 Ast_411.Asttypes.loc
val copy_location : Location.t -> Location.t
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_411_410/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_411_410/index.html new file mode 100644 index 000000000..ebc1e3d13 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_411_410/index.html @@ -0,0 +1,140 @@ + +Migrate_411_410 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_411_410)

Module Astlib.Migrate_411_410

module From = Ast_411
module To = Ast_410
val copy_cases : Ast_411.Parsetree.case list -> Ast_410.Parsetree.case list
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_411.Parsetree.class_infos -> + 'g0 Ast_410.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_411.Parsetree.include_infos -> + 'g0 Ast_410.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_411.Parsetree.open_infos -> + 'g0 Ast_410.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_411.Asttypes.loc -> + 'g0 Ast_410.Asttypes.loc
val copy_location : Location.t -> Location.t
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_411_412/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_411_412/index.html new file mode 100644 index 000000000..13226ef6c --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_411_412/index.html @@ -0,0 +1,140 @@ + +Migrate_411_412 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_411_412)

Module Astlib.Migrate_411_412

module From = Ast_411
module To = Ast_412
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_411.Parsetree.class_infos -> + 'g0 Ast_412.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_411.Parsetree.include_infos -> + 'g0 Ast_412.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_411.Parsetree.open_infos -> + 'g0 Ast_412.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_411.Asttypes.loc -> + 'g0 Ast_412.Asttypes.loc
val copy_location : Location.t -> Location.t
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_412_411/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_412_411/index.html new file mode 100644 index 000000000..6402ef237 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_412_411/index.html @@ -0,0 +1,140 @@ + +Migrate_412_411 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_412_411)

Module Astlib.Migrate_412_411

module From = Ast_412
module To = Ast_411
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_412.Parsetree.class_infos -> + 'g0 Ast_411.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_412.Parsetree.include_infos -> + 'g0 Ast_411.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_412.Parsetree.open_infos -> + 'g0 Ast_411.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_412.Asttypes.loc -> + 'g0 Ast_411.Asttypes.loc
val copy_location : Location.t -> Location.t
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_412_413/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_412_413/index.html new file mode 100644 index 000000000..d82897c77 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_412_413/index.html @@ -0,0 +1,142 @@ + +Migrate_412_413 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_412_413)

Module Astlib.Migrate_412_413

module From = Ast_412
module To = Ast_413
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_412.Parsetree.class_infos -> + 'g0 Ast_413.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_412.Parsetree.include_infos -> + 'g0 Ast_413.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_412.Parsetree.open_infos -> + 'g0 Ast_413.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_412.Asttypes.loc -> + 'g0 Ast_413.Asttypes.loc
val copy_location : Location.t -> Location.t
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_413_412/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_413_412/index.html new file mode 100644 index 000000000..28a28adfd --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_413_412/index.html @@ -0,0 +1,142 @@ + +Migrate_413_412 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_413_412)

Module Astlib.Migrate_413_412

module From = Ast_413
module To = Ast_412
val migration_error : Location.t -> string -> 'a
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_413.Parsetree.class_infos -> + 'g0 Ast_412.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_413.Parsetree.include_infos -> + 'g0 Ast_412.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_413.Parsetree.open_infos -> + 'g0 Ast_412.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_413.Asttypes.loc -> + 'g0 Ast_412.Asttypes.loc
val copy_location : Location.t -> Location.t
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_413_414/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_413_414/index.html new file mode 100644 index 000000000..6d8f26baf --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_413_414/index.html @@ -0,0 +1,142 @@ + +Migrate_413_414 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_413_414)

Module Astlib.Migrate_413_414

module From = Ast_413
module To = Ast_414
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_413.Parsetree.class_infos -> + 'g0 Ast_414.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_413.Parsetree.include_infos -> + 'g0 Ast_414.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_413.Parsetree.open_infos -> + 'g0 Ast_414.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_413.Asttypes.loc -> + 'g0 Ast_414.Asttypes.loc
val copy_location : Location.t -> Location.t
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_414_413/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_414_413/index.html new file mode 100644 index 000000000..9acc575ad --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_414_413/index.html @@ -0,0 +1,142 @@ + +Migrate_414_413 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_414_413)

Module Astlib.Migrate_414_413

module From = Ast_414
module To = Ast_413
val migration_error : Location.t -> string -> 'a
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_414.Parsetree.class_infos -> + 'g0 Ast_413.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_414.Parsetree.include_infos -> + 'g0 Ast_413.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_414.Parsetree.open_infos -> + 'g0 Ast_413.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_414.Asttypes.loc -> + 'g0 Ast_413.Asttypes.loc
val copy_location : Location.t -> Location.t
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_414_500/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_414_500/index.html new file mode 100644 index 000000000..739b159c9 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_414_500/index.html @@ -0,0 +1,30 @@ + +Migrate_414_500 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_414_500)

Module Astlib.Migrate_414_500

module From = Ast_414
module To = Ast_500
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_500_414/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_500_414/index.html new file mode 100644 index 000000000..ebc89dee0 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_500_414/index.html @@ -0,0 +1,30 @@ + +Migrate_500_414 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_500_414)

Module Astlib.Migrate_500_414

module From = Ast_500
module To = Ast_414
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_500_501/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_500_501/index.html new file mode 100644 index 000000000..5c12c91fe --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_500_501/index.html @@ -0,0 +1,142 @@ + +Migrate_500_501 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_500_501)

Module Astlib.Migrate_500_501

module From = Ast_500
module To = Ast_501
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_500.Parsetree.class_infos -> + 'g0 Ast_501.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_500.Parsetree.include_infos -> + 'g0 Ast_501.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_500.Parsetree.open_infos -> + 'g0 Ast_501.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_500.Asttypes.loc -> + 'g0 Ast_501.Asttypes.loc
val copy_location : Location.t -> Location.t
val copy_position : Lexing.position -> Lexing.position
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_501_500/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_501_500/index.html new file mode 100644 index 000000000..5c8ec150a --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_501_500/index.html @@ -0,0 +1,143 @@ + +Migrate_501_500 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_501_500)

Module Astlib.Migrate_501_500

module From = Ast_501
module To = Ast_500
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_501.Parsetree.class_infos -> + 'g0 Ast_500.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_501.Parsetree.include_infos -> + 'g0 Ast_500.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_501.Parsetree.open_infos -> + 'g0 Ast_500.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_501.Asttypes.loc -> + 'g0 Ast_500.Asttypes.loc
val copy_location : Location.t -> Location.t
val copy_position : Lexing.position -> Lexing.position
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_501_502/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_501_502/index.html new file mode 100644 index 000000000..a1eb48225 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_501_502/index.html @@ -0,0 +1,154 @@ + +Migrate_501_502 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_501_502)

Module Astlib.Migrate_501_502

module From = Ast_501
module To = Ast_502
val extract_attr : + string -> + Ast_501.Parsetree.attributes -> + Ast_501.Parsetree.payload option * Ast_501.Parsetree.attribute list

Look for a particular attribute and remove it from the list. Attributes are used to make certain migrations round-trip. Returns None if the specified attribute is not found.

val migrate_ppx_context_load_path : + Ast_501.Parsetree.expression -> + Ast_501.Parsetree.expression
val migrate_ppx_context_payload : + Ast_501.Parsetree.payload -> + Ast_501.Parsetree.payload
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_501.Parsetree.class_infos -> + 'g0 Ast_502.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_501.Parsetree.include_infos -> + 'g0 Ast_502.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_501.Parsetree.open_infos -> + 'g0 Ast_502.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_501.Asttypes.loc -> + 'g0 Ast_502.Asttypes.loc
val copy_location : Location.t -> Location.t
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_502_501/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_502_501/index.html new file mode 100644 index 000000000..e19d0be8c --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_502_501/index.html @@ -0,0 +1,154 @@ + +Migrate_502_501 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_502_501)

Module Astlib.Migrate_502_501

module From = Ast_502
module To = Ast_501
val migration_error : Location.t -> string -> 'a
val mk_ghost_attr : string -> Ast_501.Parsetree.attribute
val migrate_ppx_context_load_path : + Ast_502.Parsetree.expression -> + Ast_502.Parsetree.expression
val migrate_ppx_context_payload : + Ast_502.Parsetree.payload -> + Ast_502.Parsetree.payload
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_502.Parsetree.class_infos -> + 'g0 Ast_501.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_502.Parsetree.include_infos -> + 'g0 Ast_501.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_502.Parsetree.open_infos -> + 'g0 Ast_501.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_502.Asttypes.loc -> + 'g0 Ast_501.Asttypes.loc
val copy_location : Location.t -> Location.t
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_502_503/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_502_503/index.html new file mode 100644 index 000000000..857659fd1 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_502_503/index.html @@ -0,0 +1,152 @@ + +Migrate_502_503 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_502_503)

Module Astlib.Migrate_502_503

module From = Ast_502
module To = Ast_503
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_502.Parsetree.class_infos -> + 'g0 Ast_503.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_502.Parsetree.include_infos -> + 'g0 Ast_503.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_502.Parsetree.open_infos -> + 'g0 Ast_503.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_502.Asttypes.loc -> + 'g0 Ast_503.Asttypes.loc
val copy_location : Location.t -> Location.t
diff --git a/findlib-1/ppxlib/astlib/Astlib/Migrate_503_502/index.html b/findlib-1/ppxlib/astlib/Astlib/Migrate_503_502/index.html new file mode 100644 index 000000000..5073a7590 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Migrate_503_502/index.html @@ -0,0 +1,153 @@ + +Migrate_503_502 (docs.findlib-1.ppxlib.astlib.Astlib.Migrate_503_502)

Module Astlib.Migrate_503_502

module From = Ast_503
module To = Ast_502
val migration_error : Location.t -> string -> 'a
val copy_class_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_503.Parsetree.class_infos -> + 'g0 Ast_502.Parsetree.class_infos
val copy_include_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_503.Parsetree.include_infos -> + 'g0 Ast_502.Parsetree.include_infos
val copy_open_infos : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_503.Parsetree.open_infos -> + 'g0 Ast_502.Parsetree.open_infos
val copy_Longident_t : Longident.t -> Longident.t
val copy_loc : + 'f0 'g0. ('f0 -> 'g0) -> + 'f0 Ast_503.Asttypes.loc -> + 'g0 Ast_502.Asttypes.loc
val copy_location : Location.t -> Location.t
diff --git a/findlib-1/ppxlib/astlib/Astlib/Parse/index.html b/findlib-1/ppxlib/astlib/Astlib/Parse/index.html new file mode 100644 index 000000000..089e62358 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Parse/index.html @@ -0,0 +1,2 @@ + +Parse (docs.findlib-1.ppxlib.astlib.Astlib.Parse)

Module Astlib.Parse

Entry points in the parser

val implementation : Lexing.lexbuf -> Parsetree.structure_item list

Parse a structure

val interface : Lexing.lexbuf -> Parsetree.signature_item list

Parse a signature

val toplevel_phrase : Lexing.lexbuf -> Parsetree.toplevel_phrase

Parse a toplevel phrase

Parse a series of toplevel phrases

Parse a core type

Parse an expression

Parse a pattern

diff --git a/findlib-1/ppxlib/astlib/Astlib/Pprintast/index.html b/findlib-1/ppxlib/astlib/Astlib/Pprintast/index.html new file mode 100644 index 000000000..ae99f019e --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/Pprintast/index.html @@ -0,0 +1,20 @@ + +Pprintast (docs.findlib-1.ppxlib.astlib.Astlib.Pprintast)

Module Astlib.Pprintast

type space_formatter = (unit, Format.formatter, unit) format
val toplevel_phrase : + Format.formatter -> + Ast_414.Parsetree.toplevel_phrase -> + unit
val string_of_expression : Ast_414.Parsetree.expression -> string
val string_of_structure : Ast_414.Parsetree.structure -> string
val class_field : Format.formatter -> Ast_414.Parsetree.class_field -> unit
val class_signature : + Format.formatter -> + Ast_414.Parsetree.class_signature -> + unit
val class_type_field : + Format.formatter -> + Ast_414.Parsetree.class_type_field -> + unit
val module_expr : Format.formatter -> Ast_414.Parsetree.module_expr -> unit
val module_type : Format.formatter -> Ast_414.Parsetree.module_type -> unit
val signature_item : + Format.formatter -> + Ast_414.Parsetree.signature_item -> + unit
val structure_item : + Format.formatter -> + Ast_414.Parsetree.structure_item -> + unit
val type_declaration : + Format.formatter -> + Ast_414.Parsetree.type_declaration -> + unit
diff --git a/findlib-1/ppxlib/astlib/Astlib/index.html b/findlib-1/ppxlib/astlib/Astlib/index.html new file mode 100644 index 000000000..0150a1c89 --- /dev/null +++ b/findlib-1/ppxlib/astlib/Astlib/index.html @@ -0,0 +1,2 @@ + +Astlib (docs.findlib-1.ppxlib.astlib.Astlib)

Module Astlib

module Ast_402 : sig ... end
module Ast_403 : sig ... end
module Ast_404 : sig ... end
module Ast_405 : sig ... end
module Ast_406 : sig ... end
module Ast_407 : sig ... end
module Ast_408 : sig ... end
module Ast_409 : sig ... end
module Ast_410 : sig ... end
module Ast_411 : sig ... end
module Ast_412 : sig ... end
module Ast_413 : sig ... end
module Ast_414 : sig ... end
module Ast_500 : sig ... end
module Ast_501 : sig ... end
module Ast_502 : sig ... end
module Ast_503 : sig ... end
module Migrate_402_403 : sig ... end
module Migrate_403_402 : sig ... end
module Migrate_403_404 : sig ... end
module Migrate_404_403 : sig ... end
module Migrate_404_405 : sig ... end
module Migrate_405_404 : sig ... end
module Migrate_405_406 : sig ... end
module Migrate_406_405 : sig ... end
module Migrate_406_407 : sig ... end
module Migrate_407_406 : sig ... end
module Migrate_407_408 : sig ... end
module Migrate_408_407 : sig ... end
module Migrate_408_409 : sig ... end
module Migrate_409_408 : sig ... end
module Migrate_409_410 : sig ... end
module Migrate_410_409 : sig ... end
module Migrate_410_411 : sig ... end
module Migrate_411_410 : sig ... end
module Migrate_411_412 : sig ... end
module Migrate_412_411 : sig ... end
module Migrate_412_413 : sig ... end
module Migrate_413_412 : sig ... end
module Migrate_413_414 : sig ... end
module Migrate_414_413 : sig ... end
module Migrate_414_500 : sig ... end
module Migrate_500_414 : sig ... end
module Migrate_500_501 : sig ... end
module Migrate_501_500 : sig ... end
module Migrate_501_502 : sig ... end
module Migrate_502_501 : sig ... end
module Migrate_502_503 : sig ... end
module Migrate_503_502 : sig ... end
module Ast_metadata : sig ... end

Meta data related interface for a ppx rewriter

module Config : sig ... end

Magic numbers

module Keyword : sig ... end
module Location : sig ... end

Source code locations (ranges of positions), used in parsetrees

module Longident : sig ... end

Long identifiers, used in parsetrees.

module Parse : sig ... end

Entry points in the parser

module Pprintast : sig ... end
val init_error_reporting_style_using_env_vars : unit -> unit

Adjust the reporting style of error messages to the environment variables OCAML_COLOR and OCAML_ERROR_STYLE.

diff --git a/findlib-1/ppxlib/astlib/index.html b/findlib-1/ppxlib/astlib/index.html new file mode 100644 index 000000000..bde2c8afb --- /dev/null +++ b/findlib-1/ppxlib/astlib/index.html @@ -0,0 +1,2 @@ + +astlib (docs.findlib-1.ppxlib.astlib)

Package ppxlib.astlib

Library ppxlib.astlib

The entry point of this library is the module: Astlib.

diff --git a/findlib-1/ppxlib/index.html b/findlib-1/ppxlib/index.html new file mode 100644 index 000000000..f2238c92a --- /dev/null +++ b/findlib-1/ppxlib/index.html @@ -0,0 +1,2 @@ + +ppxlib (docs.findlib-1.ppxlib)

Package ppxlib

Sub-indexes

Library ppxlib

The entry point of this library is the module: Ppxlib.

Library ppxlib.ast

The entry point of this library is the module: Ppxlib_ast.

Library ppxlib.astlib

The entry point of this library is the module: Astlib.

Library ppxlib.print_diff

The entry point of this library is the module: Ppxlib_print_diff.

Library ppxlib.stdppx

The entry point of this library is the module: Stdppx.

Library ppxlib.traverse_builtins

The entry point of this library is the module: Ppxlib_traverse_builtins.

diff --git a/findlib-1/ppxlib/print_diff/Ppxlib_print_diff/index.html b/findlib-1/ppxlib/print_diff/Ppxlib_print_diff/index.html new file mode 100644 index 000000000..b84c57798 --- /dev/null +++ b/findlib-1/ppxlib/print_diff/Ppxlib_print_diff/index.html @@ -0,0 +1,9 @@ + +Ppxlib_print_diff (docs.findlib-1.ppxlib.print_diff.Ppxlib_print_diff)

Module Ppxlib_print_diff

val print : + ?diff_command:string -> + ?extra_patdiff_args:string list -> + ?use_color:bool -> + file1:string -> + file2:string -> + unit -> + unit

Diff two files. Use diff_command to specify what command to use. If not specified patdiff is used, with a fallback to diff -u if patdiff produces no differences.

diff --git a/findlib-1/ppxlib/print_diff/index.html b/findlib-1/ppxlib/print_diff/index.html new file mode 100644 index 000000000..f2900635e --- /dev/null +++ b/findlib-1/ppxlib/print_diff/index.html @@ -0,0 +1,2 @@ + +print_diff (docs.findlib-1.ppxlib.print_diff)

Package ppxlib.print_diff

Library ppxlib.print_diff

The entry point of this library is the module: Ppxlib_print_diff.

diff --git a/findlib-1/ppxlib/stdppx/Stdppx/Bool/index.html b/findlib-1/ppxlib/stdppx/Stdppx/Bool/index.html new file mode 100644 index 000000000..06bf3cf45 --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/Bool/index.html @@ -0,0 +1,2 @@ + +Bool (docs.findlib-1.ppxlib.stdppx.Stdppx.Bool)

Module Stdppx.Bool

val to_string : bool -> string
include Comparisons with type t := bool
val compare : bool -> bool -> int
val equal : bool -> bool -> bool
val (=) : bool -> bool -> bool
val (<) : bool -> bool -> bool
val (>) : bool -> bool -> bool
val (<>) : bool -> bool -> bool
val (<=) : bool -> bool -> bool
val (>=) : bool -> bool -> bool
val min : bool -> bool -> bool
val max : bool -> bool -> bool
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/Bytes/index.html b/findlib-1/ppxlib/stdppx/Stdppx/Bytes/index.html new file mode 100644 index 000000000..d90c4bc46 --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/Bytes/index.html @@ -0,0 +1,29 @@ + +Bytes (docs.findlib-1.ppxlib.stdppx.Stdppx.Bytes)

Module Stdppx.Bytes

include module type of struct include StdLabels.Bytes end
val length : bytes -> int

Return the length (number of bytes) of the argument.

val get : bytes -> int -> char

get s n returns the byte at index n in argument s.

val set : bytes -> int -> char -> unit

set s n c modifies s in place, replacing the byte at index n with c.

val create : int -> bytes

create n returns a new byte sequence of length n. The sequence is uninitialized and contains arbitrary bytes.

val make : int -> char -> bytes

make n c returns a new byte sequence of length n, filled with the byte c.

val init : int -> f:(int -> char) -> bytes

init n f returns a fresh byte sequence of length n, with character i initialized to the result of f i (in increasing index order).

val empty : bytes

A byte sequence of size 0.

val copy : bytes -> bytes

Return a new byte sequence that contains the same bytes as the argument.

val of_string : string -> bytes

Return a new byte sequence that contains the same bytes as the given string.

val to_string : bytes -> string

Return a new string that contains the same bytes as the given byte sequence.

val sub : bytes -> pos:int -> len:int -> bytes

sub s ~pos ~len returns a new byte sequence of length len, containing the subsequence of s that starts at position pos and has length len.

val extend : bytes -> left:int -> right:int -> bytes

extend s ~left ~right returns a new byte sequence that contains the bytes of s, with left uninitialized bytes prepended and right uninitialized bytes appended to it. If left or right is negative, then bytes are removed (instead of appended) from the corresponding side of s.

  • since 4.05 in BytesLabels
val fill : bytes -> pos:int -> len:int -> char -> unit

fill s ~pos ~len c modifies s in place, replacing len characters with c, starting at pos.

val blit : + src:bytes -> + src_pos:int -> + dst:bytes -> + dst_pos:int -> + len:int -> + unit

blit ~src ~src_pos ~dst ~dst_pos ~len copies len bytes from byte sequence src, starting at index src_pos, to byte sequence dst, starting at index dst_pos. It works correctly even if src and dst are the same byte sequence, and the source and destination intervals overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

val concat : sep:bytes -> bytes list -> bytes

concat ~sep sl concatenates the list of byte sequences sl, inserting the separator byte sequence sep between each, and returns the result as a new byte sequence.

val cat : bytes -> bytes -> bytes

cat s1 s2 concatenates s1 and s2 and returns the result as a new byte sequence.

  • since 4.05 in BytesLabels
val iter : f:(char -> unit) -> bytes -> unit

iter ~f s applies function f in turn to all the bytes of s. It is equivalent to f (get s 0); f (get s 1); ...; f (get s + (length s - 1)); ().

val iteri : f:(int -> char -> unit) -> bytes -> unit

Same as iter, but the function is applied to the index of the byte as first argument and the byte itself as second argument.

val map : f:(char -> char) -> bytes -> bytes

map ~f s applies function f in turn to all the bytes of s (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

val mapi : f:(int -> char -> char) -> bytes -> bytes

mapi ~f s calls f with each character of s and its index (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> bytes -> 'acc

fold_left f x s computes f (... (f (f x (get s 0)) (get s 1)) ...) (get s (n-1)), where n is the length of s.

  • since 4.13
val fold_right : f:(char -> 'acc -> 'acc) -> bytes -> init:'acc -> 'acc

fold_right f s x computes f (get s 0) (f (get s 1) ( ... (f (get s (n-1)) x) ...)), where n is the length of s.

  • since 4.13
val for_all : f:(char -> bool) -> bytes -> bool

for_all p s checks if all characters in s satisfy the predicate p.

  • since 4.13
val exists : f:(char -> bool) -> bytes -> bool

exists p s checks if at least one character of s satisfies the predicate p.

  • since 4.13
val trim : bytes -> bytes

Return a copy of the argument, without leading and trailing whitespace. The bytes regarded as whitespace are the ASCII characters ' ', '\012', '\n', '\r', and '\t'.

val escaped : bytes -> bytes

Return a copy of the argument, with special characters represented by escape sequences, following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash and double-quote.

val index : bytes -> char -> int

index s c returns the index of the first occurrence of byte c in s.

val index_opt : bytes -> char -> int option

index_opt s c returns the index of the first occurrence of byte c in s or None if c does not occur in s.

  • since 4.05
val rindex : bytes -> char -> int

rindex s c returns the index of the last occurrence of byte c in s.

val rindex_opt : bytes -> char -> int option

rindex_opt s c returns the index of the last occurrence of byte c in s or None if c does not occur in s.

  • since 4.05
val index_from : bytes -> int -> char -> int

index_from s i c returns the index of the first occurrence of byte c in s after position i. index s c is equivalent to index_from s 0 c.

  • raises Not_found

    if c does not occur in s after position i.

val index_from_opt : bytes -> int -> char -> int option

index_from_opt s i c returns the index of the first occurrence of byte c in s after position i or None if c does not occur in s after position i. index_opt s c is equivalent to index_from_opt s 0 c.

  • since 4.05
val rindex_from : bytes -> int -> char -> int

rindex_from s i c returns the index of the last occurrence of byte c in s before position i+1. rindex s c is equivalent to rindex_from s (length s - 1) c.

  • raises Not_found

    if c does not occur in s before position i+1.

val rindex_from_opt : bytes -> int -> char -> int option

rindex_from_opt s i c returns the index of the last occurrence of byte c in s before position i+1 or None if c does not occur in s before position i+1. rindex_opt s c is equivalent to rindex_from s (length s - 1) c.

  • since 4.05
val contains : bytes -> char -> bool

contains s c tests if byte c appears in s.

val contains_from : bytes -> int -> char -> bool

contains_from s start c tests if byte c appears in s after position start. contains s c is equivalent to contains_from + s 0 c.

val rcontains_from : bytes -> int -> char -> bool

rcontains_from s stop c tests if byte c appears in s before position stop+1.

val uppercase_ascii : bytes -> bytes

Return a copy of the argument, with all lowercase letters translated to uppercase, using the US-ASCII character set.

  • since 4.05
val lowercase_ascii : bytes -> bytes

Return a copy of the argument, with all uppercase letters translated to lowercase, using the US-ASCII character set.

  • since 4.05
val capitalize_ascii : bytes -> bytes

Return a copy of the argument, with the first character set to uppercase, using the US-ASCII character set.

  • since 4.05
val uncapitalize_ascii : bytes -> bytes

Return a copy of the argument, with the first character set to lowercase, using the US-ASCII character set.

  • since 4.05
type t = bytes

An alias for the type of byte sequences.

val compare : t -> t -> int

The comparison function for byte sequences, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Bytes to be passed as argument to the functors Set.Make and Map.Make.

val equal : t -> t -> bool

The equality function for byte sequences.

  • since 4.05
val starts_with : prefix:bytes -> bytes -> bool

starts_with ~prefix s is true if and only if s starts with prefix.

  • since 4.13
val ends_with : suffix:bytes -> bytes -> bool

ends_with ~suffix s is true if and only if s ends with suffix.

  • since 4.13

Unsafe conversions (for advanced users)

This section describes unsafe, low-level conversion functions between bytes and string. They do not copy the internal data; used improperly, they can break the immutability invariant on strings provided by the -safe-string option. They are available for expert library authors, but for most purposes you should use the always-correct to_string and of_string instead.

val unsafe_to_string : bytes -> string

Unsafely convert a byte sequence into a string.

To reason about the use of unsafe_to_string, it is convenient to consider an "ownership" discipline. A piece of code that manipulates some data "owns" it; there are several disjoint ownership modes, including:

  • Unique ownership: the data may be accessed and mutated
  • Shared ownership: the data has several owners, that may only access it, not mutate it.

Unique ownership is linear: passing the data to another piece of code means giving up ownership (we cannot write the data again). A unique owner may decide to make the data shared (giving up mutation rights on it), but shared data may not become uniquely-owned again.

unsafe_to_string s can only be used when the caller owns the byte sequence s -- either uniquely or as shared immutable data. The caller gives up ownership of s, and gains ownership of the returned string.

There are two valid use-cases that respect this ownership discipline:

1. Creating a string by initializing and mutating a byte sequence that is never changed after initialization is performed.

let string_init len f : string =
+  let s = Bytes.create len in
+  for i = 0 to len - 1 do Bytes.set s i (f i) done;
+  Bytes.unsafe_to_string s

This function is safe because the byte sequence s will never be accessed or mutated after unsafe_to_string is called. The string_init code gives up ownership of s, and returns the ownership of the resulting string to its caller.

Note that it would be unsafe if s was passed as an additional parameter to the function f as it could escape this way and be mutated in the future -- string_init would give up ownership of s to pass it to f, and could not call unsafe_to_string safely.

We have provided the String.init, String.map and String.mapi functions to cover most cases of building new strings. You should prefer those over to_string or unsafe_to_string whenever applicable.

2. Temporarily giving ownership of a byte sequence to a function that expects a uniquely owned string and returns ownership back, so that we can mutate the sequence again after the call ended.

let bytes_length (s : bytes) =
+  String.length (Bytes.unsafe_to_string s)

In this use-case, we do not promise that s will never be mutated after the call to bytes_length s. The String.length function temporarily borrows unique ownership of the byte sequence (and sees it as a string), but returns this ownership back to the caller, which may assume that s is still a valid byte sequence after the call. Note that this is only correct because we know that String.length does not capture its argument -- it could escape by a side-channel such as a memoization combinator.

The caller may not mutate s while the string is borrowed (it has temporarily given up ownership). This affects concurrent programs, but also higher-order functions: if String.length returned a closure to be called later, s should not be mutated until this closure is fully applied and returns ownership.

val unsafe_of_string : string -> bytes

Unsafely convert a shared string to a byte sequence that should not be mutated.

The same ownership discipline that makes unsafe_to_string correct applies to unsafe_of_string: you may use it if you were the owner of the string value, and you will own the return bytes in the same mode.

In practice, unique ownership of string values is extremely difficult to reason about correctly. You should always assume strings are shared, never uniquely owned.

For example, string literals are implicitly shared by the compiler, so you never uniquely own them.

let incorrect = Bytes.unsafe_of_string "hello"
+let s = Bytes.of_string "hello"

The first declaration is incorrect, because the string literal "hello" could be shared by the compiler with other parts of the program, and mutating incorrect is a bug. You must always use the second version, which performs a copy and is thus correct.

Assuming unique ownership of strings that are not string literals, but are (partly) built from string literals, is also incorrect. For example, mutating unsafe_of_string ("foo" ^ s) could mutate the shared string "foo" -- assuming a rope-like representation of strings. More generally, functions operating on strings will assume shared ownership, they do not preserve unique ownership. It is thus incorrect to assume unique ownership of the result of unsafe_of_string.

The only case we have reasonable confidence is safe is if the produced bytes is shared -- used as an immutable byte sequence. This is possibly useful for incremental migration of low-level programs that manipulate immutable sequences of bytes (for example Marshal.from_bytes) and previously used the string type for this purpose.

val split_on_char : sep:char -> bytes -> bytes list

split_on_char sep s returns the list of all (possibly empty) subsequences of s that are delimited by the sep character.

The function's output is specified by the following invariants:

  • The list is not empty.
  • Concatenating its elements using sep as a separator returns a byte sequence equal to the input (Bytes.concat (Bytes.make 1 sep) + (Bytes.split_on_char sep s) = s).
  • No byte sequence in the result contains the sep character.
  • since 4.13

Iterators

val to_seq : t -> char Seq.t

Iterate on the string, in increasing index order. Modifications of the string during iteration will be reflected in the sequence.

  • since 4.07
val to_seqi : t -> (int * char) Seq.t

Iterate on the string, in increasing order, yielding indices along chars

  • since 4.07
val of_seq : char Seq.t -> t

Create a string from the generator

  • since 4.07

UTF codecs and validations

  • since 4.14

UTF-8

val get_utf_8_uchar : t -> int -> Uchar.utf_decode

get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

val set_utf_8_uchar : t -> int -> Uchar.t -> int

set_utf_8_uchar b i u UTF-8 encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

val is_valid_utf_8 : t -> bool

is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

UTF-16BE

val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

val set_utf_16be_uchar : t -> int -> Uchar.t -> int

set_utf_16be_uchar b i u UTF-16BE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

val is_valid_utf_16be : t -> bool

is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

UTF-16LE

val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

val set_utf_16le_uchar : t -> int -> Uchar.t -> int

set_utf_16le_uchar b i u UTF-16LE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

val is_valid_utf_16le : t -> bool

is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

Binary encoding/decoding of integers

The functions in this section binary encode and decode integers to and from byte sequences.

All following functions raise Invalid_argument if the space needed at index i to decode or encode the integer is not available.

Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are handled as follows:

  • Functions that decode signed (resp. unsigned) 8-bit or 16-bit integers represented by int values sign-extend (resp. zero-extend) their result.
  • Functions that encode 8-bit or 16-bit integers represented by int values truncate their input to their least significant bytes.
val get_uint8 : bytes -> int -> int

get_uint8 b i is b's unsigned 8-bit integer starting at byte index i.

  • since 4.08
val get_int8 : bytes -> int -> int

get_int8 b i is b's signed 8-bit integer starting at byte index i.

  • since 4.08
val get_uint16_ne : bytes -> int -> int

get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at byte index i.

  • since 4.08
val get_uint16_be : bytes -> int -> int

get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at byte index i.

  • since 4.08
val get_uint16_le : bytes -> int -> int

get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at byte index i.

  • since 4.08
val get_int16_ne : bytes -> int -> int

get_int16_ne b i is b's native-endian signed 16-bit integer starting at byte index i.

  • since 4.08
val get_int16_be : bytes -> int -> int

get_int16_be b i is b's big-endian signed 16-bit integer starting at byte index i.

  • since 4.08
val get_int16_le : bytes -> int -> int

get_int16_le b i is b's little-endian signed 16-bit integer starting at byte index i.

  • since 4.08
val get_int32_ne : bytes -> int -> int32

get_int32_ne b i is b's native-endian 32-bit integer starting at byte index i.

  • since 4.08
val get_int32_be : bytes -> int -> int32

get_int32_be b i is b's big-endian 32-bit integer starting at byte index i.

  • since 4.08
val get_int32_le : bytes -> int -> int32

get_int32_le b i is b's little-endian 32-bit integer starting at byte index i.

  • since 4.08
val get_int64_ne : bytes -> int -> int64

get_int64_ne b i is b's native-endian 64-bit integer starting at byte index i.

  • since 4.08
val get_int64_be : bytes -> int -> int64

get_int64_be b i is b's big-endian 64-bit integer starting at byte index i.

  • since 4.08
val get_int64_le : bytes -> int -> int64

get_int64_le b i is b's little-endian 64-bit integer starting at byte index i.

  • since 4.08
val set_uint8 : bytes -> int -> int -> unit

set_uint8 b i v sets b's unsigned 8-bit integer starting at byte index i to v.

  • since 4.08
val set_int8 : bytes -> int -> int -> unit

set_int8 b i v sets b's signed 8-bit integer starting at byte index i to v.

  • since 4.08
val set_uint16_ne : bytes -> int -> int -> unit

set_uint16_ne b i v sets b's native-endian unsigned 16-bit integer starting at byte index i to v.

  • since 4.08
val set_uint16_be : bytes -> int -> int -> unit

set_uint16_be b i v sets b's big-endian unsigned 16-bit integer starting at byte index i to v.

  • since 4.08
val set_uint16_le : bytes -> int -> int -> unit

set_uint16_le b i v sets b's little-endian unsigned 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int16_ne : bytes -> int -> int -> unit

set_int16_ne b i v sets b's native-endian signed 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int16_be : bytes -> int -> int -> unit

set_int16_be b i v sets b's big-endian signed 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int16_le : bytes -> int -> int -> unit

set_int16_le b i v sets b's little-endian signed 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int32_ne : bytes -> int -> int32 -> unit

set_int32_ne b i v sets b's native-endian 32-bit integer starting at byte index i to v.

  • since 4.08
val set_int32_be : bytes -> int -> int32 -> unit

set_int32_be b i v sets b's big-endian 32-bit integer starting at byte index i to v.

  • since 4.08
val set_int32_le : bytes -> int -> int32 -> unit

set_int32_le b i v sets b's little-endian 32-bit integer starting at byte index i to v.

  • since 4.08
val set_int64_ne : bytes -> int -> int64 -> unit

set_int64_ne b i v sets b's native-endian 64-bit integer starting at byte index i to v.

  • since 4.08
val set_int64_be : bytes -> int -> int64 -> unit

set_int64_be b i v sets b's big-endian 64-bit integer starting at byte index i to v.

  • since 4.08
val set_int64_le : bytes -> int -> int64 -> unit

set_int64_le b i v sets b's little-endian 64-bit integer starting at byte index i to v.

  • since 4.08

Byte sequences and concurrency safety

Care must be taken when concurrently accessing byte sequences from multiple domains: accessing a byte sequence will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every byte sequence operation that accesses more than one byte is not atomic. This includes iteration and scanning.

For example, consider the following program:

let size = 100_000_000
+let b = Bytes.make size  ' '
+let update b f ()  =
+  Bytes.iteri (fun i x -> Bytes.set b i (Char.chr (f (Char.code x)))) b
+let d1 = Domain.spawn (update b (fun x -> x + 1))
+let d2 = Domain.spawn (update b (fun x -> 2 * x + 1))
+let () = Domain.join d1; Domain.join d2

the bytes sequence b may contain a non-deterministic mixture of '!', 'A', 'B', and 'C' values.

After executing this code, each byte of the sequence b is either '!', 'A', 'B', or 'C'. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

Data races

If two domains only access disjoint parts of a byte sequence, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

A data race is said to occur when two domains access the same byte without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the elements of the sequence.

Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location.

Mixed-size accesses

Another subtle point is that if a data race involves mixed-size writes and reads to the same location, the order in which those writes and reads are observed by domains is not specified. For instance, the following code write sequentially a 32-bit integer and a char to the same index

let b = Bytes.make 10 '\000'
+let d1 = Domain.spawn (fun () -> Bytes.set_int32_ne b 0 100; b.[0] <- 'd' )

In this situation, a domain that observes the write of 'd' to b.0 is not guaranteed to also observe the write to indices 1, 2, or 3.

val sub_string : bytes -> pos:int -> len:int -> string
val blit_string : + src:string -> + src_pos:int -> + dst:bytes -> + dst_pos:int -> + len:int -> + unit
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/Char/index.html b/findlib-1/ppxlib/stdppx/Stdppx/Char/index.html new file mode 100644 index 000000000..2b0225907 --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/Char/index.html @@ -0,0 +1,2 @@ + +Char (docs.findlib-1.ppxlib.stdppx.Stdppx.Char)

Module Stdppx.Char

include module type of struct include Char end
val code : char -> int

Return the ASCII code of the argument.

val chr : int -> char

Return the character with the given ASCII code.

val escaped : char -> string

Return a string representing the given character, with special characters escaped following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash, double-quote, and single-quote.

val lowercase_ascii : char -> char

Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

  • since 4.03
val uppercase_ascii : char -> char

Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

  • since 4.03
type t = char

An alias for the type of characters.

val seeded_hash : int -> t -> int

A seeded hash function for characters, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : t -> int

An unseeded hash function for characters, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.1
include Comparisons with type t := char
val compare : char -> char -> int
val equal : char -> char -> bool
val (=) : char -> char -> bool
val (<) : char -> char -> bool
val (>) : char -> char -> bool
val (<>) : char -> char -> bool
val (<=) : char -> char -> bool
val (>=) : char -> char -> bool
val min : char -> char -> char
val max : char -> char -> char
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/Either/index.html b/findlib-1/ppxlib/stdppx/Stdppx/Either/index.html new file mode 100644 index 000000000..4a3ea2f88 --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/Either/index.html @@ -0,0 +1,2 @@ + +Either (docs.findlib-1.ppxlib.stdppx.Stdppx.Either)

Module Stdppx.Either

type ('a, 'b) t =
  1. | Left of 'a
  2. | Right of 'b
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/Exn/index.html b/findlib-1/ppxlib/stdppx/Stdppx/Exn/index.html new file mode 100644 index 000000000..c001fb9d6 --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/Exn/index.html @@ -0,0 +1,2 @@ + +Exn (docs.findlib-1.ppxlib.stdppx.Stdppx.Exn)

Module Stdppx.Exn

val protectx : 'a -> f:('b -> 'c) -> finally:('d -> 'e) -> 'f
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/Float/index.html b/findlib-1/ppxlib/stdppx/Stdppx/Float/index.html new file mode 100644 index 000000000..36831c626 --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/Float/index.html @@ -0,0 +1,2 @@ + +Float (docs.findlib-1.ppxlib.stdppx.Stdppx.Float)

Module Stdppx.Float

val to_string : float -> string
include Comparisons with type t := float
val compare : float -> float -> int
val equal : float -> float -> bool
val (=) : float -> float -> bool
val (<) : float -> float -> bool
val (>) : float -> float -> bool
val (<>) : float -> float -> bool
val (<=) : float -> float -> bool
val (>=) : float -> float -> bool
val min : float -> float -> float
val max : float -> float -> float
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/Fn/index.html b/findlib-1/ppxlib/stdppx/Stdppx/Fn/index.html new file mode 100644 index 000000000..2ee068a3b --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/Fn/index.html @@ -0,0 +1,2 @@ + +Fn (docs.findlib-1.ppxlib.stdppx.Stdppx.Fn)

Module Stdppx.Fn

val id : 'a -> 'b
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/Hashtbl/index.html b/findlib-1/ppxlib/stdppx/Stdppx/Hashtbl/index.html new file mode 100644 index 000000000..c958ddd5f --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/Hashtbl/index.html @@ -0,0 +1,80 @@ + +Hashtbl (docs.findlib-1.ppxlib.stdppx.Stdppx.Hashtbl)

Module Stdppx.Hashtbl

include module type of struct include Hashtbl end

Unsynchronized accesses

Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

Generic interface

type (!'a, !'b) t = ('a, 'b) Hashtbl.t

The type of hash tables from type 'a to type 'b.

val create : ?random:bool -> int -> ('a, 'b) t

Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

  • before 4.00

    the ~random parameter was not present and all hash tables were created in non-randomized mode.

val clear : ('a, 'b) t -> unit

Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

val reset : ('a, 'b) t -> unit

Empty a hash table and shrink the size of the bucket table to its initial size.

  • since 4.00
val copy : ('a, 'b) t -> ('a, 'b) t

Return a copy of the given hashtable.

val find : ('a, 'b) t -> 'a -> 'b

Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

val find_all : ('a, 'b) t -> 'a -> 'b list

Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

val mem : ('a, 'b) t -> 'a -> bool

Hashtbl.mem tbl x checks if x is bound in tbl.

val remove : ('a, 'b) t -> 'a -> unit

Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

val replace : ('a, 'b) t -> 'a -> 'b -> unit

Hashtbl.replace tbl key data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit

Hashtbl.iter f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

The behavior is not specified if the hash table is modified by f during the iteration.

val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit

Hashtbl.filter_map_inplace f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

Other comments for iter apply as well.

  • since 4.03
val fold : ('a -> 'b -> 'acc -> 'acc) -> ('a, 'b) t -> 'acc -> 'acc

Hashtbl.fold f tbl init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

The behavior is not specified if the hash table is modified by f during the iteration.

val length : ('a, 'b) t -> int

Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

val randomize : unit -> unit

After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

  • since 4.00
val is_randomized : unit -> bool

Return true if the tables are currently created in randomized mode by default, false otherwise.

  • since 4.03
val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

  • since 4.12
type statistics = Hashtbl.statistics = {
  1. num_bindings : int;
    (*

    Number of bindings present in the table. Same value as returned by length.

    *)
  2. num_buckets : int;
    (*

    Number of buckets in the table.

    *)
  3. max_bucket_length : int;
    (*

    Maximal number of bindings per bucket.

    *)
  4. bucket_histogram : int array;
    (*

    Histogram of bucket sizes. This array histo has length max_bucket_length + 1. The value of histo.(i) is the number of buckets whose size is i.

    *)
}
  • since 4.00
val stats : ('a, 'b) t -> statistics

Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

  • since 4.00

Hash tables and Sequences

val to_seq : ('a, 'b) t -> ('a * 'b) Seq.t

Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

The behavior is not specified if the hash table is modified during the iteration.

  • since 4.07
val to_seq_keys : ('a, _) t -> 'a Seq.t

Same as Seq.map fst (to_seq m)

  • since 4.07
val to_seq_values : (_, 'b) t -> 'b Seq.t

Same as Seq.map snd (to_seq m)

  • since 4.07
val add_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

Add the given bindings to the table, using add

  • since 4.07
val replace_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

Add the given bindings to the table, using replace

  • since 4.07
val of_seq : ('a * 'b) Seq.t -> ('a, 'b) t

Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

  • since 4.07

Functorial interface

The functorial interface allows the use of specific comparison and hash functions, either for performance/security concerns, or because keys are not hashable/comparable with the polymorphic builtins.

For instance, one might want to specialize a table for integer keys:

module IntHash =
+  struct
+    type t = int
+    let equal i j = i=j
+    let hash i = i land max_int
+  end
+
+module IntHashtbl = Hashtbl.Make(IntHash)
+
+let h = IntHashtbl.create 17 in
+IntHashtbl.add h 12 "hello"

This creates a new module IntHashtbl, with a new type 'a + IntHashtbl.t of tables from int to 'a. In this example, h contains string values so its type is string IntHashtbl.t.

Note that the new type 'a IntHashtbl.t is not compatible with the type ('a,'b) Hashtbl.t of the generic interface. For example, Hashtbl.length h would not type-check, you must use IntHashtbl.length.

module type HashedType = Hashtbl.HashedType

The input signature of the functor Make.

module type S = Hashtbl.S

The output signature of the functor Make.

module Make = Hashtbl.Make

Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

module type SeededHashedType = Hashtbl.SeededHashedType

The input signature of the functor MakeSeeded.

module type SeededS = Hashtbl.SeededS

The output signature of the functor MakeSeeded.

module MakeSeeded = Hashtbl.MakeSeeded

Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

The polymorphic hash functions

val hash : 'a -> int

Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

val seeded_hash : int -> 'a -> int

A variant of hash that is further parameterized by an integer seed.

  • since 4.00
val hash_param : int -> int -> 'a -> int

Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

val seeded_hash_param : int -> int -> int -> 'a -> int

A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

  • since 4.00

Examples

Basic Example

(* 0...99 *)
+let seq = Seq.ints 0 |> Seq.take 100
+
+(* build from Seq.t *)
+# let tbl =
+    seq
+    |> Seq.map (fun x -> x, string_of_int x)
+    |> Hashtbl.of_seq
+val tbl : (int, string) Hashtbl.t = <abstr>
+
+# Hashtbl.length tbl
+- : int = 100
+
+# Hashtbl.find_opt tbl 32
+- : string option = Some "32"
+
+# Hashtbl.find_opt tbl 166
+- : string option = None
+
+# Hashtbl.replace tbl 166 "one six six"
+- : unit = ()
+
+# Hashtbl.find_opt tbl 166
+- : string option = Some "one six six"
+
+# Hashtbl.length tbl
+- : int = 101

Counting Elements

Given a sequence of elements (here, a Seq.t), we want to count how many times each distinct element occurs in the sequence. A simple way to do this, assuming the elements are comparable and hashable, is to use a hash table that maps elements to their number of occurrences.

Here we illustrate that principle using a sequence of (ascii) characters (type char). We use a custom Char_tbl specialized for char.

# module Char_tbl = Hashtbl.Make(struct
+    type t = char
+    let equal = Char.equal
+    let hash = Hashtbl.hash
+  end)
+
+(*  count distinct occurrences of chars in [seq] *)
+# let count_chars (seq : char Seq.t) : _ list =
+    let counts = Char_tbl.create 16 in
+    Seq.iter
+      (fun c ->
+        let count_c =
+          Char_tbl.find_opt counts c
+          |> Option.value ~default:0
+        in
+        Char_tbl.replace counts c (count_c + 1))
+      seq;
+    (* turn into a list *)
+    Char_tbl.fold (fun c n l -> (c,n) :: l) counts []
+      |> List.sort (fun (c1,_)(c2,_) -> Char.compare c1 c2)
+val count_chars : Char_tbl.key Seq.t -> (Char.t * int) list = <fun>
+
+(* basic seq from a string *)
+# let seq = String.to_seq "hello world, and all the camels in it!"
+val seq : char Seq.t = <fun>
+
+# count_chars seq
+- : (Char.t * int) list =
+[(' ', 7); ('!', 1); (',', 1); ('a', 3); ('c', 1); ('d', 2); ('e', 3);
+ ('h', 2); ('i', 2); ('l', 6); ('m', 1); ('n', 2); ('o', 2); ('r', 1);
+ ('s', 1); ('t', 2); ('w', 1)]
+
+(* "abcabcabc..." *)
+# let seq2 =
+    Seq.cycle (String.to_seq "abc") |> Seq.take 31
+val seq2 : char Seq.t = <fun>
+
+# String.of_seq seq2
+- : String.t = "abcabcabcabcabcabcabcabcabcabca"
+
+# count_chars seq2
+- : (Char.t * int) list = [('a', 11); ('b', 10); ('c', 10)]
val set : ('a, 'b) t -> key:'c -> data:'d -> unit
val add : ('a, 'b) t -> key:'c -> data:'d -> (unit, exn) result
val add_exn : ('a, 'b) t -> key:'c -> data:'d -> unit
val find_opt : ('a, 'b) t -> 'c -> 'd option
val find_or_add : ('a, 'b) t -> 'c -> default:(unit -> 'd) -> 'e
val add_alist : ('a, 'b) t -> ('c * 'd) list -> (unit, 'e) result
val of_alist : ?size:int -> ('a * 'b) list -> (('c, 'd) t, 'e) result
val of_alist_exn : ?size:int -> ('a * 'b) list -> ('a, 'b) t
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/In_channel/index.html b/findlib-1/ppxlib/stdppx/Stdppx/In_channel/index.html new file mode 100644 index 000000000..f0c52834a --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/In_channel/index.html @@ -0,0 +1,2 @@ + +In_channel (docs.findlib-1.ppxlib.stdppx.Stdppx.In_channel)

Module Stdppx.In_channel

val create : ?binary:bool -> string -> in_channel
val with_file : ?binary:bool -> string -> f:(in_channel -> 'a) -> 'b
val input_all : in_channel -> string
val read_all : string -> string
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/Int/index.html b/findlib-1/ppxlib/stdppx/Stdppx/Int/index.html new file mode 100644 index 000000000..bb58e52e0 --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/Int/index.html @@ -0,0 +1,2 @@ + +Int (docs.findlib-1.ppxlib.stdppx.Stdppx.Int)

Module Stdppx.Int

val max_int : int
val to_string : int -> string
include Comparisons with type t := int
val compare : int -> int -> int
val equal : int -> int -> bool
val (=) : int -> int -> bool
val (<) : int -> int -> bool
val (>) : int -> int -> bool
val (<>) : int -> int -> bool
val (<=) : int -> int -> bool
val (>=) : int -> int -> bool
val min : int -> int -> int
val max : int -> int -> int
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/List/index.html b/findlib-1/ppxlib/stdppx/Stdppx/List/index.html new file mode 100644 index 000000000..95bdc746b --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/List/index.html @@ -0,0 +1,16 @@ + +List (docs.findlib-1.ppxlib.stdppx.Stdppx.List)

Module Stdppx.List

include module type of struct include StdLabels.List end
type 'a t = 'a list =
  1. | []
  2. | :: of 'a * 'a list

An alias for the type of lists.

val length : 'a list -> int

Return the length (number of elements) of the given list.

val compare_lengths : 'a list -> 'b list -> int

Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

  • since 4.05
val compare_length_with : 'a list -> len:int -> int

Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

  • since 4.05
val cons : 'a -> 'a list -> 'a list

cons x xs is x :: xs

  • since 4.05
val hd : 'a list -> 'a

Return the first element of the given list.

  • raises Failure

    if the list is empty.

val tl : 'a list -> 'a list

Return the given list without its first element.

  • raises Failure

    if the list is empty.

val nth : 'a list -> int -> 'a

Return the n-th element of the given list. The first element (head of the list) is at position 0.

  • raises Failure

    if the list is too short.

val nth_opt : 'a list -> int -> 'a option

Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

  • since 4.05
val rev : 'a list -> 'a list

List reversal.

val rev_append : 'a list -> 'a list -> 'a list

rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

val flatten : 'a list list -> 'a list

Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

Comparison

val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

  • since 4.12
val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

  • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
  • the empty list [] is strictly smaller than non-empty lists

Note: the cmp function will be called even if the lists have different lengths.

  • since 4.12

Iterators

val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val rev_map : f:('a -> 'b) -> 'a list -> 'b list

rev_map ~f l gives the same result as rev (map f l), but is more efficient.

val fold_left_map : + f:('acc -> 'a -> 'acc * 'b) -> + init:'acc -> + 'a list -> + 'acc * 'b list

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.11
val fold_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a list -> 'acc

fold_left ~f ~init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

Iterators on two lists

val iter2 : f:('a -> 'b -> unit) -> 'a list -> 'b list -> unit

iter2 ~f [a1; ...; an] [b1; ...; bn] calls in turn f a1 b1; ...; f an bn.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val rev_map2 : f:('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

rev_map2 ~f l1 l2 gives the same result as rev (map2 f l1 l2), but is more efficient.

val fold_left2 : + f:('acc -> 'a -> 'b -> 'acc) -> + init:'acc -> + 'a list -> + 'b list -> + 'acc

fold_left2 ~f ~init [a1; ...; an] [b1; ...; bn] is f (... (f (f init a1 b1) a2 b2) ...) an bn.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

List scanning

val for_all : f:('a -> bool) -> 'a list -> bool

for_all ~f [a1; ...; an] checks if all elements of the list satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an) for a non-empty list and true if the list is empty.

val exists : f:('a -> bool) -> 'a list -> bool

exists ~f [a1; ...; an] checks if at least one element of the list satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an) for a non-empty list and false if the list is empty.

val for_all2 : f:('a -> 'b -> bool) -> 'a list -> 'b list -> bool

Same as for_all, but for a two-argument predicate.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val exists2 : f:('a -> 'b -> bool) -> 'a list -> 'b list -> bool

Same as exists, but for a two-argument predicate.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val mem : 'a -> set:'a list -> bool

mem a ~set is true if and only if a is equal to an element of set.

val memq : 'a -> set:'a list -> bool

Same as mem, but uses physical equality instead of structural equality to compare list elements.

List searching

val find : f:('a -> bool) -> 'a list -> 'a

find ~f l returns the first element of the list l that satisfies the predicate f.

  • raises Not_found

    if there is no value that satisfies f in the list l.

val find_opt : f:('a -> bool) -> 'a list -> 'a option

find ~f l returns the first element of the list l that satisfies the predicate f. Returns None if there is no value that satisfies f in the list l.

  • since 4.05
val find_index : f:('a -> bool) -> 'a list -> int option

find_index ~f xs returns Some i, where i is the index of the first element of the list xs that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_mapi : f:(int -> 'a -> 'b option) -> 'a list -> 'b option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1
val filter : f:('a -> bool) -> 'a list -> 'a list

filter ~f l returns all the elements of the list l that satisfy the predicate f. The order of the elements in the input list is preserved.

val find_all : f:('a -> bool) -> 'a list -> 'a list

find_all is another name for filter.

val filteri : f:(int -> 'a -> bool) -> 'a list -> 'a list

Same as filter, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.11
val partition : f:('a -> bool) -> 'a list -> 'a list * 'a list

partition ~f l returns a pair of lists (l1, l2), where l1 is the list of all the elements of l that satisfy the predicate f, and l2 is the list of all the elements of l that do not satisfy f. The order of the elements in the input list is preserved.

Association lists

val assoc : 'a -> ('a * 'b) list -> 'b

assoc a l returns the value associated with key a in the list of pairs l. That is, assoc a [ ...; (a,b); ...] = b if (a,b) is the leftmost binding of a in list l.

  • raises Not_found

    if there is no value associated with a in the list l.

val assq : 'a -> ('a * 'b) list -> 'b

Same as assoc, but uses physical equality instead of structural equality to compare keys.

val assq_opt : 'a -> ('a * 'b) list -> 'b option

Same as assoc_opt, but uses physical equality instead of structural equality to compare keys.

  • since 4.05
val mem_assoc : 'a -> map:('a * 'b) list -> bool

Same as assoc, but simply return true if a binding exists, and false if no bindings exist for the given key.

val mem_assq : 'a -> map:('a * 'b) list -> bool

Same as mem_assoc, but uses physical equality instead of structural equality to compare keys.

Lists of pairs

Sorting

val sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

Sort a list in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see Array.sort for a complete specification). For example, Stdlib.compare is a suitable comparison function. The resulting list is sorted in increasing order. sort is guaranteed to run in constant heap space (in addition to the size of the result list) and logarithmic stack space.

The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

val stable_sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

Same as sort, but the sorting algorithm is guaranteed to be stable (i.e. elements that compare equal are kept in their original order).

The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

val fast_sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

Same as sort or stable_sort, whichever is faster on typical input.

val sort_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list

Same as sort, but also remove duplicates.

  • since 4.03

Lists and Sequences

val to_seq : 'a list -> 'a Seq.t

Iterate on the list.

  • since 4.07
val of_seq : 'a Seq.t -> 'a list

Create a list from a sequence.

  • since 4.07
include sig ... end
val merge : [> `not_tail_recursive ]
val remove_assoc : [> `not_tail_recursive ]
val remove_assq : [> `not_tail_recursive ]
val rev_mapi : 'a t -> f:(int -> 'a -> 'b) -> 'b t
val fold_right2 : + 'a list -> + 'b list -> + init:'c -> + f:('d -> 'e -> 'f -> 'g) -> + 'h
val map : 'a list -> f:('a -> 'b) -> 'c list
val mapi : 'a t -> f:(int -> 'a -> 'b) -> 'c list
val fold_right : 'a list -> init:'b -> f:('c -> 'd -> 'e) -> 'f
val append : 'a list -> 'b list -> 'b list
val concat : 'a list list -> 'b t
val rev_combine : 'a list -> 'b list -> ('c * 'd) t
val combine : 'a list -> 'b list -> ('a * 'b) list
val split : ('a * 'b) list -> 'c t * 'd t
val map2 : 'a list -> 'b list -> f:('c -> 'd -> 'e) -> 'f list
val partition_map : ('a -> ('b, 'c) Either.t) -> 'd t -> 'e list * 'f list
val init : len:int -> f:(int -> 'a) -> 'a list
val is_empty : 'a t -> bool
val rev_filter_opt : 'a option list -> 'b t
val filter_opt : 'a option list -> 'b list
val filter_map : 'a list -> f:('a -> 'b option) -> 'b t
val concat_map : 'a list -> f:('a -> 'b list) -> 'b t
val find_map : 'a t -> f:('b -> 'c option) -> 'd option
val find_map_exn : 'a t -> f:('a -> 'b option) -> 'c
val last : 'a t -> 'b option
val split_while : 'a t -> f:('a -> bool) -> 'a list * 'a t
val find_a_dup : 'elt t -> compare:('elt0 -> 'elt0 -> int) -> 'elt option
val assoc_opt : 'a -> ('b * 'c) list -> 'd option
val iter : 'a list -> f:('a -> unit) -> unit
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/NonEmptyList/index.html b/findlib-1/ppxlib/stdppx/Stdppx/NonEmptyList/index.html new file mode 100644 index 000000000..f5d59daae --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/NonEmptyList/index.html @@ -0,0 +1,2 @@ + +NonEmptyList (docs.findlib-1.ppxlib.stdppx.Stdppx.NonEmptyList)

Module Stdppx.NonEmptyList

type 'a t = 'a * 'a list
val (@) : ('a * 'b list) -> ('c * 'd list) -> 'e * 'b list
val hd : ('a * 'b) -> 'a
val to_list : ('a * 'b list) -> 'b list
val map : f:('a -> 'b) -> ('c * 'a list) -> 'd * 'b list
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/Option/index.html b/findlib-1/ppxlib/stdppx/Stdppx/Option/index.html new file mode 100644 index 000000000..6cf4ce396 --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/Option/index.html @@ -0,0 +1,2 @@ + +Option (docs.findlib-1.ppxlib.stdppx.Stdppx.Option)

Module Stdppx.Option

val is_some : 'a option -> bool
val iter : 'a option -> f:('b -> unit) -> unit
val map : 'a option -> f:('b -> 'c) -> 'd option
val value : 'a option -> default:'b -> 'c
val to_list : 'a option -> 'b list
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/Out_channel/index.html b/findlib-1/ppxlib/stdppx/Stdppx/Out_channel/index.html new file mode 100644 index 000000000..56fceb784 --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/Out_channel/index.html @@ -0,0 +1,15 @@ + +Out_channel (docs.findlib-1.ppxlib.stdppx.Stdppx.Out_channel)

Module Stdppx.Out_channel

val create : + ?binary:bool -> + ?append:bool -> + ?fail_if_exists:bool -> + ?perm:int -> + string -> + out_channel
val with_file : + ?binary:bool -> + ?append:bool -> + ?fail_if_exists:bool -> + ?perm:int -> + string -> + f:(out_channel -> 'a) -> + 'b
val write_all : string -> data:string -> unit
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/Poly/index.html b/findlib-1/ppxlib/stdppx/Stdppx/Poly/index.html new file mode 100644 index 000000000..0fde707aa --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/Poly/index.html @@ -0,0 +1,2 @@ + +Poly (docs.findlib-1.ppxlib.stdppx.Stdppx.Poly)

Module Stdppx.Poly

val compare : 'a -> 'a -> int
val equal : 'a -> 'a -> bool
val (=) : 'a -> 'a -> bool
val (<) : 'a -> 'a -> bool
val (>) : 'a -> 'a -> bool
val (<>) : 'a -> 'a -> bool
val (<=) : 'a -> 'a -> bool
val (>=) : 'a -> 'a -> bool
val min : 'a -> 'a -> 'a
val max : 'a -> 'a -> 'a
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/Result/index.html b/findlib-1/ppxlib/stdppx/Stdppx/Result/index.html new file mode 100644 index 000000000..abb1ec835 --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/Result/index.html @@ -0,0 +1,2 @@ + +Result (docs.findlib-1.ppxlib.stdppx.Stdppx.Result)

Module Stdppx.Result

val bind : ('a, 'b) result -> f:('c -> ('d, 'e) result) -> ('d, 'e) result
val map : ('a, 'b) result -> f:('c -> 'd) -> ('e, 'f) result
val map_error : ('a, 'b) result -> f:('c -> 'd) -> ('e, 'f) result
val (>>=) : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result
val (>>|) : ('a, 'b) result -> ('a -> 'c) -> ('c, 'b) result
val handle_error : ('a, 'b) result -> f:('c -> 'd) -> 'e
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/String/Map/index.html b/findlib-1/ppxlib/stdppx/Stdppx/String/Map/index.html new file mode 100644 index 000000000..eca88489a --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/String/Map/index.html @@ -0,0 +1,6 @@ + +Map (docs.findlib-1.ppxlib.stdppx.Stdppx.String.Map)

Module String.Map

include sig ... end
type !'a t
val empty : 'a t
val add : key -> 'a -> 'a t -> 'a t
val add_to_list : key -> 'a -> 'a list t -> 'a list t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
val singleton : key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (key * 'a) list
val min_binding : 'a t -> key * 'a
val min_binding_opt : 'a t -> (key * 'a) option
val max_binding : 'a t -> key * 'a
val max_binding_opt : 'a t -> (key * 'a) option
val choose : 'a t -> key * 'a
val choose_opt : 'a t -> (key * 'a) option
val find : key -> 'a t -> 'a
val find_first : (key -> bool) -> 'a t -> key * 'a
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
val find_last : (key -> bool) -> 'a t -> key * 'a
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val split : key -> 'a t -> 'a t * 'a option * 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val to_seq : 'a t -> (key * 'a) Seq.t
val to_rev_seq : 'a t -> (key * 'a) Seq.t
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t
val of_seq : (key * 'a) Seq.t -> 'a t
val find_opt : key -> 'a t -> 'b option
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/String/Set/index.html b/findlib-1/ppxlib/stdppx/Stdppx/String/Set/index.html new file mode 100644 index 000000000..c3135b830 --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/String/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.findlib-1.ppxlib.stdppx.Stdppx.String.Set)

Module String.Set

type t
val empty : t
val add : elt -> t -> t
val singleton : elt -> t
val remove : elt -> t -> t
val union : t -> t -> t
val inter : t -> t -> t
val disjoint : t -> t -> bool
val diff : t -> t -> t
val cardinal : t -> int
val elements : t -> elt list
val min_elt : t -> elt
val min_elt_opt : t -> elt option
val max_elt : t -> elt
val max_elt_opt : t -> elt option
val choose : t -> elt
val choose_opt : t -> elt option
val find : elt -> t -> elt
val find_opt : elt -> t -> elt option
val find_first : (elt -> bool) -> t -> elt
val find_first_opt : (elt -> bool) -> t -> elt option
val find_last : (elt -> bool) -> t -> elt
val find_last_opt : (elt -> bool) -> t -> elt option
val iter : (elt -> unit) -> t -> unit
val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc
val map : (elt -> elt) -> t -> t
val filter : (elt -> bool) -> t -> t
val filter_map : (elt -> elt option) -> t -> t
val partition : (elt -> bool) -> t -> t * t
val split : elt -> t -> t * bool * t
val is_empty : t -> bool
val mem : elt -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val subset : t -> t -> bool
val for_all : (elt -> bool) -> t -> bool
val exists : (elt -> bool) -> t -> bool
val to_list : t -> elt list
val of_list : elt list -> t
val to_seq_from : elt -> t -> elt Seq.t
val to_seq : t -> elt Seq.t
val to_rev_seq : t -> elt Seq.t
val add_seq : elt Seq.t -> t -> t
val of_seq : elt Seq.t -> t
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/String/index.html b/findlib-1/ppxlib/stdppx/Stdppx/String/index.html new file mode 100644 index 000000000..8258e907f --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/String/index.html @@ -0,0 +1,8 @@ + +String (docs.findlib-1.ppxlib.stdppx.Stdppx.String)

Module Stdppx.String

include module type of struct include StdLabels.String end

Strings

type t = string

The type for strings.

val make : int -> char -> string

make n c is a string of length n with each index holding the character c.

val init : int -> f:(int -> char) -> string

init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

  • since 4.02
val empty : string

The empty string.

  • since 4.13
val length : string -> int

length s is the length (number of bytes/characters) of s.

val get : string -> int -> char

get s i is the character at index i in s. This is the same as writing s.[i].

val of_bytes : bytes -> string

Return a new string that contains the same bytes as the given byte sequence.

  • since 4.13
val to_bytes : string -> bytes

Return a new byte sequence that contains the same bytes as the given string.

  • since 4.13
val blit : + src:string -> + src_pos:int -> + dst:bytes -> + dst_pos:int -> + len:int -> + unit

Same as Bytes.blit_string which should be preferred.

Concatenating

Note. The Stdlib.(^) binary operator concatenates two strings.

val concat : sep:string -> string list -> string

concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

val cat : string -> string -> string

cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

  • since 4.13

Predicates and comparisons

val starts_with : prefix:string -> string -> bool

starts_with ~prefix s is true if and only if s starts with prefix.

  • since 4.13
val ends_with : suffix:string -> string -> bool

ends_with ~suffix s is true if and only if s ends with suffix.

  • since 4.13
val contains_from : string -> int -> char -> bool

contains_from s start c is true if and only if c appears in s after position start.

val rcontains_from : string -> int -> char -> bool

rcontains_from s stop c is true if and only if c appears in s before position stop+1.

val contains : string -> char -> bool

contains s c is String.contains_from s 0 c.

Extracting substrings

val sub : string -> pos:int -> len:int -> string

sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

Transforming

val map : f:(char -> char) -> string -> string

map f s is the string resulting from applying f to all the characters of s in increasing order.

  • since 4.00
val mapi : f:(int -> char -> char) -> string -> string

mapi ~f s is like map but the index of the character is also passed to f.

  • since 4.02
val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> string -> 'acc

fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

  • since 4.13
val fold_right : f:(char -> 'acc -> 'acc) -> string -> init:'acc -> 'acc

fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

  • since 4.13
val trim : string -> string

trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

  • since 4.00
val escaped : string -> string

escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

val uppercase_ascii : string -> string

uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

  • since 4.05

Traversing

val iter : f:(char -> unit) -> string -> unit

iter ~f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

val iteri : f:(int -> char -> unit) -> string -> unit

iteri is like iter, but the function is also given the corresponding character index.

  • since 4.00

Searching

val index_from : string -> int -> char -> int

index_from s i c is the index of the first occurrence of c in s after position i.

  • raises Not_found

    if c does not occur in s after position i.

val rindex_from : string -> int -> char -> int

rindex_from s i c is the index of the last occurrence of c in s before position i+1.

  • raises Not_found

    if c does not occur in s before position i+1.

val index : string -> char -> int

index s c is String.index_from s 0 c.

val rindex : string -> char -> int

rindex s c is String.rindex_from s (length s - 1) c.

Strings and Sequences

val to_seq : t -> char Seq.t

to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

  • since 4.07
val to_seqi : t -> (int * char) Seq.t

to_seqi s is like to_seq but also tuples the corresponding index.

  • since 4.07
val of_seq : char Seq.t -> t

of_seq s is a string made of the sequence's characters.

  • since 4.07

UTF decoding and validations

  • since 4.14

UTF-8

val get_utf_8_uchar : t -> int -> Uchar.utf_decode

get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

val is_valid_utf_8 : t -> bool

is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

UTF-16BE

val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

val is_valid_utf_16be : t -> bool

is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

UTF-16LE

val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

val is_valid_utf_16le : t -> bool

is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

Binary decoding of integers

The functions in this section binary decode integers from strings.

All following functions raise Invalid_argument if the characters needed at index i to decode the integer are not available.

Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are sign-extended (or zero-extended) for functions which decode 8-bit or 16-bit integers and represented them with int values.

val get_uint8 : string -> int -> int

get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

  • since 4.13
val get_int8 : string -> int -> int

get_int8 b i is b's signed 8-bit integer starting at character index i.

  • since 4.13
val get_uint16_ne : string -> int -> int

get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_uint16_be : string -> int -> int

get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_uint16_le : string -> int -> int

get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_int16_ne : string -> int -> int

get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int16_be : string -> int -> int

get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int16_le : string -> int -> int

get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int32_ne : string -> int -> int32

get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

  • since 4.13
val hash : t -> int

An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.0
val seeded_hash : int -> t -> int

A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.0
val get_int32_be : string -> int -> int32

get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

  • since 4.13
val get_int32_le : string -> int -> int32

get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

  • since 4.13
val get_int64_ne : string -> int -> int64

get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

  • since 4.13
val get_int64_be : string -> int -> int64

get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

  • since 4.13
val get_int64_le : string -> int -> int64

get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

  • since 4.13
val is_empty : t -> bool
val prefix : string -> int -> string
val suffix : string -> int -> string
val drop_prefix : string -> int -> string
val drop_suffix : string -> int -> string
val is_prefix : string -> prefix:string -> bool
val is_suffix : string -> suffix:string -> bool
val exists : string -> f:(char -> bool) -> bool
val for_all : string -> f:(char -> bool) -> bool
val index_opt : string -> char -> int option
val rindex_opt : string -> char -> int option
val index_from_opt : string -> int -> char -> int option
val rindex_from_opt : string -> int -> char -> int option
val lsplit2 : string -> on:char -> (string * string) option
val capitalize_ascii : string -> string
val lowercase_ascii : string -> string
val uncapitalize_ascii : string -> string
val split_on_char : string -> sep:char -> string list
include Comparisons with type t := string
val compare : string -> string -> int
val equal : string -> string -> bool
val (=) : string -> string -> bool
val (<) : string -> string -> bool
val (>) : string -> string -> bool
val (<>) : string -> string -> bool
val (<=) : string -> string -> bool
val (>=) : string -> string -> bool
val min : string -> string -> string
val max : string -> string -> string
module Map : sig ... end
module Set : sig ... end
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/index.html b/findlib-1/ppxlib/stdppx/Stdppx/index.html new file mode 100644 index 000000000..cecf35411 --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/index.html @@ -0,0 +1,47 @@ + +Stdppx (docs.findlib-1.ppxlib.stdppx.Stdppx)

Module Stdppx

module Caml = Stdlib
module Sexp = Sexplib0.Sexp
module Sexpable = Sexplib0.Sexpable
include module type of struct include Sexplib0.Sexp_conv end
Conversion of OCaml-values to S-expressions
val default_string_of_float : (float -> string) ref

default_string_of_float reference to the default function used to convert floats to strings.

Initially set to fun n -> sprintf "%.20G" n.

val write_old_option_format : bool ref

write_old_option_format reference for the default option format used to write option values. If set to true, the old-style option format will be used, the new-style one otherwise.

Initially set to true.

val read_old_option_format : bool ref

read_old_option_format reference for the default option format used to read option values. Of_sexp_error will be raised with old-style option values if this reference is set to false. Reading new-style option values is always supported. Using a global reference instead of changing the converter calling conventions is the only way to avoid breaking old code with the standard macros.

Initially set to true.

val list_map : ('a -> 'b) -> 'a list -> 'b list

We re-export a tail recursive map function, because some modules override the standard library functions (e.g. StdLabels) which wrecks havoc with the camlp4 extension.

val sexp_of_unit : unit -> Sexplib0.Sexp.t

sexp_of_unit () converts a value of type unit to an S-expression.

val sexp_of_bool : bool -> Sexplib0.Sexp.t

sexp_of_bool b converts the value x of type bool to an S-expression.

val sexp_of_string : string -> Sexplib0.Sexp.t

sexp_of_string str converts the value str of type string to an S-expression.

val sexp_of_bytes : bytes -> Sexplib0.Sexp.t

sexp_of_bytes str converts the value str of type bytes to an S-expression.

val sexp_of_char : char -> Sexplib0.Sexp.t

sexp_of_char c converts the value c of type char to an S-expression.

val sexp_of_int : int -> Sexplib0.Sexp.t

sexp_of_int n converts the value n of type int to an S-expression.

val sexp_of_float : float -> Sexplib0.Sexp.t

sexp_of_float n converts the value n of type float to an S-expression.

val sexp_of_int32 : int32 -> Sexplib0.Sexp.t

sexp_of_int32 n converts the value n of type int32 to an S-expression.

val sexp_of_int64 : int64 -> Sexplib0.Sexp.t

sexp_of_int64 n converts the value n of type int64 to an S-expression.

val sexp_of_nativeint : nativeint -> Sexplib0.Sexp.t

sexp_of_nativeint n converts the value n of type nativeint to an S-expression.

val sexp_of_ref : ('a -> Sexplib0.Sexp.t) -> 'a ref -> Sexplib0.Sexp.t

sexp_of_ref conv r converts the value r of type 'a ref to an S-expression. Uses conv to convert values of type 'a to an S-expression.

val sexp_of_lazy_t : ('a -> Sexplib0.Sexp.t) -> 'a lazy_t -> Sexplib0.Sexp.t

sexp_of_lazy_t conv l converts the value l of type 'a lazy_t to an S-expression. Uses conv to convert values of type 'a to an S-expression.

val sexp_of_option : ('a -> Sexplib0.Sexp.t) -> 'a option -> Sexplib0.Sexp.t

sexp_of_option conv opt converts the value opt of type 'a + option to an S-expression. Uses conv to convert values of type 'a to an S-expression.

val sexp_of_pair : + ('a -> Sexplib0.Sexp.t) -> + ('b -> Sexplib0.Sexp.t) -> + ('a * 'b) -> + Sexplib0.Sexp.t

sexp_of_pair conv1 conv2 pair converts a pair to an S-expression. It uses its first argument to convert the first element of the pair, and its second argument to convert the second element of the pair.

val sexp_of_triple : + ('a -> Sexplib0.Sexp.t) -> + ('b -> Sexplib0.Sexp.t) -> + ('c -> Sexplib0.Sexp.t) -> + ('a * 'b * 'c) -> + Sexplib0.Sexp.t

sexp_of_triple conv1 conv2 conv3 triple converts a triple to an S-expression using conv1, conv2, and conv3 to convert its elements.

val sexp_of_list : ('a -> Sexplib0.Sexp.t) -> 'a list -> Sexplib0.Sexp.t

sexp_of_list conv lst converts the value lst of type 'a + list to an S-expression. Uses conv to convert values of type 'a to an S-expression.

val sexp_of_array : ('a -> Sexplib0.Sexp.t) -> 'a array -> Sexplib0.Sexp.t

sexp_of_array conv ar converts the value ar of type 'a + array to an S-expression. Uses conv to convert values of type 'a to an S-expression.

val sexp_of_hashtbl : + ('a -> Sexplib0.Sexp.t) -> + ('b -> Sexplib0.Sexp.t) -> + ('a, 'b) Hashtbl.t -> + Sexplib0.Sexp.t

sexp_of_hashtbl conv_key conv_value htbl converts the value htbl of type ('a, 'b) Hashtbl.t to an S-expression. Uses conv_key to convert the hashtable keys of type 'a, and conv_value to convert hashtable values of type 'b to S-expressions.

val sexp_of_opaque : 'a -> Sexplib0.Sexp.t

sexp_of_opaque x converts the value x of opaque type to an S-expression. This means the user need not provide converters, but the result cannot be interpreted.

val sexp_of_fun : ('a -> 'b) -> Sexplib0.Sexp.t

sexp_of_fun f converts the value f of function type to a dummy S-expression. Functions cannot be serialized as S-expressions, but at least a placeholder can be generated for pretty-printing.

Conversion of S-expressions to OCaml-values
exception Of_sexp_error of exn * Sexplib0.Sexp.t

Of_sexp_error (exn, sexp) the exception raised when an S-expression could not be successfully converted to an OCaml-value.

val record_check_extra_fields : bool ref

record_check_extra_fields checks for extra (= unknown) fields in record S-expressions.

val of_sexp_error : string -> Sexplib0.Sexp.t -> 'a

of_sexp_error reason sexp

val of_sexp_error_exn : exn -> Sexplib0.Sexp.t -> 'a

of_sexp_error exc sexp

val unit_of_sexp : Sexplib0.Sexp.t -> unit

unit_of_sexp sexp converts S-expression sexp to a value of type unit.

val bool_of_sexp : Sexplib0.Sexp.t -> bool

bool_of_sexp sexp converts S-expression sexp to a value of type bool.

val string_of_sexp : Sexplib0.Sexp.t -> string

string_of_sexp sexp converts S-expression sexp to a value of type string.

val bytes_of_sexp : Sexplib0.Sexp.t -> bytes

bytes_of_sexp sexp converts S-expression sexp to a value of type bytes.

val char_of_sexp : Sexplib0.Sexp.t -> char

char_of_sexp sexp converts S-expression sexp to a value of type char.

val int_of_sexp : Sexplib0.Sexp.t -> int

int_of_sexp sexp converts S-expression sexp to a value of type int.

val float_of_sexp : Sexplib0.Sexp.t -> float

float_of_sexp sexp converts S-expression sexp to a value of type float.

val int32_of_sexp : Sexplib0.Sexp.t -> int32

int32_of_sexp sexp converts S-expression sexp to a value of type int32.

val int64_of_sexp : Sexplib0.Sexp.t -> int64

int64_of_sexp sexp converts S-expression sexp to a value of type int64.

val nativeint_of_sexp : Sexplib0.Sexp.t -> nativeint

nativeint_of_sexp sexp converts S-expression sexp to a value of type nativeint.

val ref_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a ref

ref_of_sexp conv sexp converts S-expression sexp to a value of type 'a ref using conversion function conv, which converts an S-expression to a value of type 'a.

val lazy_t_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a lazy_t

lazy_t_of_sexp conv sexp converts S-expression sexp to a value of type 'a lazy_t using conversion function conv, which converts an S-expression to a value of type 'a.

val option_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a option

option_of_sexp conv sexp converts S-expression sexp to a value of type 'a option using conversion function conv, which converts an S-expression to a value of type 'a.

val pair_of_sexp : + (Sexplib0.Sexp.t -> 'a) -> + (Sexplib0.Sexp.t -> 'b) -> + Sexplib0.Sexp.t -> + 'a * 'b

pair_of_sexp conv1 conv2 sexp converts S-expression sexp to a pair of type 'a * 'b using conversion functions conv1 and conv2, which convert S-expressions to values of type 'a and 'b respectively.

val triple_of_sexp : + (Sexplib0.Sexp.t -> 'a) -> + (Sexplib0.Sexp.t -> 'b) -> + (Sexplib0.Sexp.t -> 'c) -> + Sexplib0.Sexp.t -> + 'a * 'b * 'c

triple_of_sexp conv1 conv2 conv3 sexp converts S-expression sexp to a triple of type 'a * 'b * 'c using conversion functions conv1, conv2, and conv3, which convert S-expressions to values of type 'a, 'b, and 'c respectively.

val list_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a list

list_of_sexp conv sexp converts S-expression sexp to a value of type 'a list using conversion function conv, which converts an S-expression to a value of type 'a.

val array_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a array

array_of_sexp conv sexp converts S-expression sexp to a value of type 'a array using conversion function conv, which converts an S-expression to a value of type 'a.

val hashtbl_of_sexp : + (Sexplib0.Sexp.t -> 'a) -> + (Sexplib0.Sexp.t -> 'b) -> + Sexplib0.Sexp.t -> + ('a, 'b) Hashtbl.t

hashtbl_of_sexp conv_key conv_value sexp converts S-expression sexp to a value of type ('a, 'b) Hashtbl.t using conversion function conv_key, which converts an S-expression to hashtable key of type 'a, and function conv_value, which converts an S-expression to hashtable value of type 'b.

val opaque_of_sexp : Sexplib0.Sexp.t -> 'a

opaque_of_sexp sexp

  • raises Of_sexp_error

    when attempting to convert an S-expression to an opaque value.

val fun_of_sexp : Sexplib0.Sexp.t -> 'a

fun_of_sexp sexp

  • raises Of_sexp_error

    when attempting to convert an S-expression to a function.

Sexp Grammars

val sexp_grammar_with_tags : + Sexplib0.Sexp_grammar.grammar -> + tags:(string * Sexplib0.Sexp.t) list -> + Sexplib0.Sexp_grammar.grammar
val sexp_grammar_with_tag_list : + 'a Sexplib0.Sexp_grammar.with_tag_list -> + tags:(string * Sexplib0.Sexp.t) list -> + 'a Sexplib0.Sexp_grammar.with_tag_list

Sexp grammar definitions.

val unit_sexp_grammar : unit Sexplib0.Sexp_grammar.t
val bool_sexp_grammar : bool Sexplib0.Sexp_grammar.t
val string_sexp_grammar : string Sexplib0.Sexp_grammar.t
val bytes_sexp_grammar : bytes Sexplib0.Sexp_grammar.t
val char_sexp_grammar : char Sexplib0.Sexp_grammar.t
val int_sexp_grammar : int Sexplib0.Sexp_grammar.t
val float_sexp_grammar : float Sexplib0.Sexp_grammar.t
val int32_sexp_grammar : int32 Sexplib0.Sexp_grammar.t
val int64_sexp_grammar : int64 Sexplib0.Sexp_grammar.t
val nativeint_sexp_grammar : nativeint Sexplib0.Sexp_grammar.t
val sexp_t_sexp_grammar : Sexplib0.Sexp.t Sexplib0.Sexp_grammar.t
val ref_sexp_grammar : + 'a Sexplib0.Sexp_grammar.t -> + 'a ref Sexplib0.Sexp_grammar.t
val lazy_t_sexp_grammar : + 'a Sexplib0.Sexp_grammar.t -> + 'a lazy_t Sexplib0.Sexp_grammar.t
val option_sexp_grammar : + 'a Sexplib0.Sexp_grammar.t -> + 'a option Sexplib0.Sexp_grammar.t
val list_sexp_grammar : + 'a Sexplib0.Sexp_grammar.t -> + 'a list Sexplib0.Sexp_grammar.t
val array_sexp_grammar : + 'a Sexplib0.Sexp_grammar.t -> + 'a array Sexplib0.Sexp_grammar.t
val opaque_sexp_grammar : 'a Sexplib0.Sexp_grammar.t
val fun_sexp_grammar : 'a Sexplib0.Sexp_grammar.t

Exception converters

val sexp_of_exn : exn -> Sexplib0.Sexp.t

sexp_of_exn exc converts exception exc to an S-expression. If no suitable converter is found, the standard converter in Printexc will be used to generate an atomic S-expression.

val printexc_prefer_sexp : exn -> string

Converts an exception to a string via sexp, falling back to Printexc.to_string if no sexp conversion is registered for this exception.

This is different from Printexc.to_string in that it additionally uses the sexp converters registered with ~printexc:false. Another difference is that the behavior of Printexc can be overridden with Printexc.register, but here we always try sexp conversion first.

val sexp_of_exn_opt : exn -> Sexplib0.Sexp.t option

sexp_of_exn_opt exc converts exception exc to Some sexp. If no suitable converter is found, None is returned instead.

module Exn_converter = Sexplib0.Sexp_conv.Exn_converter
module type Comparisons = sig ... end
module Poly : sig ... end
include Comparisons with type t := int
val compare : int -> int -> int
val equal : int -> int -> bool
val (=) : int -> int -> bool
val (<) : int -> int -> bool
val (>) : int -> int -> bool
val (<>) : int -> int -> bool
val (<=) : int -> int -> bool
val (>=) : int -> int -> bool
val min : int -> int -> int
val max : int -> int -> int
module Array = StdLabels.Array
module Bool : sig ... end
module Bytes : sig ... end
module Char : sig ... end
module Exn : sig ... end
module Float : sig ... end
module Fn : sig ... end
module Hashtbl : sig ... end
module In_channel : sig ... end
module Int : sig ... end
module Either : sig ... end
module List : sig ... end
module Option : sig ... end
module Result : sig ... end
module NonEmptyList : sig ... end
module Out_channel : sig ... end
module String : sig ... end
val (@) : 'a list -> 'a list -> 'a list
val output : out_channel -> bytes -> pos:int -> len:int -> unit
val output_substring : out_channel -> string -> pos:int -> len:int -> unit
diff --git a/findlib-1/ppxlib/stdppx/Stdppx/module-type-Comparisons/index.html b/findlib-1/ppxlib/stdppx/Stdppx/module-type-Comparisons/index.html new file mode 100644 index 000000000..1609b8def --- /dev/null +++ b/findlib-1/ppxlib/stdppx/Stdppx/module-type-Comparisons/index.html @@ -0,0 +1,2 @@ + +Comparisons (docs.findlib-1.ppxlib.stdppx.Stdppx.Comparisons)

Module type Stdppx.Comparisons

type t
val compare : t -> t -> int
val equal : t -> t -> bool
val (=) : t -> t -> bool
val (<) : t -> t -> bool
val (>) : t -> t -> bool
val (<>) : t -> t -> bool
val (<=) : t -> t -> bool
val (>=) : t -> t -> bool
val min : t -> t -> t
val max : t -> t -> t
diff --git a/findlib-1/ppxlib/stdppx/index.html b/findlib-1/ppxlib/stdppx/index.html new file mode 100644 index 000000000..7b574cf30 --- /dev/null +++ b/findlib-1/ppxlib/stdppx/index.html @@ -0,0 +1,2 @@ + +stdppx (docs.findlib-1.ppxlib.stdppx)

Package ppxlib.stdppx

Library ppxlib.stdppx

The entry point of this library is the module: Stdppx.

diff --git a/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/T/index.html b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/T/index.html new file mode 100644 index 000000000..e81298f60 --- /dev/null +++ b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/T/index.html @@ -0,0 +1,2 @@ + +T (docs.findlib-1.ppxlib.traverse_builtins.Ppxlib_traverse_builtins.T)

Module Ppxlib_traverse_builtins.T

type 'a map = 'a -> 'a
type 'a iter = 'a -> unit
type ('a, 'acc) fold = 'a -> 'acc -> 'acc
type ('a, 'acc) fold_map = 'a -> 'acc -> 'a * 'acc
type ('ctx, 'a) map_with_context = 'ctx -> 'a -> 'a
type ('a, 'res) lift = 'a -> 'res
type ('ctx, 'a, 'res) lift_map_with_context = 'ctx -> 'a -> 'a * 'res
diff --git a/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-fold/index.html b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-fold/index.html new file mode 100644 index 000000000..665891464 --- /dev/null +++ b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-fold/index.html @@ -0,0 +1,2 @@ + +fold (docs.findlib-1.ppxlib.traverse_builtins.Ppxlib_traverse_builtins.fold)

Class Ppxlib_traverse_builtins.fold

method int : (int, 'acc0) T.fold
method string : (string, 'acc1) T.fold
method bool : (bool, 'acc2) T.fold
method char : (char, 'acc3) T.fold
method option : 'a. ('a, 'acc4) T.fold -> ('a option, 'acc4) T.fold
method list : 'a. ('a, 'acc5) T.fold -> ('a list, 'acc5) T.fold
method array : 'a. ('a, 'acc6) T.fold -> ('a array, 'acc6) T.fold
diff --git a/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-fold_map/index.html b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-fold_map/index.html new file mode 100644 index 000000000..13e9a75ca --- /dev/null +++ b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-fold_map/index.html @@ -0,0 +1,2 @@ + +fold_map (docs.findlib-1.ppxlib.traverse_builtins.Ppxlib_traverse_builtins.fold_map)

Class Ppxlib_traverse_builtins.fold_map

method int : (int, 'acc0) T.fold_map
method string : (string, 'acc1) T.fold_map
method bool : (bool, 'acc2) T.fold_map
method char : (char, 'acc3) T.fold_map
method option : 'a. ('a, 'acc4) T.fold_map -> ('a option, 'acc4) T.fold_map
method list : 'a. ('a, 'acc5) T.fold_map -> ('a list, 'acc5) T.fold_map
method array : 'a. ('a, 'acc6) T.fold_map -> ('a array, 'acc6) T.fold_map
diff --git a/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-iter/index.html b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-iter/index.html new file mode 100644 index 000000000..c0a3d6a52 --- /dev/null +++ b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-iter/index.html @@ -0,0 +1,2 @@ + +iter (docs.findlib-1.ppxlib.traverse_builtins.Ppxlib_traverse_builtins.iter)

Class Ppxlib_traverse_builtins.iter

method int : int T.iter
method string : string T.iter
method bool : bool T.iter
method char : char T.iter
method option : 'a. 'a T.iter -> 'a option T.iter
method list : 'a. 'a T.iter -> 'a list T.iter
method array : 'a. 'a T.iter -> 'a array T.iter
diff --git a/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-lift/index.html b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-lift/index.html new file mode 100644 index 000000000..827b40ce1 --- /dev/null +++ b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-lift/index.html @@ -0,0 +1,2 @@ + +lift (docs.findlib-1.ppxlib.traverse_builtins.Ppxlib_traverse_builtins.lift)

Class Ppxlib_traverse_builtins.lift

method virtual other : 'a. ('a, 'res0) T.lift
method virtual int : (int, 'res1) T.lift
method virtual string : (string, 'res2) T.lift
method virtual bool : (bool, 'res3) T.lift
method virtual char : (char, 'res4) T.lift
method virtual array : 'a. ('a, 'res5) T.lift -> ('a array, 'res5) T.lift
method virtual float : (float, 'res6) T.lift
method virtual int32 : (int32, 'res7) T.lift
method virtual int64 : (int64, 'res8) T.lift
method virtual nativeint : (nativeint, 'res9) T.lift
method virtual unit : (unit, 'res10) T.lift
method virtual record : (string * 'res11) list -> 'res11
method virtual constr : string -> 'res12 list -> 'res12
method virtual tuple : 'res13 list -> 'res13
method option : 'a. ('a, 'res14) T.lift -> ('a option, 'res14) T.lift
method list : 'a. ('a, 'res15) T.lift -> ('a list, 'res15) T.lift
diff --git a/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-lift_map_with_context/index.html b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-lift_map_with_context/index.html new file mode 100644 index 000000000..edcb5c614 --- /dev/null +++ b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-lift_map_with_context/index.html @@ -0,0 +1,5 @@ + +lift_map_with_context (docs.findlib-1.ppxlib.traverse_builtins.Ppxlib_traverse_builtins.lift_map_with_context)

Class Ppxlib_traverse_builtins.lift_map_with_context

method virtual other : 'a. 'ctx0 -> 'a -> 'res0
method virtual int : ('ctx1, int, 'res1) T.lift_map_with_context
method virtual string : ('ctx2, string, 'res2) T.lift_map_with_context
method virtual bool : ('ctx3, bool, 'res3) T.lift_map_with_context
method virtual char : ('ctx4, char, 'res4) T.lift_map_with_context
method virtual array : 'a. ('ctx5, 'a, 'res5) T.lift_map_with_context -> + ('ctx5, 'a array, 'res5) T.lift_map_with_context
method virtual float : ('ctx6, float, 'res6) T.lift_map_with_context
method virtual int32 : ('ctx7, int32, 'res7) T.lift_map_with_context
method virtual int64 : ('ctx8, int64, 'res8) T.lift_map_with_context
method virtual nativeint : ('ctx9, nativeint, 'res9) T.lift_map_with_context
method virtual unit : ('ctx10, unit, 'res10) T.lift_map_with_context
method virtual record : 'ctx11 -> (string * 'res11) list -> 'res11
method virtual constr : 'ctx12 -> string -> 'res12 list -> 'res12
method virtual tuple : 'ctx13 -> 'res13 list -> 'res13
method option : 'a. ('ctx14, 'a, 'res14) T.lift_map_with_context -> + ('ctx14, 'a option, 'res14) T.lift_map_with_context
method list : 'a. ('ctx15, 'a, 'res15) T.lift_map_with_context -> + ('ctx15, 'a list, 'res15) T.lift_map_with_context
diff --git a/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-map/index.html b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-map/index.html new file mode 100644 index 000000000..3d6371cce --- /dev/null +++ b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-map/index.html @@ -0,0 +1,2 @@ + +map (docs.findlib-1.ppxlib.traverse_builtins.Ppxlib_traverse_builtins.map)

Class Ppxlib_traverse_builtins.map

method int : int T.map
method string : string T.map
method bool : bool T.map
method char : char T.map
method option : 'a. 'a T.map -> 'a option T.map
method list : 'a. 'a T.map -> 'a list T.map
method array : 'a. 'a T.map -> 'a array T.map
diff --git a/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-map_with_context/index.html b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-map_with_context/index.html new file mode 100644 index 000000000..eadba0ee3 --- /dev/null +++ b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-map_with_context/index.html @@ -0,0 +1,5 @@ + +map_with_context (docs.findlib-1.ppxlib.traverse_builtins.Ppxlib_traverse_builtins.map_with_context)

Class Ppxlib_traverse_builtins.map_with_context

method int : ('ctx0, int) T.map_with_context
method string : ('ctx1, string) T.map_with_context
method bool : ('ctx2, bool) T.map_with_context
method char : ('ctx3, char) T.map_with_context
method option : 'a. ('ctx4, 'a) T.map_with_context -> + ('ctx4, 'a option) T.map_with_context
method list : 'a. ('ctx5, 'a) T.map_with_context -> + ('ctx5, 'a list) T.map_with_context
method array : 'a. ('ctx6, 'a) T.map_with_context -> + ('ctx6, 'a array) T.map_with_context
diff --git a/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-type-std_lift_mappers_with_context/index.html b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-type-std_lift_mappers_with_context/index.html new file mode 100644 index 000000000..13e88f325 --- /dev/null +++ b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-type-std_lift_mappers_with_context/index.html @@ -0,0 +1,5 @@ + +std_lift_mappers_with_context (docs.findlib-1.ppxlib.traverse_builtins.Ppxlib_traverse_builtins.std_lift_mappers_with_context)

Class type Ppxlib_traverse_builtins.std_lift_mappers_with_context

method other : 'a. 'ctx -> 'a -> 'res
method int : ('ctx, int, 'res) T.lift_map_with_context
method string : ('ctx, string, 'res) T.lift_map_with_context
method bool : ('ctx, bool, 'res) T.lift_map_with_context
method char : ('ctx, char, 'res) T.lift_map_with_context
method array : 'a. ('ctx, 'a, 'res) T.lift_map_with_context -> + ('ctx, 'a array, 'res) T.lift_map_with_context
method record : 'ctx -> (string * 'res) list -> 'res
method constr : 'ctx -> string -> 'res list -> 'res
method tuple : 'ctx -> 'res list -> 'res
method float : ('ctx, float, 'res) T.lift_map_with_context
method int32 : ('ctx, int32, 'res) T.lift_map_with_context
method int64 : ('ctx, int64, 'res) T.lift_map_with_context
method nativeint : ('ctx, nativeint, 'res) T.lift_map_with_context
method unit : ('ctx, unit, 'res) T.lift_map_with_context
method option : 'a. ('ctx, 'a, 'res) T.lift_map_with_context -> + ('ctx, 'a option, 'res) T.lift_map_with_context
method list : 'a. ('ctx, 'a, 'res) T.lift_map_with_context -> + ('ctx, 'a list, 'res) T.lift_map_with_context
diff --git a/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-type-std_lifters/index.html b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-type-std_lifters/index.html new file mode 100644 index 000000000..79cc247c4 --- /dev/null +++ b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/class-type-std_lifters/index.html @@ -0,0 +1,2 @@ + +std_lifters (docs.findlib-1.ppxlib.traverse_builtins.Ppxlib_traverse_builtins.std_lifters)

Class type Ppxlib_traverse_builtins.std_lifters

method other : 'a. ('a, 'res) T.lift
method int : (int, 'res) T.lift
method string : (string, 'res) T.lift
method bool : (bool, 'res) T.lift
method char : (char, 'res) T.lift
method array : 'a. ('a, 'res) T.lift -> ('a array, 'res) T.lift
method record : (string * 'res) list -> 'res
method constr : string -> 'res list -> 'res
method tuple : 'res list -> 'res
method float : (float, 'res) T.lift
method int32 : (int32, 'res) T.lift
method int64 : (int64, 'res) T.lift
method nativeint : (nativeint, 'res) T.lift
method unit : (unit, 'res) T.lift
method option : 'a. ('a, 'res) T.lift -> ('a option, 'res) T.lift
method list : 'a. ('a, 'res) T.lift -> ('a list, 'res) T.lift
diff --git a/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/index.html b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/index.html new file mode 100644 index 000000000..42affdfa7 --- /dev/null +++ b/findlib-1/ppxlib/traverse_builtins/Ppxlib_traverse_builtins/index.html @@ -0,0 +1,2 @@ + +Ppxlib_traverse_builtins (docs.findlib-1.ppxlib.traverse_builtins.Ppxlib_traverse_builtins)

Module Ppxlib_traverse_builtins

module T : sig ... end
class map : object ... end
class iter : object ... end
class 'acc fold : object ... end
class 'acc fold_map : object ... end
class 'ctx map_with_context : object ... end
class virtual 'res lift : object ... end
class virtual ['ctx, 'res] lift_map_with_context : object ... end
class type 'res std_lifters = object ... end
class type ['ctx, 'res] std_lift_mappers_with_context = object ... end
diff --git a/findlib-1/ppxlib/traverse_builtins/index.html b/findlib-1/ppxlib/traverse_builtins/index.html new file mode 100644 index 000000000..d8d4ea0fa --- /dev/null +++ b/findlib-1/ppxlib/traverse_builtins/index.html @@ -0,0 +1,2 @@ + +traverse_builtins (docs.findlib-1.ppxlib.traverse_builtins)

Package ppxlib.traverse_builtins

Library ppxlib.traverse_builtins

The entry point of this library is the module: Ppxlib_traverse_builtins.

diff --git a/findlib-1/quickjs/Quickjs/RegExp/index.html b/findlib-1/quickjs/Quickjs/RegExp/index.html new file mode 100644 index 000000000..3f09a642e --- /dev/null +++ b/findlib-1/quickjs/Quickjs/RegExp/index.html @@ -0,0 +1,12 @@ + +RegExp (docs.findlib-1.quickjs.Quickjs.RegExp)

Module Quickjs.RegExp

type t

The RegExp object

type result

The result of a executing a RegExp on a string

val compile : + flags:string -> + string -> + (t, + [ `Unexpected_end + | `Malformed_unicode_char + | `Invalid_escape_sequence + | `Nothing_to_repeat + | `Unknown of string ] + * string) + result

Constructs a RegExp.t from a string describing a regex and their flags

val lastIndex : t -> int

returns the index where the next match will start its search

val setLastIndex : t -> int -> unit

sets the index at which the next match (RegExp.exec or RegExp.test) will start its search from

val flags : t -> string

returns the enabled flags as a string

val global : t -> bool

returns a bool indicating whether the global flag (g) is set

val ignorecase : t -> bool

returns a bool indicating whether the ignorecase (i) flag is set

val multiline : t -> bool

returns a bool indicating whether the multiline (m) flag is set

val dotall : t -> bool

returns a bool indicating whether the dot all (s) flag is set

val sticky : t -> bool

returns a bool indicating whether the sticky (y) flag is set

val unicode : t -> bool

returns a bool indicating whether the unicode (u ) flag is set

val source : t -> string

returns the regexp pattern as a string

val test : t -> string -> bool

checks whether the given RegExp.t will match (or not match) a given string

val exec : t -> string -> result

executes a search on a given string using the given RegExp.t

val captures : result -> string array

an array of the match and captures

val input : result -> string

the original input string

val index : result -> int

sets the index at which the next match (RegExp.exec or RegExp.test) will start its search from

diff --git a/findlib-1/quickjs/Quickjs/index.html b/findlib-1/quickjs/Quickjs/index.html new file mode 100644 index 000000000..e7a5d4c4b --- /dev/null +++ b/findlib-1/quickjs/Quickjs/index.html @@ -0,0 +1,2 @@ + +Quickjs (docs.findlib-1.quickjs.Quickjs)

Module Quickjs

module RegExp : sig ... end
diff --git a/findlib-1/quickjs/bindings/Bindings/C/Functions/index.html b/findlib-1/quickjs/bindings/Bindings/C/Functions/index.html new file mode 100644 index 000000000..111e04c25 --- /dev/null +++ b/findlib-1/quickjs/bindings/Bindings/C/Functions/index.html @@ -0,0 +1,40 @@ + +Functions (docs.findlib-1.quickjs.bindings.Bindings.C.Functions)

Module C.Functions

val (@->) : + 'a Ctypes.typ -> + 'b + Bindings.Libregexp__c_generated_functions__Function_description__Functions.fn -> + ('a -> + 'b) + Bindings.Libregexp__c_generated_functions__Function_description__Functions.fn
val lre_compile : + (int Ctypes_static.ptr -> + char Ctypes_static.ptr -> + int -> + string Ctypes_static.ocaml -> + Unsigned.size_t -> + int -> + unit Ctypes_static.ptr -> + Unsigned.uint8 Ctypes_static.ptr + Bindings.Libregexp__c_generated_functions__Function_description__Functions.return) + Bindings.Libregexp__c_generated_functions__Function_description__Functions.result
val lre_exec : + (Unsigned.uint8 Ctypes_static.ptr Ctypes_static.ptr -> + Unsigned.uint8 Ctypes_static.ptr -> + Unsigned.uint8 Ctypes_static.ptr -> + int -> + int -> + int -> + unit Ctypes_static.ptr -> + int + Bindings.Libregexp__c_generated_functions__Function_description__Functions.return) + Bindings.Libregexp__c_generated_functions__Function_description__Functions.result
val lre_get_capture_count : + (Unsigned.uint8 Ctypes_static.ptr -> + int + Bindings.Libregexp__c_generated_functions__Function_description__Functions.return) + Bindings.Libregexp__c_generated_functions__Function_description__Functions.result
val lre_get_groupnames : + (Unsigned.uint8 Ctypes_static.ptr -> + char Ctypes_static.ptr option + Bindings.Libregexp__c_generated_functions__Function_description__Functions.return) + Bindings.Libregexp__c_generated_functions__Function_description__Functions.result
val lre_get_flags : + (Unsigned.uint8 Ctypes_static.ptr -> + int + Bindings.Libregexp__c_generated_functions__Function_description__Functions.return) + Bindings.Libregexp__c_generated_functions__Function_description__Functions.result
diff --git a/findlib-1/quickjs/bindings/Bindings/C/index.html b/findlib-1/quickjs/bindings/Bindings/C/index.html new file mode 100644 index 000000000..e93633976 --- /dev/null +++ b/findlib-1/quickjs/bindings/Bindings/C/index.html @@ -0,0 +1,2 @@ + +C (docs.findlib-1.quickjs.bindings.Bindings.C)

Module Bindings.C

module Type = Types_generated
module Functions : sig ... end
diff --git a/findlib-1/quickjs/bindings/Bindings/Function_description/Functions/argument-1-F/index.html b/findlib-1/quickjs/bindings/Bindings/Function_description/Functions/argument-1-F/index.html new file mode 100644 index 000000000..758e85118 --- /dev/null +++ b/findlib-1/quickjs/bindings/Bindings/Function_description/Functions/argument-1-F/index.html @@ -0,0 +1,2 @@ + +F (docs.findlib-1.quickjs.bindings.Bindings.Function_description.Functions.F)

Parameter Functions.F

type 'a fn
type 'a return
val (@->) : 'a Ctypes.typ -> 'b fn -> ('a -> 'b) fn
val returning : 'a Ctypes.typ -> 'a return fn
type 'a result
val foreign : string -> ('a -> 'b) fn -> ('a -> 'b) result
val foreign_value : string -> 'a Ctypes.typ -> 'a Ctypes.ptr result
diff --git a/findlib-1/quickjs/bindings/Bindings/Function_description/Functions/index.html b/findlib-1/quickjs/bindings/Bindings/Function_description/Functions/index.html new file mode 100644 index 000000000..62d6d4b4c --- /dev/null +++ b/findlib-1/quickjs/bindings/Bindings/Function_description/Functions/index.html @@ -0,0 +1,24 @@ + +Functions (docs.findlib-1.quickjs.bindings.Bindings.Function_description.Functions)

Module Function_description.Functions

Parameters

module F : Ctypes.FOREIGN

Signature

val (@->) : 'a Ctypes.typ -> 'b F.fn -> ('a -> 'b) F.fn
val lre_compile : + (int Ctypes_static.ptr -> + char Ctypes_static.ptr -> + int -> + string Ctypes_static.ocaml -> + Unsigned.size_t -> + int -> + unit Ctypes_static.ptr -> + Unsigned.uint8 Ctypes_static.ptr F.return) + F.result
val lre_get_capture_count : + (Unsigned.uint8 Ctypes_static.ptr -> int F.return) F.result
val lre_get_groupnames : + (Unsigned.uint8 Ctypes_static.ptr -> + char Ctypes_static.ptr option F.return) + F.result
val lre_get_flags : (Unsigned.uint8 Ctypes_static.ptr -> int F.return) F.result
diff --git a/findlib-1/quickjs/bindings/Bindings/Function_description/index.html b/findlib-1/quickjs/bindings/Bindings/Function_description/index.html new file mode 100644 index 000000000..9c9bbc928 --- /dev/null +++ b/findlib-1/quickjs/bindings/Bindings/Function_description/index.html @@ -0,0 +1,2 @@ + +Function_description (docs.findlib-1.quickjs.bindings.Bindings.Function_description)

Module Bindings.Function_description

module Functions (F : Ctypes.FOREIGN) : sig ... end
diff --git a/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Intptr/Infix/index.html b/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Intptr/Infix/index.html new file mode 100644 index 000000000..c3e3014e2 --- /dev/null +++ b/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Intptr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.quickjs.bindings.Bindings.Type_description.Types.T.Intptr.Infix)

Module Intptr.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Intptr/index.html b/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Intptr/index.html new file mode 100644 index 000000000..50f65d493 --- /dev/null +++ b/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Intptr/index.html @@ -0,0 +1,2 @@ + +Intptr (docs.findlib-1.quickjs.bindings.Bindings.Type_description.Types.T.Intptr)

Module T.Intptr

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Ptrdiff/Infix/index.html b/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Ptrdiff/Infix/index.html new file mode 100644 index 000000000..3043200ab --- /dev/null +++ b/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Ptrdiff/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.quickjs.bindings.Bindings.Type_description.Types.T.Ptrdiff.Infix)

Module Ptrdiff.Infix

include Unsigned.Infix with type t := t
val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

val (asr) : t -> int -> t

x asr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Ptrdiff/index.html b/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Ptrdiff/index.html new file mode 100644 index 000000000..528441e4a --- /dev/null +++ b/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Ptrdiff/index.html @@ -0,0 +1,2 @@ + +Ptrdiff (docs.findlib-1.quickjs.bindings.Bindings.Type_description.Types.T.Ptrdiff)

Module T.Ptrdiff

type t
module Infix : Signed.Infix with type t := t
include Unsigned.S with type t := t with module Infix := Infix
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

val neg : t -> t

Unary negation.

val abs : t -> t

Return the absolute value of its argument.

val minus_one : t

The value -1

val min_int : t

The smallest representable integer.

val shift_right_logical : t -> int -> t

shift_right_logical x y shifts x to the right by y bits. See Int32.shift_right_logical.

val of_nativeint : nativeint -> t

Convert the given nativeint value to a signed integer.

val to_nativeint : t -> nativeint

Convert the given signed integer to a nativeint value.

val of_int64 : int64 -> t

Convert the given int64 value to a signed integer.

val to_int64 : t -> int64

Convert the given signed integer to an int64 value.

diff --git a/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Uintptr/Infix/index.html b/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Uintptr/Infix/index.html new file mode 100644 index 000000000..fdf2d3161 --- /dev/null +++ b/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Uintptr/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (docs.findlib-1.quickjs.bindings.Bindings.Type_description.Types.T.Uintptr.Infix)

Module Uintptr.Infix

val (+) : t -> t -> t

Addition. See add.

val (-) : t -> t -> t

Subtraction. See sub.

val (*) : t -> t -> t

Multiplication. See mul.

val (/) : t -> t -> t

Division. See div.

val (mod) : t -> t -> t

Integer remainder. See rem.

val (land) : t -> t -> t

Bitwise logical and. See logand.

val (lor) : t -> t -> t

Bitwise logical or. See logor.

val (lxor) : t -> t -> t

Bitwise logical exclusive or. See logxor.

val (lsl) : t -> int -> t

x lsl y shifts x to the left by y bits. See shift_left.

val (lsr) : t -> int -> t

x lsr y shifts x to the right by y bits. See shift_right.

diff --git a/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Uintptr/index.html b/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Uintptr/index.html new file mode 100644 index 000000000..359b35c93 --- /dev/null +++ b/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/Uintptr/index.html @@ -0,0 +1,2 @@ + +Uintptr (docs.findlib-1.quickjs.bindings.Bindings.Type_description.Types.T.Uintptr)

Module T.Uintptr

type t
val add : t -> t -> t

Addition.

val sub : t -> t -> t

Subtraction.

val mul : t -> t -> t

Multiplication.

val div : t -> t -> t

Division. Raise Division_by_zero if the second argument is zero.

val rem : t -> t -> t

Integer remainder. Raise Division_by_zero if the second argument is zero.

val max_int : t

The greatest representable integer.

val logand : t -> t -> t

Bitwise logical and.

val logor : t -> t -> t

Bitwise logical or.

val logxor : t -> t -> t

Bitwise logical exclusive or.

val shift_left : t -> int -> t

shift_left x y shifts x to the left by y bits.

val shift_right : t -> int -> t

shift_right x y shifts x to the right by y bits.

val of_int : int -> t

Convert the given int value to an unsigned integer.

val to_int : t -> int

Convert the given unsigned integer value to an int.

val of_int64 : int64 -> t

Convert the given int64 value to an unsigned integer.

val to_int64 : t -> int64

Convert the given unsigned integer value to an int64.

val of_string : string -> t

Convert the given string to an unsigned integer. Raise Failure if the given string is not a valid representation of an unsigned integer.

val to_string : t -> string

Return the string representation of its argument.

val to_hexstring : t -> string

Return the hexadecimal string representation of its argument.

val zero : t

The integer 0.

val one : t

The integer 1.

val lognot : t -> t

Bitwise logical negation.

val succ : t -> t

Successor.

val pred : t -> t

Predecessor.

val compare : t -> t -> int

The comparison function for unsigned integers, with the same specification as Stdlib.compare.

val equal : t -> t -> bool

Tests for equality, with the same specification as Stdlib.(=).

val max : t -> t -> t

max x y is the greater of x and y

val min : t -> t -> t

min x y is the lesser of x and y

val of_string_opt : string -> t option

Convert the given string to an unsigned integer. Returns None if the given string is not a valid representation of an unsigned integer.

val pp : Format.formatter -> t -> unit

Output the result of to_string on a formatter.

val pp_hex : Format.formatter -> t -> unit

Output the result of to_hexstring on a formatter.

module Infix : Unsigned.Infix with type t := t
diff --git a/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/index.html b/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/index.html new file mode 100644 index 000000000..7b51ff997 --- /dev/null +++ b/findlib-1/quickjs/bindings/Bindings/Type_description/Types/argument-1-T/index.html @@ -0,0 +1,49 @@ + +T (docs.findlib-1.quickjs.bindings.Bindings.Type_description.Types.T)

Parameter Types.T

include Ctypes_types.TYPE

Values representing C types

type 'a typ

The type of values representing C types. There are two types associated with each typ value: the C type used to store and pass values, and the corresponding OCaml type. The type parameter indicates the OCaml type, so a value of type t typ is used to read and write OCaml values of type t. There are various uses of typ values, including

  • constructing function types for binding native functions using Foreign.foreign
  • constructing pointers for reading and writing locations in C-managed storage using ptr
  • describing the fields of structured types built with structure and union.

The void type

val void : unit typ

Value representing the C void type. Void values appear in OCaml as the unit type, so using void in an argument or result type specification produces a function which accepts or returns unit.

Dereferencing a pointer to void is an error, as in C, and will raise IncompleteType.

Scalar types

The scalar types consist of the Arithmetic types and the Pointer types.

Arithmetic types

The arithmetic types consist of the signed and unsigned integer types (including character types) and the floating types. There are values representing both exact-width integer types (of 8, 16, 32 and 64 bits) and types whose size depend on the platform (signed and unsigned short, int, long, long long).

val char : char typ

Value representing the C type char.

Signed integer types
val schar : int typ

Value representing the C type signed char.

val short : int typ

Value representing the C type (signed) short.

val int : int typ

Value representing the C type (signed) int.

val long : Signed.long typ

Value representing the C type (signed) long.

val llong : Signed.llong typ

Value representing the C type (signed) long long.

val nativeint : nativeint typ

Value representing the C type (signed) int.

val int8_t : int typ

Value representing an 8-bit signed integer C type.

val int16_t : int typ

Value representing a 16-bit signed integer C type.

val int32_t : int32 typ

Value representing a 32-bit signed integer C type.

val int64_t : int64 typ

Value representing a 64-bit signed integer C type.

module Intptr : Signed.S
val intptr_t : Intptr.t typ

Value representing the C type intptr_t.

module Ptrdiff : Signed.S
val ptrdiff_t : Ptrdiff.t typ

Value representing the C type ptrdiff_t.

val camlint : int typ

Value representing an integer type with the same storage requirements as an OCaml int.

Unsigned integer types
val uchar : Unsigned.uchar typ

Value representing the C type unsigned char.

val bool : bool typ

Value representing the C type bool.

val uint8_t : Unsigned.uint8 typ

Value representing an 8-bit unsigned integer C type.

val uint16_t : Unsigned.uint16 typ

Value representing a 16-bit unsigned integer C type.

val uint32_t : Unsigned.uint32 typ

Value representing a 32-bit unsigned integer C type.

val uint64_t : Unsigned.uint64 typ

Value representing a 64-bit unsigned integer C type.

val size_t : Unsigned.size_t typ

Value representing the C type size_t, an alias for one of the unsigned integer types. The actual size and alignment requirements for size_t vary between platforms.

val ushort : Unsigned.ushort typ

Value representing the C type unsigned short.

val sint : Signed.sint typ

Value representing the C type int.

val uint : Unsigned.uint typ

Value representing the C type unsigned int.

val ulong : Unsigned.ulong typ

Value representing the C type unsigned long.

val ullong : Unsigned.ullong typ

Value representing the C type unsigned long long.

val uintptr_t : Uintptr.t typ

Value representing the C type uintptr_t.

Floating types
val float : float typ

Value representing the C single-precision float type.

val double : float typ

Value representing the C type double.

val ldouble : LDouble.t typ

Value representing the C type long double.

Complex types
val complex32 : Complex.t typ

Value representing the C99 single-precision float complex type.

val complex64 : Complex.t typ

Value representing the C99 double-precision double complex type.

val complexld : ComplexL.t typ

Value representing the C99 long-double-precision long double complex type.

Pointer types
C-compatible pointers
val ptr : 'a typ -> 'a Ctypes_static.ptr typ

Construct a pointer type from an existing type (called the reference type).

val ptr_opt : 'a typ -> 'a Ctypes_static.ptr option typ

Construct a pointer type from an existing type (called the reference type). This behaves like ptr, except that null pointers appear in OCaml as None.

val string : string typ

A high-level representation of the string type.

On the C side this behaves like char *; on the OCaml side values read and written using string are simply native OCaml strings.

To avoid problems with the garbage collector, values passed using string are copied into immovable C-managed storage before being passed to C.

The string type representation is suitable for use in function argument types such as the following:

string @-> returning int

where the lifetime of the C-managed storage does not need to extend beyond the duration of the function call. However, it is not suitable for use in struct or union fields

field s "x" string

because it does not provide a way to manage the lifetime of the C-managed storage.

val string_opt : string option typ

A high-level representation of the string type. This behaves like string, except that null pointers appear in OCaml as None.

OCaml pointers
val ocaml_string : string Ctypes_static.ocaml typ

Value representing the directly mapped storage of an OCaml string.

val ocaml_bytes : bytes Ctypes_static.ocaml typ

Value representing the directly mapped storage of an OCaml byte array.

Array types

C array types
val array : int -> 'a typ -> 'a Ctypes_static.carray typ

Construct a sized array type from a length and an existing type (called the element type).

Bigarray types
val bigarray : + < element : 'a + ; layout : Bigarray_compat.c_layout + ; ba_repr : 'b + ; dims : 'dims + ; bigarray : 'bigarray + ; carray : _ > + Ctypes_static.bigarray_class -> + 'dims -> + ('a, 'b) Bigarray_compat.kind -> + 'bigarray typ

Construct a sized C-layout bigarray type representation from a bigarray class, the dimensions, and the Bigarray_compat.kind.

val fortran_bigarray : + < element : 'a + ; layout : Bigarray_compat.fortran_layout + ; ba_repr : 'b + ; dims : 'dims + ; bigarray : 'bigarray + ; carray : _ > + Ctypes_static.bigarray_class -> + 'dims -> + ('a, 'b) Bigarray_compat.kind -> + 'bigarray typ

Construct a sized Fortran-layout bigarray type representation from a bigarray class, the dimensions, and the Bigarray_compat.kind.

val typ_of_bigarray_kind : ('a, 'b) Bigarray_compat.kind -> 'a typ

typ_of_bigarray_kind k is the type corresponding to the Bigarray kind k.

Struct and union types

type ('a, 't) field
val structure : string -> 's Ctypes_static.structure typ

Construct a new structure type. The type value returned is incomplete and can be updated using field until it is passed to seal, at which point the set of fields is fixed.

The type ('_s structure typ) of the expression returned by the call structure tag includes a weak type variable, which can be explicitly instantiated to ensure that the OCaml values representing different C structure types have incompatible types. Typical usage is as follows:

type tagname

let tagname : tagname structure typ = structure "tagname"

val union : string -> 's Ctypes_static.union typ

Construct a new union type. This behaves analogously to structure; fields are added with field.

val field : + 't typ -> + string -> + 'a typ -> + ('a, ('s, [< `Struct | `Union ]) Ctypes_static.structured as 't) field

field ty label ty' adds a field of type ty' with label label to the structure or union type ty and returns a field value that can be used to read and write the field in structure or union instances (e.g. using getf and setf).

Attempting to add a field to a union type that has been sealed with seal is an error, and will raise ModifyingSealedType.

val seal : (_, [< `Struct | `Union ]) Ctypes_static.structured typ -> unit

seal t completes the struct or union type t so that no further fields can be added. Struct and union types must be sealed before they can be used in a way that involves their size or alignment; see the documentation for IncompleteType for further details.

View types

val view : + ?format_typ:((Format.formatter -> unit) -> Format.formatter -> unit) -> + ?format:(Format.formatter -> 'b -> unit) -> + read:('a -> 'b) -> + write:('b -> 'a) -> + 'a typ -> + 'b typ

view ~read:r ~write:w t creates a C type representation t' which behaves like t except that values read using t' are subsequently transformed using the function r and values written using t' are first transformed using the function w.

For example, given suitable definitions of string_of_char_ptr and char_ptr_of_string, the type representation

view ~read:string_of_char_ptr ~write:char_ptr_of_string (ptr char)

can be used to pass OCaml strings directly to and from bound C functions, or to read and write string members in structs and arrays. (In fact, the string type representation is defined in exactly this way.)

The optional argument format_typ is used by the Ctypes.format_typ and string_of_typ functions to print the type at the top level and elsewhere. If format_typ is not supplied the printer for t is used instead.

The optional argument format is used by the Ctypes.format and string_of functions to print the values. If format_val is not supplied the printer for t is used instead.

val typedef : 'a typ -> string -> 'a typ

typedef t name creates a C type representation t' which is equivalent to t except its name is printed as name.

This is useful when generating C stubs involving "anonymous" types, for example: typedef struct { int f } typedef_name;

Abstract types

val abstract : + name:string -> + size:int -> + alignment:int -> + 'a Ctypes_static.abstract typ

Create an abstract type specification from the size and alignment requirements for the type.

Injection of concrete types

val lift_typ : 'a Ctypes_static.typ -> 'a typ

lift_typ t turns a concrete type representation into an abstract type representation.

For example, retrieving struct layout from C involves working with an abstract representation of types which do not support operations such as sizeof. The lift_typ function makes it possible to use concrete type representations wherever such abstract type representations are needed.

Function types

Abstract interface to C function type descriptions

type 'a fn = 'a Ctypes_static.fn

The type of values representing C function types. A value of type t fn can be used to bind to C functions and to describe type of OCaml functions passed to C.

val (@->) : 'a typ -> 'b fn -> ('a -> 'b) fn

Construct a function type from a type and an existing function type. This corresponds to prepending a parameter to a C function parameter list. For example,

int @-> ptr void @-> returning float

describes a function type that accepts two arguments -- an integer and a pointer to void -- and returns a float.

val returning : 'a typ -> 'a fn

Give the return type of a C function. Note that returning is intended to be used together with (@->); see the documentation for (@->) for an example.

type 'a static_funptr = 'a Ctypes_static.static_funptr

Function pointer types

The type of values representing C function pointer types.

val static_funptr : 'a fn -> 'a Ctypes_static.static_funptr typ

Construct a function pointer type from an existing function type (called the reference type).

val const : 'a typ -> 'a typ
type 'a const
val constant : string -> 'a typ -> 'a const

constant name typ retrieves the value of the compile-time constant name of type typ. It can be used to retrieve enum constants, #defined values and other integer constant expressions.

The type typ must be either an integer type such as bool, char, int, uint8, etc., or a view (or perhaps multiple views) where the underlying type is an integer type.

When the value of the constant cannot be represented in the type there will typically be a diagnostic from either the C compiler or the OCaml compiler. For example, gcc will say

warning: overflow in implicit constant conversion

val enum : + string -> + ?typedef:bool -> + ?unexpected:(int64 -> 'a) -> + ('a * int64 const) list -> + 'a typ

enum name ?unexpected alist builds a type representation for the enum named name. The size and alignment are retrieved so that the resulting type can be used everywhere an integer type can be used: as an array element or struct member, as an argument or return value, etc.

The value alist is an association list of OCaml values and values retrieved by the constant function. For example, to expose the enum

enum letters { A, B, C = 10, D };

you might first retrieve the values of the enumeration constants:

let a = constant "A" int64_t
+and b = constant "B" int64_t
+and c = constant "C" int64_t
+and d = constant "D" int64_t

and then build the enumeration type

let letters = enum "letters" [
+   `A, a;
+   `B, b;
+   `C, c;
+   `D, d;
+] ~unexpected:(fun i -> `E i)

The unexpected function specifies the value to return in the case that some unexpected value is encountered -- for example, if a function with the return type 'enum letters' actually returns the value -1.

The optional flag typedef specifies whether the first argument, name, indicates an tag or an alias. If typedef is false (the default) then name is treated as an enumeration tag:

enum letters { ... }

If typedef is true then name is instead treated as an alias:

typedef enum { ... } letters

diff --git a/findlib-1/quickjs/bindings/Bindings/Type_description/Types/index.html b/findlib-1/quickjs/bindings/Bindings/Type_description/Types/index.html new file mode 100644 index 000000000..f384b5cfc --- /dev/null +++ b/findlib-1/quickjs/bindings/Bindings/Type_description/Types/index.html @@ -0,0 +1,2 @@ + +Types (docs.findlib-1.quickjs.bindings.Bindings.Type_description.Types)

Module Type_description.Types

Parameters

module T : Ctypes.TYPE

Signature

diff --git a/findlib-1/quickjs/bindings/Bindings/Type_description/index.html b/findlib-1/quickjs/bindings/Bindings/Type_description/index.html new file mode 100644 index 000000000..d078c8177 --- /dev/null +++ b/findlib-1/quickjs/bindings/Bindings/Type_description/index.html @@ -0,0 +1,2 @@ + +Type_description (docs.findlib-1.quickjs.bindings.Bindings.Type_description)

Module Bindings.Type_description

module Types (T : Ctypes.TYPE) : sig ... end
diff --git a/findlib-1/quickjs/bindings/Bindings/Types_generated/index.html b/findlib-1/quickjs/bindings/Bindings/Types_generated/index.html new file mode 100644 index 000000000..35bdea4d9 --- /dev/null +++ b/findlib-1/quickjs/bindings/Bindings/Types_generated/index.html @@ -0,0 +1,2 @@ + +Types_generated (docs.findlib-1.quickjs.bindings.Bindings.Types_generated)

Module Bindings.Types_generated

include sig ... end
diff --git a/findlib-1/quickjs/bindings/Bindings/index.html b/findlib-1/quickjs/bindings/Bindings/index.html new file mode 100644 index 000000000..e770a500c --- /dev/null +++ b/findlib-1/quickjs/bindings/Bindings/index.html @@ -0,0 +1,2 @@ + +Bindings (docs.findlib-1.quickjs.bindings.Bindings)

Module Bindings

module C : sig ... end
module Function_description : sig ... end
module Type_description : sig ... end
module Types_generated : sig ... end
diff --git a/findlib-1/quickjs/bindings/index.html b/findlib-1/quickjs/bindings/index.html new file mode 100644 index 000000000..2eb00f387 --- /dev/null +++ b/findlib-1/quickjs/bindings/index.html @@ -0,0 +1,2 @@ + +bindings (docs.findlib-1.quickjs.bindings)

Package quickjs.bindings

Library quickjs.bindings

The entry point of this library is the module: Bindings.

diff --git a/findlib-1/quickjs/index.html b/findlib-1/quickjs/index.html new file mode 100644 index 000000000..68e474c39 --- /dev/null +++ b/findlib-1/quickjs/index.html @@ -0,0 +1,2 @@ + +quickjs (docs.findlib-1.quickjs)

Package quickjs

Sub-indexes

Library quickjs

The entry point of this library is the module: Quickjs.

Library quickjs.bindings

The entry point of this library is the module: Bindings.

diff --git a/findlib-1/reason-react/React/Children/index.html b/findlib-1/reason-react/React/Children/index.html new file mode 100644 index 000000000..6fbe69d60 --- /dev/null +++ b/findlib-1/reason-react/React/Children/index.html @@ -0,0 +1,2 @@ + +Children (docs.findlib-1.reason-react.React.Children)

Module React.Children

val map : element -> (element -> element) -> element
val mapWithIndex : element -> (element -> int -> element) -> element
val forEach : element -> (element -> unit) -> unit
val forEachWithIndex : element -> (element -> int -> unit) -> unit
val count : element -> int
val only : element -> element
val toArray : element -> element array
diff --git a/findlib-1/reason-react/React/Context/index.html b/findlib-1/reason-react/React/Context/index.html new file mode 100644 index 000000000..7d420dec8 --- /dev/null +++ b/findlib-1/reason-react/React/Context/index.html @@ -0,0 +1,8 @@ + +Context (docs.findlib-1.reason-react.React.Context)

Module React.Context

type 'props t
val makeProps : + value:'props -> + children:element -> + unit -> + < value : 'props ; children : element > Js.t
val provider : + 'props t -> + < value : 'props ; children : element > Js.t component
diff --git a/findlib-1/reason-react/React/Event/Animation/index.html b/findlib-1/reason-react/React/Event/Animation/index.html new file mode 100644 index 000000000..c4cab6f22 --- /dev/null +++ b/findlib-1/reason-react/React/Event/Animation/index.html @@ -0,0 +1,2 @@ + +Animation (docs.findlib-1.reason-react.React.Event.Animation)

Module Event.Animation

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < .. > Js.t
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < .. > Js.t
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < .. > Js.t
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val animationName : t -> string
val pseudoElement : t -> string
val elapsedTime : t -> float
diff --git a/findlib-1/reason-react/React/Event/Clipboard/index.html b/findlib-1/reason-react/React/Event/Clipboard/index.html new file mode 100644 index 000000000..c101bc0a1 --- /dev/null +++ b/findlib-1/reason-react/React/Event/Clipboard/index.html @@ -0,0 +1,2 @@ + +Clipboard (docs.findlib-1.reason-react.React.Event.Clipboard)

Module Event.Clipboard

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < .. > Js.t
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < .. > Js.t
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < .. > Js.t
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val clipboardData : t -> < .. > Js.t
diff --git a/findlib-1/reason-react/React/Event/Composition/index.html b/findlib-1/reason-react/React/Event/Composition/index.html new file mode 100644 index 000000000..25ba44a90 --- /dev/null +++ b/findlib-1/reason-react/React/Event/Composition/index.html @@ -0,0 +1,2 @@ + +Composition (docs.findlib-1.reason-react.React.Event.Composition)

Module Event.Composition

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < .. > Js.t
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < .. > Js.t
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < .. > Js.t
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val data : t -> string
diff --git a/findlib-1/reason-react/React/Event/Drag/index.html b/findlib-1/reason-react/React/Event/Drag/index.html new file mode 100644 index 000000000..5d7615c43 --- /dev/null +++ b/findlib-1/reason-react/React/Event/Drag/index.html @@ -0,0 +1,2 @@ + +Drag (docs.findlib-1.reason-react.React.Event.Drag)

Module Event.Drag

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < .. > Js.t
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < .. > Js.t
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < .. > Js.t
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val altKey : t -> bool
val button : t -> int
val buttons : t -> int
val clientX : t -> int
val clientY : t -> int
val ctrlKey : t -> bool
val getModifierState : t -> string -> bool
val metaKey : t -> bool
val movementX : t -> int
val movementY : t -> int
val pageX : t -> int
val pageY : t -> int
val relatedTarget : t -> < .. > Js.t option
val screenX : t -> int
val screenY : t -> int
val shiftKey : t -> bool
val dataTransfer : t -> < .. > Js.t
diff --git a/findlib-1/reason-react/React/Event/Focus/index.html b/findlib-1/reason-react/React/Event/Focus/index.html new file mode 100644 index 000000000..4294106cc --- /dev/null +++ b/findlib-1/reason-react/React/Event/Focus/index.html @@ -0,0 +1,2 @@ + +Focus (docs.findlib-1.reason-react.React.Event.Focus)

Module Event.Focus

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < .. > Js.t
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < .. > Js.t
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < .. > Js.t
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val relatedTarget : t -> < .. > Js.t option
diff --git a/findlib-1/reason-react/React/Event/Form/index.html b/findlib-1/reason-react/React/Event/Form/index.html new file mode 100644 index 000000000..9892f0bd3 --- /dev/null +++ b/findlib-1/reason-react/React/Event/Form/index.html @@ -0,0 +1,2 @@ + +Form (docs.findlib-1.reason-react.React.Event.Form)

Module Event.Form

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < .. > Js.t
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < .. > Js.t
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < .. > Js.t
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
diff --git a/findlib-1/reason-react/React/Event/Image/index.html b/findlib-1/reason-react/React/Event/Image/index.html new file mode 100644 index 000000000..2878683f8 --- /dev/null +++ b/findlib-1/reason-react/React/Event/Image/index.html @@ -0,0 +1,2 @@ + +Image (docs.findlib-1.reason-react.React.Event.Image)

Module Event.Image

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < .. > Js.t
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < .. > Js.t
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < .. > Js.t
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
diff --git a/findlib-1/reason-react/React/Event/Keyboard/index.html b/findlib-1/reason-react/React/Event/Keyboard/index.html new file mode 100644 index 000000000..b8f6026e9 --- /dev/null +++ b/findlib-1/reason-react/React/Event/Keyboard/index.html @@ -0,0 +1,2 @@ + +Keyboard (docs.findlib-1.reason-react.React.Event.Keyboard)

Module Event.Keyboard

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < .. > Js.t
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < .. > Js.t
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < .. > Js.t
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val altKey : t -> bool
val charCode : t -> int
val ctrlKey : t -> bool
val getModifierState : t -> string -> bool
val key : t -> string
val keyCode : t -> int
val locale : t -> string
val location : t -> int
val metaKey : t -> bool
val repeat : t -> bool
val shiftKey : t -> bool
val which : t -> int
diff --git a/findlib-1/reason-react/React/Event/Media/index.html b/findlib-1/reason-react/React/Event/Media/index.html new file mode 100644 index 000000000..d3797bd61 --- /dev/null +++ b/findlib-1/reason-react/React/Event/Media/index.html @@ -0,0 +1,2 @@ + +Media (docs.findlib-1.reason-react.React.Event.Media)

Module Event.Media

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < .. > Js.t
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < .. > Js.t
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < .. > Js.t
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
diff --git a/findlib-1/reason-react/React/Event/Mouse/index.html b/findlib-1/reason-react/React/Event/Mouse/index.html new file mode 100644 index 000000000..7d7d5d6e8 --- /dev/null +++ b/findlib-1/reason-react/React/Event/Mouse/index.html @@ -0,0 +1,2 @@ + +Mouse (docs.findlib-1.reason-react.React.Event.Mouse)

Module Event.Mouse

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < .. > Js.t
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < .. > Js.t
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < .. > Js.t
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val altKey : t -> bool
val button : t -> int
val buttons : t -> int
val clientX : t -> int
val clientY : t -> int
val ctrlKey : t -> bool
val getModifierState : t -> string -> bool
val metaKey : t -> bool
val movementX : t -> int
val movementY : t -> int
val pageX : t -> int
val pageY : t -> int
val relatedTarget : t -> < .. > Js.t option
val screenX : t -> int
val screenY : t -> int
val shiftKey : t -> bool
diff --git a/findlib-1/reason-react/React/Event/Pointer/index.html b/findlib-1/reason-react/React/Event/Pointer/index.html new file mode 100644 index 000000000..9eb0cc47b --- /dev/null +++ b/findlib-1/reason-react/React/Event/Pointer/index.html @@ -0,0 +1,2 @@ + +Pointer (docs.findlib-1.reason-react.React.Event.Pointer)

Module Event.Pointer

type tag
type t = tag synthetic
val type_ : t -> string
val target : t -> < .. > Js.t
val currentTarget : t -> < .. > Js.t
val eventPhase : t -> int
val stopPropagation : t -> unit
val bubbles : t -> bool
val cancelable : t -> bool
val preventDefault : t -> unit
val defaultPrevented : t -> bool
val isTrusted : t -> bool
val timeStamp : t -> float
val nativeEvent : t -> < .. > Js.t
val isDefaultPrevented : t -> bool
val isPropagationStopped : t -> bool
val persist : t -> unit
val detail : t -> int
val view : t -> Dom.window
val screenX : t -> int
val screenY : t -> int
val clientX : t -> int
val clientY : t -> int
val pageX : t -> int
val pageY : t -> int
val movementX : t -> int
val movementY : t -> int
val ctrlKey : t -> bool
val shiftKey : t -> bool
val altKey : t -> bool
val metaKey : t -> bool
val getModifierState : t -> string -> bool
val button : t -> int
val buttons : t -> int
val relatedTarget : t -> < .. > Js.t option
val pointerId : t -> Dom.eventPointerId
val width : t -> float
val height : t -> float
val pressure : t -> float
val tangentialPressure : t -> float
val tiltX : t -> int
val tiltY : t -> int
val twist : t -> int
val pointerType : t -> string
val isPrimary : t -> bool
diff --git a/findlib-1/reason-react/React/Event/Selection/index.html b/findlib-1/reason-react/React/Event/Selection/index.html new file mode 100644 index 000000000..2fd90704e --- /dev/null +++ b/findlib-1/reason-react/React/Event/Selection/index.html @@ -0,0 +1,2 @@ + +Selection (docs.findlib-1.reason-react.React.Event.Selection)

Module Event.Selection

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < .. > Js.t
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < .. > Js.t
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < .. > Js.t
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
diff --git a/findlib-1/reason-react/React/Event/Synthetic/index.html b/findlib-1/reason-react/React/Event/Synthetic/index.html new file mode 100644 index 000000000..e301ccb41 --- /dev/null +++ b/findlib-1/reason-react/React/Event/Synthetic/index.html @@ -0,0 +1,2 @@ + +Synthetic (docs.findlib-1.reason-react.React.Event.Synthetic)

Module Event.Synthetic

type tag
type t = tag synthetic
val bubbles : 'a synthetic -> bool
val cancelable : 'a synthetic -> bool
val currentTarget : 'a synthetic -> < .. > Js.t
val defaultPrevented : 'a synthetic -> bool
val eventPhase : 'a synthetic -> int
val isTrusted : 'a synthetic -> bool
val nativeEvent : 'a synthetic -> < .. > Js.t
val preventDefault : 'a synthetic -> unit
val isDefaultPrevented : 'a synthetic -> bool
val stopPropagation : 'a synthetic -> unit
val isPropagationStopped : 'a synthetic -> bool
val target : 'a synthetic -> < .. > Js.t
val timeStamp : 'a synthetic -> float
val type_ : 'a synthetic -> string
val persist : 'a synthetic -> unit
diff --git a/findlib-1/reason-react/React/Event/Touch/index.html b/findlib-1/reason-react/React/Event/Touch/index.html new file mode 100644 index 000000000..5a328a996 --- /dev/null +++ b/findlib-1/reason-react/React/Event/Touch/index.html @@ -0,0 +1,2 @@ + +Touch (docs.findlib-1.reason-react.React.Event.Touch)

Module Event.Touch

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < .. > Js.t
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < .. > Js.t
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < .. > Js.t
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val altKey : t -> bool
val changedTouches : t -> < .. > Js.t
val ctrlKey : t -> bool
val getModifierState : t -> string -> bool
val metaKey : t -> bool
val shiftKey : t -> bool
val targetTouches : t -> < .. > Js.t
val touches : t -> < .. > Js.t
diff --git a/findlib-1/reason-react/React/Event/Transition/index.html b/findlib-1/reason-react/React/Event/Transition/index.html new file mode 100644 index 000000000..261d978cc --- /dev/null +++ b/findlib-1/reason-react/React/Event/Transition/index.html @@ -0,0 +1,2 @@ + +Transition (docs.findlib-1.reason-react.React.Event.Transition)

Module Event.Transition

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < .. > Js.t
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < .. > Js.t
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < .. > Js.t
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val propertyName : t -> string
val pseudoElement : t -> string
val elapsedTime : t -> float
diff --git a/findlib-1/reason-react/React/Event/UI/index.html b/findlib-1/reason-react/React/Event/UI/index.html new file mode 100644 index 000000000..4900b8eb0 --- /dev/null +++ b/findlib-1/reason-react/React/Event/UI/index.html @@ -0,0 +1,2 @@ + +UI (docs.findlib-1.reason-react.React.Event.UI)

Module Event.UI

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < .. > Js.t
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < .. > Js.t
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < .. > Js.t
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val detail : t -> int
val view : t -> Dom.window
diff --git a/findlib-1/reason-react/React/Event/Wheel/index.html b/findlib-1/reason-react/React/Event/Wheel/index.html new file mode 100644 index 000000000..a88880201 --- /dev/null +++ b/findlib-1/reason-react/React/Event/Wheel/index.html @@ -0,0 +1,2 @@ + +Wheel (docs.findlib-1.reason-react.React.Event.Wheel)

Module Event.Wheel

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < .. > Js.t
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < .. > Js.t
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < .. > Js.t
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val deltaMode : t -> int
val deltaX : t -> float
val deltaY : t -> float
val deltaZ : t -> float
diff --git a/findlib-1/reason-react/React/Event/index.html b/findlib-1/reason-react/React/Event/index.html new file mode 100644 index 000000000..baf1aab8d --- /dev/null +++ b/findlib-1/reason-react/React/Event/index.html @@ -0,0 +1,2 @@ + +Event (docs.findlib-1.reason-react.React.Event)

Module React.Event

type 'a synthetic
module Synthetic : sig ... end
val toSyntheticEvent : 'a synthetic -> Synthetic.t
module Clipboard : sig ... end
module Composition : sig ... end
module Drag : sig ... end
module Keyboard : sig ... end
module Focus : sig ... end
module Form : sig ... end
module Mouse : sig ... end
module Pointer : sig ... end
module Selection : sig ... end
module Touch : sig ... end
module UI : sig ... end
module Wheel : sig ... end
module Media : sig ... end
module Image : sig ... end
module Animation : sig ... end
module Transition : sig ... end
diff --git a/findlib-1/reason-react/React/Experimental/index.html b/findlib-1/reason-react/React/Experimental/index.html new file mode 100644 index 000000000..775c2da4d --- /dev/null +++ b/findlib-1/reason-react/React/Experimental/index.html @@ -0,0 +1,2 @@ + +Experimental (docs.findlib-1.reason-react.React.Experimental)

Module React.Experimental

val use : 'a Js.Promise.t -> 'a
diff --git a/findlib-1/reason-react/React/Fragment/index.html b/findlib-1/reason-react/React/Fragment/index.html new file mode 100644 index 000000000..ea589691f --- /dev/null +++ b/findlib-1/reason-react/React/Fragment/index.html @@ -0,0 +1,2 @@ + +Fragment (docs.findlib-1.reason-react.React.Fragment)

Module React.Fragment

val makeProps : children:element -> unit -> < children : element > Js.t
val make : < children : element > Js.t component
diff --git a/findlib-1/reason-react/React/Ref/index.html b/findlib-1/reason-react/React/Ref/index.html new file mode 100644 index 000000000..e3ba5c787 --- /dev/null +++ b/findlib-1/reason-react/React/Ref/index.html @@ -0,0 +1,2 @@ + +Ref (docs.findlib-1.reason-react.React.Ref)

Module React.Ref

type 'value t = 'value ref
  • deprecated Please use the type React.ref instead
val current : 'value ref -> 'value
  • deprecated Please directly read from ref.current instead
val setCurrent : 'value ref -> 'value -> unit
  • deprecated Please directly assign to ref.current instead
diff --git a/findlib-1/reason-react/React/StrictMode/index.html b/findlib-1/reason-react/React/StrictMode/index.html new file mode 100644 index 000000000..6995bad1f --- /dev/null +++ b/findlib-1/reason-react/React/StrictMode/index.html @@ -0,0 +1,2 @@ + +StrictMode (docs.findlib-1.reason-react.React.StrictMode)

Module React.StrictMode

val makeProps : children:element -> unit -> < children : element > Js.t
val make : < children : element > Js.t component
diff --git a/findlib-1/reason-react/React/Suspense/index.html b/findlib-1/reason-react/React/Suspense/index.html new file mode 100644 index 000000000..a8efd3e1d --- /dev/null +++ b/findlib-1/reason-react/React/Suspense/index.html @@ -0,0 +1,7 @@ + +Suspense (docs.findlib-1.reason-react.React.Suspense)

Module React.Suspense

val makeProps : + ?children:element -> + ?fallback:element -> + unit -> + < children : element option ; fallback : element option > Js.t
val make : + < children : element option ; fallback : element option > Js.t component
diff --git a/findlib-1/reason-react/React/Uncurried/index.html b/findlib-1/reason-react/React/Uncurried/index.html new file mode 100644 index 000000000..2f2fd8c4f --- /dev/null +++ b/findlib-1/reason-react/React/Uncurried/index.html @@ -0,0 +1,32 @@ + +Uncurried (docs.findlib-1.reason-react.React.Uncurried)

Module React.Uncurried

val useState : + (unit -> 'state) -> + 'state * (('state -> 'state) -> unit) Js.Fn.arity1
val useReducer : + ('state -> 'action -> 'state) -> + 'state -> + 'state * ('action -> unit) Js.Fn.arity1
val useReducerWithMapState : + ('state -> 'action -> 'state) -> + 'initialState -> + ('initialState -> 'state) -> + 'state * ('action -> unit) Js.Fn.arity1
type ('input, 'output) callback = ('input -> 'output) Js.Fn.arity1
val useCallback : ('input -> 'output) -> ('input, 'output) callback
val useCallback0 : ('input -> 'output) -> ('input, 'output) callback
val useCallback1 : + ('input -> 'output) -> + 'a array -> + ('input, 'output) callback
val useCallback2 : + ('input -> 'output) -> + ('a * 'b) -> + ('input, 'output) callback
val useCallback3 : + ('input -> 'output) -> + ('a * 'b * 'c) -> + ('input, 'output) callback
val useCallback4 : + ('input -> 'output) -> + ('a * 'b * 'c * 'd) -> + ('input, 'output) callback
val useCallback5 : + ('input -> 'output) -> + ('a * 'b * 'c * 'd * 'e) -> + ('input, 'output) callback
val useCallback6 : + ('input -> 'output) -> + ('a * 'b * 'c * 'd * 'e * 'f) -> + ('input, 'output) callback
val useCallback7 : + ('input -> 'output) -> + ('a * 'b * 'c * 'd * 'e * 'f * 'g) -> + ('input, 'output) callback
diff --git a/findlib-1/reason-react/React/index.html b/findlib-1/reason-react/React/index.html new file mode 100644 index 000000000..1f4f02afc --- /dev/null +++ b/findlib-1/reason-react/React/index.html @@ -0,0 +1,92 @@ + +React (docs.findlib-1.reason-react.React)

Module React

type element
type ('props, 'return) componentLike = 'props -> 'return
type 'props component = ('props, element) componentLike
val null : element
val float : float -> element
val int : int -> element
val string : string -> element
val array : element array -> element
val component : ('props, element) componentLike -> 'props component
val createElement : 'props component -> 'props -> element
val isValidElement : element -> bool
val cloneElement : element -> 'props -> element
val createElementVariadic : + 'props component -> + 'props -> + element array -> + element
val jsxKeyed : 'props component -> 'props -> ?key:string -> unit -> element
val jsx : 'props component -> 'props -> element
val jsxs : 'props component -> 'props -> element
val jsxsKeyed : 'props component -> 'props -> ?key:string -> unit -> element
val jsxFragment : 'element
type 'value ref = {
  1. mutable current : 'value;
}
module Ref : sig ... end
val createRef : unit -> 'a Js.nullable ref
module Children : sig ... end
module Context : sig ... end
val createContext : 'a -> 'a Context.t
val forwardRef : + ('props -> 'a ref Js.Nullable.t -> element) -> + 'props component
val memo : 'props component -> 'props component
val memoCustomCompareProps : + 'props component -> + ('props -> 'props -> bool) -> + 'props component
module Fragment : sig ... end
module StrictMode : sig ... end
module Suspense : sig ... end
val useState : (unit -> 'state) -> 'state * (('state -> 'state) -> unit)
val useReducer : + ('state -> 'action -> 'state) -> + 'state -> + 'state * ('action -> unit)
val useReducerWithMapState : + ('state -> 'action -> 'state) -> + 'initialState -> + ('initialState -> 'state) -> + 'state * ('action -> unit)
type ('input, 'output) callback = 'input -> 'output
val useSyncExternalStore : + subscribe:((unit -> unit) -> (unit, unit) callback) -> + getSnapshot:(unit -> 'snapshot) -> + 'snapshot
val useSyncExternalStoreWithServer : + subscribe:((unit -> unit) -> (unit, unit) callback) -> + getSnapshot:(unit -> 'snapshot) -> + getServerSnapshot:(unit -> 'snapshot) -> + 'snapshot
val useEffect : (unit -> (unit -> unit) option) -> unit
val useEffect0 : (unit -> (unit -> unit) option) -> unit
val useEffect1 : (unit -> (unit -> unit) option) -> 'a array -> unit
val useEffect2 : (unit -> (unit -> unit) option) -> ('a * 'b) -> unit
val useEffect3 : (unit -> (unit -> unit) option) -> ('a * 'b * 'c) -> unit
val useEffect4 : (unit -> (unit -> unit) option) -> ('a * 'b * 'c * 'd) -> unit
val useEffect5 : + (unit -> (unit -> unit) option) -> + ('a * 'b * 'c * 'd * 'e) -> + unit
val useEffect6 : + (unit -> (unit -> unit) option) -> + ('a * 'b * 'c * 'd * 'e * 'f) -> + unit
val useEffect7 : + (unit -> (unit -> unit) option) -> + ('a * 'b * 'c * 'd * 'e * 'f * 'g) -> + unit
val useInsertionEffect : (unit -> (unit -> unit) option) -> unit
val useInsertionEffect0 : (unit -> (unit -> unit) option) -> unit
val useInsertionEffect1 : (unit -> (unit -> unit) option) -> 'a array -> unit
val useInsertionEffect2 : (unit -> (unit -> unit) option) -> ('a * 'b) -> unit
val useInsertionEffect3 : + (unit -> (unit -> unit) option) -> + ('a * 'b * 'c) -> + unit
val useInsertionEffect4 : + (unit -> (unit -> unit) option) -> + ('a * 'b * 'c * 'd) -> + unit
val useInsertionEffect5 : + (unit -> (unit -> unit) option) -> + ('a * 'b * 'c * 'd * 'e) -> + unit
val useInsertionEffect6 : + (unit -> (unit -> unit) option) -> + ('a * 'b * 'c * 'd * 'e * 'f) -> + unit
val useInsertionEffect7 : + (unit -> (unit -> unit) option) -> + ('a * 'b * 'c * 'd * 'e * 'f * 'g) -> + unit
val useLayoutEffect : (unit -> (unit -> unit) option) -> unit
val useLayoutEffect0 : (unit -> (unit -> unit) option) -> unit
val useLayoutEffect1 : (unit -> (unit -> unit) option) -> 'a array -> unit
val useLayoutEffect2 : (unit -> (unit -> unit) option) -> ('a * 'b) -> unit
val useLayoutEffect3 : + (unit -> (unit -> unit) option) -> + ('a * 'b * 'c) -> + unit
val useLayoutEffect4 : + (unit -> (unit -> unit) option) -> + ('a * 'b * 'c * 'd) -> + unit
val useLayoutEffect5 : + (unit -> (unit -> unit) option) -> + ('a * 'b * 'c * 'd * 'e) -> + unit
val useLayoutEffect6 : + (unit -> (unit -> unit) option) -> + ('a * 'b * 'c * 'd * 'e * 'f) -> + unit
val useLayoutEffect7 : + (unit -> (unit -> unit) option) -> + ('a * 'b * 'c * 'd * 'e * 'f * 'g) -> + unit
val useMemo : (unit -> 'any) -> 'any
val useMemo0 : (unit -> 'any) -> 'any
val useMemo1 : (unit -> 'any) -> 'a array -> 'any
val useMemo2 : (unit -> 'any) -> ('a * 'b) -> 'any
val useMemo3 : (unit -> 'any) -> ('a * 'b * 'c) -> 'any
val useMemo4 : (unit -> 'any) -> ('a * 'b * 'c * 'd) -> 'any
val useMemo5 : (unit -> 'any) -> ('a * 'b * 'c * 'd * 'e) -> 'any
val useMemo6 : (unit -> 'any) -> ('a * 'b * 'c * 'd * 'e * 'f) -> 'any
val useMemo7 : (unit -> 'any) -> ('a * 'b * 'c * 'd * 'e * 'f * 'g) -> 'any
val useCallback : 'fn -> 'fn
val useCallback0 : 'fn -> 'fn
val useCallback1 : 'fn -> 'a array -> 'fn
val useCallback2 : 'fn -> ('a * 'b) -> 'fn
val useCallback3 : 'fn -> ('a * 'b * 'c) -> 'fn
val useCallback4 : 'fn -> ('a * 'b * 'c * 'd) -> 'fn
val useCallback5 : 'fn -> ('a * 'b * 'c * 'd * 'e) -> 'fn
val useCallback6 : 'fn -> ('a * 'b * 'c * 'd * 'e * 'f) -> 'fn
val useCallback7 : 'fn -> ('a * 'b * 'c * 'd * 'e * 'f * 'g) -> 'fn
val useContext : 'any Context.t -> 'any
val useRef : 'value -> 'value ref
val useId : unit -> string
val useDeferredValue : 'a -> 'a
val useImperativeHandle0 : 'value ref Js.Nullable.t -> (unit -> 'value) -> unit
val useImperativeHandle1 : + 'value ref Js.Nullable.t -> + (unit -> 'value) -> + 'a array -> + unit
val useImperativeHandle2 : + 'value ref Js.Nullable.t -> + (unit -> 'value) -> + ('a * 'b) -> + unit
val useImperativeHandle3 : + 'value ref Js.Nullable.t -> + (unit -> 'value) -> + ('a * 'b * 'c) -> + unit
val useImperativeHandle4 : + 'value ref Js.Nullable.t -> + (unit -> 'value) -> + ('a * 'b * 'c * 'd) -> + unit
val useImperativeHandle5 : + 'value ref Js.Nullable.t -> + (unit -> 'value) -> + ('a * 'b * 'c * 'd * 'e) -> + unit
val useImperativeHandle6 : + 'value ref Js.Nullable.t -> + (unit -> 'value) -> + ('a * 'b * 'c * 'd * 'e * 'f) -> + unit
val useImperativeHandle7 : + 'value ref Js.Nullable.t -> + (unit -> 'value) -> + ('a * 'b * 'c * 'd * 'e * 'f * 'g) -> + unit
module Uncurried : sig ... end
val startTransition : (unit -> unit) -> unit
val useTransition : unit -> bool * ((unit, unit) callback, unit) callback
module Experimental : sig ... end
val setDisplayName : 'props component -> string -> unit
val displayName : 'props component -> string option
val useDebugValue : 'value -> ?format:('value -> string) -> unit -> unit
module Event : sig ... end
diff --git a/findlib-1/reason-react/ReactDOM/Client/index.html b/findlib-1/reason-react/ReactDOM/Client/index.html new file mode 100644 index 000000000..07887c758 --- /dev/null +++ b/findlib-1/reason-react/ReactDOM/Client/index.html @@ -0,0 +1,2 @@ + +Client (docs.findlib-1.reason-react.ReactDOM.Client)

Module ReactDOM.Client

type root
val render : root -> React.element -> unit
val unmount : root -> unit -> unit
val createRoot : Dom.element -> root
val hydrateRoot : Dom.element -> React.element -> root
diff --git a/findlib-1/reason-react/ReactDOM/Ref/index.html b/findlib-1/reason-react/ReactDOM/Ref/index.html new file mode 100644 index 000000000..c139e438b --- /dev/null +++ b/findlib-1/reason-react/ReactDOM/Ref/index.html @@ -0,0 +1,2 @@ + +Ref (docs.findlib-1.reason-react.ReactDOM.Ref)

Module ReactDOM.Ref

type t = domRef
type currentDomRef = Dom.element Js.nullable React.ref
type callbackDomRef = Dom.element Js.nullable -> unit
val domRef : currentDomRef -> domRef
val callbackDomRef : callbackDomRef -> domRef
diff --git a/findlib-1/reason-react/ReactDOM/Style/index.html b/findlib-1/reason-react/ReactDOM/Style/index.html new file mode 100644 index 000000000..0ddc65656 --- /dev/null +++ b/findlib-1/reason-react/ReactDOM/Style/index.html @@ -0,0 +1,354 @@ + +Style (docs.findlib-1.reason-react.ReactDOM.Style)

Module ReactDOM.Style

type t
val make : + ?azimuth:string -> + ?background:string -> + ?backgroundAttachment:string -> + ?backgroundColor:string -> + ?backgroundImage:string -> + ?backgroundPosition:string -> + ?backgroundRepeat:string -> + ?border:string -> + ?borderCollapse:string -> + ?borderColor:string -> + ?borderSpacing:string -> + ?borderStyle:string -> + ?borderTop:string -> + ?borderRight:string -> + ?borderBottom:string -> + ?borderLeft:string -> + ?borderTopColor:string -> + ?borderRightColor:string -> + ?borderBottomColor:string -> + ?borderLeftColor:string -> + ?borderTopStyle:string -> + ?borderRightStyle:string -> + ?borderBottomStyle:string -> + ?borderLeftStyle:string -> + ?borderTopWidth:string -> + ?borderRightWidth:string -> + ?borderBottomWidth:string -> + ?borderLeftWidth:string -> + ?borderWidth:string -> + ?bottom:string -> + ?captionSide:string -> + ?clear:string -> + ?clip:string -> + ?color:string -> + ?content:string -> + ?counterIncrement:string -> + ?counterReset:string -> + ?cue:string -> + ?cueAfter:string -> + ?cueBefore:string -> + ?cursor:string -> + ?direction:string -> + ?display:string -> + ?elevation:string -> + ?emptyCells:string -> + ?float:string -> + ?font:string -> + ?fontFamily:string -> + ?fontSize:string -> + ?fontSizeAdjust:string -> + ?fontStretch:string -> + ?fontStyle:string -> + ?fontVariant:string -> + ?fontWeight:string -> + ?height:string -> + ?left:string -> + ?letterSpacing:string -> + ?lineHeight:string -> + ?listStyle:string -> + ?listStyleImage:string -> + ?listStylePosition:string -> + ?listStyleType:string -> + ?margin:string -> + ?marginTop:string -> + ?marginRight:string -> + ?marginBottom:string -> + ?marginLeft:string -> + ?markerOffset:string -> + ?marks:string -> + ?maxHeight:string -> + ?maxWidth:string -> + ?minHeight:string -> + ?minWidth:string -> + ?orphans:string -> + ?outline:string -> + ?outlineColor:string -> + ?outlineStyle:string -> + ?outlineWidth:string -> + ?overflow:string -> + ?overflowX:string -> + ?overflowY:string -> + ?padding:string -> + ?paddingTop:string -> + ?paddingRight:string -> + ?paddingBottom:string -> + ?paddingLeft:string -> + ?page:string -> + ?pageBreakAfter:string -> + ?pageBreakBefore:string -> + ?pageBreakInside:string -> + ?pause:string -> + ?pauseAfter:string -> + ?pauseBefore:string -> + ?pitch:string -> + ?pitchRange:string -> + ?playDuring:string -> + ?position:string -> + ?quotes:string -> + ?richness:string -> + ?right:string -> + ?size:string -> + ?speak:string -> + ?speakHeader:string -> + ?speakNumeral:string -> + ?speakPunctuation:string -> + ?speechRate:string -> + ?stress:string -> + ?tableLayout:string -> + ?textAlign:string -> + ?textDecoration:string -> + ?textIndent:string -> + ?textShadow:string -> + ?textTransform:string -> + ?top:string -> + ?unicodeBidi:string -> + ?verticalAlign:string -> + ?visibility:string -> + ?voiceFamily:string -> + ?volume:string -> + ?whiteSpace:string -> + ?widows:string -> + ?width:string -> + ?wordSpacing:string -> + ?zIndex:string -> + ?opacity:string -> + ?backgroundOrigin:string -> + ?backgroundSize:string -> + ?backgroundClip:string -> + ?borderRadius:string -> + ?borderTopLeftRadius:string -> + ?borderTopRightRadius:string -> + ?borderBottomLeftRadius:string -> + ?borderBottomRightRadius:string -> + ?borderImage:string -> + ?borderImageSource:string -> + ?borderImageSlice:string -> + ?borderImageWidth:string -> + ?borderImageOutset:string -> + ?borderImageRepeat:string -> + ?boxShadow:string -> + ?columns:string -> + ?columnCount:string -> + ?columnFill:string -> + ?columnGap:string -> + ?columnRule:string -> + ?columnRuleColor:string -> + ?columnRuleStyle:string -> + ?columnRuleWidth:string -> + ?columnSpan:string -> + ?columnWidth:string -> + ?breakAfter:string -> + ?breakBefore:string -> + ?breakInside:string -> + ?rest:string -> + ?restAfter:string -> + ?restBefore:string -> + ?speakAs:string -> + ?voiceBalance:string -> + ?voiceDuration:string -> + ?voicePitch:string -> + ?voiceRange:string -> + ?voiceRate:string -> + ?voiceStress:string -> + ?voiceVolume:string -> + ?objectFit:string -> + ?objectPosition:string -> + ?imageResolution:string -> + ?imageOrientation:string -> + ?alignContent:string -> + ?alignItems:string -> + ?alignSelf:string -> + ?flex:string -> + ?flexBasis:string -> + ?flexDirection:string -> + ?flexFlow:string -> + ?flexGrow:string -> + ?flexShrink:string -> + ?flexWrap:string -> + ?justifyContent:string -> + ?order:string -> + ?textDecorationColor:string -> + ?textDecorationLine:string -> + ?textDecorationSkip:string -> + ?textDecorationStyle:string -> + ?textEmphasis:string -> + ?textEmphasisColor:string -> + ?textEmphasisPosition:string -> + ?textEmphasisStyle:string -> + ?textUnderlinePosition:string -> + ?fontFeatureSettings:string -> + ?fontKerning:string -> + ?fontLanguageOverride:string -> + ?fontSynthesis:string -> + ?forntVariantAlternates:string -> + ?fontVariantCaps:string -> + ?fontVariantEastAsian:string -> + ?fontVariantLigatures:string -> + ?fontVariantNumeric:string -> + ?fontVariantPosition:string -> + ?all:string -> + ?glyphOrientationVertical:string -> + ?textCombineUpright:string -> + ?textOrientation:string -> + ?writingMode:string -> + ?shapeImageThreshold:string -> + ?shapeMargin:string -> + ?shapeOutside:string -> + ?clipPath:string -> + ?clipRule:string -> + ?mask:string -> + ?maskBorder:string -> + ?maskBorderMode:string -> + ?maskBorderOutset:string -> + ?maskBorderRepeat:string -> + ?maskBorderSlice:string -> + ?maskBorderSource:string -> + ?maskBorderWidth:string -> + ?maskClip:string -> + ?maskComposite:string -> + ?maskImage:string -> + ?maskMode:string -> + ?maskOrigin:string -> + ?maskPosition:string -> + ?maskRepeat:string -> + ?maskSize:string -> + ?maskType:string -> + ?backgroundBlendMode:string -> + ?isolation:string -> + ?mixBlendMode:string -> + ?boxDecorationBreak:string -> + ?boxSizing:string -> + ?caretColor:string -> + ?navDown:string -> + ?navLeft:string -> + ?navRight:string -> + ?navUp:string -> + ?outlineOffset:string -> + ?resize:string -> + ?textOverflow:string -> + ?grid:string -> + ?gridArea:string -> + ?gridAutoColumns:string -> + ?gridAutoFlow:string -> + ?gridAutoRows:string -> + ?gridColumn:string -> + ?gridColumnEnd:string -> + ?gridColumnGap:string -> + ?gridColumnStart:string -> + ?gridGap:string -> + ?gridRow:string -> + ?gridRowEnd:string -> + ?gridRowGap:string -> + ?gridRowStart:string -> + ?gridTemplate:string -> + ?gridTemplateAreas:string -> + ?gridTemplateColumns:string -> + ?gridTemplateRows:string -> + ?willChange:string -> + ?hangingPunctuation:string -> + ?hyphens:string -> + ?lineBreak:string -> + ?overflowWrap:string -> + ?tabSize:string -> + ?textAlignLast:string -> + ?textJustify:string -> + ?wordBreak:string -> + ?wordWrap:string -> + ?animation:string -> + ?animationDelay:string -> + ?animationDirection:string -> + ?animationDuration:string -> + ?animationFillMode:string -> + ?animationIterationCount:string -> + ?animationName:string -> + ?animationPlayState:string -> + ?animationTimingFunction:string -> + ?transition:string -> + ?transitionDelay:string -> + ?transitionDuration:string -> + ?transitionProperty:string -> + ?transitionTimingFunction:string -> + ?backfaceVisibility:string -> + ?perspective:string -> + ?perspectiveOrigin:string -> + ?transform:string -> + ?transformOrigin:string -> + ?transformStyle:string -> + ?justifyItems:string -> + ?justifySelf:string -> + ?placeContent:string -> + ?placeItems:string -> + ?placeSelf:string -> + ?appearance:string -> + ?caret:string -> + ?caretAnimation:string -> + ?caretShape:string -> + ?userSelect:string -> + ?maxLines:string -> + ?marqueeDirection:string -> + ?marqueeLoop:string -> + ?marqueeSpeed:string -> + ?marqueeStyle:string -> + ?overflowStyle:string -> + ?rotation:string -> + ?rotationPoint:string -> + ?alignmentBaseline:string -> + ?baselineShift:string -> + ?clip:string -> + ?clipPath:string -> + ?clipRule:string -> + ?colorInterpolation:string -> + ?colorInterpolationFilters:string -> + ?colorProfile:string -> + ?colorRendering:string -> + ?cursor:string -> + ?dominantBaseline:string -> + ?fill:string -> + ?fillOpacity:string -> + ?fillRule:string -> + ?filter:string -> + ?floodColor:string -> + ?floodOpacity:string -> + ?glyphOrientationHorizontal:string -> + ?glyphOrientationVertical:string -> + ?imageRendering:string -> + ?kerning:string -> + ?lightingColor:string -> + ?markerEnd:string -> + ?markerMid:string -> + ?markerStart:string -> + ?pointerEvents:string -> + ?shapeRendering:string -> + ?stopColor:string -> + ?stopOpacity:string -> + ?stroke:string -> + ?strokeDasharray:string -> + ?strokeDashoffset:string -> + ?strokeLinecap:string -> + ?strokeLinejoin:string -> + ?strokeMiterlimit:string -> + ?strokeOpacity:string -> + ?strokeWidth:string -> + ?textAnchor:string -> + ?textRendering:string -> + ?rubyAlign:string -> + ?rubyMerge:string -> + ?rubyPosition:string -> + ?gap:string -> + ?columnGap:string -> + ?rowGap:string -> + unit -> + t
val combine : t -> t -> t
val _dictToStyle : string Js.Dict.t -> t
val unsafeAddProp : t -> string -> string -> t
val unsafeAddStyle : t -> < .. > Js.t -> t
diff --git a/findlib-1/reason-react/ReactDOM/index.html b/findlib-1/reason-react/ReactDOM/index.html new file mode 100644 index 000000000..9a578522e --- /dev/null +++ b/findlib-1/reason-react/ReactDOM/index.html @@ -0,0 +1,523 @@ + +ReactDOM (docs.findlib-1.reason-react.ReactDOM)

Module ReactDOM

module Style : sig ... end
val querySelector : string -> Dom.element option
module Client : sig ... end
val render : React.element -> Dom.element -> unit
  • deprecated This function will be removed in the next release. Use ReactDOM.Client.createRoot and ReactDOM.Client.render instead.
val hydrate : React.element -> Dom.element -> unit
  • deprecated This function will be removed in the next release. Use ReactDOM.Client.hydrateRoot instead.
val createPortal : React.element -> Dom.element -> React.element
val unmountComponentAtNode : Dom.element -> unit
val flushSync : (unit -> unit) -> unit
val domElementToObj : Dom.element -> < .. > Js.t
type style = Style.t
type domRef
module Ref : sig ... end
type domProps = {
  1. key : string option;
  2. ref : domRef option;
  3. children : React.element option;
  4. ariaActivedescendant : string option;
  5. ariaAtomic : bool option;
  6. ariaAutocomplete : string option;
  7. ariaBusy : bool option;
  8. ariaChecked : string option;
  9. ariaColcount : int option;
  10. ariaColindex : int option;
  11. ariaColspan : int option;
  12. ariaControls : string option;
  13. ariaCurrent : string option;
  14. ariaDescribedby : string option;
  15. ariaDetails : string option;
  16. ariaDisabled : bool option;
  17. ariaErrormessage : string option;
  18. ariaExpanded : bool option;
  19. ariaFlowto : string option;
  20. ariaGrabbed : bool option;
  21. ariaHaspopup : string option;
  22. ariaHidden : bool option;
  23. ariaInvalid : string option;
  24. ariaKeyshortcuts : string option;
  25. ariaLabel : string option;
  26. ariaLabelledby : string option;
  27. ariaLevel : int option;
  28. ariaLive : string option;
  29. ariaModal : bool option;
  30. ariaMultiline : bool option;
  31. ariaMultiselectable : bool option;
  32. ariaOrientation : string option;
  33. ariaOwns : string option;
  34. ariaPlaceholder : string option;
  35. ariaPosinset : int option;
  36. ariaPressed : string option;
  37. ariaReadonly : bool option;
  38. ariaRelevant : string option;
  39. ariaRequired : bool option;
  40. ariaRoledescription : string option;
  41. ariaRowcount : int option;
  42. ariaRowindex : int option;
  43. ariaRowindextext : string option;
  44. ariaRowspan : int option;
  45. ariaSelected : bool option;
  46. ariaSetsize : int option;
  47. ariaSort : string option;
  48. ariaValuemax : float option;
  49. ariaValuemin : float option;
  50. ariaValuenow : float option;
  51. ariaValuetext : string option;
  52. defaultChecked : bool option;
  53. defaultValue : string option;
  54. accessKey : string option;
  55. className : string option;
  56. contentEditable : bool option;
  57. contextMenu : string option;
  58. dir : string option;
  59. draggable : bool option;
  60. hidden : bool option;
  61. id : string option;
  62. lang : string option;
  63. role : string option;
  64. style : style option;
  65. spellCheck : bool option;
  66. tabIndex : int option;
  67. title : string option;
  68. itemID : string option;
  69. itemProp : string option;
  70. itemRef : string option;
  71. itemScope : bool option;
  72. itemType : string option;
  73. as_ : string option;
  74. accept : string option;
  75. acceptCharset : string option;
  76. action : string option;
  77. allowFullScreen : bool option;
  78. alt : string option;
  79. async : bool option;
  80. autoComplete : string option;
  81. autoCapitalize : string option;
  82. autoFocus : bool option;
  83. autoPlay : bool option;
  84. challenge : string option;
  85. charSet : string option;
  86. checked : bool option;
  87. cite : string option;
  88. crossOrigin : string option;
  89. cols : int option;
  90. colSpan : int option;
  91. content : string option;
  92. controls : bool option;
  93. coords : string option;
  94. data : string option;
  95. dateTime : string option;
  96. default : bool option;
  97. defer : bool option;
  98. disabled : bool option;
  99. download : string option;
  100. encType : string option;
  101. form : string option;
  102. formAction : string option;
  103. formTarget : string option;
  104. formMethod : string option;
  105. headers : string option;
  106. height : string option;
  107. high : int option;
  108. href : string option;
  109. hrefLang : string option;
  110. htmlFor : string option;
  111. httpEquiv : string option;
  112. icon : string option;
  113. inputMode : string option;
  114. integrity : string option;
  115. keyType : string option;
  116. kind : string option;
  117. label : string option;
  118. list : string option;
  119. loop : bool option;
  120. low : int option;
  121. manifest : string option;
  122. max : string option;
  123. maxLength : int option;
  124. media : string option;
  125. mediaGroup : string option;
  126. method : string option;
  127. min : string option;
  128. minLength : int option;
  129. multiple : bool option;
  130. muted : bool option;
  131. name : string option;
  132. nonce : string option;
  133. noValidate : bool option;
  134. open_ : bool option;
  135. optimum : int option;
  136. pattern : string option;
  137. placeholder : string option;
  138. playsInline : bool option;
  139. poster : string option;
  140. preload : string option;
  141. radioGroup : string option;
  142. readOnly : bool option;
  143. referrerPolicy : string option;
  144. rel : string option;
  145. required : bool option;
  146. reversed : bool option;
  147. rows : int option;
  148. rowSpan : int option;
  149. sandbox : string option;
  150. scope : string option;
  151. scoped : bool option;
  152. scrolling : string option;
  153. selected : bool option;
  154. shape : string option;
  155. size : int option;
  156. sizes : string option;
  157. span : int option;
  158. src : string option;
  159. srcDoc : string option;
  160. srcLang : string option;
  161. srcSet : string option;
  162. start : int option;
  163. step : float option;
  164. summary : string option;
  165. target : string option;
  166. type_ : string option;
  167. useMap : string option;
  168. value : string option;
  169. width : string option;
  170. wrap : string option;
  171. onCopy : (React.Event.Clipboard.t -> unit) option;
  172. onCut : (React.Event.Clipboard.t -> unit) option;
  173. onPaste : (React.Event.Clipboard.t -> unit) option;
  174. onCompositionEnd : (React.Event.Composition.t -> unit) option;
  175. onCompositionStart : (React.Event.Composition.t -> unit) option;
  176. onCompositionUpdate : (React.Event.Composition.t -> unit) option;
  177. onKeyDown : (React.Event.Keyboard.t -> unit) option;
  178. onKeyPress : (React.Event.Keyboard.t -> unit) option;
  179. onKeyUp : (React.Event.Keyboard.t -> unit) option;
  180. onFocus : (React.Event.Focus.t -> unit) option;
  181. onBlur : (React.Event.Focus.t -> unit) option;
  182. onChange : (React.Event.Form.t -> unit) option;
  183. onInput : (React.Event.Form.t -> unit) option;
  184. onSubmit : (React.Event.Form.t -> unit) option;
  185. onInvalid : (React.Event.Form.t -> unit) option;
  186. onClick : (React.Event.Mouse.t -> unit) option;
  187. onContextMenu : (React.Event.Mouse.t -> unit) option;
  188. onDoubleClick : (React.Event.Mouse.t -> unit) option;
  189. onDrag : (React.Event.Drag.t -> unit) option;
  190. onDragEnd : (React.Event.Drag.t -> unit) option;
  191. onDragEnter : (React.Event.Drag.t -> unit) option;
  192. onDragExit : (React.Event.Drag.t -> unit) option;
  193. onDragLeave : (React.Event.Drag.t -> unit) option;
  194. onDragOver : (React.Event.Drag.t -> unit) option;
  195. onDragStart : (React.Event.Drag.t -> unit) option;
  196. onDrop : (React.Event.Drag.t -> unit) option;
  197. onMouseDown : (React.Event.Mouse.t -> unit) option;
  198. onMouseEnter : (React.Event.Mouse.t -> unit) option;
  199. onMouseLeave : (React.Event.Mouse.t -> unit) option;
  200. onMouseMove : (React.Event.Mouse.t -> unit) option;
  201. onMouseOut : (React.Event.Mouse.t -> unit) option;
  202. onMouseOver : (React.Event.Mouse.t -> unit) option;
  203. onMouseUp : (React.Event.Mouse.t -> unit) option;
  204. onSelect : (React.Event.Selection.t -> unit) option;
  205. onTouchCancel : (React.Event.Touch.t -> unit) option;
  206. onTouchEnd : (React.Event.Touch.t -> unit) option;
  207. onTouchMove : (React.Event.Touch.t -> unit) option;
  208. onTouchStart : (React.Event.Touch.t -> unit) option;
  209. onPointerOver : (React.Event.Pointer.t -> unit) option;
  210. onPointerEnter : (React.Event.Pointer.t -> unit) option;
  211. onPointerDown : (React.Event.Pointer.t -> unit) option;
  212. onPointerMove : (React.Event.Pointer.t -> unit) option;
  213. onPointerUp : (React.Event.Pointer.t -> unit) option;
  214. onPointerCancel : (React.Event.Pointer.t -> unit) option;
  215. onPointerOut : (React.Event.Pointer.t -> unit) option;
  216. onPointerLeave : (React.Event.Pointer.t -> unit) option;
  217. onGotPointerCapture : (React.Event.Pointer.t -> unit) option;
  218. onLostPointerCapture : (React.Event.Pointer.t -> unit) option;
  219. onScroll : (React.Event.UI.t -> unit) option;
  220. onWheel : (React.Event.Wheel.t -> unit) option;
  221. onAbort : (React.Event.Media.t -> unit) option;
  222. onCanPlay : (React.Event.Media.t -> unit) option;
  223. onCanPlayThrough : (React.Event.Media.t -> unit) option;
  224. onDurationChange : (React.Event.Media.t -> unit) option;
  225. onEmptied : (React.Event.Media.t -> unit) option;
  226. onEncrypetd : (React.Event.Media.t -> unit) option;
  227. onEnded : (React.Event.Media.t -> unit) option;
  228. onError : (React.Event.Media.t -> unit) option;
  229. onLoadedData : (React.Event.Media.t -> unit) option;
  230. onLoadedMetadata : (React.Event.Media.t -> unit) option;
  231. onLoadStart : (React.Event.Media.t -> unit) option;
  232. onPause : (React.Event.Media.t -> unit) option;
  233. onPlay : (React.Event.Media.t -> unit) option;
  234. onPlaying : (React.Event.Media.t -> unit) option;
  235. onProgress : (React.Event.Media.t -> unit) option;
  236. onRateChange : (React.Event.Media.t -> unit) option;
  237. onSeeked : (React.Event.Media.t -> unit) option;
  238. onSeeking : (React.Event.Media.t -> unit) option;
  239. onStalled : (React.Event.Media.t -> unit) option;
  240. onSuspend : (React.Event.Media.t -> unit) option;
  241. onTimeUpdate : (React.Event.Media.t -> unit) option;
  242. onVolumeChange : (React.Event.Media.t -> unit) option;
  243. onWaiting : (React.Event.Media.t -> unit) option;
  244. onLoad : (React.Event.Image.t -> unit) option;
  245. onAnimationStart : (React.Event.Animation.t -> unit) option;
  246. onAnimationEnd : (React.Event.Animation.t -> unit) option;
  247. onAnimationIteration : (React.Event.Animation.t -> unit) option;
  248. onTransitionEnd : (React.Event.Transition.t -> unit) option;
  249. accentHeight : string option;
  250. accumulate : string option;
  251. additive : string option;
  252. alignmentBaseline : string option;
  253. allowReorder : string option;
  254. alphabetic : string option;
  255. amplitude : string option;
  256. arabicForm : string option;
  257. ascent : string option;
  258. attributeName : string option;
  259. attributeType : string option;
  260. autoReverse : string option;
  261. azimuth : string option;
  262. baseFrequency : string option;
  263. baseProfile : string option;
  264. baselineShift : string option;
  265. bbox : string option;
  266. begin_ : string option;
  267. bias : string option;
  268. by : string option;
  269. calcMode : string option;
  270. capHeight : string option;
  271. clip : string option;
  272. clipPath : string option;
  273. clipPathUnits : string option;
  274. clipRule : string option;
  275. colorInterpolation : string option;
  276. colorInterpolationFilters : string option;
  277. colorProfile : string option;
  278. colorRendering : string option;
  279. contentScriptType : string option;
  280. contentStyleType : string option;
  281. cursor : string option;
  282. cx : string option;
  283. cy : string option;
  284. d : string option;
  285. decelerate : string option;
  286. descent : string option;
  287. diffuseConstant : string option;
  288. direction : string option;
  289. display : string option;
  290. divisor : string option;
  291. dominantBaseline : string option;
  292. dur : string option;
  293. dx : string option;
  294. dy : string option;
  295. edgeMode : string option;
  296. elevation : string option;
  297. enableBackground : string option;
  298. end_ : string option;
  299. exponent : string option;
  300. externalResourcesRequired : string option;
  301. fill : string option;
  302. fillOpacity : string option;
  303. fillRule : string option;
  304. filter : string option;
  305. filterRes : string option;
  306. filterUnits : string option;
  307. floodColor : string option;
  308. floodOpacity : string option;
  309. focusable : string option;
  310. fontFamily : string option;
  311. fontSize : string option;
  312. fontSizeAdjust : string option;
  313. fontStretch : string option;
  314. fontStyle : string option;
  315. fontVariant : string option;
  316. fontWeight : string option;
  317. fomat : string option;
  318. from : string option;
  319. fx : string option;
  320. fy : string option;
  321. g1 : string option;
  322. g2 : string option;
  323. glyphName : string option;
  324. glyphOrientationHorizontal : string option;
  325. glyphOrientationVertical : string option;
  326. glyphRef : string option;
  327. gradientTransform : string option;
  328. gradientUnits : string option;
  329. hanging : string option;
  330. horizAdvX : string option;
  331. horizOriginX : string option;
  332. ideographic : string option;
  333. imageRendering : string option;
  334. in_ : string option;
  335. in2 : string option;
  336. intercept : string option;
  337. k : string option;
  338. k1 : string option;
  339. k2 : string option;
  340. k3 : string option;
  341. k4 : string option;
  342. kernelMatrix : string option;
  343. kernelUnitLength : string option;
  344. kerning : string option;
  345. keyPoints : string option;
  346. keySplines : string option;
  347. keyTimes : string option;
  348. lengthAdjust : string option;
  349. letterSpacing : string option;
  350. lightingColor : string option;
  351. limitingConeAngle : string option;
  352. local : string option;
  353. markerEnd : string option;
  354. markerHeight : string option;
  355. markerMid : string option;
  356. markerStart : string option;
  357. markerUnits : string option;
  358. markerWidth : string option;
  359. mask : string option;
  360. maskContentUnits : string option;
  361. maskUnits : string option;
  362. mathematical : string option;
  363. mode : string option;
  364. numOctaves : string option;
  365. offset : string option;
  366. opacity : string option;
  367. operator : string option;
  368. order : string option;
  369. orient : string option;
  370. orientation : string option;
  371. origin : string option;
  372. overflow : string option;
  373. overflowX : string option;
  374. overflowY : string option;
  375. overlinePosition : string option;
  376. overlineThickness : string option;
  377. paintOrder : string option;
  378. panose1 : string option;
  379. pathLength : string option;
  380. patternContentUnits : string option;
  381. patternTransform : string option;
  382. patternUnits : string option;
  383. pointerEvents : string option;
  384. points : string option;
  385. pointsAtX : string option;
  386. pointsAtY : string option;
  387. pointsAtZ : string option;
  388. preserveAlpha : string option;
  389. preserveAspectRatio : string option;
  390. primitiveUnits : string option;
  391. r : string option;
  392. radius : string option;
  393. refX : string option;
  394. refY : string option;
  395. renderingIntent : string option;
  396. repeatCount : string option;
  397. repeatDur : string option;
  398. requiredExtensions : string option;
  399. requiredFeatures : string option;
  400. restart : string option;
  401. result : string option;
  402. rotate : string option;
  403. rx : string option;
  404. ry : string option;
  405. scale : string option;
  406. seed : string option;
  407. shapeRendering : string option;
  408. slope : string option;
  409. spacing : string option;
  410. specularConstant : string option;
  411. specularExponent : string option;
  412. speed : string option;
  413. spreadMethod : string option;
  414. startOffset : string option;
  415. stdDeviation : string option;
  416. stemh : string option;
  417. stemv : string option;
  418. stitchTiles : string option;
  419. stopColor : string option;
  420. stopOpacity : string option;
  421. strikethroughPosition : string option;
  422. strikethroughThickness : string option;
  423. string : string option;
  424. stroke : string option;
  425. strokeDasharray : string option;
  426. strokeDashoffset : string option;
  427. strokeLinecap : string option;
  428. strokeLinejoin : string option;
  429. strokeMiterlimit : string option;
  430. strokeOpacity : string option;
  431. strokeWidth : string option;
  432. surfaceScale : string option;
  433. systemLanguage : string option;
  434. tableValues : string option;
  435. targetX : string option;
  436. targetY : string option;
  437. textAnchor : string option;
  438. textDecoration : string option;
  439. textLength : string option;
  440. textRendering : string option;
  441. to_ : string option;
  442. transform : string option;
  443. u1 : string option;
  444. u2 : string option;
  445. underlinePosition : string option;
  446. underlineThickness : string option;
  447. unicode : string option;
  448. unicodeBidi : string option;
  449. unicodeRange : string option;
  450. unitsPerEm : string option;
  451. vAlphabetic : string option;
  452. vHanging : string option;
  453. vIdeographic : string option;
  454. vMathematical : string option;
  455. values : string option;
  456. vectorEffect : string option;
  457. version : string option;
  458. vertAdvX : string option;
  459. vertAdvY : string option;
  460. vertOriginX : string option;
  461. vertOriginY : string option;
  462. viewBox : string option;
  463. viewTarget : string option;
  464. visibility : string option;
  465. widths : string option;
  466. wordSpacing : string option;
  467. writingMode : string option;
  468. x : string option;
  469. x1 : string option;
  470. x2 : string option;
  471. xChannelSelector : string option;
  472. xHeight : string option;
  473. xlinkActuate : string option;
  474. xlinkArcrole : string option;
  475. xlinkHref : string option;
  476. xlinkRole : string option;
  477. xlinkShow : string option;
  478. xlinkTitle : string option;
  479. xlinkType : string option;
  480. xmlns : string option;
  481. xmlBase : string option;
  482. xmlLang : string option;
  483. xmlSpace : string option;
  484. y : string option;
  485. y1 : string option;
  486. y2 : string option;
  487. yChannelSelector : string option;
  488. z : string option;
  489. zoomAndPan : string option;
  490. about : string option;
  491. datatype : string option;
  492. inlist : string option;
  493. prefix : string option;
  494. property : string option;
  495. resource : string option;
  496. typeof : string option;
  497. vocab : string option;
  498. dangerouslySetInnerHTML : < __html : string > Js.t option;
  499. suppressContentEditableWarning : bool option;
  500. suppressHydrationWarning : bool option;
}
val domProps : + ?key:string -> + ?ref:domRef -> + ?children:React.element -> + ?ariaActivedescendant:string -> + ?ariaAtomic:bool -> + ?ariaAutocomplete:string -> + ?ariaBusy:bool -> + ?ariaChecked:string -> + ?ariaColcount:int -> + ?ariaColindex:int -> + ?ariaColspan:int -> + ?ariaControls:string -> + ?ariaCurrent:string -> + ?ariaDescribedby:string -> + ?ariaDetails:string -> + ?ariaDisabled:bool -> + ?ariaErrormessage:string -> + ?ariaExpanded:bool -> + ?ariaFlowto:string -> + ?ariaGrabbed:bool -> + ?ariaHaspopup:string -> + ?ariaHidden:bool -> + ?ariaInvalid:string -> + ?ariaKeyshortcuts:string -> + ?ariaLabel:string -> + ?ariaLabelledby:string -> + ?ariaLevel:int -> + ?ariaLive:string -> + ?ariaModal:bool -> + ?ariaMultiline:bool -> + ?ariaMultiselectable:bool -> + ?ariaOrientation:string -> + ?ariaOwns:string -> + ?ariaPlaceholder:string -> + ?ariaPosinset:int -> + ?ariaPressed:string -> + ?ariaReadonly:bool -> + ?ariaRelevant:string -> + ?ariaRequired:bool -> + ?ariaRoledescription:string -> + ?ariaRowcount:int -> + ?ariaRowindex:int -> + ?ariaRowindextext:string -> + ?ariaRowspan:int -> + ?ariaSelected:bool -> + ?ariaSetsize:int -> + ?ariaSort:string -> + ?ariaValuemax:float -> + ?ariaValuemin:float -> + ?ariaValuenow:float -> + ?ariaValuetext:string -> + ?defaultChecked:bool -> + ?defaultValue:string -> + ?accessKey:string -> + ?className:string -> + ?contentEditable:bool -> + ?contextMenu:string -> + ?dir:string -> + ?draggable:bool -> + ?hidden:bool -> + ?id:string -> + ?lang:string -> + ?role:string -> + ?style:style -> + ?spellCheck:bool -> + ?tabIndex:int -> + ?title:string -> + ?itemID:string -> + ?itemProp:string -> + ?itemRef:string -> + ?itemScope:bool -> + ?itemType:string -> + ?as_:string -> + ?accept:string -> + ?acceptCharset:string -> + ?action:string -> + ?allowFullScreen:bool -> + ?alt:string -> + ?async:bool -> + ?autoComplete:string -> + ?autoCapitalize:string -> + ?autoFocus:bool -> + ?autoPlay:bool -> + ?challenge:string -> + ?charSet:string -> + ?checked:bool -> + ?cite:string -> + ?crossOrigin:string -> + ?cols:int -> + ?colSpan:int -> + ?content:string -> + ?controls:bool -> + ?coords:string -> + ?data:string -> + ?dateTime:string -> + ?default:bool -> + ?defer:bool -> + ?disabled:bool -> + ?download:string -> + ?encType:string -> + ?form:string -> + ?formAction:string -> + ?formTarget:string -> + ?formMethod:string -> + ?headers:string -> + ?height:string -> + ?high:int -> + ?href:string -> + ?hrefLang:string -> + ?htmlFor:string -> + ?httpEquiv:string -> + ?icon:string -> + ?inputMode:string -> + ?integrity:string -> + ?keyType:string -> + ?kind:string -> + ?label:string -> + ?list:string -> + ?loop:bool -> + ?low:int -> + ?manifest:string -> + ?max:string -> + ?maxLength:int -> + ?media:string -> + ?mediaGroup:string -> + ?method:string -> + ?min:string -> + ?minLength:int -> + ?multiple:bool -> + ?muted:bool -> + ?name:string -> + ?nonce:string -> + ?noValidate:bool -> + ?open_:bool -> + ?optimum:int -> + ?pattern:string -> + ?placeholder:string -> + ?playsInline:bool -> + ?poster:string -> + ?preload:string -> + ?radioGroup:string -> + ?readOnly:bool -> + ?referrerPolicy:string -> + ?rel:string -> + ?required:bool -> + ?reversed:bool -> + ?rows:int -> + ?rowSpan:int -> + ?sandbox:string -> + ?scope:string -> + ?scoped:bool -> + ?scrolling:string -> + ?selected:bool -> + ?shape:string -> + ?size:int -> + ?sizes:string -> + ?span:int -> + ?src:string -> + ?srcDoc:string -> + ?srcLang:string -> + ?srcSet:string -> + ?start:int -> + ?step:float -> + ?summary:string -> + ?target:string -> + ?type_:string -> + ?useMap:string -> + ?value:string -> + ?width:string -> + ?wrap:string -> + ?onCopy:(React.Event.Clipboard.t -> unit) -> + ?onCut:(React.Event.Clipboard.t -> unit) -> + ?onPaste:(React.Event.Clipboard.t -> unit) -> + ?onCompositionEnd:(React.Event.Composition.t -> unit) -> + ?onCompositionStart:(React.Event.Composition.t -> unit) -> + ?onCompositionUpdate:(React.Event.Composition.t -> unit) -> + ?onKeyDown:(React.Event.Keyboard.t -> unit) -> + ?onKeyPress:(React.Event.Keyboard.t -> unit) -> + ?onKeyUp:(React.Event.Keyboard.t -> unit) -> + ?onFocus:(React.Event.Focus.t -> unit) -> + ?onBlur:(React.Event.Focus.t -> unit) -> + ?onChange:(React.Event.Form.t -> unit) -> + ?onInput:(React.Event.Form.t -> unit) -> + ?onSubmit:(React.Event.Form.t -> unit) -> + ?onInvalid:(React.Event.Form.t -> unit) -> + ?onClick:(React.Event.Mouse.t -> unit) -> + ?onContextMenu:(React.Event.Mouse.t -> unit) -> + ?onDoubleClick:(React.Event.Mouse.t -> unit) -> + ?onDrag:(React.Event.Drag.t -> unit) -> + ?onDragEnd:(React.Event.Drag.t -> unit) -> + ?onDragEnter:(React.Event.Drag.t -> unit) -> + ?onDragExit:(React.Event.Drag.t -> unit) -> + ?onDragLeave:(React.Event.Drag.t -> unit) -> + ?onDragOver:(React.Event.Drag.t -> unit) -> + ?onDragStart:(React.Event.Drag.t -> unit) -> + ?onDrop:(React.Event.Drag.t -> unit) -> + ?onMouseDown:(React.Event.Mouse.t -> unit) -> + ?onMouseEnter:(React.Event.Mouse.t -> unit) -> + ?onMouseLeave:(React.Event.Mouse.t -> unit) -> + ?onMouseMove:(React.Event.Mouse.t -> unit) -> + ?onMouseOut:(React.Event.Mouse.t -> unit) -> + ?onMouseOver:(React.Event.Mouse.t -> unit) -> + ?onMouseUp:(React.Event.Mouse.t -> unit) -> + ?onSelect:(React.Event.Selection.t -> unit) -> + ?onTouchCancel:(React.Event.Touch.t -> unit) -> + ?onTouchEnd:(React.Event.Touch.t -> unit) -> + ?onTouchMove:(React.Event.Touch.t -> unit) -> + ?onTouchStart:(React.Event.Touch.t -> unit) -> + ?onPointerOver:(React.Event.Pointer.t -> unit) -> + ?onPointerEnter:(React.Event.Pointer.t -> unit) -> + ?onPointerDown:(React.Event.Pointer.t -> unit) -> + ?onPointerMove:(React.Event.Pointer.t -> unit) -> + ?onPointerUp:(React.Event.Pointer.t -> unit) -> + ?onPointerCancel:(React.Event.Pointer.t -> unit) -> + ?onPointerOut:(React.Event.Pointer.t -> unit) -> + ?onPointerLeave:(React.Event.Pointer.t -> unit) -> + ?onGotPointerCapture:(React.Event.Pointer.t -> unit) -> + ?onLostPointerCapture:(React.Event.Pointer.t -> unit) -> + ?onScroll:(React.Event.UI.t -> unit) -> + ?onWheel:(React.Event.Wheel.t -> unit) -> + ?onAbort:(React.Event.Media.t -> unit) -> + ?onCanPlay:(React.Event.Media.t -> unit) -> + ?onCanPlayThrough:(React.Event.Media.t -> unit) -> + ?onDurationChange:(React.Event.Media.t -> unit) -> + ?onEmptied:(React.Event.Media.t -> unit) -> + ?onEncrypetd:(React.Event.Media.t -> unit) -> + ?onEnded:(React.Event.Media.t -> unit) -> + ?onError:(React.Event.Media.t -> unit) -> + ?onLoadedData:(React.Event.Media.t -> unit) -> + ?onLoadedMetadata:(React.Event.Media.t -> unit) -> + ?onLoadStart:(React.Event.Media.t -> unit) -> + ?onPause:(React.Event.Media.t -> unit) -> + ?onPlay:(React.Event.Media.t -> unit) -> + ?onPlaying:(React.Event.Media.t -> unit) -> + ?onProgress:(React.Event.Media.t -> unit) -> + ?onRateChange:(React.Event.Media.t -> unit) -> + ?onSeeked:(React.Event.Media.t -> unit) -> + ?onSeeking:(React.Event.Media.t -> unit) -> + ?onStalled:(React.Event.Media.t -> unit) -> + ?onSuspend:(React.Event.Media.t -> unit) -> + ?onTimeUpdate:(React.Event.Media.t -> unit) -> + ?onVolumeChange:(React.Event.Media.t -> unit) -> + ?onWaiting:(React.Event.Media.t -> unit) -> + ?onLoad:(React.Event.Image.t -> unit) -> + ?onAnimationStart:(React.Event.Animation.t -> unit) -> + ?onAnimationEnd:(React.Event.Animation.t -> unit) -> + ?onAnimationIteration:(React.Event.Animation.t -> unit) -> + ?onTransitionEnd:(React.Event.Transition.t -> unit) -> + ?accentHeight:string -> + ?accumulate:string -> + ?additive:string -> + ?alignmentBaseline:string -> + ?allowReorder:string -> + ?alphabetic:string -> + ?amplitude:string -> + ?arabicForm:string -> + ?ascent:string -> + ?attributeName:string -> + ?attributeType:string -> + ?autoReverse:string -> + ?azimuth:string -> + ?baseFrequency:string -> + ?baseProfile:string -> + ?baselineShift:string -> + ?bbox:string -> + ?begin_:string -> + ?bias:string -> + ?by:string -> + ?calcMode:string -> + ?capHeight:string -> + ?clip:string -> + ?clipPath:string -> + ?clipPathUnits:string -> + ?clipRule:string -> + ?colorInterpolation:string -> + ?colorInterpolationFilters:string -> + ?colorProfile:string -> + ?colorRendering:string -> + ?contentScriptType:string -> + ?contentStyleType:string -> + ?cursor:string -> + ?cx:string -> + ?cy:string -> + ?d:string -> + ?decelerate:string -> + ?descent:string -> + ?diffuseConstant:string -> + ?direction:string -> + ?display:string -> + ?divisor:string -> + ?dominantBaseline:string -> + ?dur:string -> + ?dx:string -> + ?dy:string -> + ?edgeMode:string -> + ?elevation:string -> + ?enableBackground:string -> + ?end_:string -> + ?exponent:string -> + ?externalResourcesRequired:string -> + ?fill:string -> + ?fillOpacity:string -> + ?fillRule:string -> + ?filter:string -> + ?filterRes:string -> + ?filterUnits:string -> + ?floodColor:string -> + ?floodOpacity:string -> + ?focusable:string -> + ?fontFamily:string -> + ?fontSize:string -> + ?fontSizeAdjust:string -> + ?fontStretch:string -> + ?fontStyle:string -> + ?fontVariant:string -> + ?fontWeight:string -> + ?fomat:string -> + ?from:string -> + ?fx:string -> + ?fy:string -> + ?g1:string -> + ?g2:string -> + ?glyphName:string -> + ?glyphOrientationHorizontal:string -> + ?glyphOrientationVertical:string -> + ?glyphRef:string -> + ?gradientTransform:string -> + ?gradientUnits:string -> + ?hanging:string -> + ?horizAdvX:string -> + ?horizOriginX:string -> + ?ideographic:string -> + ?imageRendering:string -> + ?in_:string -> + ?in2:string -> + ?intercept:string -> + ?k:string -> + ?k1:string -> + ?k2:string -> + ?k3:string -> + ?k4:string -> + ?kernelMatrix:string -> + ?kernelUnitLength:string -> + ?kerning:string -> + ?keyPoints:string -> + ?keySplines:string -> + ?keyTimes:string -> + ?lengthAdjust:string -> + ?letterSpacing:string -> + ?lightingColor:string -> + ?limitingConeAngle:string -> + ?local:string -> + ?markerEnd:string -> + ?markerHeight:string -> + ?markerMid:string -> + ?markerStart:string -> + ?markerUnits:string -> + ?markerWidth:string -> + ?mask:string -> + ?maskContentUnits:string -> + ?maskUnits:string -> + ?mathematical:string -> + ?mode:string -> + ?numOctaves:string -> + ?offset:string -> + ?opacity:string -> + ?operator:string -> + ?order:string -> + ?orient:string -> + ?orientation:string -> + ?origin:string -> + ?overflow:string -> + ?overflowX:string -> + ?overflowY:string -> + ?overlinePosition:string -> + ?overlineThickness:string -> + ?paintOrder:string -> + ?panose1:string -> + ?pathLength:string -> + ?patternContentUnits:string -> + ?patternTransform:string -> + ?patternUnits:string -> + ?pointerEvents:string -> + ?points:string -> + ?pointsAtX:string -> + ?pointsAtY:string -> + ?pointsAtZ:string -> + ?preserveAlpha:string -> + ?preserveAspectRatio:string -> + ?primitiveUnits:string -> + ?r:string -> + ?radius:string -> + ?refX:string -> + ?refY:string -> + ?renderingIntent:string -> + ?repeatCount:string -> + ?repeatDur:string -> + ?requiredExtensions:string -> + ?requiredFeatures:string -> + ?restart:string -> + ?result:string -> + ?rotate:string -> + ?rx:string -> + ?ry:string -> + ?scale:string -> + ?seed:string -> + ?shapeRendering:string -> + ?slope:string -> + ?spacing:string -> + ?specularConstant:string -> + ?specularExponent:string -> + ?speed:string -> + ?spreadMethod:string -> + ?startOffset:string -> + ?stdDeviation:string -> + ?stemh:string -> + ?stemv:string -> + ?stitchTiles:string -> + ?stopColor:string -> + ?stopOpacity:string -> + ?strikethroughPosition:string -> + ?strikethroughThickness:string -> + ?string:string -> + ?stroke:string -> + ?strokeDasharray:string -> + ?strokeDashoffset:string -> + ?strokeLinecap:string -> + ?strokeLinejoin:string -> + ?strokeMiterlimit:string -> + ?strokeOpacity:string -> + ?strokeWidth:string -> + ?surfaceScale:string -> + ?systemLanguage:string -> + ?tableValues:string -> + ?targetX:string -> + ?targetY:string -> + ?textAnchor:string -> + ?textDecoration:string -> + ?textLength:string -> + ?textRendering:string -> + ?to_:string -> + ?transform:string -> + ?u1:string -> + ?u2:string -> + ?underlinePosition:string -> + ?underlineThickness:string -> + ?unicode:string -> + ?unicodeBidi:string -> + ?unicodeRange:string -> + ?unitsPerEm:string -> + ?vAlphabetic:string -> + ?vHanging:string -> + ?vIdeographic:string -> + ?vMathematical:string -> + ?values:string -> + ?vectorEffect:string -> + ?version:string -> + ?vertAdvX:string -> + ?vertAdvY:string -> + ?vertOriginX:string -> + ?vertOriginY:string -> + ?viewBox:string -> + ?viewTarget:string -> + ?visibility:string -> + ?widths:string -> + ?wordSpacing:string -> + ?writingMode:string -> + ?x:string -> + ?x1:string -> + ?x2:string -> + ?xChannelSelector:string -> + ?xHeight:string -> + ?xlinkActuate:string -> + ?xlinkArcrole:string -> + ?xlinkHref:string -> + ?xlinkRole:string -> + ?xlinkShow:string -> + ?xlinkTitle:string -> + ?xlinkType:string -> + ?xmlns:string -> + ?xmlnsXlink:string -> + ?xmlBase:string -> + ?xmlLang:string -> + ?xmlSpace:string -> + ?y:string -> + ?y1:string -> + ?y2:string -> + ?yChannelSelector:string -> + ?z:string -> + ?zoomAndPan:string -> + ?about:string -> + ?datatype:string -> + ?inlist:string -> + ?prefix:string -> + ?property:string -> + ?resource:string -> + ?typeof:string -> + ?vocab:string -> + ?dangerouslySetInnerHTML:< __html : string > Js.t -> + ?suppressContentEditableWarning:bool -> + ?suppressHydrationWarning:bool -> + unit -> + domProps
val keyGet : domProps -> string option
val refGet : domProps -> domRef option
val childrenGet : domProps -> React.element option
val ariaActivedescendantGet : domProps -> string option
val ariaAtomicGet : domProps -> bool option
val ariaAutocompleteGet : domProps -> string option
val ariaBusyGet : domProps -> bool option
val ariaCheckedGet : domProps -> string option
val ariaColcountGet : domProps -> int option
val ariaColindexGet : domProps -> int option
val ariaColspanGet : domProps -> int option
val ariaControlsGet : domProps -> string option
val ariaCurrentGet : domProps -> string option
val ariaDescribedbyGet : domProps -> string option
val ariaDetailsGet : domProps -> string option
val ariaDisabledGet : domProps -> bool option
val ariaErrormessageGet : domProps -> string option
val ariaExpandedGet : domProps -> bool option
val ariaFlowtoGet : domProps -> string option
val ariaGrabbedGet : domProps -> bool option
val ariaHaspopupGet : domProps -> string option
val ariaHiddenGet : domProps -> bool option
val ariaInvalidGet : domProps -> string option
val ariaKeyshortcutsGet : domProps -> string option
val ariaLabelGet : domProps -> string option
val ariaLabelledbyGet : domProps -> string option
val ariaLevelGet : domProps -> int option
val ariaLiveGet : domProps -> string option
val ariaModalGet : domProps -> bool option
val ariaMultilineGet : domProps -> bool option
val ariaMultiselectableGet : domProps -> bool option
val ariaOrientationGet : domProps -> string option
val ariaOwnsGet : domProps -> string option
val ariaPlaceholderGet : domProps -> string option
val ariaPosinsetGet : domProps -> int option
val ariaPressedGet : domProps -> string option
val ariaReadonlyGet : domProps -> bool option
val ariaRelevantGet : domProps -> string option
val ariaRequiredGet : domProps -> bool option
val ariaRoledescriptionGet : domProps -> string option
val ariaRowcountGet : domProps -> int option
val ariaRowindexGet : domProps -> int option
val ariaRowindextextGet : domProps -> string option
val ariaRowspanGet : domProps -> int option
val ariaSelectedGet : domProps -> bool option
val ariaSetsizeGet : domProps -> int option
val ariaSortGet : domProps -> string option
val ariaValuemaxGet : domProps -> float option
val ariaValueminGet : domProps -> float option
val ariaValuenowGet : domProps -> float option
val ariaValuetextGet : domProps -> string option
val defaultCheckedGet : domProps -> bool option
val defaultValueGet : domProps -> string option
val accessKeyGet : domProps -> string option
val classNameGet : domProps -> string option
val contentEditableGet : domProps -> bool option
val contextMenuGet : domProps -> string option
val dirGet : domProps -> string option
val draggableGet : domProps -> bool option
val hiddenGet : domProps -> bool option
val idGet : domProps -> string option
val langGet : domProps -> string option
val roleGet : domProps -> string option
val styleGet : domProps -> style option
val spellCheckGet : domProps -> bool option
val tabIndexGet : domProps -> int option
val titleGet : domProps -> string option
val itemIDGet : domProps -> string option
val itemPropGet : domProps -> string option
val itemRefGet : domProps -> string option
val itemScopeGet : domProps -> bool option
val itemTypeGet : domProps -> string option
val as_Get : domProps -> string option
val acceptGet : domProps -> string option
val acceptCharsetGet : domProps -> string option
val actionGet : domProps -> string option
val allowFullScreenGet : domProps -> bool option
val altGet : domProps -> string option
val asyncGet : domProps -> bool option
val autoCompleteGet : domProps -> string option
val autoCapitalizeGet : domProps -> string option
val autoFocusGet : domProps -> bool option
val autoPlayGet : domProps -> bool option
val challengeGet : domProps -> string option
val charSetGet : domProps -> string option
val checkedGet : domProps -> bool option
val citeGet : domProps -> string option
val crossOriginGet : domProps -> string option
val colsGet : domProps -> int option
val colSpanGet : domProps -> int option
val contentGet : domProps -> string option
val controlsGet : domProps -> bool option
val coordsGet : domProps -> string option
val dataGet : domProps -> string option
val dateTimeGet : domProps -> string option
val defaultGet : domProps -> bool option
val deferGet : domProps -> bool option
val disabledGet : domProps -> bool option
val downloadGet : domProps -> string option
val encTypeGet : domProps -> string option
val formGet : domProps -> string option
val formActionGet : domProps -> string option
val formTargetGet : domProps -> string option
val formMethodGet : domProps -> string option
val headersGet : domProps -> string option
val heightGet : domProps -> string option
val highGet : domProps -> int option
val hrefGet : domProps -> string option
val hrefLangGet : domProps -> string option
val htmlForGet : domProps -> string option
val httpEquivGet : domProps -> string option
val iconGet : domProps -> string option
val inputModeGet : domProps -> string option
val integrityGet : domProps -> string option
val keyTypeGet : domProps -> string option
val kindGet : domProps -> string option
val labelGet : domProps -> string option
val listGet : domProps -> string option
val loopGet : domProps -> bool option
val lowGet : domProps -> int option
val manifestGet : domProps -> string option
val maxGet : domProps -> string option
val maxLengthGet : domProps -> int option
val mediaGet : domProps -> string option
val mediaGroupGet : domProps -> string option
val methodGet : domProps -> string option
val minGet : domProps -> string option
val minLengthGet : domProps -> int option
val multipleGet : domProps -> bool option
val mutedGet : domProps -> bool option
val nameGet : domProps -> string option
val nonceGet : domProps -> string option
val noValidateGet : domProps -> bool option
val open_Get : domProps -> bool option
val optimumGet : domProps -> int option
val patternGet : domProps -> string option
val placeholderGet : domProps -> string option
val playsInlineGet : domProps -> bool option
val posterGet : domProps -> string option
val preloadGet : domProps -> string option
val radioGroupGet : domProps -> string option
val readOnlyGet : domProps -> bool option
val referrerPolicyGet : domProps -> string option
val relGet : domProps -> string option
val requiredGet : domProps -> bool option
val reversedGet : domProps -> bool option
val rowsGet : domProps -> int option
val rowSpanGet : domProps -> int option
val sandboxGet : domProps -> string option
val scopeGet : domProps -> string option
val scopedGet : domProps -> bool option
val scrollingGet : domProps -> string option
val selectedGet : domProps -> bool option
val shapeGet : domProps -> string option
val sizeGet : domProps -> int option
val sizesGet : domProps -> string option
val spanGet : domProps -> int option
val srcGet : domProps -> string option
val srcDocGet : domProps -> string option
val srcLangGet : domProps -> string option
val srcSetGet : domProps -> string option
val startGet : domProps -> int option
val stepGet : domProps -> float option
val summaryGet : domProps -> string option
val targetGet : domProps -> string option
val type_Get : domProps -> string option
val useMapGet : domProps -> string option
val valueGet : domProps -> string option
val widthGet : domProps -> string option
val wrapGet : domProps -> string option
val onCopyGet : domProps -> (React.Event.Clipboard.t -> unit) option
val onCutGet : domProps -> (React.Event.Clipboard.t -> unit) option
val onPasteGet : domProps -> (React.Event.Clipboard.t -> unit) option
val onCompositionEndGet : + domProps -> + (React.Event.Composition.t -> unit) option
val onCompositionStartGet : + domProps -> + (React.Event.Composition.t -> unit) option
val onCompositionUpdateGet : + domProps -> + (React.Event.Composition.t -> unit) option
val onKeyDownGet : domProps -> (React.Event.Keyboard.t -> unit) option
val onKeyPressGet : domProps -> (React.Event.Keyboard.t -> unit) option
val onKeyUpGet : domProps -> (React.Event.Keyboard.t -> unit) option
val onFocusGet : domProps -> (React.Event.Focus.t -> unit) option
val onBlurGet : domProps -> (React.Event.Focus.t -> unit) option
val onChangeGet : domProps -> (React.Event.Form.t -> unit) option
val onInputGet : domProps -> (React.Event.Form.t -> unit) option
val onSubmitGet : domProps -> (React.Event.Form.t -> unit) option
val onInvalidGet : domProps -> (React.Event.Form.t -> unit) option
val onClickGet : domProps -> (React.Event.Mouse.t -> unit) option
val onContextMenuGet : domProps -> (React.Event.Mouse.t -> unit) option
val onDoubleClickGet : domProps -> (React.Event.Mouse.t -> unit) option
val onDragGet : domProps -> (React.Event.Drag.t -> unit) option
val onDragEndGet : domProps -> (React.Event.Drag.t -> unit) option
val onDragEnterGet : domProps -> (React.Event.Drag.t -> unit) option
val onDragExitGet : domProps -> (React.Event.Drag.t -> unit) option
val onDragLeaveGet : domProps -> (React.Event.Drag.t -> unit) option
val onDragOverGet : domProps -> (React.Event.Drag.t -> unit) option
val onDragStartGet : domProps -> (React.Event.Drag.t -> unit) option
val onDropGet : domProps -> (React.Event.Drag.t -> unit) option
val onMouseDownGet : domProps -> (React.Event.Mouse.t -> unit) option
val onMouseEnterGet : domProps -> (React.Event.Mouse.t -> unit) option
val onMouseLeaveGet : domProps -> (React.Event.Mouse.t -> unit) option
val onMouseMoveGet : domProps -> (React.Event.Mouse.t -> unit) option
val onMouseOutGet : domProps -> (React.Event.Mouse.t -> unit) option
val onMouseOverGet : domProps -> (React.Event.Mouse.t -> unit) option
val onMouseUpGet : domProps -> (React.Event.Mouse.t -> unit) option
val onSelectGet : domProps -> (React.Event.Selection.t -> unit) option
val onTouchCancelGet : domProps -> (React.Event.Touch.t -> unit) option
val onTouchEndGet : domProps -> (React.Event.Touch.t -> unit) option
val onTouchMoveGet : domProps -> (React.Event.Touch.t -> unit) option
val onTouchStartGet : domProps -> (React.Event.Touch.t -> unit) option
val onPointerOverGet : domProps -> (React.Event.Pointer.t -> unit) option
val onPointerEnterGet : domProps -> (React.Event.Pointer.t -> unit) option
val onPointerDownGet : domProps -> (React.Event.Pointer.t -> unit) option
val onPointerMoveGet : domProps -> (React.Event.Pointer.t -> unit) option
val onPointerUpGet : domProps -> (React.Event.Pointer.t -> unit) option
val onPointerCancelGet : domProps -> (React.Event.Pointer.t -> unit) option
val onPointerOutGet : domProps -> (React.Event.Pointer.t -> unit) option
val onPointerLeaveGet : domProps -> (React.Event.Pointer.t -> unit) option
val onGotPointerCaptureGet : domProps -> (React.Event.Pointer.t -> unit) option
val onLostPointerCaptureGet : + domProps -> + (React.Event.Pointer.t -> unit) option
val onScrollGet : domProps -> (React.Event.UI.t -> unit) option
val onWheelGet : domProps -> (React.Event.Wheel.t -> unit) option
val onAbortGet : domProps -> (React.Event.Media.t -> unit) option
val onCanPlayGet : domProps -> (React.Event.Media.t -> unit) option
val onCanPlayThroughGet : domProps -> (React.Event.Media.t -> unit) option
val onDurationChangeGet : domProps -> (React.Event.Media.t -> unit) option
val onEmptiedGet : domProps -> (React.Event.Media.t -> unit) option
val onEncrypetdGet : domProps -> (React.Event.Media.t -> unit) option
val onEndedGet : domProps -> (React.Event.Media.t -> unit) option
val onErrorGet : domProps -> (React.Event.Media.t -> unit) option
val onLoadedDataGet : domProps -> (React.Event.Media.t -> unit) option
val onLoadedMetadataGet : domProps -> (React.Event.Media.t -> unit) option
val onLoadStartGet : domProps -> (React.Event.Media.t -> unit) option
val onPauseGet : domProps -> (React.Event.Media.t -> unit) option
val onPlayGet : domProps -> (React.Event.Media.t -> unit) option
val onPlayingGet : domProps -> (React.Event.Media.t -> unit) option
val onProgressGet : domProps -> (React.Event.Media.t -> unit) option
val onRateChangeGet : domProps -> (React.Event.Media.t -> unit) option
val onSeekedGet : domProps -> (React.Event.Media.t -> unit) option
val onSeekingGet : domProps -> (React.Event.Media.t -> unit) option
val onStalledGet : domProps -> (React.Event.Media.t -> unit) option
val onSuspendGet : domProps -> (React.Event.Media.t -> unit) option
val onTimeUpdateGet : domProps -> (React.Event.Media.t -> unit) option
val onVolumeChangeGet : domProps -> (React.Event.Media.t -> unit) option
val onWaitingGet : domProps -> (React.Event.Media.t -> unit) option
val onLoadGet : domProps -> (React.Event.Image.t -> unit) option
val onAnimationStartGet : domProps -> (React.Event.Animation.t -> unit) option
val onAnimationEndGet : domProps -> (React.Event.Animation.t -> unit) option
val onAnimationIterationGet : + domProps -> + (React.Event.Animation.t -> unit) option
val onTransitionEndGet : domProps -> (React.Event.Transition.t -> unit) option
val accentHeightGet : domProps -> string option
val accumulateGet : domProps -> string option
val additiveGet : domProps -> string option
val alignmentBaselineGet : domProps -> string option
val allowReorderGet : domProps -> string option
val alphabeticGet : domProps -> string option
val amplitudeGet : domProps -> string option
val arabicFormGet : domProps -> string option
val ascentGet : domProps -> string option
val attributeNameGet : domProps -> string option
val attributeTypeGet : domProps -> string option
val autoReverseGet : domProps -> string option
val azimuthGet : domProps -> string option
val baseFrequencyGet : domProps -> string option
val baseProfileGet : domProps -> string option
val baselineShiftGet : domProps -> string option
val bboxGet : domProps -> string option
val begin_Get : domProps -> string option
val biasGet : domProps -> string option
val byGet : domProps -> string option
val calcModeGet : domProps -> string option
val capHeightGet : domProps -> string option
val clipGet : domProps -> string option
val clipPathGet : domProps -> string option
val clipPathUnitsGet : domProps -> string option
val clipRuleGet : domProps -> string option
val colorInterpolationGet : domProps -> string option
val colorInterpolationFiltersGet : domProps -> string option
val colorProfileGet : domProps -> string option
val colorRenderingGet : domProps -> string option
val contentScriptTypeGet : domProps -> string option
val contentStyleTypeGet : domProps -> string option
val cursorGet : domProps -> string option
val cxGet : domProps -> string option
val cyGet : domProps -> string option
val dGet : domProps -> string option
val decelerateGet : domProps -> string option
val descentGet : domProps -> string option
val diffuseConstantGet : domProps -> string option
val directionGet : domProps -> string option
val displayGet : domProps -> string option
val divisorGet : domProps -> string option
val dominantBaselineGet : domProps -> string option
val durGet : domProps -> string option
val dxGet : domProps -> string option
val dyGet : domProps -> string option
val edgeModeGet : domProps -> string option
val elevationGet : domProps -> string option
val enableBackgroundGet : domProps -> string option
val end_Get : domProps -> string option
val exponentGet : domProps -> string option
val externalResourcesRequiredGet : domProps -> string option
val fillGet : domProps -> string option
val fillOpacityGet : domProps -> string option
val fillRuleGet : domProps -> string option
val filterGet : domProps -> string option
val filterResGet : domProps -> string option
val filterUnitsGet : domProps -> string option
val floodColorGet : domProps -> string option
val floodOpacityGet : domProps -> string option
val focusableGet : domProps -> string option
val fontFamilyGet : domProps -> string option
val fontSizeGet : domProps -> string option
val fontSizeAdjustGet : domProps -> string option
val fontStretchGet : domProps -> string option
val fontStyleGet : domProps -> string option
val fontVariantGet : domProps -> string option
val fontWeightGet : domProps -> string option
val fomatGet : domProps -> string option
val fromGet : domProps -> string option
val fxGet : domProps -> string option
val fyGet : domProps -> string option
val g1Get : domProps -> string option
val g2Get : domProps -> string option
val glyphNameGet : domProps -> string option
val glyphOrientationHorizontalGet : domProps -> string option
val glyphOrientationVerticalGet : domProps -> string option
val glyphRefGet : domProps -> string option
val gradientTransformGet : domProps -> string option
val gradientUnitsGet : domProps -> string option
val hangingGet : domProps -> string option
val horizAdvXGet : domProps -> string option
val horizOriginXGet : domProps -> string option
val ideographicGet : domProps -> string option
val imageRenderingGet : domProps -> string option
val in_Get : domProps -> string option
val in2Get : domProps -> string option
val interceptGet : domProps -> string option
val kGet : domProps -> string option
val k1Get : domProps -> string option
val k2Get : domProps -> string option
val k3Get : domProps -> string option
val k4Get : domProps -> string option
val kernelMatrixGet : domProps -> string option
val kernelUnitLengthGet : domProps -> string option
val kerningGet : domProps -> string option
val keyPointsGet : domProps -> string option
val keySplinesGet : domProps -> string option
val keyTimesGet : domProps -> string option
val lengthAdjustGet : domProps -> string option
val letterSpacingGet : domProps -> string option
val lightingColorGet : domProps -> string option
val limitingConeAngleGet : domProps -> string option
val localGet : domProps -> string option
val markerEndGet : domProps -> string option
val markerHeightGet : domProps -> string option
val markerMidGet : domProps -> string option
val markerStartGet : domProps -> string option
val markerUnitsGet : domProps -> string option
val markerWidthGet : domProps -> string option
val maskGet : domProps -> string option
val maskContentUnitsGet : domProps -> string option
val maskUnitsGet : domProps -> string option
val mathematicalGet : domProps -> string option
val modeGet : domProps -> string option
val numOctavesGet : domProps -> string option
val offsetGet : domProps -> string option
val opacityGet : domProps -> string option
val operatorGet : domProps -> string option
val orderGet : domProps -> string option
val orientGet : domProps -> string option
val orientationGet : domProps -> string option
val originGet : domProps -> string option
val overflowGet : domProps -> string option
val overflowXGet : domProps -> string option
val overflowYGet : domProps -> string option
val overlinePositionGet : domProps -> string option
val overlineThicknessGet : domProps -> string option
val paintOrderGet : domProps -> string option
val panose1Get : domProps -> string option
val pathLengthGet : domProps -> string option
val patternContentUnitsGet : domProps -> string option
val patternTransformGet : domProps -> string option
val patternUnitsGet : domProps -> string option
val pointerEventsGet : domProps -> string option
val pointsGet : domProps -> string option
val pointsAtXGet : domProps -> string option
val pointsAtYGet : domProps -> string option
val pointsAtZGet : domProps -> string option
val preserveAlphaGet : domProps -> string option
val preserveAspectRatioGet : domProps -> string option
val primitiveUnitsGet : domProps -> string option
val rGet : domProps -> string option
val radiusGet : domProps -> string option
val refXGet : domProps -> string option
val refYGet : domProps -> string option
val renderingIntentGet : domProps -> string option
val repeatCountGet : domProps -> string option
val repeatDurGet : domProps -> string option
val requiredExtensionsGet : domProps -> string option
val requiredFeaturesGet : domProps -> string option
val restartGet : domProps -> string option
val resultGet : domProps -> string option
val rotateGet : domProps -> string option
val rxGet : domProps -> string option
val ryGet : domProps -> string option
val scaleGet : domProps -> string option
val seedGet : domProps -> string option
val shapeRenderingGet : domProps -> string option
val slopeGet : domProps -> string option
val spacingGet : domProps -> string option
val specularConstantGet : domProps -> string option
val specularExponentGet : domProps -> string option
val speedGet : domProps -> string option
val spreadMethodGet : domProps -> string option
val startOffsetGet : domProps -> string option
val stdDeviationGet : domProps -> string option
val stemhGet : domProps -> string option
val stemvGet : domProps -> string option
val stitchTilesGet : domProps -> string option
val stopColorGet : domProps -> string option
val stopOpacityGet : domProps -> string option
val strikethroughPositionGet : domProps -> string option
val strikethroughThicknessGet : domProps -> string option
val stringGet : domProps -> string option
val strokeGet : domProps -> string option
val strokeDasharrayGet : domProps -> string option
val strokeDashoffsetGet : domProps -> string option
val strokeLinecapGet : domProps -> string option
val strokeLinejoinGet : domProps -> string option
val strokeMiterlimitGet : domProps -> string option
val strokeOpacityGet : domProps -> string option
val strokeWidthGet : domProps -> string option
val surfaceScaleGet : domProps -> string option
val systemLanguageGet : domProps -> string option
val tableValuesGet : domProps -> string option
val targetXGet : domProps -> string option
val targetYGet : domProps -> string option
val textAnchorGet : domProps -> string option
val textDecorationGet : domProps -> string option
val textLengthGet : domProps -> string option
val textRenderingGet : domProps -> string option
val to_Get : domProps -> string option
val transformGet : domProps -> string option
val u1Get : domProps -> string option
val u2Get : domProps -> string option
val underlinePositionGet : domProps -> string option
val underlineThicknessGet : domProps -> string option
val unicodeGet : domProps -> string option
val unicodeBidiGet : domProps -> string option
val unicodeRangeGet : domProps -> string option
val unitsPerEmGet : domProps -> string option
val vAlphabeticGet : domProps -> string option
val vHangingGet : domProps -> string option
val vIdeographicGet : domProps -> string option
val vMathematicalGet : domProps -> string option
val valuesGet : domProps -> string option
val vectorEffectGet : domProps -> string option
val versionGet : domProps -> string option
val vertAdvXGet : domProps -> string option
val vertAdvYGet : domProps -> string option
val vertOriginXGet : domProps -> string option
val vertOriginYGet : domProps -> string option
val viewBoxGet : domProps -> string option
val viewTargetGet : domProps -> string option
val visibilityGet : domProps -> string option
val widthsGet : domProps -> string option
val wordSpacingGet : domProps -> string option
val writingModeGet : domProps -> string option
val xGet : domProps -> string option
val x1Get : domProps -> string option
val x2Get : domProps -> string option
val xChannelSelectorGet : domProps -> string option
val xHeightGet : domProps -> string option
val xlinkActuateGet : domProps -> string option
val xlinkArcroleGet : domProps -> string option
val xlinkHrefGet : domProps -> string option
val xlinkRoleGet : domProps -> string option
val xlinkShowGet : domProps -> string option
val xlinkTitleGet : domProps -> string option
val xlinkTypeGet : domProps -> string option
val xmlnsGet : domProps -> string option
val xmlnsXlinkGet : domProps -> string option
val xmlBaseGet : domProps -> string option
val xmlLangGet : domProps -> string option
val xmlSpaceGet : domProps -> string option
val yGet : domProps -> string option
val y1Get : domProps -> string option
val y2Get : domProps -> string option
val yChannelSelectorGet : domProps -> string option
val zGet : domProps -> string option
val zoomAndPanGet : domProps -> string option
val aboutGet : domProps -> string option
val datatypeGet : domProps -> string option
val inlistGet : domProps -> string option
val prefixGet : domProps -> string option
val propertyGet : domProps -> string option
val resourceGet : domProps -> string option
val typeofGet : domProps -> string option
val vocabGet : domProps -> string option
val dangerouslySetInnerHTMLGet : domProps -> < __html : string > Js.t option
val suppressContentEditableWarningGet : domProps -> bool option
val suppressHydrationWarningGet : domProps -> bool option
val stringToComponent : string -> domProps React.component
val createElement : + string -> + ?props:domProps -> + React.element array -> + React.element
val createDOMElementVariadic : + string -> + ?props:domProps -> + React.element array -> + React.element
val jsxKeyed : string -> domProps -> ?key:string -> unit -> React.element
val jsx : string -> domProps -> React.element
val jsxs : string -> domProps -> React.element
val jsxsKeyed : string -> domProps -> ?key:string -> unit -> React.element
diff --git a/findlib-1/reason-react/ReactDOMServer/index.html b/findlib-1/reason-react/ReactDOMServer/index.html new file mode 100644 index 000000000..4be356348 --- /dev/null +++ b/findlib-1/reason-react/ReactDOMServer/index.html @@ -0,0 +1,2 @@ + +ReactDOMServer (docs.findlib-1.reason-react.ReactDOMServer)

Module ReactDOMServer

val renderToString : React.element -> string
val renderToStaticMarkup : React.element -> string
diff --git a/findlib-1/reason-react/ReactDOMTestUtils/DOM/index.html b/findlib-1/reason-react/ReactDOMTestUtils/DOM/index.html new file mode 100644 index 000000000..9197e2425 --- /dev/null +++ b/findlib-1/reason-react/ReactDOMTestUtils/DOM/index.html @@ -0,0 +1,10 @@ + +DOM (docs.findlib-1.reason-react.ReactDOMTestUtils.DOM)

Module ReactDOMTestUtils.DOM

val value : Dom.element -> string option
val findBySelector : Dom.element -> string -> Dom.element option
val findByAllSelector : Dom.element -> string -> Dom.element array
val findBySelectorAndTextContent : + Dom.element -> + string -> + string -> + Dom.element option
val findBySelectorAndPartialTextContent : + Dom.element -> + string -> + string -> + Dom.element option
diff --git a/findlib-1/reason-react/ReactDOMTestUtils/Simulate/index.html b/findlib-1/reason-react/ReactDOMTestUtils/Simulate/index.html new file mode 100644 index 000000000..4ccba406b --- /dev/null +++ b/findlib-1/reason-react/ReactDOMTestUtils/Simulate/index.html @@ -0,0 +1,2 @@ + +Simulate (docs.findlib-1.reason-react.ReactDOMTestUtils.Simulate)

Module ReactDOMTestUtils.Simulate

val click : Dom.element -> unit
val clickWithEvent : Dom.element -> 'event -> unit
val change : Dom.element -> unit
val blur : Dom.element -> unit
val changeWithEvent : Dom.element -> 'event -> unit
val changeWithValue : Dom.element -> string -> unit
val changeWithChecked : Dom.element -> bool -> unit
val canPlay : Dom.element -> unit
val timeUpdate : Dom.element -> unit
val ended : Dom.element -> unit
val focus : Dom.element -> unit
diff --git a/findlib-1/reason-react/ReactDOMTestUtils/index.html b/findlib-1/reason-react/ReactDOMTestUtils/index.html new file mode 100644 index 000000000..cc6e94bb5 --- /dev/null +++ b/findlib-1/reason-react/ReactDOMTestUtils/index.html @@ -0,0 +1,2 @@ + +ReactDOMTestUtils (docs.findlib-1.reason-react.ReactDOMTestUtils)

Module ReactDOMTestUtils

val act : (unit -> unit) -> unit
val actAsync : (unit -> 'a Js.Promise.t) -> unit Js.Promise.t
val isElement : 'element -> bool
val isElementOfType : 'element -> 'props React.component -> bool
val isDOMComponent : 'element -> bool
val isCompositeComponent : 'element -> bool
val isCompositeComponentWithType : 'element -> 'props React.component -> bool
module Simulate : sig ... end
module DOM : sig ... end
val prepareContainer : Dom.element option ref -> unit -> unit
val cleanupContainer : Dom.element option ref -> unit -> unit
val getContainer : Dom.element option ref -> Dom.element
diff --git a/findlib-1/reason-react/ReactTestRenderer/Shallow/index.html b/findlib-1/reason-react/ReactTestRenderer/Shallow/index.html new file mode 100644 index 000000000..51aebccda --- /dev/null +++ b/findlib-1/reason-react/ReactTestRenderer/Shallow/index.html @@ -0,0 +1,2 @@ + +Shallow (docs.findlib-1.reason-react.ReactTestRenderer.Shallow)

Module ReactTestRenderer.Shallow

type t
val createRenderer : unit -> t
val render : t -> React.element -> React.element option
val getRenderOutput : t -> React.element option
val unmount : t -> unit
val renderWithRenderer : React.element -> React.element option
diff --git a/findlib-1/reason-react/ReactTestRenderer/index.html b/findlib-1/reason-react/ReactTestRenderer/index.html new file mode 100644 index 000000000..07e365e5e --- /dev/null +++ b/findlib-1/reason-react/ReactTestRenderer/index.html @@ -0,0 +1,2 @@ + +ReactTestRenderer (docs.findlib-1.reason-react.ReactTestRenderer)

Module ReactTestRenderer

type t
val create : React.element -> t
val toJSON : t -> Js.Json.t
val toObject : t -> < .. > Js.t
module Shallow : sig ... end
diff --git a/findlib-1/reason-react/ReasonReactErrorBoundary/index.html b/findlib-1/reason-react/ReasonReactErrorBoundary/index.html new file mode 100644 index 000000000..501fe6a35 --- /dev/null +++ b/findlib-1/reason-react/ReasonReactErrorBoundary/index.html @@ -0,0 +1,12 @@ + +ReasonReactErrorBoundary (docs.findlib-1.reason-react.ReasonReactErrorBoundary)

Module ReasonReactErrorBoundary

type info = {
  1. componentStack : string;
}

* Important note on this module: * As soon as React provides a mechanism for error-catching using functional component, * this is likely to be deprecated and/or move to user space.

type 'error params = {
  1. error : 'error;
  2. info : info;
}
val makeProps : + children:React.element -> + fallback:('error params -> React.element) -> + ?key:string -> + unit -> + < children : React.element ; fallback : 'error params -> React.element > Js.t
val make : + (< children : React.element + ; fallback : 'error params -> React.element > + Js.t, + React.element) + React.componentLike
diff --git a/findlib-1/reason-react/ReasonReactRouter/index.html b/findlib-1/reason-react/ReasonReactRouter/index.html new file mode 100644 index 000000000..50931e9d5 --- /dev/null +++ b/findlib-1/reason-react/ReasonReactRouter/index.html @@ -0,0 +1,2 @@ + +ReasonReactRouter (docs.findlib-1.reason-react.ReasonReactRouter)

Module ReasonReactRouter

val push : string -> unit

update the url with the string path. Example: `push("/book/1")`, `push("/books#title")`

val replace : string -> unit

update the url with the string path. modifies the current history entry instead of creating a new one. Example: `replace("/book/1")`, `replace("/books#title")`

type watcherID
type url = {
  1. path : string list;
  2. hash : string;
  3. search : string;
}
val watchUrl : (url -> unit) -> watcherID

start watching for URL changes. Returns a subscription token. Upon url change, calls the callback and passes it the url record

val unwatchUrl : watcherID -> unit

stop watching for URL changes

val dangerouslyGetInitialUrl : ?serverUrlString:string -> unit -> url

this is marked as "dangerous" because you technically shouldn't be accessing the URL outside of watchUrl's callback; you'd read a potentially stale url, instead of the fresh one inside watchUrl.

But this helper is sometimes needed, if you'd like to initialize a page whose display/state depends on the URL, instead of reading from it in watchUrl's callback, which you'd probably have put inside didMount (aka too late, the page's already rendered).

So, the correct (and idiomatic) usage of this helper is to only use it in a component that's also subscribed to watchUrl. Please see https://github.com/reasonml-community/reason-react-example/blob/master/src/todomvc/TodoItem.re for an example.

val useUrl : ?serverUrl:url -> unit -> url

hook for watching url changes. * serverUrl is used for ssr. it allows you to specify the url without relying on browser apis existing/working as expected

diff --git a/findlib-1/reason-react/index.html b/findlib-1/reason-react/index.html new file mode 100644 index 000000000..03b518fb2 --- /dev/null +++ b/findlib-1/reason-react/index.html @@ -0,0 +1,2 @@ + +reason-react (docs.findlib-1.reason-react)

Package reason-react

Library reason-react

This library exposes the following toplevel modules:

diff --git a/findlib-1/sexplib0/Sexplib0/Sexp/Private/index.html b/findlib-1/sexplib0/Sexplib0/Sexp/Private/index.html new file mode 100644 index 000000000..cfbbae322 --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexp/Private/index.html @@ -0,0 +1,7 @@ + +Private (docs.findlib-1.sexplib0.Sexplib0.Sexp.Private)

Module Sexp.Private

val size : t -> int * int
val buffer : unit -> Buffer.t
val to_buffer : buf:Buffer.t -> t -> unit
val to_buffer_hum : buf:Buffer.t -> ?indent:int -> t -> unit
val to_buffer_mach : buf:Buffer.t -> t -> unit
val to_buffer_gen : + buf:'buffer -> + add_char:('buffer -> char -> unit) -> + add_string:('buffer -> string -> unit) -> + t -> + unit
val mach_maybe_esc_str : string -> string
val must_escape : string -> bool
val esc_str : string -> string
diff --git a/findlib-1/sexplib0/Sexplib0/Sexp/index.html b/findlib-1/sexplib0/Sexplib0/Sexp/index.html new file mode 100644 index 000000000..4fbbf3f01 --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexp/index.html @@ -0,0 +1,5 @@ + +Sexp (docs.findlib-1.sexplib0.Sexplib0.Sexp)

Module Sexplib0.Sexp

Type of S-expressions

type t =
  1. | Atom of string
  2. | List of t list
val t_of_sexp : t -> t
val sexp_of_t : t -> t
val equal : t -> t -> bool
val compare : t -> t -> int
exception Not_found_s of t

Not_found_s is used by functions that historically raised Not_found, to allow them to raise an exception that contains an informative error message (as a sexp), while still having an exception that can be distinguished from other exceptions.

exception Of_sexp_error of exn * t

Of_sexp_error (exn, sexp) the exception raised when an S-expression could not be successfully converted to an OCaml-value.

Helpers

val message : string -> (string * t) list -> t

Helper to build nice s-expressions for error messages. It imitates the behavior of [%message ...] from the ppx_sexp_message rewriter.

message name key_values produces a s-expression list starting with atom name and followed by list of size 2 of the form (key value). When the key is the empty string, value is used directly instead as for [%message].

For instance the following code:

Sexp.message "error"
+  [ "x", sexp_of_int 42
+  ; "" , sexp_of_exn Exit
+  ]

produces the s-expression:

(error (x 42) Exit)

Defaults

val default_indent : int ref

default_indent reference to default indentation level for human-readable conversions.

Initialisation value: 2.

Pretty printing of S-expressions

val pp_hum : Format.formatter -> t -> unit

pp_hum ppf sexp outputs S-expression sexp to formatter ppf in human readable form.

val pp_hum_indent : int -> Format.formatter -> t -> unit

pp_hum_indent n ppf sexp outputs S-expression sexp to formatter ppf in human readable form and indentation level n.

val pp_mach : Format.formatter -> t -> unit

pp_mach ppf sexp outputs S-expression sexp to formatter ppf in machine readable (i.e. most compact) form.

val pp : Format.formatter -> t -> unit

Same as pp_mach.

Conversion to strings

val to_string_hum : ?indent:int -> t -> string

to_string_hum ?indent sexp converts S-expression sexp to a string in human readable form with indentation level indent.

  • parameter indent

    default = !default_indent

val to_string_mach : t -> string

to_string_mach sexp converts S-expression sexp to a string in machine readable (i.e. most compact) form.

val to_string : t -> string

Same as to_string_mach.

Styles

val of_float_style : [ `Underscores | `No_underscores ] ref
val of_int_style : [ `Underscores | `No_underscores ] ref
module Private : sig ... end
diff --git a/findlib-1/sexplib0/Sexplib0/Sexp_conv/Exn_converter/For_unit_tests_only/index.html b/findlib-1/sexplib0/Sexplib0/Sexp_conv/Exn_converter/For_unit_tests_only/index.html new file mode 100644 index 000000000..7bda31b47 --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexp_conv/Exn_converter/For_unit_tests_only/index.html @@ -0,0 +1,2 @@ + +For_unit_tests_only (docs.findlib-1.sexplib0.Sexplib0.Sexp_conv.Exn_converter.For_unit_tests_only)

Module Exn_converter.For_unit_tests_only

val size : unit -> int
diff --git a/findlib-1/sexplib0/Sexplib0/Sexp_conv/Exn_converter/index.html b/findlib-1/sexplib0/Sexplib0/Sexp_conv/Exn_converter/index.html new file mode 100644 index 000000000..2b100cc08 --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexp_conv/Exn_converter/index.html @@ -0,0 +1,7 @@ + +Exn_converter (docs.findlib-1.sexplib0.Sexplib0.Sexp_conv.Exn_converter)

Module Sexp_conv.Exn_converter

val add : + ?printexc:bool -> + ?finalise:bool -> + extension_constructor -> + (exn -> Sexp.t) -> + unit

add constructor sexp_of_exn registers exception S-expression converter sexp_of_exn for exceptions with the given constructor.

NOTE: finalise is ignored, and provided only for backward compatibility.

module For_unit_tests_only : sig ... end
diff --git a/findlib-1/sexplib0/Sexplib0/Sexp_conv/index.html b/findlib-1/sexplib0/Sexplib0/Sexp_conv/index.html new file mode 100644 index 000000000..c83749252 --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexp_conv/index.html @@ -0,0 +1,29 @@ + +Sexp_conv (docs.findlib-1.sexplib0.Sexplib0.Sexp_conv)

Module Sexplib0.Sexp_conv

Utility Module for S-expression Conversions

Conversion of OCaml-values to S-expressions
val default_string_of_float : (float -> string) ref

default_string_of_float reference to the default function used to convert floats to strings.

Initially set to fun n -> sprintf "%.20G" n.

val write_old_option_format : bool ref

write_old_option_format reference for the default option format used to write option values. If set to true, the old-style option format will be used, the new-style one otherwise.

Initially set to true.

val read_old_option_format : bool ref

read_old_option_format reference for the default option format used to read option values. Of_sexp_error will be raised with old-style option values if this reference is set to false. Reading new-style option values is always supported. Using a global reference instead of changing the converter calling conventions is the only way to avoid breaking old code with the standard macros.

Initially set to true.

val list_map : ('a -> 'b) -> 'a list -> 'b list

We re-export a tail recursive map function, because some modules override the standard library functions (e.g. StdLabels) which wrecks havoc with the camlp4 extension.

val sexp_of_unit : unit -> Sexp.t

sexp_of_unit () converts a value of type unit to an S-expression.

val sexp_of_bool : bool -> Sexp.t

sexp_of_bool b converts the value x of type bool to an S-expression.

val sexp_of_string : string -> Sexp.t

sexp_of_string str converts the value str of type string to an S-expression.

val sexp_of_bytes : bytes -> Sexp.t

sexp_of_bytes str converts the value str of type bytes to an S-expression.

val sexp_of_char : char -> Sexp.t

sexp_of_char c converts the value c of type char to an S-expression.

val sexp_of_int : int -> Sexp.t

sexp_of_int n converts the value n of type int to an S-expression.

val sexp_of_float : float -> Sexp.t

sexp_of_float n converts the value n of type float to an S-expression.

val sexp_of_int32 : int32 -> Sexp.t

sexp_of_int32 n converts the value n of type int32 to an S-expression.

val sexp_of_int64 : int64 -> Sexp.t

sexp_of_int64 n converts the value n of type int64 to an S-expression.

val sexp_of_nativeint : nativeint -> Sexp.t

sexp_of_nativeint n converts the value n of type nativeint to an S-expression.

val sexp_of_ref : ('a -> Sexp.t) -> 'a ref -> Sexp.t

sexp_of_ref conv r converts the value r of type 'a ref to an S-expression. Uses conv to convert values of type 'a to an S-expression.

val sexp_of_lazy_t : ('a -> Sexp.t) -> 'a lazy_t -> Sexp.t

sexp_of_lazy_t conv l converts the value l of type 'a lazy_t to an S-expression. Uses conv to convert values of type 'a to an S-expression.

val sexp_of_option : ('a -> Sexp.t) -> 'a option -> Sexp.t

sexp_of_option conv opt converts the value opt of type 'a + option to an S-expression. Uses conv to convert values of type 'a to an S-expression.

val sexp_of_pair : ('a -> Sexp.t) -> ('b -> Sexp.t) -> ('a * 'b) -> Sexp.t

sexp_of_pair conv1 conv2 pair converts a pair to an S-expression. It uses its first argument to convert the first element of the pair, and its second argument to convert the second element of the pair.

val sexp_of_triple : + ('a -> Sexp.t) -> + ('b -> Sexp.t) -> + ('c -> Sexp.t) -> + ('a * 'b * 'c) -> + Sexp.t

sexp_of_triple conv1 conv2 conv3 triple converts a triple to an S-expression using conv1, conv2, and conv3 to convert its elements.

val sexp_of_list : ('a -> Sexp.t) -> 'a list -> Sexp.t

sexp_of_list conv lst converts the value lst of type 'a + list to an S-expression. Uses conv to convert values of type 'a to an S-expression.

val sexp_of_array : ('a -> Sexp.t) -> 'a array -> Sexp.t

sexp_of_array conv ar converts the value ar of type 'a + array to an S-expression. Uses conv to convert values of type 'a to an S-expression.

val sexp_of_hashtbl : + ('a -> Sexp.t) -> + ('b -> Sexp.t) -> + ('a, 'b) Hashtbl.t -> + Sexp.t

sexp_of_hashtbl conv_key conv_value htbl converts the value htbl of type ('a, 'b) Hashtbl.t to an S-expression. Uses conv_key to convert the hashtable keys of type 'a, and conv_value to convert hashtable values of type 'b to S-expressions.

val sexp_of_opaque : 'a -> Sexp.t

sexp_of_opaque x converts the value x of opaque type to an S-expression. This means the user need not provide converters, but the result cannot be interpreted.

val sexp_of_fun : ('a -> 'b) -> Sexp.t

sexp_of_fun f converts the value f of function type to a dummy S-expression. Functions cannot be serialized as S-expressions, but at least a placeholder can be generated for pretty-printing.

Conversion of S-expressions to OCaml-values
exception Of_sexp_error of exn * Sexp.t

Of_sexp_error (exn, sexp) the exception raised when an S-expression could not be successfully converted to an OCaml-value.

val record_check_extra_fields : bool ref

record_check_extra_fields checks for extra (= unknown) fields in record S-expressions.

val of_sexp_error : string -> Sexp.t -> 'a

of_sexp_error reason sexp

val of_sexp_error_exn : exn -> Sexp.t -> 'a

of_sexp_error exc sexp

val unit_of_sexp : Sexp.t -> unit

unit_of_sexp sexp converts S-expression sexp to a value of type unit.

val bool_of_sexp : Sexp.t -> bool

bool_of_sexp sexp converts S-expression sexp to a value of type bool.

val string_of_sexp : Sexp.t -> string

string_of_sexp sexp converts S-expression sexp to a value of type string.

val bytes_of_sexp : Sexp.t -> bytes

bytes_of_sexp sexp converts S-expression sexp to a value of type bytes.

val char_of_sexp : Sexp.t -> char

char_of_sexp sexp converts S-expression sexp to a value of type char.

val int_of_sexp : Sexp.t -> int

int_of_sexp sexp converts S-expression sexp to a value of type int.

val float_of_sexp : Sexp.t -> float

float_of_sexp sexp converts S-expression sexp to a value of type float.

val int32_of_sexp : Sexp.t -> int32

int32_of_sexp sexp converts S-expression sexp to a value of type int32.

val int64_of_sexp : Sexp.t -> int64

int64_of_sexp sexp converts S-expression sexp to a value of type int64.

val nativeint_of_sexp : Sexp.t -> nativeint

nativeint_of_sexp sexp converts S-expression sexp to a value of type nativeint.

val ref_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a ref

ref_of_sexp conv sexp converts S-expression sexp to a value of type 'a ref using conversion function conv, which converts an S-expression to a value of type 'a.

val lazy_t_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a lazy_t

lazy_t_of_sexp conv sexp converts S-expression sexp to a value of type 'a lazy_t using conversion function conv, which converts an S-expression to a value of type 'a.

val option_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a option

option_of_sexp conv sexp converts S-expression sexp to a value of type 'a option using conversion function conv, which converts an S-expression to a value of type 'a.

val pair_of_sexp : (Sexp.t -> 'a) -> (Sexp.t -> 'b) -> Sexp.t -> 'a * 'b

pair_of_sexp conv1 conv2 sexp converts S-expression sexp to a pair of type 'a * 'b using conversion functions conv1 and conv2, which convert S-expressions to values of type 'a and 'b respectively.

val triple_of_sexp : + (Sexp.t -> 'a) -> + (Sexp.t -> 'b) -> + (Sexp.t -> 'c) -> + Sexp.t -> + 'a * 'b * 'c

triple_of_sexp conv1 conv2 conv3 sexp converts S-expression sexp to a triple of type 'a * 'b * 'c using conversion functions conv1, conv2, and conv3, which convert S-expressions to values of type 'a, 'b, and 'c respectively.

val list_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a list

list_of_sexp conv sexp converts S-expression sexp to a value of type 'a list using conversion function conv, which converts an S-expression to a value of type 'a.

val array_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a array

array_of_sexp conv sexp converts S-expression sexp to a value of type 'a array using conversion function conv, which converts an S-expression to a value of type 'a.

val hashtbl_of_sexp : + (Sexp.t -> 'a) -> + (Sexp.t -> 'b) -> + Sexp.t -> + ('a, 'b) Hashtbl.t

hashtbl_of_sexp conv_key conv_value sexp converts S-expression sexp to a value of type ('a, 'b) Hashtbl.t using conversion function conv_key, which converts an S-expression to hashtable key of type 'a, and function conv_value, which converts an S-expression to hashtable value of type 'b.

val opaque_of_sexp : Sexp.t -> 'a

opaque_of_sexp sexp

  • raises Of_sexp_error

    when attempting to convert an S-expression to an opaque value.

val fun_of_sexp : Sexp.t -> 'a

fun_of_sexp sexp

  • raises Of_sexp_error

    when attempting to convert an S-expression to a function.

Sexp Grammars

val sexp_grammar_with_tags : + Sexp_grammar.grammar -> + tags:(string * Sexp.t) list -> + Sexp_grammar.grammar
val sexp_grammar_with_tag_list : + 'a Sexp_grammar.with_tag_list -> + tags:(string * Sexp.t) list -> + 'a Sexp_grammar.with_tag_list

Sexp grammar definitions.

val unit_sexp_grammar : unit Sexp_grammar.t
val bool_sexp_grammar : bool Sexp_grammar.t
val string_sexp_grammar : string Sexp_grammar.t
val bytes_sexp_grammar : bytes Sexp_grammar.t
val char_sexp_grammar : char Sexp_grammar.t
val int_sexp_grammar : int Sexp_grammar.t
val float_sexp_grammar : float Sexp_grammar.t
val int32_sexp_grammar : int32 Sexp_grammar.t
val int64_sexp_grammar : int64 Sexp_grammar.t
val nativeint_sexp_grammar : nativeint Sexp_grammar.t
val sexp_t_sexp_grammar : Sexp.t Sexp_grammar.t
val ref_sexp_grammar : 'a Sexp_grammar.t -> 'a ref Sexp_grammar.t
val lazy_t_sexp_grammar : 'a Sexp_grammar.t -> 'a lazy_t Sexp_grammar.t
val option_sexp_grammar : 'a Sexp_grammar.t -> 'a option Sexp_grammar.t
val list_sexp_grammar : 'a Sexp_grammar.t -> 'a list Sexp_grammar.t
val array_sexp_grammar : 'a Sexp_grammar.t -> 'a array Sexp_grammar.t
val opaque_sexp_grammar : 'a Sexp_grammar.t
val fun_sexp_grammar : 'a Sexp_grammar.t

Exception converters

val sexp_of_exn : exn -> Sexp.t

sexp_of_exn exc converts exception exc to an S-expression. If no suitable converter is found, the standard converter in Printexc will be used to generate an atomic S-expression.

val printexc_prefer_sexp : exn -> string

Converts an exception to a string via sexp, falling back to Printexc.to_string if no sexp conversion is registered for this exception.

This is different from Printexc.to_string in that it additionally uses the sexp converters registered with ~printexc:false. Another difference is that the behavior of Printexc can be overridden with Printexc.register, but here we always try sexp conversion first.

val sexp_of_exn_opt : exn -> Sexp.t option

sexp_of_exn_opt exc converts exception exc to Some sexp. If no suitable converter is found, None is returned instead.

module Exn_converter : sig ... end
diff --git a/findlib-1/sexplib0/Sexplib0/Sexp_conv_error/index.html b/findlib-1/sexplib0/Sexplib0/Sexp_conv_error/index.html new file mode 100644 index 000000000..b844cd79a --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexp_conv_error/index.html @@ -0,0 +1,7 @@ + +Sexp_conv_error (docs.findlib-1.sexplib0.Sexplib0.Sexp_conv_error)

Module Sexplib0.Sexp_conv_error

exception Of_sexp_error of exn * Sexp.t
val error : loc:string -> sexp:Sexp.t -> string -> 'a
val simple_error : string -> string -> Sexp.t -> 'a
val tuple_of_size_n_expected : string -> int -> Sexp.t -> 'a
val tuple_pair_expected : string -> string -> Sexp.t -> 'a
val tuple_incorrect_label : string -> string -> int -> Sexp.t -> 'a
val stag_no_args : string -> Sexp.t -> 'a
val stag_incorrect_n_args : string -> string -> Sexp.t -> 'a
val stag_takes_args : string -> Sexp.t -> 'a
val nested_list_invalid_sum : string -> Sexp.t -> 'a
val empty_list_invalid_sum : string -> Sexp.t -> 'a
val unexpected_stag : string -> Sexp.t -> 'a
val record_sexp_bool_with_payload : string -> Sexp.t -> 'a
val record_only_pairs_expected : string -> Sexp.t -> 'a
val record_invalid_fields : + what:string -> + loc:string -> + string list -> + Sexp.t -> + 'a
val record_duplicate_fields : string -> string list -> Sexp.t -> 'a
val record_extra_fields : string -> string list -> Sexp.t -> 'a
val record_get_undefined_loop : string list -> (bool * string) list -> string
val record_undefined_elements : string -> Sexp.t -> (bool * string) list -> 'a
val record_list_instead_atom : string -> Sexp.t -> 'a
val record_poly_field_value : string -> Sexp.t -> 'a
exception No_variant_match
val no_variant_match : unit -> 'a
val no_matching_variant_found : string -> Sexp.t -> 'a
val ptag_no_args : string -> Sexp.t -> 'a
val ptag_incorrect_n_args : string -> string -> Sexp.t -> 'a
val ptag_takes_args : string -> Sexp.t -> 'a
val nested_list_invalid_poly_var : string -> Sexp.t -> 'a
val empty_list_invalid_poly_var : string -> Sexp.t -> 'a
val empty_type : string -> Sexp.t -> 'a
diff --git a/findlib-1/sexplib0/Sexplib0/Sexp_conv_labeled_tuple/Fields/index.html b/findlib-1/sexplib0/Sexplib0/Sexp_conv_labeled_tuple/Fields/index.html new file mode 100644 index 000000000..dda1f7e09 --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexp_conv_labeled_tuple/Fields/index.html @@ -0,0 +1,2 @@ + +Fields (docs.findlib-1.sexplib0.Sexplib0.Sexp_conv_labeled_tuple.Fields)

Module Sexp_conv_labeled_tuple.Fields

type _ t =
  1. | Field : {
    1. name : string;
    2. conv : Sexp.t -> 'a;
    3. rest : 'b t;
    } -> ('a * 'b) t
  2. | Empty : unit t
diff --git a/findlib-1/sexplib0/Sexplib0/Sexp_conv_labeled_tuple/index.html b/findlib-1/sexplib0/Sexplib0/Sexp_conv_labeled_tuple/index.html new file mode 100644 index 000000000..93d7f7332 --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexp_conv_labeled_tuple/index.html @@ -0,0 +1,7 @@ + +Sexp_conv_labeled_tuple (docs.findlib-1.sexplib0.Sexplib0.Sexp_conv_labeled_tuple)

Module Sexplib0.Sexp_conv_labeled_tuple

module Fields : sig ... end
val labeled_tuple_of_sexp : + caller:string -> + fields:'a Fields.t -> + create:('a -> 'b) -> + Sexp.t -> + 'b
diff --git a/findlib-1/sexplib0/Sexplib0/Sexp_conv_record/Fields/index.html b/findlib-1/sexplib0/Sexplib0/Sexp_conv_record/Fields/index.html new file mode 100644 index 000000000..413bf11c7 --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexp_conv_record/Fields/index.html @@ -0,0 +1,2 @@ + +Fields (docs.findlib-1.sexplib0.Sexplib0.Sexp_conv_record.Fields)

Module Sexp_conv_record.Fields

type _ t =
  1. | Empty : unit t
  2. | Field : {
    1. name : string;
    2. kind : ('a, 'conv) Kind.t;
    3. conv : 'conv;
    4. rest : 'b t;
    } -> ('a * 'b) t

A GADT specifying record fields.

diff --git a/findlib-1/sexplib0/Sexplib0/Sexp_conv_record/Kind/index.html b/findlib-1/sexplib0/Sexplib0/Sexp_conv_record/Kind/index.html new file mode 100644 index 000000000..9705775b1 --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexp_conv_record/Kind/index.html @@ -0,0 +1,2 @@ + +Kind (docs.findlib-1.sexplib0.Sexplib0.Sexp_conv_record.Kind)

Module Sexp_conv_record.Kind

type (_, _) t =
  1. | Default : (unit -> 'a) -> ('a, Sexp.t -> 'a) t
  2. | Omit_nil : ('a, Sexp.t -> 'a) t
  3. | Required : ('a, Sexp.t -> 'a) t
  4. | Sexp_array : ('a array, Sexp.t -> 'a) t
  5. | Sexp_bool : (bool, unit) t
  6. | Sexp_list : ('a list, Sexp.t -> 'a) t
  7. | Sexp_option : ('a option, Sexp.t -> 'a) t

A GADT specifying how to parse a record field. See documentation for ppx_sexp_conv.

diff --git a/findlib-1/sexplib0/Sexplib0/Sexp_conv_record/index.html b/findlib-1/sexplib0/Sexplib0/Sexp_conv_record/index.html new file mode 100644 index 000000000..0d8abd551 --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexp_conv_record/index.html @@ -0,0 +1,17 @@ + +Sexp_conv_record (docs.findlib-1.sexplib0.Sexplib0.Sexp_conv_record)

Module Sexplib0.Sexp_conv_record

module Kind : sig ... end
module Fields : sig ... end
val record_of_sexp : + caller:string -> + fields:'a Fields.t -> + index_of_field:(string -> int) -> + allow_extra_fields:bool -> + create:('a -> 'b) -> + Sexp.t -> + 'b

Parses a record from a sexp that must be a list of fields.

Uses caller as the source for error messages. Parses using the given fields. Uses index_of_field to look up field names found in sexps. If allow_extra_fields is true, extra fields are allowed and discarded without error. create is used to construct the final returned value.

val record_of_sexps : + caller:string -> + context:Sexp.t -> + fields:'a Fields.t -> + index_of_field:(string -> int) -> + allow_extra_fields:bool -> + create:('a -> 'b) -> + Sexp.t list -> + 'b

Like record_of_sexp, but for a list of sexps with no List wrapper. Used, for example, to parse arguments to a variant constructor with an inlined record argument. Reports context for parse errors when no more specific sexp is applicable.

diff --git a/findlib-1/sexplib0/Sexplib0/Sexp_grammar/index.html b/findlib-1/sexplib0/Sexplib0/Sexp_grammar/index.html new file mode 100644 index 000000000..e9609a70c --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexp_grammar/index.html @@ -0,0 +1,39 @@ + +Sexp_grammar (docs.findlib-1.sexplib0.Sexplib0.Sexp_grammar)

Module Sexplib0.Sexp_grammar

Representation of S-expression grammars

This module defines a representation for s-expression grammars. Using ppx_sexp_conv and [@@deriving sexp_grammar] produces a grammar that is compatible with the derived of_sexp for a given type.

As with other derived definitions, polymorphic types derive a function that takes a grammar for each type argument and produces a grammar for the monomorphized type.

Monomorphic types derive a grammar directly. To avoid top-level side effects, [@@deriving sexp_grammar] wraps grammars in the Lazy constructor as needed.

This type may change over time as our needs for expressive grammars change. We will attempt to make changes backward-compatible, or at least provide a reasonable upgrade path.

type grammar =
  1. | Any of string
    (*

    accepts any sexp; string is a type name for human readability

    *)
  2. | Bool
    (*

    accepts the atoms "true" or "false", modulo capitalization

    *)
  3. | Char
    (*

    accepts any single-character atom

    *)
  4. | Integer
    (*

    accepts any atom matching ocaml integer syntax, regardless of bit width

    *)
  5. | Float
    (*

    accepts any atom matching ocaml float syntax

    *)
  6. | String
    (*

    accepts any atom

    *)
  7. | Option of grammar
    (*

    accepts an option, both None vs Some _ and () vs (_).

    *)
  8. | List of list_grammar
    (*

    accepts a list

    *)
  9. | Variant of variant
    (*

    accepts clauses keyed by a leading or sole atom

    *)
  10. | Union of grammar list
    (*

    accepts a sexp if any of the listed grammars accepts it

    *)
  11. | Tagged of grammar with_tag
    (*

    annotates a grammar with a client-specific key/value pair

    *)
  12. | Tyvar of string
    (*

    Name of a type variable, e.g. Tyvar "a" for 'a. Only meaningful when the body of the innermost enclosing defn defines a corresponding type variable.

    *)
  13. | Tycon of string * grammar list * defn list
    (*

    Type constructor applied to arguments, and its definition.

    For example, writing Tycon ("tree", [ Integer ], defns) represents int tree, for whatever tree is defined as in defns. The following defines tree as a binary tree with the parameter type stored at the leaves.

    let defns =
    +  [ { tycon = "tree"
    +    ; tyvars = ["a"]
    +    ; grammar =
    +        Variant
    +          { name_kind = Capitalized
    +          ; clauses =
    +              [ { name = "Node"
    +                ; args = Cons (Recursive ("node", [Tyvar "a"]), Empty)
    +                }
    +              ; { name = "Leaf"
    +                ; args = Cons (Recursive ("leaf", [Tyvar "a"]), Empty)
    +                }
    +              ]
    +          }
    +    }
    +  ; { tycon = "node"
    +    ; tyvars = ["a"]
    +    ; grammar = List (Many (Recursive "tree", [Tyvar "a"]))
    +    }
    +  ; { tycon = "leaf"
    +    ; tyvars = ["a"]
    +    ; grammar = [Tyvar "a"]
    +    }
    +  ]
    +;;

    To illustrate the meaning of Tycon with respect to defns, and to demonstrate one way to access them, it is equivalent to expand the definition of "tree" one level and move the defns to enclosed recursive references:

    Tycon ("tree", [ Integer ], defns)
    +-->
    +Variant
    +  { name_kind = Capitalized
    +  ; clauses =
    +      [ { name = "Node"
    +        ; args = Cons (Tycon ("node", [Tyvar "a"], defns), Empty)
    +        }
    +      ; { name = "Leaf"
    +        ; args = Cons (Tycon ("leaf", [Tyvar "a"], defns), Empty)
    +        }
    +      ]
    +  }

    This transformation exposes the structure of a grammar with recursive references, while preserving the meaning of recursively-defined elements.

    *)
  14. | Recursive of string * grammar list
    (*

    Type constructor applied to arguments. Used to denote recursive type references. Only meaningful when used inside the defns of a Tycon grammar, to refer to a type constructor in the nearest enclosing defn list.

    *)
  15. | Lazy of grammar lazy_t
    (*

    Lazily computed grammar. Use Lazy to avoid top-level side effects. To define recursive grammars, use Recursive instead.

    *)

Grammar of a sexp.

and list_grammar =
  1. | Empty
    (*

    accepts an empty list of sexps

    *)
  2. | Cons of grammar * list_grammar
    (*

    accepts a non-empty list with head and tail matching the given grammars

    *)
  3. | Many of grammar
    (*

    accepts zero or more sexps, each matching the given grammar

    *)
  4. | Fields of record
    (*

    accepts sexps representing fields of a record

    *)

Grammar of a list of sexps.

and case_sensitivity =
  1. | Case_insensitive
    (*

    Comparison is case insensitive. Used for custom parsers.

    *)
  2. | Case_sensitive
    (*

    Comparison is case sensitive. Used for polymorphic variants.

    *)
  3. | Case_sensitive_except_first_character
    (*

    Comparison is case insensitive for the first character and case sensitive afterward. Used for regular variants.

    *)

Case sensitivity options for names of variant constructors.

and variant = {
  1. case_sensitivity : case_sensitivity;
  2. clauses : clause with_tag_list list;
}

Grammar of variants. Accepts any sexp matching one of the clauses.

and clause = {
  1. name : string;
  2. clause_kind : clause_kind;
}

Grammar of a single variant clause. Accepts sexps based on the clause_kind.

and clause_kind =
  1. | Atom_clause
  2. | List_clause of {
    1. args : list_grammar;
    }

Grammar of a single variant clause's contents. Atom_clause accepts an atom matching the clause's name. List_clause accepts a list whose head is an atom matching the clause's name and whose tail matches args. The clause's name is matched modulo the variant's name_kind.

and record = {
  1. allow_extra_fields : bool;
  2. fields : field with_tag_list list;
}

Grammar of a record. Accepts any list of sexps specifying each of the fields, regardless of order. If allow_extra_fields is specified, ignores sexps with names not found in fields.

and field = {
  1. name : string;
  2. required : bool;
  3. args : list_grammar;
}

Grammar of a record field. A field must show up exactly once in a record if required, or at most once otherwise. Accepts a list headed by name as an atom, followed by sexps matching args.

and 'a with_tag = {
  1. key : string;
  2. value : Sexp.t;
  3. grammar : 'a;
}

Grammar tagged with client-specific key/value pair.

and 'a with_tag_list =
  1. | Tag of 'a with_tag_list with_tag
  2. | No_tag of 'a
and defn = {
  1. tycon : string;
  2. tyvars : string list;
  3. grammar : grammar;
}

Grammar of a recursive type definition. Names the tycon being defined, and the tyvars it takes as parameters. Specifies the grammar of the tycon. The grammar may refer to any of the tyvars, and to any of the tycons from the same set of Recursive definitions.

type _ t = {
  1. untyped : grammar;
}

Top-level grammar type. Has a phantom type parameter to associate each grammar with the type its sexps represent. This makes it harder to apply grammars to the wrong type, while grammars can still be easily coerced to a new type if needed.

val coerce : 'a t -> 'b t
val tag : 'a t -> key:string -> value:Sexp.t -> 'a0 t
val doc_comment_tag : string

This reserved key is used for all tags generated from doc comments.

val type_name_tag : string

This reserved key can be used to associate a type name with a grammar.

val assoc_tag : string

This reserved key indicates that a sexp represents a key/value association. The tag's value is ignored.

val assoc_key_tag : string

This reserved key indicates that a sexp is a key in a key/value association. The tag's value is ignored.

val assoc_value_tag : string

This reserved key indicates that a sexp is a value in a key/value association. The tag's value is ignored.

val completion_suggested : string

When the key is set to Atom "false" for a variant clause, that clause should not be suggested in auto-completion based on the sexp grammar.

diff --git a/findlib-1/sexplib0/Sexplib0/Sexpable/index.html b/findlib-1/sexplib0/Sexplib0/Sexpable/index.html new file mode 100644 index 000000000..3709d325d --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexpable/index.html @@ -0,0 +1,2 @@ + +Sexpable (docs.findlib-1.sexplib0.Sexplib0.Sexpable)

Module Sexplib0.Sexpable

module type S = sig ... end
module type S1 = sig ... end
module type S2 = sig ... end
module type S3 = sig ... end
diff --git a/findlib-1/sexplib0/Sexplib0/Sexpable/module-type-S/index.html b/findlib-1/sexplib0/Sexplib0/Sexpable/module-type-S/index.html new file mode 100644 index 000000000..1530743d6 --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexpable/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (docs.findlib-1.sexplib0.Sexplib0.Sexpable.S)

Module type Sexpable.S

type t
val t_of_sexp : Sexp.t -> t
val sexp_of_t : t -> Sexp.t
diff --git a/findlib-1/sexplib0/Sexplib0/Sexpable/module-type-S1/index.html b/findlib-1/sexplib0/Sexplib0/Sexpable/module-type-S1/index.html new file mode 100644 index 000000000..c0f171f30 --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexpable/module-type-S1/index.html @@ -0,0 +1,2 @@ + +S1 (docs.findlib-1.sexplib0.Sexplib0.Sexpable.S1)

Module type Sexpable.S1

type 'a t
val t_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexp.t) -> 'a t -> Sexp.t
diff --git a/findlib-1/sexplib0/Sexplib0/Sexpable/module-type-S2/index.html b/findlib-1/sexplib0/Sexplib0/Sexpable/module-type-S2/index.html new file mode 100644 index 000000000..f87369175 --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexpable/module-type-S2/index.html @@ -0,0 +1,2 @@ + +S2 (docs.findlib-1.sexplib0.Sexplib0.Sexpable.S2)

Module type Sexpable.S2

type ('a, 'b) t
val t_of_sexp : (Sexp.t -> 'a) -> (Sexp.t -> 'b) -> Sexp.t -> ('a, 'b) t
val sexp_of_t : ('a -> Sexp.t) -> ('b -> Sexp.t) -> ('a, 'b) t -> Sexp.t
diff --git a/findlib-1/sexplib0/Sexplib0/Sexpable/module-type-S3/index.html b/findlib-1/sexplib0/Sexplib0/Sexpable/module-type-S3/index.html new file mode 100644 index 000000000..0eec16f6d --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/Sexpable/module-type-S3/index.html @@ -0,0 +1,12 @@ + +S3 (docs.findlib-1.sexplib0.Sexplib0.Sexpable.S3)

Module type Sexpable.S3

type ('a, 'b, 'c) t
val t_of_sexp : + (Sexp.t -> 'a) -> + (Sexp.t -> 'b) -> + (Sexp.t -> 'c) -> + Sexp.t -> + ('a, 'b, 'c) t
val sexp_of_t : + ('a -> Sexp.t) -> + ('b -> Sexp.t) -> + ('c -> Sexp.t) -> + ('a, 'b, 'c) t -> + Sexp.t
diff --git a/findlib-1/sexplib0/Sexplib0/index.html b/findlib-1/sexplib0/Sexplib0/index.html new file mode 100644 index 000000000..9a76b6fd4 --- /dev/null +++ b/findlib-1/sexplib0/Sexplib0/index.html @@ -0,0 +1,2 @@ + +Sexplib0 (docs.findlib-1.sexplib0.Sexplib0)

Module Sexplib0

module Sexp : sig ... end

Type of S-expressions

module Sexp_conv : sig ... end

Utility Module for S-expression Conversions

module Sexp_conv_error : sig ... end
module Sexp_conv_record : sig ... end
module Sexp_conv_labeled_tuple : sig ... end
module Sexp_grammar : sig ... end

Representation of S-expression grammars

module Sexpable : sig ... end
diff --git a/findlib-1/sexplib0/index.html b/findlib-1/sexplib0/index.html new file mode 100644 index 000000000..e1f889147 --- /dev/null +++ b/findlib-1/sexplib0/index.html @@ -0,0 +1,2 @@ + +sexplib0 (docs.findlib-1.sexplib0)

Package sexplib0

Library sexplib0

The entry point of this library is the module: Sexplib0.

diff --git a/findlib-1/stdlib-shims/index.html b/findlib-1/stdlib-shims/index.html new file mode 100644 index 000000000..94c3759a2 --- /dev/null +++ b/findlib-1/stdlib-shims/index.html @@ -0,0 +1,2 @@ + +stdlib-shims (docs.findlib-1.stdlib-shims)

Package stdlib-shims

diff --git a/findlib-1/stringext/Stringext/index.html b/findlib-1/stringext/Stringext/index.html new file mode 100644 index 000000000..9c58d2be7 --- /dev/null +++ b/findlib-1/stringext/Stringext/index.html @@ -0,0 +1,2 @@ + +Stringext (docs.findlib-1.stringext.Stringext)

Module Stringext

Misc. string functions not found in the built in OCaml string module

val string_after : string -> int -> string

string_after s n returns the substring of s that is after character n

val quote : string -> string

equivalent to Str.quote

val split : ?max:int -> string -> on:char -> string list

split ?max s ~on splits s on every on occurence upto max number of items if max is specified. max is assumed to be a small number if specified. To not cause stack overflows

val full_split : string -> on:char -> string list

full_split s ~on will split s on every occurence of on but will add the separators between the tokens. Maintains the invariant:

String.concat (full_split s ~on) =s

val trim_left : string -> string

Trims spaces on the left of the string. In case no trimming is needed the same string is returned without copying

val split_trim_left : string -> on:string -> trim:string -> string list

split_strim_left s ~on ~trim splits s on every character in on. Characters in trim are trimmed from the left of every result element

val of_char : char -> string
val of_list : char list -> string
val to_list : string -> char list
val to_array : string -> char array
val of_array : char array -> string
val find_from : ?start:int -> string -> pattern:string -> int option
val replace_all : string -> pattern:string -> with_:string -> string
val replace_all_assoc : string -> (string * string) list -> string
val cut : string -> on:string -> (string * string) option

String.cut on s is either the pair Some (l,r) of the two (possibly empty) substrings of s that are delimited by the first match of the non empty onarator string on or None if on can't be matched in s. Matching starts from the beginning of s.

The invariant l ^ on ^ r = s holds.

val rcut : string -> on:string -> (string * string) option

String.rcut on s is like cut but the matching is done backwards starting from the end of s.

val chop_prefix : string -> prefix:string -> string option
val drop : string -> int -> string
val take : string -> int -> string
val trim_left_sub : string -> pos:int -> len:int -> chars:string -> string

trim_left_sub s ~pos ~len ~chars Trim all characters inside chars from s starting from pos and up to len

diff --git a/findlib-1/stringext/index.html b/findlib-1/stringext/index.html new file mode 100644 index 000000000..08fe28054 --- /dev/null +++ b/findlib-1/stringext/index.html @@ -0,0 +1,2 @@ + +stringext (docs.findlib-1.stringext)

Package stringext

Library stringext

The entry point of this library is the module: Stringext.

diff --git a/findlib-1/uri/Uri/Absolute_http/index.html b/findlib-1/uri/Uri/Absolute_http/index.html new file mode 100644 index 000000000..0d2455c86 --- /dev/null +++ b/findlib-1/uri/Uri/Absolute_http/index.html @@ -0,0 +1,11 @@ + +Absolute_http (docs.findlib-1.uri.Uri.Absolute_http)

Module Uri.Absolute_http

Specializations for HTTP and HTTPS schemes as per RFC9110

type uri := t
type t
val of_uri : uri -> (t, [ `Msg of string ]) result
val to_uri : t -> uri
val of_string : string -> t
val to_string : ?pct_encoder:pct_encoder -> t -> string
val make : + scheme:[ `Http | `Https ] -> + host:string -> + ?userinfo:string -> + ?port:int -> + ?path:string -> + ?query:(string * string list) list -> + ?fragment:string -> + unit -> + t
val host : t -> string
val scheme : t -> [ `Http | `Https ]
diff --git a/findlib-1/uri/Uri/Parser/index.html b/findlib-1/uri/Uri/Parser/index.html new file mode 100644 index 000000000..c1afdcfa2 --- /dev/null +++ b/findlib-1/uri/Uri/Parser/index.html @@ -0,0 +1,2 @@ + +Parser (docs.findlib-1.uri.Uri.Parser)

Module Uri.Parser

val ipv6 : string Angstrom.t
val uri_reference : t Angstrom.t
diff --git a/findlib-1/uri/Uri/index.html b/findlib-1/uri/Uri/index.html new file mode 100644 index 000000000..141e9e071 --- /dev/null +++ b/findlib-1/uri/Uri/index.html @@ -0,0 +1,33 @@ + +Uri (docs.findlib-1.uri.Uri)

Module Uri

Uniform Resource Identifier handling that is RFC3986-compliant.

type t

A single URI that is a compact sequence of characters that identifies an abstract or physical resource.

type component = [
  1. | `Scheme
  2. | `Authority
  3. | `Userinfo
    (*

    subcomponent of authority in some schemes

    *)
  4. | `Host
    (*

    subcomponent of authority in some schemes

    *)
  5. | `Path
  6. | `Query
  7. | `Query_key
  8. | `Query_value
  9. | `Fragment
  10. | `Generic
  11. | `Custom of component * string * string
]
type pct_encoder

For pct encoding customization when converting a URI to a string.

Core functionality

val empty : t

The empty (zero length) URI reference. Useful for constructing URIs piece-by-piece.

val compare : t -> t -> int

Comparator ordering by host, scheme, port, userinfo, path, query, and finally fragment. Designed to produce a reasonable sort order.

val equal : t -> t -> bool

equal a b is compare a b = 0.

val pct_encode : ?scheme:string -> ?component:component -> string -> string

Percent-encode a string. The component argument defaults to `Path

val pct_encoder : + ?scheme:component -> + ?userinfo:component -> + ?host:component -> + ?path:component -> + ?query_key:component -> + ?query_value:component -> + ?fragment:component -> + unit -> + pct_encoder

Construct a pct_encoder.

val pct_decode : string -> string

Percent-decode a percent-encoded string

val of_string : string -> t

Parse a URI string literal into a URI structure. A bare string will be interpreted as a path; a string prefixed with `//` will be interpreted as a host.

val to_string : ?pct_encoder:pct_encoder -> t -> string

Convert a URI structure into a percent-encoded URI string

val resolve : string -> t -> t -> t

Resolve a URI against a default scheme and base URI

val canonicalize : t -> t

Canonicalize a URI according to Sec 6.2.3 "Scheme-Based Normalization". This transform is more aggressive than the standard URI-generic normalization automatically done. In particular, HTTP(S) URIs with empty path components will have their path components set to "/". Some applications like web servers may rely on the distinction between a path-less and a root-path URI to distinguish request URIs (e.g. OPTIONS * vs OPTIONS /).

val make : + ?scheme:string -> + ?userinfo:string -> + ?host:string -> + ?port:int -> + ?path:string -> + ?query:(string * string list) list -> + ?fragment:string -> + unit -> + t

Make a URI from supplied components. If userinfo or port are supplied without host, an empty host is added. If path is supplied and userinfo, host, or port is also supplied, path is made absolute but not resolved.

val with_uri : + ?scheme:string option -> + ?userinfo:string option -> + ?host:string option -> + ?port:int option -> + ?path:string option -> + ?query:(string * string list) list option -> + ?fragment:string option -> + t -> + t

Functional update for a URI using the supplied components. If a component is unspecified then it will be unchanged. If a component is supplied as None then the component will be removed in the returned URI. If a component is supplied as Some x then x will be added if it does not exist in the source URI or replaced if it does exist.

Query functions

The query string API attempts to accommodate conventional query string representations (i.e. ?key0=value0&key1=value1) while maximally exposing any meaning in those representations. For example, it is not necessarily the case that / and /? are equivalent to a web server. In the former case, we observe a zero query string whereas in the latter case, we observe a query string with a single key, "" and a zero value. Compare this with /?= which has a single key and a single empty value, "". Additionally, some query functions return lists of values for a key. These list values are extracted from a single key with a comma-separated value list. If a query string has multiple identical keys, you must use query to retrieve the entirety of the structured query string.

val query : t -> (string * string list) list

Get a query string from a URI

val verbatim_query : ?pct_encoder:pct_encoder -> t -> string option

Get a verbatim query string from a URI. If the provenance of the URI is a string and its query component has not been updated, this is the literal query string as parsed. Otherwise, this is the composition of query and encoded_of_query

val encoded_of_query : + ?scheme:string -> + ?pct_encoder:pct_encoder -> + (string * string list) list -> + string

Make a percent-encoded query string from percent-decoded query tuple

val query_of_encoded : string -> (string * string list) list

Parse a percent-encoded query string into a percent-decoded query tuple

val with_query : t -> (string * string list) list -> t

Replace the query URI with the supplied list. Input URI is not modified

val with_query' : t -> (string * string) list -> t

Replace the query URI with the supplied singleton query list. Input URI is not modified

val get_query_param' : t -> string -> string list option

get_query_param' q key returns the list of values for the key parameter in query q. Note that an empty list is not the same as a None return value. For a query foo, the mapping is:

  • / returns None
  • /?foo returns Some
  • /?foo= returns Some [""]
  • /?foo=bar returns Some ["bar"]
  • /?foo=bar,chi returns Some ["bar","chi"]

Query keys can be duplicated in the URI, in which case the first one is returned. If you want to resolve duplicate keys, obtain the full result set with query instead.

val get_query_param : t -> string -> string option

get_query_param q key returns the value found for a key in query q. If there are multiple values for the key, then the first one is returned.

val add_query_param : t -> (string * string list) -> t

Add a query parameter to the input query URI. Input URI is not modified

val add_query_param' : t -> (string * string) -> t

Add a query parameter to the input singleton query URI. Input URI is not modified

val add_query_params : t -> (string * string list) list -> t

Add a query parameter list to the input query URI. Input URI is not modified

val add_query_params' : t -> (string * string) list -> t

Add a query singleton parameter list to the input query URI. Input URI is not modified

val remove_query_param : t -> string -> t

Remove a query key from the input query URI. Input URI is not modified, and no error is generated if the key does not already exist in the URI.

Component getters and setters

val path : ?pct_encoder:pct_encoder -> t -> string

Get the encoded path component of a URI

val path_and_query : t -> string

Get the encoded path and query components of a URI

val with_path : t -> string -> t

Replace the path URI with the supplied encoded path. If a host is present in the supplied URI, the path is made absolute but not resolved. If the path is empty, the path component is removed. Input URI is not modified

val scheme : t -> string option

Get the scheme component of a URI

val with_scheme : t -> string option -> t

Replace the scheme portion of the URI with the supplied scheme. Input URI is not modified

val userinfo : ?pct_encoder:pct_encoder -> t -> string option

Get the userinfo component of a URI

val with_userinfo : t -> string option -> t

Replace the userinfo portion of the URI with the supplied string option. If no host is present in the supplied URI, an empty host is added. Input URI is not modified.

val user : t -> string option

Get the username component of a URI

val password : t -> string option

Get the password component of a URI

val with_password : t -> string option -> t

Replace the password portion of the URI with the supplied string option. If no host is present in the supplied URI, an empty host is added. Input URI is not modified.

val host : t -> string option

Get the host component of a URI

val with_host : t -> string option -> t

Replace the host component of the URI. Input URI is not modified.

val host_with_default : ?default:string -> t -> string

Get the host component of a URI, with a default supplied if one is not present

val port : t -> int option

Get the port component of a URI

val with_port : t -> int option -> t

Replace the port component of the URI with the supplied port. If no host is present in the supplied URI, an empty host is added. Input URI is not modified.

val fragment : t -> string option

Get the fragment component of a URI

val with_fragment : t -> string option -> t

Replace the fragment component of a URI with the supplied fragment. Input URI is not modified

Formatters

val pp : Format.formatter -> t -> unit

pp ppf t will output a human readable version of the Uri t to the formatter ppf

val pp_hum : Format.formatter -> t -> unit

pp_hum is now an alias for the pp function.

module Parser : sig ... end
module Absolute_http : sig ... end

Specializations for HTTP and HTTPS schemes as per RFC9110

diff --git a/findlib-1/uri/index.html b/findlib-1/uri/index.html new file mode 100644 index 000000000..890101ae0 --- /dev/null +++ b/findlib-1/uri/index.html @@ -0,0 +1,2 @@ + +uri (docs.findlib-1.uri)

Package uri

Library uri

The entry point of this library is the module: Uri.

diff --git a/index.html b/index.html new file mode 100644 index 000000000..a358610a9 --- /dev/null +++ b/index.html @@ -0,0 +1,2 @@ + +docs (docs)

Docs

Local Packages

Switch-installed packages

Private libraries

diff --git a/local/index.html b/local/index.html new file mode 100644 index 000000000..d21ce2cb7 --- /dev/null +++ b/local/index.html @@ -0,0 +1,2 @@ + +local (docs.local)

Local packages

Sub-indexes

diff --git a/local/server-reason-react/base32/Base32/index.html b/local/server-reason-react/base32/Base32/index.html new file mode 100644 index 000000000..8ccc37b91 --- /dev/null +++ b/local/server-reason-react/base32/Base32/index.html @@ -0,0 +1,30 @@ + +Base32 (docs.local.server-reason-react.base32.Base32)

Module Base32

Base32 RFC4648 implementation.

Base32 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-32 representation. It is specified in RFC 4648.

Release %%VERSION%% - %%PKG_HOMEPAGE%%

type alphabet

Type of alphabet.

type sub = string * int * int

Type of sub-string: str, off, len.

val default_alphabet : alphabet

A 32-character alphabet specifying the regular Base32 alphabet.

val make_alphabet : string -> alphabet

Make a new alphabet.

val length_alphabet : alphabet -> int

Returns length of the alphabet, should be 64.

val alphabet : alphabet -> int array

Returns the alphabet.

val decode_exn : ?alphabet:alphabet -> ?off:int -> ?len:int -> string -> string

decode_exn ?off ?len s decodes len bytes (defaults to String.length s - off) of the string s starting from off (defaults to 0) that is encoded in Base32 format. Will leave trailing NULLs on the string, padding it out to a multiple of 3 characters. alphabet defaults to default_alphabet. pad = true specifies to check if s is padded or not, otherwise, it raises an exception.

Decoder can fail when character of s is not a part of alphabet or is not padding character. If input is not padded correctly, decoder does the best-effort but it does not ensure decode_exn (encode ~pad:false x) = x.

  • raises if

    Invalid_argument s is not a valid Base32 string.

val decode_sub : + ?alphabet:alphabet -> + ?off:int -> + ?len:int -> + string -> + (sub, [> `Msg of string ]) result

Same as decode_exn but it returns a result type instead to raise an exception. Then, it returns a sub string. Decoded input (str, off, len) will starting to off and will have len bytes - by this way, we ensure to allocate only one time result.

val decode : + ?alphabet:alphabet -> + ?off:int -> + ?len:int -> + string -> + (string, [> `Msg of string ]) result

Same as decode_exn, but returns an explicit error message result if it fails.

val encode : + ?pad:bool -> + ?alphabet:alphabet -> + ?off:int -> + ?len:int -> + string -> + (string, [> `Msg of string ]) result

encode s encodes the string s into base32. If pad is false, no trailing padding is added. pad defaults to true, and alphabet to default_alphabet.

encode fails when off and len do not designate a valid range of s.

val encode_string : ?pad:bool -> ?alphabet:alphabet -> string -> string

encode_string s encodes the string s into base32. If pad is false, no trailing padding is added. pad defaults to true, and alphabet to default_alphabet.

val encode_sub : + ?pad:bool -> + ?alphabet:alphabet -> + ?off:int -> + ?len:int -> + string -> + (sub, [> `Msg of string ]) result

Same as encode but return a sub-string instead a plain result. By this way, we ensure to allocate only one time result.

val encode_exn : + ?pad:bool -> + ?alphabet:alphabet -> + ?off:int -> + ?len:int -> + string -> + string

Same as encode but raises an invalid argument exception if we retrieve an error.

diff --git a/local/server-reason-react/base32/index.html b/local/server-reason-react/base32/index.html new file mode 100644 index 000000000..2a7dc54c0 --- /dev/null +++ b/local/server-reason-react/base32/index.html @@ -0,0 +1,2 @@ + +base32 (docs.local.server-reason-react.base32)

Package server-reason-react.base32

Library server-reason-react.base32

The entry point of this library is the module: Base32.

diff --git a/local/server-reason-react/belt/Belt/Array/index.html b/local/server-reason-react/belt/Belt/Array/index.html new file mode 100644 index 000000000..a1ac426ef --- /dev/null +++ b/local/server-reason-react/belt/Belt/Array/index.html @@ -0,0 +1,80 @@ + +Array (docs.local.server-reason-react.belt.Belt.Array)

Module Belt.Array

Belt.Array

mutable array: Utilities functions

Belt.Array Utililites for Array functions

type 'a t = 'a array
val length : 'a t -> int

length xs return the size of the array

val size : 'a t -> int

See length

val get : 'a t -> int -> 'a option

get arr i

If i <= 0 <= length arr;returns Some value where value is the item at index i If i is out of range;returns None

Belt.Array.get [|"a";"b";"c"|] 0 = Some "a";;
+Belt.Array.get [|"a";"b";"c"|] 3 = None;;
+Belt.Array.get [|"a";"b";"c"|] (-1) = None;;
val getExn : 'a t -> int -> 'a

getExn arr i

raise an exception if i is out of range;otherwise return the value at index i in arr

val getUnsafe : 'a t -> int -> 'a

getUnsafe arr i

Unsafe

no bounds checking;this would cause type error if i does not stay within range

val getUndefined : 'a t -> int -> 'a option

getUndefined arr i

It does the samething in the runtime as getUnsafe; it is type safe since the return type still track whether it is in range or not

val set : 'a t -> int -> 'a -> bool

set arr n x modifies arr in place; it replaces the nth element of arr with x

  • returns

    false means not updated due to out of range

val setExn : 'a t -> int -> 'a -> unit

setExn arr i x raise an exception if i is out of range

val setUnsafe : 'a t -> int -> 'a -> unit
val shuffleInPlace : 'a t -> unit

shuffleInPlace arr randomly re-orders the items in arr

val shuffle : 'a t -> 'a t

shuffle xs

  • returns

    a fresh array with items in original array randomly shuffled

val reverseInPlace : 'a t -> unit

reverseInPlace arr reverses items in arr in place

let arr = [|10;11;12;13;14|];;
+let () = reverseInPlace arr;;
+arr = [|14;13;12;11;10|];;
val reverse : 'a t -> 'a t

reverse arr

  • returns

    a fresh array with items in arr in reverse order

    reverse [|10;11;12;13;14|] = [|14;13;12;11;10|];;
val makeUninitialized : int -> 'a option array

makeUninitialized n creates an array of length n filled with the undefined value. You must specify the type of data that will eventually fill the array.

let arr: string Js.undefined array = makeUninitialized 5;;
+getExn arr 0 = Js.undefined;;
val makeUninitializedUnsafe : int -> 'a -> 'a array

`makeUninitializedUnsafe n`

Unsafe

let arr = Belt.Array.makeUninitializedUnsafe 5;;
+let () = Js.log(Belt.Array.getExn arr 0);; (* undefined *)
+Belt.Array.setExn arr 0 "example";;
+let () = Js.log(Belt.Array.getExn arr 0 = "example");;
val make : int -> 'a -> 'a t

make n e return an array of size n filled with value e

  • returns

    an empty array when n is negative.

val range : int -> int -> int t

range start finish create an inclusive array

range 0 3 =  [|0;1;2;3|];;
+range 3 0 =  [||] ;;
+range 3 3 = [|3|];;
val rangeBy : int -> int -> step:int -> int t

rangeBy start finish ~step

  • returns

    empty array when step is 0 or negative it also return empty array when start > finish

    rangeBy 0 10 ~step:3 = [|0;3;6;9|];;
    +rangeBy 0 12 ~step:3 = [|0;3;6;9;12|];;
    +rangeBy 33 0 ~step:1 =  [||];;
    +rangeBy 33 0 ~step:(-1) = [||];;
    +rangeBy 3 12 ~step:(-1) = [||];;
    +rangeBy 3 3 ~step:0 = [||] ;;
    +rangeBy 3 3 ~step:(1) = [|3|] ;;
val makeByU : int -> (int -> 'a) -> 'a t
val makeBy : int -> (int -> 'a) -> 'a t

makeBy n f

return an empty array when n is negative return an array of size n populated by f i start from 0 to n - 1

makeBy 5 (fun i -> i) = [|0;1;2;3;4|];;
+makeBy 5 (fun i -> i * i) = [|0;1;4;9;16|]
val makeByAndShuffleU : int -> (int -> 'a) -> 'a t
val makeByAndShuffle : int -> (int -> 'a) -> 'a t

makeByAndShuffle n f

Equivalent to shuffle (makeBy n f)

val zip : 'a t -> 'b array -> ('a * 'b) array

zip a b

Create an array of pairs from corresponding elements of a and b. Stop with the shorter array

zip [|1;2|] [|3;4;5|] = [|(1, 3);(2, 4)|]
val zipByU : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array
val zipBy : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array

zipBy xs ys f

Create an array by applying f to corresponding elements of xs and ys Stops with shorter array

Equivalent to map (zip xs ys) (fun (a,b) -> f a b)

zipBy [|1;2;3|] [|4;5|] (fun a b -> 2 * a + b) = [|6;9|];;
val unzip : ('a * 'b) array -> 'a t * 'b array

unzip a takes an array of pairs and creates a pair of arrays. The first array contains all the first items of the pairs; the second array contains all the second items.

unzip [|(1,2) ; (3,4)|] = ([|1;3|], [|2;4|]);;
+unzip [|(1,2) ; (3,4) ; (5,6) ; (7,8)|] = ([|1;3;5;7|], [|2;4;6;8|]);;
val concat : 'a t -> 'a t -> 'a t

concat xs ys

  • returns

    a fresh array containing the concatenation of the arrays v1 and v2;so even if v1 or v2 is empty;it can not be shared

    concat [|1;2;3|] [|4;5|] = [|1;2;3;4;5|];;
    +concat [| |] [|"a";"b";"c"|] = [|"a";"b";"c"|];;
val concatMany : 'a t t -> 'a t

concatMany xss

  • returns

    a fresh array as the concatenation of xss (an array of arrays)

    concatMany [| [|1;2;3|]; [|4;5;6|]; [|7;8|] |] = [|1;2;3;4;5;6;7;8|];;
val slice : 'a t -> offset:int -> len:int -> 'a t

slice xs offset len creates a new array with the len elements of xs starting at offset for

offset can be negative;and is evaluated as length xs - offset slice xs -1 1 means get the last element as a singleton array

slice xs (-len) len will return a copy of the array

if the array does not have enough data;slice extracts through the end of sequence.

if len is negative;returns the empty array.

slice [|10;11;12;13;14;15;16|] ~offset: 2 ~len: 3 = [|12;13;14|];;
+slice [|10;11;12;13;14;15;16|] ~offset: (-4) ~len: 3 = [|13;14;15|];;
+slice [|10;11;12;13;14;15;16|] ~offset:4  ~len:9 = [|14;15;16|];;
val sliceToEnd : 'a t -> int -> 'a t

sliceToEnd xs offset creates a new array with the elements of xs starting at offset

offset can be negative;and is evaluated as length xs - offset sliceToEnd xs -1 means get the last element as a singleton array

sliceToEnd xs 0 will return a copy of the array

sliceToEnd [|10;11;12;13;14;15;16|] 2 = [|12;13;14;15;16|];;
+sliceToEnd [|10;11;12;13;14;15;16|] (-4) = [|13;14;15;16|];;
val copy : 'a t -> 'a t

copy a

  • returns

    a copy of a;that is;a fresh array containing the same elements as a.

val fill : 'a t -> offset:int -> len:int -> 'a -> unit

fill arr ~offset ~len x

Modifies arr in place, storing x in elements number offset to offset + len - 1.

offset can be negative;and is evaluated as length arr - offset

fill arr ~offset:(-1) ~len:1 means fill the last element, if the array does not have enough data;fill will ignore it

let arr = makeBy 5 (fun i -> i) ;;
+fill arr ~offset:2 ~len:2 9 ;;
+arr = [|0;1;9;9;4|];;
+fill arr ~offset:7 ~len:2 8;;
+arr = [|0;1;9;9;4|];;
val blit : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

blit ~src:v1 ~srcOffset:o1 ~dst:v2 ~dstOffset:o2 ~len

copies len elements from array v1;starting at element number o1;to array v2, starting at element number o2.

It works correctly even if v1 and v2 are the same array;and the source and destination chunks overlap.

offset can be negative;-1 means len - 1;if len + offset is still negative;it will be set as 0

For each of the examples;presume that v1 = [|10;11;12;13;14;15;16;17|] and v2 = [|20;21;22;23;24;25;26;27|]. The result shown is the content of the destination array.

Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v2 ~dstOffset: 2 ~len: 3 |.
+  [|20;21;14;15;16;25;26;27|]
+Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v1 ~dstOffset: 2 ~len: 3 |.
+  [|10;11;14;15;16;15;16;17|]
val blitUnsafe : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

Unsafe blit without bounds checking

val forEachU : 'a t -> ('a -> unit) -> unit
val forEach : 'a t -> ('a -> unit) -> unit

forEach xs f

Call f on each element of xs from the beginning to end. f returns unit;so no new array is created. Use forEach when you are primarily concerned with repetitively creating side effects.

forEach [|"a";"b";"c"|] (fun x -> Js.log("Item: " ^ x));;
+(*  prints:
+  Item: a
+  Item: b
+  Item: c
+*)
+
+let total = ref 0;;
+forEach [|1;2;3;4|] (fun x -> total := !total + x);;
+!total  = 1 + 2 + 3 + 4;;
val mapU : 'a t -> ('a -> 'b) -> 'b array
val map : 'a t -> ('a -> 'b) -> 'b array

map xs f

  • returns

    a new array by calling f for each element of xs from the beginning to end

    map [|1;2|] (fun x-> x + 10) = [|11;12|]
val flatMapU : 'a t -> ('a -> 'b t) -> 'b t
val flatMap : 'a t -> ('a -> 'b t) -> 'b t

flatMap xs f **return** a new array by calling `f` for each element of `xs` from the beginning to end, and then concatenating the results ``` flatMap |1;2| (fun x-> |x + 10;x + 20|) = |11;21;12;22| ```

val getByU : 'a t -> ('a -> bool) -> 'a option
val getBy : 'a t -> ('a -> bool) -> 'a option

getBy xs p returns Some value for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 4
+getBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val getIndexByU : 'a t -> ('a -> bool) -> int option
val getIndexBy : 'a t -> ('a -> bool) -> int option

getIndexBy xs p returns Some index for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getIndexBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 1
+getIndexBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val keepU : 'a t -> ('a -> bool) -> 'a t
val keep : 'a t -> ('a -> bool) -> 'a t

keep xs p

  • returns

    a new array that keeps all elements satisfying p

    keep [|1;2;3|] (fun x -> x mod  2 = 0) = [|2|]
val keepWithIndexU : 'a t -> ('a -> int -> bool) -> 'a t
val keepWithIndex : 'a t -> ('a -> int -> bool) -> 'a t

keepWithIndex xs p

  • returns

    a new array that keeps all elements satisfying p. The predicate p takes two arguments: the element from xs and the index starting from 0.

    keepWithIndex [|1;2;3|] (fun _x i -> i = 1) = [|2|]
val keepMapU : 'a t -> ('a -> 'b option) -> 'b array
val keepMap : 'a t -> ('a -> 'b option) -> 'b array

keepMap xs p

  • returns

    a new array that keeps all elements that return a non-None when applied to p

    keepMap [|1;2;3|] (fun x -> if x mod 2 = 0 then Some x else None)
    += [| 2 |]
val forEachWithIndexU : 'a t -> (int -> 'a -> unit) -> unit
val forEachWithIndex : 'a t -> (int -> 'a -> unit) -> unit

forEachWithIndex xs f

The same as forEach; except that f is supplied with two arguments: the index starting from 0 and the element from xs

forEachWithIndex [|"a";"b";"c"|] (fun i x -> Js.log("Item " ^ (string_of_int i) ^ " is " ^ x));;
+(*  prints:
+  Item 0 is a
+  Item 1 is b
+  Item 2 is c
+*)
+
+let total = ref 0 ;;
+forEachWithIndex [|10;11;12;13|] (fun i x -> total := !total + x + i);;
+!total  = 0 + 10 + 1 +  11 + 2 + 12 + 3 + 13;;
val mapWithIndexU : 'a t -> (int -> 'a -> 'b) -> 'b t
val mapWithIndex : 'a t -> (int -> 'a -> 'b) -> 'b t

mapWithIndex xs f applies f to each element of xs. Function f takes two arguments: the index starting from 0 and the element from xs.

mapWithIndex [|1;2;3|] (fun i x -> i + x) =
+[|0 + 1; 1 + 2; 2 + 3|]
val partitionU : 'a t -> ('a -> bool) -> 'a t * 'a t
val partition : 'a t -> ('a -> bool) -> 'a t * 'a t

partition f a split array into tuple of two arrays based on predicate f; first of tuple where predicate cause true, second where predicate cause false

partition [|1;2;3;4;5|] (fun x -> x mod 2 = 0  ) = ([|2;4|], [|1;2;3|]);;
+partition [|1;2;3;4;5|] (fun x -> x mod 2 <> 0 ) = ([|1;2;3|], [|2;4|]);;
val reduceU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduce : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduce xs init f

Applies f to each element of xs from beginning to end. Function f has two parameters: the item from the list and an “accumulator”;which starts with a value of init. reduce returns the final value of the accumulator.

reduce [|2;3;4|] 1 (+) = 10;;
+reduce [|"a";"b";"c";"d"|] "" (^) = "abcd";;
val reduceReverseU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduceReverse : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduceReverse xs init f

Works like reduce;except that function f is applied to each item of xs from the last back to the first.

reduceReverse [|"a";"b";"c";"d"|] "" (^) = "dcba";;
val reduceReverse2U : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val reduceReverse2 : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c

reduceReverse2 xs ys init f Reduces two arrays xs and ys;taking items starting at min (length xs) (length ys) down to and including zero.

reduceReverse2 [|1;2;3|] [|1;2|] 0 (fun acc x y -> acc + x + y) = 6
val reduceWithIndexU : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b
val reduceWithIndex : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b

reduceWithIndex xs f

Applies f to each element of xs from beginning to end. Function f has three parameters: the item from the array and an “accumulator”, which starts with a value of init and the index of each element. reduceWithIndex returns the final value of the accumulator.

reduceWithIndex [|1;2;3;4|] 0 (fun acc x i -> acc + x + i) = 16;
val joinWithU : 'a t -> string -> ('a -> string) -> string
val joinWith : 'a t -> string -> ('a -> string) -> string

joinWith xs sep toString

Concatenates all the elements of xs converted to string with toString, each separated by sep, the string given as the second argument, into a single string. If the array has only one element, then that element will be returned without using the separator. If the array is empty, the empty string will be returned.

joinWith [|0; 1|] ", " string_of_int = "0, 1"
+joinWith [||] " " string_of_int = ""
+joinWith [|1|] " " string_of_int = "1"
val someU : 'a t -> ('a -> bool) -> bool
val some : 'a t -> ('a -> bool) -> bool

some xs p

  • returns

    true if at least one of the elements in xs satifies p;where p is a predicate: a function taking an element and returning a bool.

    some [|2; 3; 4|] (fun x -> x mod 2 = 1) = true;;
    +some [|-1; -3; -5|] (fun x -> x > 0) = false;;
val everyU : 'a t -> ('a -> bool) -> bool
val every : 'a t -> ('a -> bool) -> bool

every xs p

  • returns

    true if all elements satisfy p;where p is a predicate: a function taking an element and returning a bool.

    every [|1; 3; 5|] (fun x -> x mod 2 = 1) = true;;
    +every [|1; -3; 5|] (fun x -> x > 0) = false;;
val every2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val every2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

every2 xs ys p returns true if p xi yi is true for all pairs of elements up to the shorter length (i.e. min (length xs) (length ys))

every2 [|1;2;3|] [|0;1|] (>) = true;;
+every2 [||] [|1|] (fun  x y -> x > y) = true;;
+every2 [|2;3|] [|1|] (fun  x y -> x > y) = true;;
+every2 [|0;1|] [|5;0|] (fun x y -> x > y) = false;
val some2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val some2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

some2 xs ys p returns true if p xi yi is true for any pair of elements up to the shorter length (i.e. min (length xs) (length ys))

some2 [|0;2|] [|1;0;3|] (>) = true ;;
+(some2 [||] [|1|] (fun   x y -> x > y)) =  false;;
+(some2 [|2;3|] [|1;4|] (fun   x y -> x > y)) = true;;
val cmpU : 'a t -> 'a t -> ('a -> 'a -> int) -> int
val cmp : 'a t -> 'a t -> ('a -> 'a -> int) -> int

cmp xs ys f

  • Compared by length if length xs <> length ys;returning -1 iflength xs < length ys or 1 if length xs > length ys
  • Otherwise compare one by one f x y. f returns
  • a negative number if x is “less than” y
  • zero if x is “equal to” y
  • a positive number if x is “greater than” y
  • The comparison returns the first non-zero result of f;or zero if f returns zero for all x and y.
cmp [|1; 3; 5|] [|1; 4; 2|] (fun a b -> compare a b) = -1;;
+cmp [|1; 3; 5|] [|1; 2; 3|] (fun a b -> compare a b) = 1;;
+cmp [|1; 3; 5|] [|1; 3; 5|] (fun a b -> compare a b) = 0;;
val eqU : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool
val eq : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool

eq xs ys

  • return false if length is not the same
  • otherwise compare items one by one using f xi yi;and return true if all results are true;false otherwise
eq [|1; 2; 3|] [|-1; -2; -3|] (fun a b -> abs a = abs b) = true
val truncateToLengthUnsafe : 'a t -> int -> 'a t

Unsafe truncateToLengthUnsafe xs n sets length of array xs to n.

If n is greater than the length of xs;the extra elements are set to Js.Null_undefined.null

If n is less than zero;raises a RangeError.

let arr = [|"ant";"bee";"cat";"dog";"elk"|];;
+let () = truncateToLengthUnsafe arr 3;;
+arr = [|"ant";"bee";"cat"|];;
val initU : int -> (int -> 'a) -> 'a t
val init : int -> (int -> 'a) -> 'a t
val push : 'a t -> 'a -> [ `Do_not_use_Array_push_in_native ]

Using Belt.Array.push in native isn't a good idea, since OCaml's Array are fixed length and can't resize the same way as JavaScript arrays.

diff --git a/local/server-reason-react/belt/Belt/Float/index.html b/local/server-reason-react/belt/Belt/Float/index.html new file mode 100644 index 000000000..d20d39d5a --- /dev/null +++ b/local/server-reason-react/belt/Belt/Float/index.html @@ -0,0 +1,2 @@ + +Float (docs.local.server-reason-react.belt.Belt.Float)

Module Belt.Float

val toInt : float -> int
val fromInt : int -> float
val fromString : string -> float option
val toString : float -> string
val (+) : float -> float -> float
val (-) : float -> float -> float
val (*) : float -> float -> float
val (/) : float -> float -> float
diff --git a/local/server-reason-react/belt/Belt/HashMap/index.html b/local/server-reason-react/belt/Belt/HashMap/index.html new file mode 100644 index 000000000..868f96c50 --- /dev/null +++ b/local/server-reason-react/belt/Belt/HashMap/index.html @@ -0,0 +1,29 @@ + +HashMap (docs.local.server-reason-react.belt.Belt.HashMap)

Module Belt.HashMap

Belt.HashMap

The top level provides generic mutable hash map operations.

It also has two specialized inner modules Belt.HashMap.Int and Belt.HashMap.String

A mutable Hash map which allows customized hash behavior.

All data are parameterized by not its only type but also a unique identity in the time of initialization, so that two HashMaps of ints initialized with different hash functions will have different type.

For example:

type t = int
+module I0 =
+  (val Belt.Id.hashableU
+      ~hash:(fun[\@bs] (a : t)  -> a & 0xff_ff)
+      ~eq:(fun[\@bs] a b -> a = b)
+  )
+let s0 : (_, string,_) t = make ~hintSize:40 ~id:(module I0)
+module I1 =
+  (val Belt.Id.hashableU
+      ~hash:(fun[\@bs] (a : t)  -> a & 0xff)
+      ~eq:(fun[\@bs] a b -> a = b)
+  )
+let s1 : (_, string,_) t = make ~hintSize:40 ~id:(module I1)

The invariant must be held: for two elements who are equal, their hashed value should be the same

Here the compiler would infer s0 and s1 having different type so that it would not mix.

val s0 :  (int, I0.identity) t
+val s1 :  (int, I1.identity) t

We can add elements to the collection:

let () =
+  add s1 0 "3";
+  add s1 1 "3"

Since this is an mutable data strucure, s1 will contain two pairs.

module Int = Belt_HashMapInt

Specalized when key type is int, more efficient than the generic type

module String = Belt_HashMapString

Specalized when key type is string, more efficient than the generic type

type ('key, 'value, 'id) t

The type of hash tables from type 'key to type 'value.

type ('a, 'id) id = + (module Belt__.Belt_Id.Hashable + with type identity = 'id + and type t = 'a)
val make : hintSize:int -> id:('key, 'id) id -> ('key, 'value, 'id) t
val clear : ('key, 'value, 'id) t -> unit

Empty a hash table.

val isEmpty : (_, _, _) t -> bool
val set : ('key, 'value, 'id) t -> 'key -> 'value -> unit

set tbl k v if k does not exist, add the binding k,v, otherwise, update the old value with the new v

val copy : ('key, 'value, 'id) t -> ('key, 'value, 'id) t
val get : ('key, 'value, 'id) t -> 'key -> 'value option
val has : ('key, 'value, 'id) t -> 'key -> bool

has tbl x checks if x is bound in tbl.

val remove : ('key, 'value, 'id) t -> 'key -> unit
val forEachU : ('key, 'value, 'id) t -> ('key -> 'value -> unit) -> unit
val forEach : ('key, 'value, 'id) t -> ('key -> 'value -> unit) -> unit

forEach tbl f applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

val reduceU : ('key, 'value, 'id) t -> 'c -> ('c -> 'key -> 'value -> 'c) -> 'c
val reduce : ('key, 'value, 'id) t -> 'c -> ('c -> 'key -> 'value -> 'c) -> 'c

reduce tbl init f computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

val keepMapInPlaceU : + ('key, 'value, 'id) t -> + ('key -> 'value -> 'value option) -> + unit
val keepMapInPlace : + ('key, 'value, 'id) t -> + ('key -> 'value -> 'value option) -> + unit
val size : (_, _, _) t -> int

size tbl returns the number of bindings in tbl. It takes constant time.

val toArray : ('key, 'value, 'id) t -> ('key * 'value) array
val keysToArray : ('key, _, _) t -> 'key array
val valuesToArray : (_, 'value, _) t -> 'value array
val fromArray : + ('key * 'value) array -> + id:('key, 'id) id -> + ('key, 'value, 'id) t
val mergeMany : ('key, 'value, 'id) t -> ('key * 'value) array -> unit
val getBucketHistogram : (_, _, _) t -> int array
val logStats : (_, _, _) t -> unit
diff --git a/local/server-reason-react/belt/Belt/HashSet/index.html b/local/server-reason-react/belt/Belt/HashSet/index.html new file mode 100644 index 000000000..a07279b17 --- /dev/null +++ b/local/server-reason-react/belt/Belt/HashSet/index.html @@ -0,0 +1,20 @@ + +HashSet (docs.local.server-reason-react.belt.Belt.HashSet)

Module Belt.HashSet

Belt.HashSet

The top level provides generic mutable hash set operations.

It also has two specialized inner modules Belt.HashSet.Int and Belt.HashSet.String

A mutable Hash set which allows customized hash behavior.

All data are parameterized by not its only type but also a unique identity in the time of initialization, so that two HashSets of ints initialized with different hash functions will have different type.

For example:

type t = int
+module I0 =
+  (val Belt.Id.hashableU
+      ~hash:(fun[\@bs] (a : t)  -> a & 0xff_ff)
+      ~eq:(fun[\@bs] a b -> a = b)
+  )
+let s0 = make ~id:(module I0) ~hintSize:40
+module I1 =
+  (val Belt.Id.hashableU
+      ~hash:(fun[\@bs] (a : t)  -> a & 0xff)
+      ~eq:(fun[\@bs] a b -> a = b)
+  )
+let s1 = make ~id:(module I1) ~hintSize:40

The invariant must be held: for two elements who are equal, their hashed value should be the same

Here the compiler would infer s0 and s1 having different type so that it would not mix.

val s0 :  (int, I0.identity) t
+val s1 :  (int, I1.identity) t

We can add elements to the collection:

let () =
+  add s1 0;
+  add s1 1

Since this is an mutable data strucure, s1 will contain two pairs.

module Int = Belt_HashSetInt

Specalized when key type is int, more efficient than the generic type

module String = Belt_HashSetString

Specalized when key type is string, more efficient than the generic type

type ('a, 'id) t

The type of hash tables from type 'a to type 'b.

type ('a, 'id) id = + (module Belt__.Belt_Id.Hashable + with type identity = 'id + and type t = 'a)
val make : hintSize:int -> id:('a, 'id) id -> ('a, 'id) t
val clear : ('a, 'id) t -> unit
val isEmpty : (_, _) t -> bool
val add : ('a, 'id) t -> 'a -> unit
val copy : ('a, 'id) t -> ('a, 'id) t
val has : ('a, 'id) t -> 'a -> bool
val remove : ('a, 'id) t -> 'a -> unit
val forEachU : ('a, 'id) t -> ('a -> unit) -> unit
val forEach : ('a, 'id) t -> ('a -> unit) -> unit

Order unspecified.

val reduceU : ('a, 'id) t -> 'c -> ('c -> 'a -> 'c) -> 'c
val reduce : ('a, 'id) t -> 'c -> ('c -> 'a -> 'c) -> 'c

Order unspecified.

val size : ('a, 'id) t -> int
val logStats : (_, _) t -> unit
val toArray : ('a, 'id) t -> 'a array
val fromArray : 'a array -> id:('a, 'id) id -> ('a, 'id) t
val mergeMany : ('a, 'id) t -> 'a array -> unit
val getBucketHistogram : (_, _) t -> int array
diff --git a/local/server-reason-react/belt/Belt/Id/MakeComparable/argument-1-M/index.html b/local/server-reason-react/belt/Belt/Id/MakeComparable/argument-1-M/index.html new file mode 100644 index 000000000..821037e56 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Id/MakeComparable/argument-1-M/index.html @@ -0,0 +1,2 @@ + +M (docs.local.server-reason-react.belt.Belt.Id.MakeComparable.M)

Parameter MakeComparable.M

type t
val cmp : t -> t -> int
diff --git a/local/server-reason-react/belt/Belt/Id/MakeComparable/index.html b/local/server-reason-react/belt/Belt/Id/MakeComparable/index.html new file mode 100644 index 000000000..f65adecce --- /dev/null +++ b/local/server-reason-react/belt/Belt/Id/MakeComparable/index.html @@ -0,0 +1,2 @@ + +MakeComparable (docs.local.server-reason-react.belt.Belt.Id.MakeComparable)

Module Id.MakeComparable

Parameters

module M : sig ... end

Signature

type identity
type t = M.t
val cmp : M.t -> M.t -> int
diff --git a/local/server-reason-react/belt/Belt/Id/MakeComparableU/argument-1-M/index.html b/local/server-reason-react/belt/Belt/Id/MakeComparableU/argument-1-M/index.html new file mode 100644 index 000000000..85c940cb3 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Id/MakeComparableU/argument-1-M/index.html @@ -0,0 +1,2 @@ + +M (docs.local.server-reason-react.belt.Belt.Id.MakeComparableU.M)

Parameter MakeComparableU.M

type t
val cmp : t -> t -> int
diff --git a/local/server-reason-react/belt/Belt/Id/MakeComparableU/index.html b/local/server-reason-react/belt/Belt/Id/MakeComparableU/index.html new file mode 100644 index 000000000..252f95fb4 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Id/MakeComparableU/index.html @@ -0,0 +1,2 @@ + +MakeComparableU (docs.local.server-reason-react.belt.Belt.Id.MakeComparableU)

Module Id.MakeComparableU

Parameters

module M : sig ... end

Signature

type identity
type t = M.t
val cmp : M.t -> M.t -> int
diff --git a/local/server-reason-react/belt/Belt/Id/MakeHashable/argument-1-M/index.html b/local/server-reason-react/belt/Belt/Id/MakeHashable/argument-1-M/index.html new file mode 100644 index 000000000..99ddc6b5b --- /dev/null +++ b/local/server-reason-react/belt/Belt/Id/MakeHashable/argument-1-M/index.html @@ -0,0 +1,2 @@ + +M (docs.local.server-reason-react.belt.Belt.Id.MakeHashable.M)

Parameter MakeHashable.M

type t
val hash : t -> int
val eq : t -> t -> bool
diff --git a/local/server-reason-react/belt/Belt/Id/MakeHashable/index.html b/local/server-reason-react/belt/Belt/Id/MakeHashable/index.html new file mode 100644 index 000000000..8420d17c6 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Id/MakeHashable/index.html @@ -0,0 +1,2 @@ + +MakeHashable (docs.local.server-reason-react.belt.Belt.Id.MakeHashable)

Module Id.MakeHashable

Parameters

module M : sig ... end

Signature

type identity
type t = M.t
val hash : M.t -> int
val eq : M.t -> M.t -> bool
diff --git a/local/server-reason-react/belt/Belt/Id/MakeHashableU/argument-1-M/index.html b/local/server-reason-react/belt/Belt/Id/MakeHashableU/argument-1-M/index.html new file mode 100644 index 000000000..f7bbc10b1 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Id/MakeHashableU/argument-1-M/index.html @@ -0,0 +1,2 @@ + +M (docs.local.server-reason-react.belt.Belt.Id.MakeHashableU.M)

Parameter MakeHashableU.M

type t
val hash : t -> int
val eq : t -> t -> bool
diff --git a/local/server-reason-react/belt/Belt/Id/MakeHashableU/index.html b/local/server-reason-react/belt/Belt/Id/MakeHashableU/index.html new file mode 100644 index 000000000..62cd1352a --- /dev/null +++ b/local/server-reason-react/belt/Belt/Id/MakeHashableU/index.html @@ -0,0 +1,2 @@ + +MakeHashableU (docs.local.server-reason-react.belt.Belt.Id.MakeHashableU)

Module Id.MakeHashableU

Parameters

module M : sig ... end

Signature

type identity
type t = M.t
val hash : M.t -> int
val eq : M.t -> M.t -> bool
diff --git a/local/server-reason-react/belt/Belt/Id/index.html b/local/server-reason-react/belt/Belt/Id/index.html new file mode 100644 index 000000000..faf18994a --- /dev/null +++ b/local/server-reason-react/belt/Belt/Id/index.html @@ -0,0 +1,22 @@ + +Id (docs.local.server-reason-react.belt.Belt.Id)

Module Belt.Id

Belt.Id

Provide utilities to create identified comparators or hashes for data structures used below.

It create a unique identifier per module of functions so that different data structures with slightly different comparison functions won't mix

type ('a, 'id) hash = 'a -> int
type ('a, 'id) eq = 'a -> 'a -> bool
type ('a, 'id) cmp = 'a -> 'a -> int
val getHashInternal : ('a, 'id) hash -> 'a -> int
val getEqInternal : ('a, 'id) eq -> 'a -> 'a -> bool
val getCmpInternal : ('a, 'id) cmp -> 'a -> 'a -> int
module type Comparable = sig ... end
type ('key, 'id) comparable = + (module Comparable + with type identity = 'id + and type t = 'key)
module MakeComparableU (M : sig ... end) : sig ... end
module MakeComparable (M : sig ... end) : sig ... end
val comparableU : + cmp:('key -> 'key -> int) -> + (module Comparable + with type t = 'key)
val comparable : + cmp:('key -> 'key -> int) -> + (module Comparable + with type t = 'key)
module type Hashable = sig ... end
type ('key, 'id) hashable = + (module Hashable + with type identity = 'id + and type t = 'key)
module MakeHashableU (M : sig ... end) : sig ... end
module MakeHashable (M : sig ... end) : sig ... end
val hashableU : + hash:('key -> int) -> + eq:('key -> 'key -> bool) -> + (module Hashable + with type t = 'key)
val hashable : + hash:('key -> int) -> + eq:('key -> 'key -> bool) -> + (module Hashable + with type t = 'key)
diff --git a/local/server-reason-react/belt/Belt/Id/module-type-Comparable/index.html b/local/server-reason-react/belt/Belt/Id/module-type-Comparable/index.html new file mode 100644 index 000000000..3999bfc25 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Id/module-type-Comparable/index.html @@ -0,0 +1,2 @@ + +Comparable (docs.local.server-reason-react.belt.Belt.Id.Comparable)

Module type Id.Comparable

type identity
type t
val cmp : (t, identity) cmp
diff --git a/local/server-reason-react/belt/Belt/Id/module-type-Hashable/index.html b/local/server-reason-react/belt/Belt/Id/module-type-Hashable/index.html new file mode 100644 index 000000000..ca5ae3ddc --- /dev/null +++ b/local/server-reason-react/belt/Belt/Id/module-type-Hashable/index.html @@ -0,0 +1,2 @@ + +Hashable (docs.local.server-reason-react.belt.Belt.Id.Hashable)

Module type Id.Hashable

type identity
type t
val hash : (t, identity) hash
val eq : (t, identity) eq
diff --git a/local/server-reason-react/belt/Belt/Int/index.html b/local/server-reason-react/belt/Belt/Int/index.html new file mode 100644 index 000000000..be55ac79e --- /dev/null +++ b/local/server-reason-react/belt/Belt/Int/index.html @@ -0,0 +1,2 @@ + +Int (docs.local.server-reason-react.belt.Belt.Int)

Module Belt.Int

val toFloat : int -> float
val fromFloat : float -> int
val fromString : string -> int option
val toString : int -> string
val (+) : int -> int -> int
val (-) : int -> int -> int
val (*) : int -> int -> int
val (/) : int -> int -> int
diff --git a/local/server-reason-react/belt/Belt/List/index.html b/local/server-reason-react/belt/Belt/List/index.html new file mode 100644 index 000000000..4221663e0 --- /dev/null +++ b/local/server-reason-react/belt/Belt/List/index.html @@ -0,0 +1,77 @@ + +List (docs.local.server-reason-react.belt.Belt.List)

Module Belt.List

Belt.List

Utilities for List data type

Belt.List

Utilities for List data type.

This module is compatible with original ocaml stdlib. In general, all functions comes with the original stdlib also applies to this collection, however, this module provides faster and stack safer utilities

type 'a t = 'a list

'a t is compatible with built-in list type

val length : 'a t -> int

length xs

  • returns

    the length of the list xs

val size : 'a t -> int

See length

val head : 'a t -> 'a option

head xs returns None if xs is the empty list, otherwise it returns Some value where value is the first element in the list.

head [] = None ;;
+head [1;2;3] = Some 1 ;;
val headExn : 'a t -> 'a

headExn xs

See head

raise an exception if xs is empty

val tail : 'a t -> 'a t option

tail xs returns None if xs is empty; otherwise it returns Some xs2 where xs2 is everything except the first element of xs;

tail [] = None;;
+tail [1;2;3;4] = Some [2;3;4];;
val tailExn : 'a t -> 'a t

tailExn xs

See tail

raise an exception if xs is empty

val add : 'a t -> 'a -> 'a t

add xs y adds y to the beginning of list xs

add [1] 3 = [3;1];;
val get : 'a t -> int -> 'a option

get xs n

return the nth element in xs, or None if n is larger than the length

get [0;3;32] 2 = Some 32 ;;
+get [0;3;32] 3 = None;;
val getExn : 'a t -> int -> 'a

getExn xs n

See get

raise an exception if n is larger than the length

val make : int -> 'a -> 'a t

make n v

  • return a list of length n with each element filled with value v
  • return the empty list if n is negative
make 3 1 =  [1;1;1]
val makeByU : int -> (int -> 'a) -> 'a t
val makeBy : int -> (int -> 'a) -> 'a t

makeBy n f

  • return a list of length n with element i initialized with f i
  • return the empty list if n is negative
makeBy 5 (fun i -> i) = [0;1;2;3;4];;
+makeBy 5 (fun i -> i * i) = [0;1;4;9;16];;
val shuffle : 'a t -> 'a t

shuffle xs

  • returns

    a new list in random order

val drop : 'a t -> int -> 'a t option

drop xs n

return the list obtained by dropping the first n elements, or None if xs has fewer than n elements

drop [1;2;3] 2 = Some [3];;
+drop [1;2;3] 3 = Some [];;
+drop [1;2;3] 4 = None;;
val take : 'a t -> int -> 'a t option

take xs n

return a list with the first n elements from xs, or None if xs has fewer than n elements

take [1;2;3] 1 = Some [1];;
+take [1;2;3] 2 = Some [1;2];;
+take [1;2;3] 4 = None;;
val splitAt : 'a t -> int -> ('a list * 'a list) option

splitAt xs n split the list xs at position n return None when the length of xs is less than n

splitAt [0;1;2;3;4] 2 = Some ([0;1], [2;3;4])
val concat : 'a t -> 'a t -> 'a t

concat xs ys

  • returns

    the list obtained by adding ys after xs

    concat [1;2;3] [4;5] = [1;2;3;4;5]
val concatMany : 'a t array -> 'a t

concatMany a return the list obtained by concatenating in order all the lists in array a

concatMany [| [1;2;3] ; []; [3]; [4] |] = [1;2;3;3;4]
val reverseConcat : 'a t -> 'a t -> 'a t

reverseConcat xs ys is equivalent to concat (reverse xs) ys

reverseConcat [1;2] [3;4] = [2;1;3;4]
val flatten : 'a t t -> 'a t

flatten ls return the list obtained by concatenating in order all the lists in list ls

flatten [ [1;2;3] ; []; [3]; [4] ] = [1;2;3;3;4]
val mapU : 'a t -> ('a -> 'b) -> 'b t
val map : 'a t -> ('a -> 'b) -> 'b t

map xs f

return the list obtained by applying f to each element of xs

map [1;2] (fun x-> x + 1) = [3;4]
val zip : 'a t -> 'b t -> ('a * 'b) t

zip xs ys

  • returns

    a list of pairs from the two lists with the length of the shorter list

    zip [1;2] [3;4;5] = [(1,3); (2,4)]
val zipByU : 'a t -> 'b t -> ('a -> 'b -> 'c) -> 'c t
val zipBy : 'a t -> 'b t -> ('a -> 'b -> 'c) -> 'c t

zipBy xs ys f

See zip

Equivalent to zip xs ys |> List.map (fun (x,y) -> f x y)

zipBy [1;2;3] [4;5] (fun a b -> 2 * a + b) = [6;9];;
val mapWithIndexU : 'a t -> (int -> 'a -> 'b) -> 'b t
val mapWithIndex : 'a t -> (int -> 'a -> 'b) -> 'b t

mapWithIndex xs f applies f to each element of xs. Function f takes two arguments: the index starting from 0 and the element from xs.

mapWithIndex [1;2;3] (fun i x -> i + x) =
+[0 + 1; 1 + 2; 2 + 3 ]
val fromArray : 'a array -> 'a t

fromArray arr converts the given array to a list

fromArray [|1;2;3|]  = [1;2;3]
val toArray : 'a t -> 'a array

toArray xs converts the given list to an array

toArray [1;2;3] = [|1;2;3|]
val reverse : 'a t -> 'a t

reverse xs returns a new list whose elements are those of xs in reverse order.

reverse [1;2;3] = [3;2;1]
val mapReverseU : 'a t -> ('a -> 'b) -> 'b t
val mapReverse : 'a t -> ('a -> 'b) -> 'b t

mapReverse xs f

Equivalent to reverse (map xs f)

mapReverse [3;4;5] (fun x -> x * x) = [25;16;9];;
val forEachU : 'a t -> ('a -> unit) -> unit
val forEach : 'a t -> ('a -> unit) -> unit

forEach xs f Call f on each element of xs from the beginning to end. f returns unit, so no new array is created. Use foreach when you are primarily concerned with repetitively creating side effects.

forEach ["a";"b";"c"] (fun x -> Js.log("Item: " ^ x));;
+(*  prints:
+  Item: a
+  Item: b
+  Item: c
+*)
+
+let us = ref 0;;
+forEach [1;2;3;4] (fun x -> us := !us + x);;
+!us  = 1 + 2 + 3 + 4;;
val forEachWithIndexU : 'a t -> (int -> 'a -> unit) -> unit
val forEachWithIndex : 'a t -> (int -> 'a -> unit) -> unit

forEachWithIndex xs f

forEach ["a";"b";"c"] (fun i x -> Js.log("Item " ^ (string_of_int i) ^ " is " ^ x));;
+(*  prints:
+  Item 0 is a
+  Item 1 is b
+  Item 2 is cc
+*)
+
+let total = ref 0 ;;
+forEachWithIndex [10;11;12;13] (fun i x -> total := !total + x + i);;
+!total  = 0 + 10 + 1 +  11 + 2 + 12 + 3 + 13;;
val reduceU : 'a t -> 'b -> ('b -> 'a -> 'b) -> 'b
val reduce : 'a t -> 'b -> ('b -> 'a -> 'b) -> 'b

reduce xs f

Applies f to each element of xs from beginning to end. Function f has two parameters: the item from the list and an “accumulator”, which starts with a value of init. reduce returns the final value of the accumulator.

reduce [1;2;3;4] 0 (+) = 10;;
+reduce [1;2;3;4] 10 (-) = 0;;
+reduce [1;2;3;4] [] add = [4;3;2;1];
val reduceWithIndexU : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b
val reduceWithIndex : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b

reduceWithIndex xs f

Applies f to each element of xs from beginning to end. Function f has three parameters: the item from the list and an “accumulator”, which starts with a value of init and the index of each element. reduceWithIndex returns the final value of the accumulator.

reduceWithIndex [1;2;3;4] 0 (fun acc x i -> acc + x + i) = 16;;
val reduceReverseU : 'a t -> 'b -> ('b -> 'a -> 'b) -> 'b
val reduceReverse : 'a t -> 'b -> ('b -> 'a -> 'b) -> 'b

reduceReverse xs f

Works like reduce, except that function f is applied to each item of xs from the last back to the first.

reduceReverse [1;2;3;4] 0 (+) = 10;;
+reduceReverse [1;2;3;4] 10 (-) = 0;;
+reduceReverse [1;2;3;4] [] add = [1;2;3;4];;
val mapReverse2U : 'a t -> 'b t -> ('a -> 'b -> 'c) -> 'c t
val mapReverse2 : 'a t -> 'b t -> ('a -> 'b -> 'c) -> 'c t

mapReverse2 xs ys f

equivalent to reverse (zipBy xs ys f)

mapReverse2 [1;2;3] [1;2] (+) = [4;2]
val forEach2U : 'a t -> 'b t -> ('a -> 'b -> unit) -> unit
val forEach2 : 'a t -> 'b t -> ('a -> 'b -> unit) -> unit

forEach2 xs ys f stop with the shorter list

val reduce2U : 'b t -> 'c t -> 'a -> ('a -> 'b -> 'c -> 'a) -> 'a
val reduce2 : 'b t -> 'c t -> 'a -> ('a -> 'b -> 'c -> 'a) -> 'a

reduce2 xs ys init f

Applies f to each element of xs and ys from beginning to end. Stops with the shorter list. Function f has three parameters: an “accumulator” which starts with a value of init, an item from xs, and an item from ys. reduce2 returns the final value of the accumulator.

reduce2 [1;2;3] [4;5] 0 (fun acc x y -> acc + x * x + y) =  0 + (1 * 1 + 4) + (2 * 2 + 5);;
+reduce2 [1;2;3] [4;5] [] (fun acc x y -> add acc (x + y) = [2 +5;1 + 4 ];; (*add appends at end *)
val reduceReverse2U : 'a t -> 'b t -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val reduceReverse2 : 'a t -> 'b t -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c

reduceReverse2 xs ys init f

Applies f to each element of xs and ys from end to beginning. Stops with the shorter list. Function f has three parameters: an “accumulator” which starts with a value of init, an item from xs, and an item from ys. reduce2 returns the final value of the accumulator.

reduceReverse2 [1;2;3] [4;5] 0 (fun acc x y -> acc + x * x + y) =  0 + (1 * 1 + 4) + (2 * 2 + 5);;
+reduceReverse2 [1;2;3] [4;5] [] (fun acc x y -> add acc (x + y) = [1 + 4;2 + 5];; (*add appends at end *)
val everyU : 'a t -> ('a -> bool) -> bool
val every : 'a t -> ('a -> bool) -> bool

every xs p

  • returns

    true if all elements satisfy p, where p is a predicate: a function taking an element and returning a bool.

    every [] (fun x -> x mod 2 = 0) = true;;
    +every [2;4;6] (fun x -> x mod 2 = 0 ) = true;;
    +every [1;-3;5] (fun x -> x > 0) = false;;
val someU : 'a t -> ('a -> bool) -> bool
val some : 'a t -> ('a -> bool) -> bool

some xs p

  • returns

    true if at least one of the elements in xs satifies p, where p is a predicate: a function taking an element and returning a bool.

    some [] (fun x -> x mod 2 = 0) = false ;;
    +some [1;2;4] (fun x -> x mod 2 = 0) = true;;
    +some [-1;-3;-5] (fun x -> x > 0) = false;;
val every2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val every2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

every2 xs ys p returns true if predicate p xi yi is true for all pairs of elements up to the shorter length (i.e. min (length xs) (length ys))

every2 [1;2;3] [0;1] (>) = true;;
+every2 [] [1] (fun  x y -> x > y) = true;;
+every2 [2;3] [1] (fun  x y -> x > y) = true;;
+every2 [0;1] [5;0] (fun x y -> x > y) = false;
val some2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val some2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

some2 xs ys p returns true if p xi yi is true for any pair of elements up to the shorter length (i.e. min (length xs) (length ys))

some2 [0;2] [1;0;3] (>) = true ;;
+some2 [] [1] (fun  x y -> x > y) =  false;;
+some2 [2;3] [1;4] (fun  x y -> x > y) = true;;
val cmpByLength : 'a t -> 'a t -> int

cmpByLength l1 l2

Compare two lists solely by length. Returns -1 if length l1 is less than length l2, 0 if length l1 equals length l2, and 1 if length l1 is greater than length l2.

cmpByLength [1;2] [3;4;5;6] = -1;;
+cmpByLength [1;2;3] [4;5;6] = 0;;
+cmpByLength [1;2;3;4] [5;6] = 1;;
val cmpU : 'a t -> 'a t -> ('a -> 'a -> int) -> int
val cmp : 'a t -> 'a t -> ('a -> 'a -> int) -> int

Compare elements one by one f x y. f returns

  • a negative number if x is “less than” y
  • zero if x is “equal to” y
  • a positive number if x is “greater than” y The comparison returns the first non-zero result of f, or zero if f returns zero for all x and y. If all items have compared equal, but xs is exhausted first, return -1. (xs is shorter) If all items have compared equal, but ys is exhausted first, return 1 (xs is longer)
cmp [3] [3;7] (fun a b -> compare a b) = -1
+cmp [5;3] [5] (fun a b -> compare a b)  = 1
+cmp [|1; 3; 5|] [|1; 4; 2|] (fun a b -> compare a b) = -1;;
+cmp [|1; 3; 5|] [|1; 2; 3|] (fun a b -> compare a b) = 1;;
+cmp [|1; 3; 5|] [|1; 3; 5|] (fun a b -> compare a b) = 0;;

Attention: The total ordering of List is different from Array, for Array, we compare the length first and, only if the lengths are equal, elements one by one. For lists, we just compare elements one by one

val eqU : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool
val eq : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool

eq xs ys eqElem check equality of xs and ys using eqElem for equality on elements, where eqElem is a function that returns true if items x and y meet some criterion for equality, false otherwise. eq false if length of xs and ys are not the same.

eq [1;2;3] [1;2] (=) = false ;;
+eq [1;2] [1;2] (=) = true;;
+eq [1; 2; 3] [-1; -2; -3] (fun a b -> abs a = abs b) = true;;
val hasU : 'a t -> 'b -> ('a -> 'b -> bool) -> bool
val has : 'a t -> 'b -> ('a -> 'b -> bool) -> bool

has xs eqFcn returns true if the list contains at least one element for which eqFcn x returns true

has [1;2;3] 2 (=) = true;;
+has [1;2;3] 4 (=) = false;;
+has [-1;-2;-3] 2 (fun a b -> abs a = abs b) = true;;
val getByU : 'a t -> ('a -> bool) -> 'a option
val getBy : 'a t -> ('a -> bool) -> 'a option

getBy xs p returns Some value for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getBy [1;4;3;2] (fun x -> x mod 2 = 0) = Some 4
+getBy [15;13;11] (fun x -> x mod 2 = 0) = None
val keepU : 'a t -> ('a -> bool) -> 'a t
val keep : 'a t -> ('a -> bool) -> 'a t

keep xs p returns a list of all elements in xs which satisfy the predicate function p

keep [1;2;3;4] (fun x -> x mod 2 = 0) =
+[2;4]
val filter : 'a t -> ('a -> bool) -> 'a t

filter xs p returns a list of all elements in xs which satisfy the predicate function p

filter [1;2;3;4] (fun x -> x mod 2 = 0) =
+[2;4]
  • deprecated This function will soon be deprecated. Please, use `List.keep` instead.
val keepWithIndexU : 'a t -> ('a -> int -> bool) -> 'a t
val keepWithIndex : 'a t -> ('a -> int -> bool) -> 'a t

keepWithIndex xs p returns a list of all elements in xs which satisfy the predicate function p

keepWithIndex [1;2;3;4] (fun _x i -> i mod 2 = 0)
+=
+[1;3]
val filterWithIndex : 'a t -> ('a -> int -> bool) -> 'a t

filterWithIndex xs p returns a list of all elements in xs which satisfy the predicate function p

filterWithIndex [1;2;3;4] (fun _x i -> i mod 2 = 0)
+=
+[1;3]
  • deprecated This function will soon be deprecated. Please, use `List.keepWithIndex` instead.
val keepMapU : 'a t -> ('a -> 'b option) -> 'b t
val keepMap : 'a t -> ('a -> 'b option) -> 'b t

keepMap xs f applies f to each element of xs. If f xi returns Some value, then value is kept in the resulting list; if f xi returns None, the element is not retained in the result.

keepMap [1;2;3;4] (fun x -> if x mod 2 = 0 then Some (-x ) else None)
+=
+[-2;-4]
val partitionU : 'a t -> ('a -> bool) -> 'a t * 'a t
val partition : 'a t -> ('a -> bool) -> 'a t * 'a t

partition xs p creates a pair of lists; the first list consists of all elements of xs that satisfy the predicate function p; the second list consists of all elements of xs that do not satisfy p

partition [1;2;3;4] (fun x -> x mod 2 = 0) =
+([2;4], [1;3])
val unzip : ('a * 'b) t -> 'a t * 'b t

unzip xs takes a list of pairs and creates a pair of lists. The first list contains all the first items of the pairs; the second list contains all the second items.

unzip [(1,2) ; (3,4)] = ([1;3], [2;4]);;
+unzip [(1,2) ; (3,4) ; (5,6) ; (7,8)] = ([1;3;5;7], [2;4;6;8]);;
val getAssocU : ('a * 'c) t -> 'b -> ('a -> 'b -> bool) -> 'c option
val getAssoc : ('a * 'c) t -> 'b -> ('a -> 'b -> bool) -> 'c option

getAssoc xs k eq

return the second element of a pair in xs where the first element equals x as per the predicate function eq, or None if not found

getAssoc [ 1, "a"; 2, "b"; 3, "c"] 2 (=) = Some "b"
+getAssoc [9, "morning"; 15, "afternoon"; 22, "night"] 3 (fun a b -> a mod 12 = b mod 12) = Some "afternoon"
val hasAssocU : ('a * 'c) t -> 'b -> ('a -> 'b -> bool) -> bool
val hasAssoc : ('a * 'c) t -> 'b -> ('a -> 'b -> bool) -> bool

hasAssoc xs k eq return true if there is a pair in xs where the first element equals k as per the predicate funtion eq

hasAssoc [1, "a"; 2, "b"; 3,"c"] 1 (=) = true;;
+hasAssoc [9, "morning"; 15, "afternoon"; 22, "night"] 3 (fun a b -> a mod 12 = b mod 12) = true;;
val removeAssocU : ('a * 'c) t -> 'b -> ('a -> 'b -> bool) -> ('a * 'c) t
val removeAssoc : ('a * 'c) t -> 'b -> ('a -> 'b -> bool) -> ('a * 'c) t

removeAssoc xs k eq Return a list after removing the first pair whose first value is k per the equality predicate eq; if not found, return a new list identical to xs.

removeAssoc [1,"a"; 2, "b"; 3, "c" ] 1 (=) =
+  [2, "b"; 3, "c"]
+removeAssoc [1,"a"; 2, "b"; 3, "c" ] 99 (=) =
+  [1, "a"; 2, "b"; 3, "c"]
val setAssocU : ('a * 'c) t -> 'a -> 'c -> ('a -> 'a -> bool) -> ('a * 'c) t
val setAssoc : ('a * 'c) t -> 'a -> 'c -> ('a -> 'a -> bool) -> ('a * 'c) t

setAssoc xs k v eq if k exists in xs by satisfying the eq predicate, return a new list with the key and value replaced by the new k and v; otherwise, return a new list with the pair k, v added to the head of xs.

setAssoc [1,"a"; 2, "b"; 3, "c"] 2 "x" (=) =
+[1,"a"; 2, "x"; 3,"c"] ;;
+
+setAssoc [1,"a"; 3, "c"] 2 "b" (=) =
+[2,"b"; 1,"a"; 3, "c"]
+
+setAssoc [9, "morning"; 3, "morning?!"; 22, "night"] 15 "afternoon"
+  (fun a b -> a mod 12 = b mod 12) = [9, "morning"; 15, "afternoon"; 22, "night"]

Note carefully the last example! Since 15 mod 12 equals 3 mod 12, both the key and value are replaced in the list.

val sortU : 'a t -> ('a -> 'a -> int) -> 'a t
val sort : 'a t -> ('a -> 'a -> int) -> 'a t

sort xs Returns a sorted list.

sort [5; 4; 9; 3; 7] (fun a b -> a - b) = [3; 4; 5; 7; 9]
diff --git a/local/server-reason-react/belt/Belt/Map/Dict/index.html b/local/server-reason-react/belt/Belt/Map/Dict/index.html new file mode 100644 index 000000000..3a920cf97 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Map/Dict/index.html @@ -0,0 +1,65 @@ + +Dict (docs.local.server-reason-react.belt.Belt.Map.Dict)

Module Map.Dict

This module seprate identity from data, it is a bit more verboe but slightly more efficient due to the fact that there is no need to pack identity and data back after each operation

Advanced usage only

type ('key, 'value, 'id) t
type ('key, 'id) cmp = 'key -> 'key -> int
val empty : ('k, 'v, 'id) t
val isEmpty : ('k, 'v, 'id) t -> bool
val has : ('k, 'a, 'id) t -> 'k -> cmp:('k, 'id) cmp -> bool
val cmpU : + ('k, 'v, 'id) t -> + ('k, 'v, 'id) t -> + kcmp:('k, 'id) cmp -> + vcmp:('v -> 'v -> int) -> + int
val cmp : + ('k, 'v, 'id) t -> + ('k, 'v, 'id) t -> + kcmp:('k, 'id) cmp -> + vcmp:('v -> 'v -> int) -> + int
val eqU : + ('k, 'a, 'id) t -> + ('k, 'a, 'id) t -> + kcmp:('k, 'id) cmp -> + veq:('a -> 'a -> bool) -> + bool
val eq : + ('k, 'a, 'id) t -> + ('k, 'a, 'id) t -> + kcmp:('k, 'id) cmp -> + veq:('a -> 'a -> bool) -> + bool

eq m1 m2 cmp tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val findFirstByU : ('k, 'v, 'id) t -> ('k -> 'v -> bool) -> ('k * 'v) option
val findFirstBy : ('k, 'v, 'id) t -> ('k -> 'v -> bool) -> ('k * 'v) option

findFirstBy m p uses funcion f to find the first key value pair to match predicate p.

let s0 = fromArray ~id:(module IntCmp) [|4,"4";1,"1";2,"2,"3""|];;
+findFirstBy s0 (fun k v -> k = 4 ) = option (4, "4");;
val forEachU : ('k, 'a, 'id) t -> ('k -> 'a -> unit) -> unit
val forEach : ('k, 'a, 'id) t -> ('k -> 'a -> unit) -> unit

forEach m f applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val reduceU : ('k, 'a, 'id) t -> 'b -> ('b -> 'k -> 'a -> 'b) -> 'b
val reduce : ('k, 'a, 'id) t -> 'b -> ('b -> 'k -> 'a -> 'b) -> 'b

reduce m a f computes (f kN dN ... (f k1 d1 a)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

val everyU : ('k, 'a, 'id) t -> ('k -> 'a -> bool) -> bool
val every : ('k, 'a, 'id) t -> ('k -> 'a -> bool) -> bool

every m p checks if all the bindings of the map satisfy the predicate p. Order unspecified

val someU : ('k, 'a, 'id) t -> ('k -> 'a -> bool) -> bool
val some : ('k, 'a, 'id) t -> ('k -> 'a -> bool) -> bool

some m p checks if at least one binding of the map satisfy the predicate p. Order unspecified

val size : ('k, 'a, 'id) t -> int
val toList : ('k, 'a, 'id) t -> ('k * 'a) list

In increasing order.

val toArray : ('k, 'a, 'id) t -> ('k * 'a) array
val fromArray : ('k * 'a) array -> cmp:('k, 'id) cmp -> ('k, 'a, 'id) t
val keysToArray : ('k, 'a, 'id) t -> 'k array
val valuesToArray : ('k, 'a, 'id) t -> 'a array
val minKey : ('k, _, _) t -> 'k option
val minKeyUndefined : ('k, _, _) t -> 'k Js.undefined
val maxKey : ('k, _, _) t -> 'k option
val maxKeyUndefined : ('k, _, _) t -> 'k Js.undefined
val minimum : ('k, 'a, _) t -> ('k * 'a) option
val minUndefined : ('k, 'a, _) t -> ('k * 'a) Js.undefined
val maximum : ('k, 'a, _) t -> ('k * 'a) option
val maxUndefined : ('k, 'a, _) t -> ('k * 'a) Js.undefined
val get : ('k, 'a, 'id) t -> 'k -> cmp:('k, 'id) cmp -> 'a option
val getUndefined : + ('k, 'a, 'id) t -> + 'k -> + cmp:('k, 'id) cmp -> + 'a Js.undefined
val getWithDefault : ('k, 'a, 'id) t -> 'k -> 'a -> cmp:('k, 'id) cmp -> 'a
val getExn : ('k, 'a, 'id) t -> 'k -> cmp:('k, 'id) cmp -> 'a
val checkInvariantInternal : (_, _, _) t -> unit

raise when invariant is not held

val remove : ('a, 'b, 'id) t -> 'a -> cmp:('a, 'id) cmp -> ('a, 'b, 'id) t

remove m x returns a map containing the same bindings as m, except for x which is unbound in the returned map.

val removeMany : + ('a, 'b, 'id) t -> + 'a array -> + cmp:('a, 'id) cmp -> + ('a, 'b, 'id) t
val set : ('a, 'b, 'id) t -> 'a -> 'b -> cmp:('a, 'id) cmp -> ('a, 'b, 'id) t

set m x y returns a map containing the same bindings as m, plus a binding of x to y. If x was already bound in m, its previous binding disappears.

val updateU : + ('a, 'b, 'id) t -> + 'a -> + ('b option -> 'b option) -> + cmp:('a, 'id) cmp -> + ('a, 'b, 'id) t
val update : + ('a, 'b, 'id) t -> + 'a -> + ('b option -> 'b option) -> + cmp:('a, 'id) cmp -> + ('a, 'b, 'id) t
val mergeU : + ('a, 'b, 'id) t -> + ('a, 'c, 'id) t -> + ('a -> 'b option -> 'c option -> 'd option) -> + cmp:('a, 'id) cmp -> + ('a, 'd, 'id) t
val merge : + ('a, 'b, 'id) t -> + ('a, 'c, 'id) t -> + ('a -> 'b option -> 'c option -> 'd option) -> + cmp:('a, 'id) cmp -> + ('a, 'd, 'id) t

merge m1 m2 f computes a map whose keys is a subset of keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f.

val mergeMany : + ('a, 'b, 'id) t -> + ('a * 'b) array -> + cmp:('a, 'id) cmp -> + ('a, 'b, 'id) t
val keepU : ('k, 'a, 'id) t -> ('k -> 'a -> bool) -> ('k, 'a, 'id) t
val keep : ('k, 'a, 'id) t -> ('k -> 'a -> bool) -> ('k, 'a, 'id) t

keep m p returns the map with all the bindings in m that satisfy predicate p.

val partitionU : + ('k, 'a, 'id) t -> + ('k -> 'a -> bool) -> + ('k, 'a, 'id) t * ('k, 'a, 'id) t
val partition : + ('k, 'a, 'id) t -> + ('k -> 'a -> bool) -> + ('k, 'a, 'id) t * ('k, 'a, 'id) t

partition m p returns a pair of maps (m1, m2), where m1 contains all the bindings of s that satisfy the predicate p, and m2 is the map with all the bindings of s that do not satisfy p.

val split : + ('a, 'b, 'id) t -> + 'a -> + cmp:('a, 'id) cmp -> + (('a, 'b, 'id) t * ('a, 'b, 'id) t) * 'b option

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

val mapU : ('k, 'a, 'id) t -> ('a -> 'b) -> ('k, 'b, 'id) t
val map : ('k, 'a, 'id) t -> ('a -> 'b) -> ('k, 'b, 'id) t

map m f returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapWithKeyU : ('k, 'a, 'id) t -> ('k -> 'a -> 'b) -> ('k, 'b, 'id) t
val mapWithKey : ('k, 'a, 'id) t -> ('k -> 'a -> 'b) -> ('k, 'b, 'id) t
diff --git a/local/server-reason-react/belt/Belt/Map/String/A/index.html b/local/server-reason-react/belt/Belt/Map/String/A/index.html new file mode 100644 index 000000000..0ae8e0b57 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Map/String/A/index.html @@ -0,0 +1,80 @@ + +A (docs.local.server-reason-react.belt.Belt.Map.String.A)

Module String.A

Belt.Array Utililites for Array functions

type 'a t = 'a array
val length : 'a t -> int

length xs return the size of the array

val size : 'a t -> int

See length

val get : 'a t -> int -> 'a option

get arr i

If i <= 0 <= length arr;returns Some value where value is the item at index i If i is out of range;returns None

Belt.Array.get [|"a";"b";"c"|] 0 = Some "a";;
+Belt.Array.get [|"a";"b";"c"|] 3 = None;;
+Belt.Array.get [|"a";"b";"c"|] (-1) = None;;
val getExn : 'a t -> int -> 'a

getExn arr i

raise an exception if i is out of range;otherwise return the value at index i in arr

val getUnsafe : 'a t -> int -> 'a

getUnsafe arr i

Unsafe

no bounds checking;this would cause type error if i does not stay within range

val getUndefined : 'a t -> int -> 'a option

getUndefined arr i

It does the samething in the runtime as getUnsafe; it is type safe since the return type still track whether it is in range or not

val set : 'a t -> int -> 'a -> bool

set arr n x modifies arr in place; it replaces the nth element of arr with x

  • returns

    false means not updated due to out of range

val setExn : 'a t -> int -> 'a -> unit

setExn arr i x raise an exception if i is out of range

val setUnsafe : 'a t -> int -> 'a -> unit
val shuffleInPlace : 'a t -> unit

shuffleInPlace arr randomly re-orders the items in arr

val shuffle : 'a t -> 'a t

shuffle xs

  • returns

    a fresh array with items in original array randomly shuffled

val reverseInPlace : 'a t -> unit

reverseInPlace arr reverses items in arr in place

let arr = [|10;11;12;13;14|];;
+let () = reverseInPlace arr;;
+arr = [|14;13;12;11;10|];;
val reverse : 'a t -> 'a t

reverse arr

  • returns

    a fresh array with items in arr in reverse order

    reverse [|10;11;12;13;14|] = [|14;13;12;11;10|];;
val makeUninitialized : int -> 'a option array

makeUninitialized n creates an array of length n filled with the undefined value. You must specify the type of data that will eventually fill the array.

let arr: string Js.undefined array = makeUninitialized 5;;
+getExn arr 0 = Js.undefined;;
val makeUninitializedUnsafe : int -> 'a -> 'a array

`makeUninitializedUnsafe n`

Unsafe

let arr = Belt.Array.makeUninitializedUnsafe 5;;
+let () = Js.log(Belt.Array.getExn arr 0);; (* undefined *)
+Belt.Array.setExn arr 0 "example";;
+let () = Js.log(Belt.Array.getExn arr 0 = "example");;
val make : int -> 'a -> 'a t

make n e return an array of size n filled with value e

  • returns

    an empty array when n is negative.

val range : int -> int -> int t

range start finish create an inclusive array

range 0 3 =  [|0;1;2;3|];;
+range 3 0 =  [||] ;;
+range 3 3 = [|3|];;
val rangeBy : int -> int -> step:int -> int t

rangeBy start finish ~step

  • returns

    empty array when step is 0 or negative it also return empty array when start > finish

    rangeBy 0 10 ~step:3 = [|0;3;6;9|];;
    +rangeBy 0 12 ~step:3 = [|0;3;6;9;12|];;
    +rangeBy 33 0 ~step:1 =  [||];;
    +rangeBy 33 0 ~step:(-1) = [||];;
    +rangeBy 3 12 ~step:(-1) = [||];;
    +rangeBy 3 3 ~step:0 = [||] ;;
    +rangeBy 3 3 ~step:(1) = [|3|] ;;
val makeByU : int -> (int -> 'a) -> 'a t
val makeBy : int -> (int -> 'a) -> 'a t

makeBy n f

return an empty array when n is negative return an array of size n populated by f i start from 0 to n - 1

makeBy 5 (fun i -> i) = [|0;1;2;3;4|];;
+makeBy 5 (fun i -> i * i) = [|0;1;4;9;16|]
val makeByAndShuffleU : int -> (int -> 'a) -> 'a t
val makeByAndShuffle : int -> (int -> 'a) -> 'a t

makeByAndShuffle n f

Equivalent to shuffle (makeBy n f)

val zip : 'a t -> 'b array -> ('a * 'b) array

zip a b

Create an array of pairs from corresponding elements of a and b. Stop with the shorter array

zip [|1;2|] [|3;4;5|] = [|(1, 3);(2, 4)|]
val zipByU : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array
val zipBy : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array

zipBy xs ys f

Create an array by applying f to corresponding elements of xs and ys Stops with shorter array

Equivalent to map (zip xs ys) (fun (a,b) -> f a b)

zipBy [|1;2;3|] [|4;5|] (fun a b -> 2 * a + b) = [|6;9|];;
val unzip : ('a * 'b) array -> 'a t * 'b array

unzip a takes an array of pairs and creates a pair of arrays. The first array contains all the first items of the pairs; the second array contains all the second items.

unzip [|(1,2) ; (3,4)|] = ([|1;3|], [|2;4|]);;
+unzip [|(1,2) ; (3,4) ; (5,6) ; (7,8)|] = ([|1;3;5;7|], [|2;4;6;8|]);;
val concat : 'a t -> 'a t -> 'a t

concat xs ys

  • returns

    a fresh array containing the concatenation of the arrays v1 and v2;so even if v1 or v2 is empty;it can not be shared

    concat [|1;2;3|] [|4;5|] = [|1;2;3;4;5|];;
    +concat [| |] [|"a";"b";"c"|] = [|"a";"b";"c"|];;
val concatMany : 'a t t -> 'a t

concatMany xss

  • returns

    a fresh array as the concatenation of xss (an array of arrays)

    concatMany [| [|1;2;3|]; [|4;5;6|]; [|7;8|] |] = [|1;2;3;4;5;6;7;8|];;
val slice : 'a t -> offset:int -> len:int -> 'a t

slice xs offset len creates a new array with the len elements of xs starting at offset for

offset can be negative;and is evaluated as length xs - offset slice xs -1 1 means get the last element as a singleton array

slice xs (-len) len will return a copy of the array

if the array does not have enough data;slice extracts through the end of sequence.

if len is negative;returns the empty array.

slice [|10;11;12;13;14;15;16|] ~offset: 2 ~len: 3 = [|12;13;14|];;
+slice [|10;11;12;13;14;15;16|] ~offset: (-4) ~len: 3 = [|13;14;15|];;
+slice [|10;11;12;13;14;15;16|] ~offset:4  ~len:9 = [|14;15;16|];;
val sliceToEnd : 'a t -> int -> 'a t

sliceToEnd xs offset creates a new array with the elements of xs starting at offset

offset can be negative;and is evaluated as length xs - offset sliceToEnd xs -1 means get the last element as a singleton array

sliceToEnd xs 0 will return a copy of the array

sliceToEnd [|10;11;12;13;14;15;16|] 2 = [|12;13;14;15;16|];;
+sliceToEnd [|10;11;12;13;14;15;16|] (-4) = [|13;14;15;16|];;
val copy : 'a t -> 'a t

copy a

  • returns

    a copy of a;that is;a fresh array containing the same elements as a.

val fill : 'a t -> offset:int -> len:int -> 'a -> unit

fill arr ~offset ~len x

Modifies arr in place, storing x in elements number offset to offset + len - 1.

offset can be negative;and is evaluated as length arr - offset

fill arr ~offset:(-1) ~len:1 means fill the last element, if the array does not have enough data;fill will ignore it

let arr = makeBy 5 (fun i -> i) ;;
+fill arr ~offset:2 ~len:2 9 ;;
+arr = [|0;1;9;9;4|];;
+fill arr ~offset:7 ~len:2 8;;
+arr = [|0;1;9;9;4|];;
val blit : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

blit ~src:v1 ~srcOffset:o1 ~dst:v2 ~dstOffset:o2 ~len

copies len elements from array v1;starting at element number o1;to array v2, starting at element number o2.

It works correctly even if v1 and v2 are the same array;and the source and destination chunks overlap.

offset can be negative;-1 means len - 1;if len + offset is still negative;it will be set as 0

For each of the examples;presume that v1 = [|10;11;12;13;14;15;16;17|] and v2 = [|20;21;22;23;24;25;26;27|]. The result shown is the content of the destination array.

Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v2 ~dstOffset: 2 ~len: 3 |.
+  [|20;21;14;15;16;25;26;27|]
+Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v1 ~dstOffset: 2 ~len: 3 |.
+  [|10;11;14;15;16;15;16;17|]
val blitUnsafe : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

Unsafe blit without bounds checking

val forEachU : 'a t -> ('a -> unit) -> unit
val forEach : 'a t -> ('a -> unit) -> unit

forEach xs f

Call f on each element of xs from the beginning to end. f returns unit;so no new array is created. Use forEach when you are primarily concerned with repetitively creating side effects.

forEach [|"a";"b";"c"|] (fun x -> Js.log("Item: " ^ x));;
+(*  prints:
+  Item: a
+  Item: b
+  Item: c
+*)
+
+let total = ref 0;;
+forEach [|1;2;3;4|] (fun x -> total := !total + x);;
+!total  = 1 + 2 + 3 + 4;;
val mapU : 'a t -> ('a -> 'b) -> 'b array
val map : 'a t -> ('a -> 'b) -> 'b array

map xs f

  • returns

    a new array by calling f for each element of xs from the beginning to end

    map [|1;2|] (fun x-> x + 10) = [|11;12|]
val flatMapU : 'a t -> ('a -> 'b t) -> 'b t
val flatMap : 'a t -> ('a -> 'b t) -> 'b t

flatMap xs f **return** a new array by calling `f` for each element of `xs` from the beginning to end, and then concatenating the results ``` flatMap |1;2| (fun x-> |x + 10;x + 20|) = |11;21;12;22| ```

val getByU : 'a t -> ('a -> bool) -> 'a option
val getBy : 'a t -> ('a -> bool) -> 'a option

getBy xs p returns Some value for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 4
+getBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val getIndexByU : 'a t -> ('a -> bool) -> int option
val getIndexBy : 'a t -> ('a -> bool) -> int option

getIndexBy xs p returns Some index for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getIndexBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 1
+getIndexBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val keepU : 'a t -> ('a -> bool) -> 'a t
val keep : 'a t -> ('a -> bool) -> 'a t

keep xs p

  • returns

    a new array that keeps all elements satisfying p

    keep [|1;2;3|] (fun x -> x mod  2 = 0) = [|2|]
val keepWithIndexU : 'a t -> ('a -> int -> bool) -> 'a t
val keepWithIndex : 'a t -> ('a -> int -> bool) -> 'a t

keepWithIndex xs p

  • returns

    a new array that keeps all elements satisfying p. The predicate p takes two arguments: the element from xs and the index starting from 0.

    keepWithIndex [|1;2;3|] (fun _x i -> i = 1) = [|2|]
val keepMapU : 'a t -> ('a -> 'b option) -> 'b array
val keepMap : 'a t -> ('a -> 'b option) -> 'b array

keepMap xs p

  • returns

    a new array that keeps all elements that return a non-None when applied to p

    keepMap [|1;2;3|] (fun x -> if x mod 2 = 0 then Some x else None)
    += [| 2 |]
val forEachWithIndexU : 'a t -> (int -> 'a -> unit) -> unit
val forEachWithIndex : 'a t -> (int -> 'a -> unit) -> unit

forEachWithIndex xs f

The same as forEach; except that f is supplied with two arguments: the index starting from 0 and the element from xs

forEachWithIndex [|"a";"b";"c"|] (fun i x -> Js.log("Item " ^ (string_of_int i) ^ " is " ^ x));;
+(*  prints:
+  Item 0 is a
+  Item 1 is b
+  Item 2 is c
+*)
+
+let total = ref 0 ;;
+forEachWithIndex [|10;11;12;13|] (fun i x -> total := !total + x + i);;
+!total  = 0 + 10 + 1 +  11 + 2 + 12 + 3 + 13;;
val mapWithIndexU : 'a t -> (int -> 'a -> 'b) -> 'b t
val mapWithIndex : 'a t -> (int -> 'a -> 'b) -> 'b t

mapWithIndex xs f applies f to each element of xs. Function f takes two arguments: the index starting from 0 and the element from xs.

mapWithIndex [|1;2;3|] (fun i x -> i + x) =
+[|0 + 1; 1 + 2; 2 + 3|]
val partitionU : 'a t -> ('a -> bool) -> 'a t * 'a t
val partition : 'a t -> ('a -> bool) -> 'a t * 'a t

partition f a split array into tuple of two arrays based on predicate f; first of tuple where predicate cause true, second where predicate cause false

partition [|1;2;3;4;5|] (fun x -> x mod 2 = 0  ) = ([|2;4|], [|1;2;3|]);;
+partition [|1;2;3;4;5|] (fun x -> x mod 2 <> 0 ) = ([|1;2;3|], [|2;4|]);;
val reduceU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduce : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduce xs init f

Applies f to each element of xs from beginning to end. Function f has two parameters: the item from the list and an “accumulator”;which starts with a value of init. reduce returns the final value of the accumulator.

reduce [|2;3;4|] 1 (+) = 10;;
+reduce [|"a";"b";"c";"d"|] "" (^) = "abcd";;
val reduceReverseU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduceReverse : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduceReverse xs init f

Works like reduce;except that function f is applied to each item of xs from the last back to the first.

reduceReverse [|"a";"b";"c";"d"|] "" (^) = "dcba";;
val reduceReverse2U : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val reduceReverse2 : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c

reduceReverse2 xs ys init f Reduces two arrays xs and ys;taking items starting at min (length xs) (length ys) down to and including zero.

reduceReverse2 [|1;2;3|] [|1;2|] 0 (fun acc x y -> acc + x + y) = 6
val reduceWithIndexU : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b
val reduceWithIndex : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b

reduceWithIndex xs f

Applies f to each element of xs from beginning to end. Function f has three parameters: the item from the array and an “accumulator”, which starts with a value of init and the index of each element. reduceWithIndex returns the final value of the accumulator.

reduceWithIndex [|1;2;3;4|] 0 (fun acc x i -> acc + x + i) = 16;
val joinWithU : 'a t -> string -> ('a -> string) -> string
val joinWith : 'a t -> string -> ('a -> string) -> string

joinWith xs sep toString

Concatenates all the elements of xs converted to string with toString, each separated by sep, the string given as the second argument, into a single string. If the array has only one element, then that element will be returned without using the separator. If the array is empty, the empty string will be returned.

joinWith [|0; 1|] ", " string_of_int = "0, 1"
+joinWith [||] " " string_of_int = ""
+joinWith [|1|] " " string_of_int = "1"
val someU : 'a t -> ('a -> bool) -> bool
val some : 'a t -> ('a -> bool) -> bool

some xs p

  • returns

    true if at least one of the elements in xs satifies p;where p is a predicate: a function taking an element and returning a bool.

    some [|2; 3; 4|] (fun x -> x mod 2 = 1) = true;;
    +some [|-1; -3; -5|] (fun x -> x > 0) = false;;
val everyU : 'a t -> ('a -> bool) -> bool
val every : 'a t -> ('a -> bool) -> bool

every xs p

  • returns

    true if all elements satisfy p;where p is a predicate: a function taking an element and returning a bool.

    every [|1; 3; 5|] (fun x -> x mod 2 = 1) = true;;
    +every [|1; -3; 5|] (fun x -> x > 0) = false;;
val every2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val every2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

every2 xs ys p returns true if p xi yi is true for all pairs of elements up to the shorter length (i.e. min (length xs) (length ys))

every2 [|1;2;3|] [|0;1|] (>) = true;;
+every2 [||] [|1|] (fun  x y -> x > y) = true;;
+every2 [|2;3|] [|1|] (fun  x y -> x > y) = true;;
+every2 [|0;1|] [|5;0|] (fun x y -> x > y) = false;
val some2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val some2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

some2 xs ys p returns true if p xi yi is true for any pair of elements up to the shorter length (i.e. min (length xs) (length ys))

some2 [|0;2|] [|1;0;3|] (>) = true ;;
+(some2 [||] [|1|] (fun   x y -> x > y)) =  false;;
+(some2 [|2;3|] [|1;4|] (fun   x y -> x > y)) = true;;
val cmpU : 'a t -> 'a t -> ('a -> 'a -> int) -> int
val cmp : 'a t -> 'a t -> ('a -> 'a -> int) -> int

cmp xs ys f

  • Compared by length if length xs <> length ys;returning -1 iflength xs < length ys or 1 if length xs > length ys
  • Otherwise compare one by one f x y. f returns
  • a negative number if x is “less than” y
  • zero if x is “equal to” y
  • a positive number if x is “greater than” y
  • The comparison returns the first non-zero result of f;or zero if f returns zero for all x and y.
cmp [|1; 3; 5|] [|1; 4; 2|] (fun a b -> compare a b) = -1;;
+cmp [|1; 3; 5|] [|1; 2; 3|] (fun a b -> compare a b) = 1;;
+cmp [|1; 3; 5|] [|1; 3; 5|] (fun a b -> compare a b) = 0;;
val eqU : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool
val eq : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool

eq xs ys

  • return false if length is not the same
  • otherwise compare items one by one using f xi yi;and return true if all results are true;false otherwise
eq [|1; 2; 3|] [|-1; -2; -3|] (fun a b -> abs a = abs b) = true
val truncateToLengthUnsafe : 'a t -> int -> 'a t

Unsafe truncateToLengthUnsafe xs n sets length of array xs to n.

If n is greater than the length of xs;the extra elements are set to Js.Null_undefined.null

If n is less than zero;raises a RangeError.

let arr = [|"ant";"bee";"cat";"dog";"elk"|];;
+let () = truncateToLengthUnsafe arr 3;;
+arr = [|"ant";"bee";"cat"|];;
val initU : int -> (int -> 'a) -> 'a t
val init : int -> (int -> 'a) -> 'a t
val push : 'a t -> 'a -> [ `Do_not_use_Array_push_in_native ]

Using Belt.Array.push in native isn't a good idea, since OCaml's Array are fixed length and can't resize the same way as JavaScript arrays.

diff --git a/local/server-reason-react/belt/Belt/Map/String/I/A/index.html b/local/server-reason-react/belt/Belt/Map/String/I/A/index.html new file mode 100644 index 000000000..9e32816ef --- /dev/null +++ b/local/server-reason-react/belt/Belt/Map/String/I/A/index.html @@ -0,0 +1,80 @@ + +A (docs.local.server-reason-react.belt.Belt.Map.String.I.A)

Module I.A

Belt.Array Utililites for Array functions

type 'a t = 'a array
val length : 'a t -> int

length xs return the size of the array

val size : 'a t -> int

See length

val get : 'a t -> int -> 'a option

get arr i

If i <= 0 <= length arr;returns Some value where value is the item at index i If i is out of range;returns None

Belt.Array.get [|"a";"b";"c"|] 0 = Some "a";;
+Belt.Array.get [|"a";"b";"c"|] 3 = None;;
+Belt.Array.get [|"a";"b";"c"|] (-1) = None;;
val getExn : 'a t -> int -> 'a

getExn arr i

raise an exception if i is out of range;otherwise return the value at index i in arr

val getUnsafe : 'a t -> int -> 'a

getUnsafe arr i

Unsafe

no bounds checking;this would cause type error if i does not stay within range

val getUndefined : 'a t -> int -> 'a option

getUndefined arr i

It does the samething in the runtime as getUnsafe; it is type safe since the return type still track whether it is in range or not

val set : 'a t -> int -> 'a -> bool

set arr n x modifies arr in place; it replaces the nth element of arr with x

  • returns

    false means not updated due to out of range

val setExn : 'a t -> int -> 'a -> unit

setExn arr i x raise an exception if i is out of range

val setUnsafe : 'a t -> int -> 'a -> unit
val shuffleInPlace : 'a t -> unit

shuffleInPlace arr randomly re-orders the items in arr

val shuffle : 'a t -> 'a t

shuffle xs

  • returns

    a fresh array with items in original array randomly shuffled

val reverseInPlace : 'a t -> unit

reverseInPlace arr reverses items in arr in place

let arr = [|10;11;12;13;14|];;
+let () = reverseInPlace arr;;
+arr = [|14;13;12;11;10|];;
val reverse : 'a t -> 'a t

reverse arr

  • returns

    a fresh array with items in arr in reverse order

    reverse [|10;11;12;13;14|] = [|14;13;12;11;10|];;
val makeUninitialized : int -> 'a option array

makeUninitialized n creates an array of length n filled with the undefined value. You must specify the type of data that will eventually fill the array.

let arr: string Js.undefined array = makeUninitialized 5;;
+getExn arr 0 = Js.undefined;;
val makeUninitializedUnsafe : int -> 'a -> 'a array

`makeUninitializedUnsafe n`

Unsafe

let arr = Belt.Array.makeUninitializedUnsafe 5;;
+let () = Js.log(Belt.Array.getExn arr 0);; (* undefined *)
+Belt.Array.setExn arr 0 "example";;
+let () = Js.log(Belt.Array.getExn arr 0 = "example");;
val make : int -> 'a -> 'a t

make n e return an array of size n filled with value e

  • returns

    an empty array when n is negative.

val range : int -> int -> int t

range start finish create an inclusive array

range 0 3 =  [|0;1;2;3|];;
+range 3 0 =  [||] ;;
+range 3 3 = [|3|];;
val rangeBy : int -> int -> step:int -> int t

rangeBy start finish ~step

  • returns

    empty array when step is 0 or negative it also return empty array when start > finish

    rangeBy 0 10 ~step:3 = [|0;3;6;9|];;
    +rangeBy 0 12 ~step:3 = [|0;3;6;9;12|];;
    +rangeBy 33 0 ~step:1 =  [||];;
    +rangeBy 33 0 ~step:(-1) = [||];;
    +rangeBy 3 12 ~step:(-1) = [||];;
    +rangeBy 3 3 ~step:0 = [||] ;;
    +rangeBy 3 3 ~step:(1) = [|3|] ;;
val makeByU : int -> (int -> 'a) -> 'a t
val makeBy : int -> (int -> 'a) -> 'a t

makeBy n f

return an empty array when n is negative return an array of size n populated by f i start from 0 to n - 1

makeBy 5 (fun i -> i) = [|0;1;2;3;4|];;
+makeBy 5 (fun i -> i * i) = [|0;1;4;9;16|]
val makeByAndShuffleU : int -> (int -> 'a) -> 'a t
val makeByAndShuffle : int -> (int -> 'a) -> 'a t

makeByAndShuffle n f

Equivalent to shuffle (makeBy n f)

val zip : 'a t -> 'b array -> ('a * 'b) array

zip a b

Create an array of pairs from corresponding elements of a and b. Stop with the shorter array

zip [|1;2|] [|3;4;5|] = [|(1, 3);(2, 4)|]
val zipByU : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array
val zipBy : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array

zipBy xs ys f

Create an array by applying f to corresponding elements of xs and ys Stops with shorter array

Equivalent to map (zip xs ys) (fun (a,b) -> f a b)

zipBy [|1;2;3|] [|4;5|] (fun a b -> 2 * a + b) = [|6;9|];;
val unzip : ('a * 'b) array -> 'a t * 'b array

unzip a takes an array of pairs and creates a pair of arrays. The first array contains all the first items of the pairs; the second array contains all the second items.

unzip [|(1,2) ; (3,4)|] = ([|1;3|], [|2;4|]);;
+unzip [|(1,2) ; (3,4) ; (5,6) ; (7,8)|] = ([|1;3;5;7|], [|2;4;6;8|]);;
val concat : 'a t -> 'a t -> 'a t

concat xs ys

  • returns

    a fresh array containing the concatenation of the arrays v1 and v2;so even if v1 or v2 is empty;it can not be shared

    concat [|1;2;3|] [|4;5|] = [|1;2;3;4;5|];;
    +concat [| |] [|"a";"b";"c"|] = [|"a";"b";"c"|];;
val concatMany : 'a t t -> 'a t

concatMany xss

  • returns

    a fresh array as the concatenation of xss (an array of arrays)

    concatMany [| [|1;2;3|]; [|4;5;6|]; [|7;8|] |] = [|1;2;3;4;5;6;7;8|];;
val slice : 'a t -> offset:int -> len:int -> 'a t

slice xs offset len creates a new array with the len elements of xs starting at offset for

offset can be negative;and is evaluated as length xs - offset slice xs -1 1 means get the last element as a singleton array

slice xs (-len) len will return a copy of the array

if the array does not have enough data;slice extracts through the end of sequence.

if len is negative;returns the empty array.

slice [|10;11;12;13;14;15;16|] ~offset: 2 ~len: 3 = [|12;13;14|];;
+slice [|10;11;12;13;14;15;16|] ~offset: (-4) ~len: 3 = [|13;14;15|];;
+slice [|10;11;12;13;14;15;16|] ~offset:4  ~len:9 = [|14;15;16|];;
val sliceToEnd : 'a t -> int -> 'a t

sliceToEnd xs offset creates a new array with the elements of xs starting at offset

offset can be negative;and is evaluated as length xs - offset sliceToEnd xs -1 means get the last element as a singleton array

sliceToEnd xs 0 will return a copy of the array

sliceToEnd [|10;11;12;13;14;15;16|] 2 = [|12;13;14;15;16|];;
+sliceToEnd [|10;11;12;13;14;15;16|] (-4) = [|13;14;15;16|];;
val copy : 'a t -> 'a t

copy a

  • returns

    a copy of a;that is;a fresh array containing the same elements as a.

val fill : 'a t -> offset:int -> len:int -> 'a -> unit

fill arr ~offset ~len x

Modifies arr in place, storing x in elements number offset to offset + len - 1.

offset can be negative;and is evaluated as length arr - offset

fill arr ~offset:(-1) ~len:1 means fill the last element, if the array does not have enough data;fill will ignore it

let arr = makeBy 5 (fun i -> i) ;;
+fill arr ~offset:2 ~len:2 9 ;;
+arr = [|0;1;9;9;4|];;
+fill arr ~offset:7 ~len:2 8;;
+arr = [|0;1;9;9;4|];;
val blit : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

blit ~src:v1 ~srcOffset:o1 ~dst:v2 ~dstOffset:o2 ~len

copies len elements from array v1;starting at element number o1;to array v2, starting at element number o2.

It works correctly even if v1 and v2 are the same array;and the source and destination chunks overlap.

offset can be negative;-1 means len - 1;if len + offset is still negative;it will be set as 0

For each of the examples;presume that v1 = [|10;11;12;13;14;15;16;17|] and v2 = [|20;21;22;23;24;25;26;27|]. The result shown is the content of the destination array.

Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v2 ~dstOffset: 2 ~len: 3 |.
+  [|20;21;14;15;16;25;26;27|]
+Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v1 ~dstOffset: 2 ~len: 3 |.
+  [|10;11;14;15;16;15;16;17|]
val blitUnsafe : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

Unsafe blit without bounds checking

val forEachU : 'a t -> ('a -> unit) -> unit
val forEach : 'a t -> ('a -> unit) -> unit

forEach xs f

Call f on each element of xs from the beginning to end. f returns unit;so no new array is created. Use forEach when you are primarily concerned with repetitively creating side effects.

forEach [|"a";"b";"c"|] (fun x -> Js.log("Item: " ^ x));;
+(*  prints:
+  Item: a
+  Item: b
+  Item: c
+*)
+
+let total = ref 0;;
+forEach [|1;2;3;4|] (fun x -> total := !total + x);;
+!total  = 1 + 2 + 3 + 4;;
val mapU : 'a t -> ('a -> 'b) -> 'b array
val map : 'a t -> ('a -> 'b) -> 'b array

map xs f

  • returns

    a new array by calling f for each element of xs from the beginning to end

    map [|1;2|] (fun x-> x + 10) = [|11;12|]
val flatMapU : 'a t -> ('a -> 'b t) -> 'b t
val flatMap : 'a t -> ('a -> 'b t) -> 'b t

flatMap xs f **return** a new array by calling `f` for each element of `xs` from the beginning to end, and then concatenating the results ``` flatMap |1;2| (fun x-> |x + 10;x + 20|) = |11;21;12;22| ```

val getByU : 'a t -> ('a -> bool) -> 'a option
val getBy : 'a t -> ('a -> bool) -> 'a option

getBy xs p returns Some value for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 4
+getBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val getIndexByU : 'a t -> ('a -> bool) -> int option
val getIndexBy : 'a t -> ('a -> bool) -> int option

getIndexBy xs p returns Some index for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getIndexBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 1
+getIndexBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val keepU : 'a t -> ('a -> bool) -> 'a t
val keep : 'a t -> ('a -> bool) -> 'a t

keep xs p

  • returns

    a new array that keeps all elements satisfying p

    keep [|1;2;3|] (fun x -> x mod  2 = 0) = [|2|]
val keepWithIndexU : 'a t -> ('a -> int -> bool) -> 'a t
val keepWithIndex : 'a t -> ('a -> int -> bool) -> 'a t

keepWithIndex xs p

  • returns

    a new array that keeps all elements satisfying p. The predicate p takes two arguments: the element from xs and the index starting from 0.

    keepWithIndex [|1;2;3|] (fun _x i -> i = 1) = [|2|]
val keepMapU : 'a t -> ('a -> 'b option) -> 'b array
val keepMap : 'a t -> ('a -> 'b option) -> 'b array

keepMap xs p

  • returns

    a new array that keeps all elements that return a non-None when applied to p

    keepMap [|1;2;3|] (fun x -> if x mod 2 = 0 then Some x else None)
    += [| 2 |]
val forEachWithIndexU : 'a t -> (int -> 'a -> unit) -> unit
val forEachWithIndex : 'a t -> (int -> 'a -> unit) -> unit

forEachWithIndex xs f

The same as forEach; except that f is supplied with two arguments: the index starting from 0 and the element from xs

forEachWithIndex [|"a";"b";"c"|] (fun i x -> Js.log("Item " ^ (string_of_int i) ^ " is " ^ x));;
+(*  prints:
+  Item 0 is a
+  Item 1 is b
+  Item 2 is c
+*)
+
+let total = ref 0 ;;
+forEachWithIndex [|10;11;12;13|] (fun i x -> total := !total + x + i);;
+!total  = 0 + 10 + 1 +  11 + 2 + 12 + 3 + 13;;
val mapWithIndexU : 'a t -> (int -> 'a -> 'b) -> 'b t
val mapWithIndex : 'a t -> (int -> 'a -> 'b) -> 'b t

mapWithIndex xs f applies f to each element of xs. Function f takes two arguments: the index starting from 0 and the element from xs.

mapWithIndex [|1;2;3|] (fun i x -> i + x) =
+[|0 + 1; 1 + 2; 2 + 3|]
val partitionU : 'a t -> ('a -> bool) -> 'a t * 'a t
val partition : 'a t -> ('a -> bool) -> 'a t * 'a t

partition f a split array into tuple of two arrays based on predicate f; first of tuple where predicate cause true, second where predicate cause false

partition [|1;2;3;4;5|] (fun x -> x mod 2 = 0  ) = ([|2;4|], [|1;2;3|]);;
+partition [|1;2;3;4;5|] (fun x -> x mod 2 <> 0 ) = ([|1;2;3|], [|2;4|]);;
val reduceU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduce : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduce xs init f

Applies f to each element of xs from beginning to end. Function f has two parameters: the item from the list and an “accumulator”;which starts with a value of init. reduce returns the final value of the accumulator.

reduce [|2;3;4|] 1 (+) = 10;;
+reduce [|"a";"b";"c";"d"|] "" (^) = "abcd";;
val reduceReverseU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduceReverse : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduceReverse xs init f

Works like reduce;except that function f is applied to each item of xs from the last back to the first.

reduceReverse [|"a";"b";"c";"d"|] "" (^) = "dcba";;
val reduceReverse2U : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val reduceReverse2 : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c

reduceReverse2 xs ys init f Reduces two arrays xs and ys;taking items starting at min (length xs) (length ys) down to and including zero.

reduceReverse2 [|1;2;3|] [|1;2|] 0 (fun acc x y -> acc + x + y) = 6
val reduceWithIndexU : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b
val reduceWithIndex : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b

reduceWithIndex xs f

Applies f to each element of xs from beginning to end. Function f has three parameters: the item from the array and an “accumulator”, which starts with a value of init and the index of each element. reduceWithIndex returns the final value of the accumulator.

reduceWithIndex [|1;2;3;4|] 0 (fun acc x i -> acc + x + i) = 16;
val joinWithU : 'a t -> string -> ('a -> string) -> string
val joinWith : 'a t -> string -> ('a -> string) -> string

joinWith xs sep toString

Concatenates all the elements of xs converted to string with toString, each separated by sep, the string given as the second argument, into a single string. If the array has only one element, then that element will be returned without using the separator. If the array is empty, the empty string will be returned.

joinWith [|0; 1|] ", " string_of_int = "0, 1"
+joinWith [||] " " string_of_int = ""
+joinWith [|1|] " " string_of_int = "1"
val someU : 'a t -> ('a -> bool) -> bool
val some : 'a t -> ('a -> bool) -> bool

some xs p

  • returns

    true if at least one of the elements in xs satifies p;where p is a predicate: a function taking an element and returning a bool.

    some [|2; 3; 4|] (fun x -> x mod 2 = 1) = true;;
    +some [|-1; -3; -5|] (fun x -> x > 0) = false;;
val everyU : 'a t -> ('a -> bool) -> bool
val every : 'a t -> ('a -> bool) -> bool

every xs p

  • returns

    true if all elements satisfy p;where p is a predicate: a function taking an element and returning a bool.

    every [|1; 3; 5|] (fun x -> x mod 2 = 1) = true;;
    +every [|1; -3; 5|] (fun x -> x > 0) = false;;
val every2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val every2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

every2 xs ys p returns true if p xi yi is true for all pairs of elements up to the shorter length (i.e. min (length xs) (length ys))

every2 [|1;2;3|] [|0;1|] (>) = true;;
+every2 [||] [|1|] (fun  x y -> x > y) = true;;
+every2 [|2;3|] [|1|] (fun  x y -> x > y) = true;;
+every2 [|0;1|] [|5;0|] (fun x y -> x > y) = false;
val some2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val some2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

some2 xs ys p returns true if p xi yi is true for any pair of elements up to the shorter length (i.e. min (length xs) (length ys))

some2 [|0;2|] [|1;0;3|] (>) = true ;;
+(some2 [||] [|1|] (fun   x y -> x > y)) =  false;;
+(some2 [|2;3|] [|1;4|] (fun   x y -> x > y)) = true;;
val cmpU : 'a t -> 'a t -> ('a -> 'a -> int) -> int
val cmp : 'a t -> 'a t -> ('a -> 'a -> int) -> int

cmp xs ys f

  • Compared by length if length xs <> length ys;returning -1 iflength xs < length ys or 1 if length xs > length ys
  • Otherwise compare one by one f x y. f returns
  • a negative number if x is “less than” y
  • zero if x is “equal to” y
  • a positive number if x is “greater than” y
  • The comparison returns the first non-zero result of f;or zero if f returns zero for all x and y.
cmp [|1; 3; 5|] [|1; 4; 2|] (fun a b -> compare a b) = -1;;
+cmp [|1; 3; 5|] [|1; 2; 3|] (fun a b -> compare a b) = 1;;
+cmp [|1; 3; 5|] [|1; 3; 5|] (fun a b -> compare a b) = 0;;
val eqU : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool
val eq : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool

eq xs ys

  • return false if length is not the same
  • otherwise compare items one by one using f xi yi;and return true if all results are true;false otherwise
eq [|1; 2; 3|] [|-1; -2; -3|] (fun a b -> abs a = abs b) = true
val truncateToLengthUnsafe : 'a t -> int -> 'a t

Unsafe truncateToLengthUnsafe xs n sets length of array xs to n.

If n is greater than the length of xs;the extra elements are set to Js.Null_undefined.null

If n is less than zero;raises a RangeError.

let arr = [|"ant";"bee";"cat";"dog";"elk"|];;
+let () = truncateToLengthUnsafe arr 3;;
+arr = [|"ant";"bee";"cat"|];;
val initU : int -> (int -> 'a) -> 'a t
val init : int -> (int -> 'a) -> 'a t
val push : 'a t -> 'a -> [ `Do_not_use_Array_push_in_native ]

Using Belt.Array.push in native isn't a good idea, since OCaml's Array are fixed length and can't resize the same way as JavaScript arrays.

diff --git a/local/server-reason-react/belt/Belt/Map/String/I/N/A/index.html b/local/server-reason-react/belt/Belt/Map/String/I/N/A/index.html new file mode 100644 index 000000000..d2eece98f --- /dev/null +++ b/local/server-reason-react/belt/Belt/Map/String/I/N/A/index.html @@ -0,0 +1,80 @@ + +A (docs.local.server-reason-react.belt.Belt.Map.String.I.N.A)

Module N.A

Belt.Array Utililites for Array functions

type 'a t = 'a array
val length : 'a t -> int

length xs return the size of the array

val size : 'a t -> int

See length

val get : 'a t -> int -> 'a option

get arr i

If i <= 0 <= length arr;returns Some value where value is the item at index i If i is out of range;returns None

Belt.Array.get [|"a";"b";"c"|] 0 = Some "a";;
+Belt.Array.get [|"a";"b";"c"|] 3 = None;;
+Belt.Array.get [|"a";"b";"c"|] (-1) = None;;
val getExn : 'a t -> int -> 'a

getExn arr i

raise an exception if i is out of range;otherwise return the value at index i in arr

val getUnsafe : 'a t -> int -> 'a

getUnsafe arr i

Unsafe

no bounds checking;this would cause type error if i does not stay within range

val getUndefined : 'a t -> int -> 'a option

getUndefined arr i

It does the samething in the runtime as getUnsafe; it is type safe since the return type still track whether it is in range or not

val set : 'a t -> int -> 'a -> bool

set arr n x modifies arr in place; it replaces the nth element of arr with x

  • returns

    false means not updated due to out of range

val setExn : 'a t -> int -> 'a -> unit

setExn arr i x raise an exception if i is out of range

val setUnsafe : 'a t -> int -> 'a -> unit
val shuffleInPlace : 'a t -> unit

shuffleInPlace arr randomly re-orders the items in arr

val shuffle : 'a t -> 'a t

shuffle xs

  • returns

    a fresh array with items in original array randomly shuffled

val reverseInPlace : 'a t -> unit

reverseInPlace arr reverses items in arr in place

let arr = [|10;11;12;13;14|];;
+let () = reverseInPlace arr;;
+arr = [|14;13;12;11;10|];;
val reverse : 'a t -> 'a t

reverse arr

  • returns

    a fresh array with items in arr in reverse order

    reverse [|10;11;12;13;14|] = [|14;13;12;11;10|];;
val makeUninitialized : int -> 'a option array

makeUninitialized n creates an array of length n filled with the undefined value. You must specify the type of data that will eventually fill the array.

let arr: string Js.undefined array = makeUninitialized 5;;
+getExn arr 0 = Js.undefined;;
val makeUninitializedUnsafe : int -> 'a -> 'a array

`makeUninitializedUnsafe n`

Unsafe

let arr = Belt.Array.makeUninitializedUnsafe 5;;
+let () = Js.log(Belt.Array.getExn arr 0);; (* undefined *)
+Belt.Array.setExn arr 0 "example";;
+let () = Js.log(Belt.Array.getExn arr 0 = "example");;
val make : int -> 'a -> 'a t

make n e return an array of size n filled with value e

  • returns

    an empty array when n is negative.

val range : int -> int -> int t

range start finish create an inclusive array

range 0 3 =  [|0;1;2;3|];;
+range 3 0 =  [||] ;;
+range 3 3 = [|3|];;
val rangeBy : int -> int -> step:int -> int t

rangeBy start finish ~step

  • returns

    empty array when step is 0 or negative it also return empty array when start > finish

    rangeBy 0 10 ~step:3 = [|0;3;6;9|];;
    +rangeBy 0 12 ~step:3 = [|0;3;6;9;12|];;
    +rangeBy 33 0 ~step:1 =  [||];;
    +rangeBy 33 0 ~step:(-1) = [||];;
    +rangeBy 3 12 ~step:(-1) = [||];;
    +rangeBy 3 3 ~step:0 = [||] ;;
    +rangeBy 3 3 ~step:(1) = [|3|] ;;
val makeByU : int -> (int -> 'a) -> 'a t
val makeBy : int -> (int -> 'a) -> 'a t

makeBy n f

return an empty array when n is negative return an array of size n populated by f i start from 0 to n - 1

makeBy 5 (fun i -> i) = [|0;1;2;3;4|];;
+makeBy 5 (fun i -> i * i) = [|0;1;4;9;16|]
val makeByAndShuffleU : int -> (int -> 'a) -> 'a t
val makeByAndShuffle : int -> (int -> 'a) -> 'a t

makeByAndShuffle n f

Equivalent to shuffle (makeBy n f)

val zip : 'a t -> 'b array -> ('a * 'b) array

zip a b

Create an array of pairs from corresponding elements of a and b. Stop with the shorter array

zip [|1;2|] [|3;4;5|] = [|(1, 3);(2, 4)|]
val zipByU : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array
val zipBy : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array

zipBy xs ys f

Create an array by applying f to corresponding elements of xs and ys Stops with shorter array

Equivalent to map (zip xs ys) (fun (a,b) -> f a b)

zipBy [|1;2;3|] [|4;5|] (fun a b -> 2 * a + b) = [|6;9|];;
val unzip : ('a * 'b) array -> 'a t * 'b array

unzip a takes an array of pairs and creates a pair of arrays. The first array contains all the first items of the pairs; the second array contains all the second items.

unzip [|(1,2) ; (3,4)|] = ([|1;3|], [|2;4|]);;
+unzip [|(1,2) ; (3,4) ; (5,6) ; (7,8)|] = ([|1;3;5;7|], [|2;4;6;8|]);;
val concat : 'a t -> 'a t -> 'a t

concat xs ys

  • returns

    a fresh array containing the concatenation of the arrays v1 and v2;so even if v1 or v2 is empty;it can not be shared

    concat [|1;2;3|] [|4;5|] = [|1;2;3;4;5|];;
    +concat [| |] [|"a";"b";"c"|] = [|"a";"b";"c"|];;
val concatMany : 'a t t -> 'a t

concatMany xss

  • returns

    a fresh array as the concatenation of xss (an array of arrays)

    concatMany [| [|1;2;3|]; [|4;5;6|]; [|7;8|] |] = [|1;2;3;4;5;6;7;8|];;
val slice : 'a t -> offset:int -> len:int -> 'a t

slice xs offset len creates a new array with the len elements of xs starting at offset for

offset can be negative;and is evaluated as length xs - offset slice xs -1 1 means get the last element as a singleton array

slice xs (-len) len will return a copy of the array

if the array does not have enough data;slice extracts through the end of sequence.

if len is negative;returns the empty array.

slice [|10;11;12;13;14;15;16|] ~offset: 2 ~len: 3 = [|12;13;14|];;
+slice [|10;11;12;13;14;15;16|] ~offset: (-4) ~len: 3 = [|13;14;15|];;
+slice [|10;11;12;13;14;15;16|] ~offset:4  ~len:9 = [|14;15;16|];;
val sliceToEnd : 'a t -> int -> 'a t

sliceToEnd xs offset creates a new array with the elements of xs starting at offset

offset can be negative;and is evaluated as length xs - offset sliceToEnd xs -1 means get the last element as a singleton array

sliceToEnd xs 0 will return a copy of the array

sliceToEnd [|10;11;12;13;14;15;16|] 2 = [|12;13;14;15;16|];;
+sliceToEnd [|10;11;12;13;14;15;16|] (-4) = [|13;14;15;16|];;
val copy : 'a t -> 'a t

copy a

  • returns

    a copy of a;that is;a fresh array containing the same elements as a.

val fill : 'a t -> offset:int -> len:int -> 'a -> unit

fill arr ~offset ~len x

Modifies arr in place, storing x in elements number offset to offset + len - 1.

offset can be negative;and is evaluated as length arr - offset

fill arr ~offset:(-1) ~len:1 means fill the last element, if the array does not have enough data;fill will ignore it

let arr = makeBy 5 (fun i -> i) ;;
+fill arr ~offset:2 ~len:2 9 ;;
+arr = [|0;1;9;9;4|];;
+fill arr ~offset:7 ~len:2 8;;
+arr = [|0;1;9;9;4|];;
val blit : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

blit ~src:v1 ~srcOffset:o1 ~dst:v2 ~dstOffset:o2 ~len

copies len elements from array v1;starting at element number o1;to array v2, starting at element number o2.

It works correctly even if v1 and v2 are the same array;and the source and destination chunks overlap.

offset can be negative;-1 means len - 1;if len + offset is still negative;it will be set as 0

For each of the examples;presume that v1 = [|10;11;12;13;14;15;16;17|] and v2 = [|20;21;22;23;24;25;26;27|]. The result shown is the content of the destination array.

Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v2 ~dstOffset: 2 ~len: 3 |.
+  [|20;21;14;15;16;25;26;27|]
+Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v1 ~dstOffset: 2 ~len: 3 |.
+  [|10;11;14;15;16;15;16;17|]
val blitUnsafe : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

Unsafe blit without bounds checking

val forEachU : 'a t -> ('a -> unit) -> unit
val forEach : 'a t -> ('a -> unit) -> unit

forEach xs f

Call f on each element of xs from the beginning to end. f returns unit;so no new array is created. Use forEach when you are primarily concerned with repetitively creating side effects.

forEach [|"a";"b";"c"|] (fun x -> Js.log("Item: " ^ x));;
+(*  prints:
+  Item: a
+  Item: b
+  Item: c
+*)
+
+let total = ref 0;;
+forEach [|1;2;3;4|] (fun x -> total := !total + x);;
+!total  = 1 + 2 + 3 + 4;;
val mapU : 'a t -> ('a -> 'b) -> 'b array
val map : 'a t -> ('a -> 'b) -> 'b array

map xs f

  • returns

    a new array by calling f for each element of xs from the beginning to end

    map [|1;2|] (fun x-> x + 10) = [|11;12|]
val flatMapU : 'a t -> ('a -> 'b t) -> 'b t
val flatMap : 'a t -> ('a -> 'b t) -> 'b t

flatMap xs f **return** a new array by calling `f` for each element of `xs` from the beginning to end, and then concatenating the results ``` flatMap |1;2| (fun x-> |x + 10;x + 20|) = |11;21;12;22| ```

val getByU : 'a t -> ('a -> bool) -> 'a option
val getBy : 'a t -> ('a -> bool) -> 'a option

getBy xs p returns Some value for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 4
+getBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val getIndexByU : 'a t -> ('a -> bool) -> int option
val getIndexBy : 'a t -> ('a -> bool) -> int option

getIndexBy xs p returns Some index for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getIndexBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 1
+getIndexBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val keepU : 'a t -> ('a -> bool) -> 'a t
val keep : 'a t -> ('a -> bool) -> 'a t

keep xs p

  • returns

    a new array that keeps all elements satisfying p

    keep [|1;2;3|] (fun x -> x mod  2 = 0) = [|2|]
val keepWithIndexU : 'a t -> ('a -> int -> bool) -> 'a t
val keepWithIndex : 'a t -> ('a -> int -> bool) -> 'a t

keepWithIndex xs p

  • returns

    a new array that keeps all elements satisfying p. The predicate p takes two arguments: the element from xs and the index starting from 0.

    keepWithIndex [|1;2;3|] (fun _x i -> i = 1) = [|2|]
val keepMapU : 'a t -> ('a -> 'b option) -> 'b array
val keepMap : 'a t -> ('a -> 'b option) -> 'b array

keepMap xs p

  • returns

    a new array that keeps all elements that return a non-None when applied to p

    keepMap [|1;2;3|] (fun x -> if x mod 2 = 0 then Some x else None)
    += [| 2 |]
val forEachWithIndexU : 'a t -> (int -> 'a -> unit) -> unit
val forEachWithIndex : 'a t -> (int -> 'a -> unit) -> unit

forEachWithIndex xs f

The same as forEach; except that f is supplied with two arguments: the index starting from 0 and the element from xs

forEachWithIndex [|"a";"b";"c"|] (fun i x -> Js.log("Item " ^ (string_of_int i) ^ " is " ^ x));;
+(*  prints:
+  Item 0 is a
+  Item 1 is b
+  Item 2 is c
+*)
+
+let total = ref 0 ;;
+forEachWithIndex [|10;11;12;13|] (fun i x -> total := !total + x + i);;
+!total  = 0 + 10 + 1 +  11 + 2 + 12 + 3 + 13;;
val mapWithIndexU : 'a t -> (int -> 'a -> 'b) -> 'b t
val mapWithIndex : 'a t -> (int -> 'a -> 'b) -> 'b t

mapWithIndex xs f applies f to each element of xs. Function f takes two arguments: the index starting from 0 and the element from xs.

mapWithIndex [|1;2;3|] (fun i x -> i + x) =
+[|0 + 1; 1 + 2; 2 + 3|]
val partitionU : 'a t -> ('a -> bool) -> 'a t * 'a t
val partition : 'a t -> ('a -> bool) -> 'a t * 'a t

partition f a split array into tuple of two arrays based on predicate f; first of tuple where predicate cause true, second where predicate cause false

partition [|1;2;3;4;5|] (fun x -> x mod 2 = 0  ) = ([|2;4|], [|1;2;3|]);;
+partition [|1;2;3;4;5|] (fun x -> x mod 2 <> 0 ) = ([|1;2;3|], [|2;4|]);;
val reduceU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduce : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduce xs init f

Applies f to each element of xs from beginning to end. Function f has two parameters: the item from the list and an “accumulator”;which starts with a value of init. reduce returns the final value of the accumulator.

reduce [|2;3;4|] 1 (+) = 10;;
+reduce [|"a";"b";"c";"d"|] "" (^) = "abcd";;
val reduceReverseU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduceReverse : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduceReverse xs init f

Works like reduce;except that function f is applied to each item of xs from the last back to the first.

reduceReverse [|"a";"b";"c";"d"|] "" (^) = "dcba";;
val reduceReverse2U : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val reduceReverse2 : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c

reduceReverse2 xs ys init f Reduces two arrays xs and ys;taking items starting at min (length xs) (length ys) down to and including zero.

reduceReverse2 [|1;2;3|] [|1;2|] 0 (fun acc x y -> acc + x + y) = 6
val reduceWithIndexU : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b
val reduceWithIndex : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b

reduceWithIndex xs f

Applies f to each element of xs from beginning to end. Function f has three parameters: the item from the array and an “accumulator”, which starts with a value of init and the index of each element. reduceWithIndex returns the final value of the accumulator.

reduceWithIndex [|1;2;3;4|] 0 (fun acc x i -> acc + x + i) = 16;
val joinWithU : 'a t -> string -> ('a -> string) -> string
val joinWith : 'a t -> string -> ('a -> string) -> string

joinWith xs sep toString

Concatenates all the elements of xs converted to string with toString, each separated by sep, the string given as the second argument, into a single string. If the array has only one element, then that element will be returned without using the separator. If the array is empty, the empty string will be returned.

joinWith [|0; 1|] ", " string_of_int = "0, 1"
+joinWith [||] " " string_of_int = ""
+joinWith [|1|] " " string_of_int = "1"
val someU : 'a t -> ('a -> bool) -> bool
val some : 'a t -> ('a -> bool) -> bool

some xs p

  • returns

    true if at least one of the elements in xs satifies p;where p is a predicate: a function taking an element and returning a bool.

    some [|2; 3; 4|] (fun x -> x mod 2 = 1) = true;;
    +some [|-1; -3; -5|] (fun x -> x > 0) = false;;
val everyU : 'a t -> ('a -> bool) -> bool
val every : 'a t -> ('a -> bool) -> bool

every xs p

  • returns

    true if all elements satisfy p;where p is a predicate: a function taking an element and returning a bool.

    every [|1; 3; 5|] (fun x -> x mod 2 = 1) = true;;
    +every [|1; -3; 5|] (fun x -> x > 0) = false;;
val every2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val every2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

every2 xs ys p returns true if p xi yi is true for all pairs of elements up to the shorter length (i.e. min (length xs) (length ys))

every2 [|1;2;3|] [|0;1|] (>) = true;;
+every2 [||] [|1|] (fun  x y -> x > y) = true;;
+every2 [|2;3|] [|1|] (fun  x y -> x > y) = true;;
+every2 [|0;1|] [|5;0|] (fun x y -> x > y) = false;
val some2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val some2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

some2 xs ys p returns true if p xi yi is true for any pair of elements up to the shorter length (i.e. min (length xs) (length ys))

some2 [|0;2|] [|1;0;3|] (>) = true ;;
+(some2 [||] [|1|] (fun   x y -> x > y)) =  false;;
+(some2 [|2;3|] [|1;4|] (fun   x y -> x > y)) = true;;
val cmpU : 'a t -> 'a t -> ('a -> 'a -> int) -> int
val cmp : 'a t -> 'a t -> ('a -> 'a -> int) -> int

cmp xs ys f

  • Compared by length if length xs <> length ys;returning -1 iflength xs < length ys or 1 if length xs > length ys
  • Otherwise compare one by one f x y. f returns
  • a negative number if x is “less than” y
  • zero if x is “equal to” y
  • a positive number if x is “greater than” y
  • The comparison returns the first non-zero result of f;or zero if f returns zero for all x and y.
cmp [|1; 3; 5|] [|1; 4; 2|] (fun a b -> compare a b) = -1;;
+cmp [|1; 3; 5|] [|1; 2; 3|] (fun a b -> compare a b) = 1;;
+cmp [|1; 3; 5|] [|1; 3; 5|] (fun a b -> compare a b) = 0;;
val eqU : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool
val eq : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool

eq xs ys

  • return false if length is not the same
  • otherwise compare items one by one using f xi yi;and return true if all results are true;false otherwise
eq [|1; 2; 3|] [|-1; -2; -3|] (fun a b -> abs a = abs b) = true
val truncateToLengthUnsafe : 'a t -> int -> 'a t

Unsafe truncateToLengthUnsafe xs n sets length of array xs to n.

If n is greater than the length of xs;the extra elements are set to Js.Null_undefined.null

If n is less than zero;raises a RangeError.

let arr = [|"ant";"bee";"cat";"dog";"elk"|];;
+let () = truncateToLengthUnsafe arr 3;;
+arr = [|"ant";"bee";"cat"|];;
val initU : int -> (int -> 'a) -> 'a t
val init : int -> (int -> 'a) -> 'a t
val push : 'a t -> 'a -> [ `Do_not_use_Array_push_in_native ]

Using Belt.Array.push in native isn't a good idea, since OCaml's Array are fixed length and can't resize the same way as JavaScript arrays.

diff --git a/local/server-reason-react/belt/Belt/Map/String/I/N/S/index.html b/local/server-reason-react/belt/Belt/Map/String/I/N/S/index.html new file mode 100644 index 000000000..9bbddfb1d --- /dev/null +++ b/local/server-reason-react/belt/Belt/Map/String/I/N/S/index.html @@ -0,0 +1,6 @@ + +S (docs.local.server-reason-react.belt.Belt.Map.String.I.N.S)

Module N.S

A module for Array sort relevant utiliites

module Int = Belt_SortArrayInt

Specalized when key type is int, more efficient than the generic type

module String = Belt_SortArrayString

Specalized when key type is string, more efficient than the generic type

val strictlySortedLengthU : 'a array -> ('a -> 'a -> bool) -> int
val strictlySortedLength : 'a array -> ('a -> 'a -> bool) -> int

strictlySortedLenght xs cmp return +n means increasing order -n means negative order

strictlySortedLength [|1;2;3;4;3|] (fun x y -> x < y) = 4;;
+strictlySortedLength [||] (fun x y -> x < y) = 0;;
+strictlySortedLength [|1|] (fun x y -> x < y) = 1;;
+strictlySortedLength [|4;3;2;1|] (fun x y -> x < y) = -4;;
val isSortedU : 'a array -> ('a -> 'a -> int) -> bool
val isSorted : 'a array -> ('a -> 'a -> int) -> bool

isSorted arr cmp

  • returns

    true if array is increasingly sorted (equal is okay )

    isSorted [|1;1;2;3;4|] (fun x y -> compare x y) = true
val stableSortInPlaceByU : 'a array -> ('a -> 'a -> int) -> unit
val stableSortInPlaceBy : 'a array -> ('a -> 'a -> int) -> unit

stableSortBy xs cmp

Sort xs in place using comparator cmp, the stable means if the elements are equal, their order will be preserved

val stableSortByU : 'a array -> ('a -> 'a -> int) -> 'a array
val stableSortBy : 'a array -> ('a -> 'a -> int) -> 'a array

stableSort xs cmp

val binarySearchByU : 'a array -> 'a -> ('a -> 'a -> int) -> int
val binarySearchBy : 'a array -> 'a -> ('a -> 'a -> int) -> int

If value is not found and value is less than one or more elements in array, the negative number returned is the bitwise complement of the index of the first element that is larger than value.

If value is not found and value is greater than all elements in array, the negative number returned is the bitwise complement of (the index of the last element plus 1)

for example, if key is smaller than all elements return -1 since lnot (-1) = 0 if key is larger than all elements return - (len + 1) since lnot (-(len+1)) = len

binarySearchBy [|1;2;3;4;33;35;36|] 33 = 4;;
+lnot (binarySearchBy [|1;3;5;7|] 4) = 2;;
diff --git a/local/server-reason-react/belt/Belt/Map/String/I/N/index.html b/local/server-reason-react/belt/Belt/Map/String/I/N/index.html new file mode 100644 index 000000000..06375e919 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Map/String/I/N/index.html @@ -0,0 +1,110 @@ + +N (docs.local.server-reason-react.belt.Belt.Map.String.I.N)

Module I.N

type ('k, 'v) node = {
  1. mutable key : 'k;
  2. mutable value : 'v;
  3. mutable height : int;
  4. mutable left : ('k, 'v) t;
  5. mutable right : ('k, 'v) t;
}
and ('key, 'a) t = ('key, 'a) node option
val node : + key:'k -> + value:'v -> + height:int -> + left:('k, 'v) t -> + right:('k, 'v) t -> + ('k, 'v) node
val keySet : ('k, 'v) node -> 'k -> unit
val key : ('k, 'v) node -> 'k
val valueSet : ('k, 'v) node -> 'v -> unit
val value : ('k, 'v) node -> 'v
val heightSet : ('k, 'v) node -> int -> unit
val height : ('k, 'v) node -> int
val leftSet : ('k, 'v) node -> ('k, 'v) t -> unit
val left : ('k, 'v) node -> ('k, 'v) t
val rightSet : ('k, 'v) node -> ('k, 'v) t -> unit
val right : ('k, 'v) node -> ('k, 'v) t
type ('k, 'id) cmp = 'k -> 'k -> int
module A : sig ... end

Belt.Array Utililites for Array functions

module S : sig ... end

A module for Array sort relevant utiliites

val toOpt : 'a option -> 'a option
val return : 'a -> 'a option
val empty : 'a option
val unsafeCoerce : 'a option -> 'a
val treeHeight : ('a, 'b) t -> int
val copy : ('a, 'b) node option -> ('a, 'b) node option
val create : ('a, 'b) t -> 'a -> 'b -> ('a, 'b) t -> ('a, 'b) node option
val singleton : 'a -> 'b -> ('a, 'b) node option
val heightGe : ('a, 'b) node option -> ('c, 'd) node option -> bool
val updateValue : ('a, 'b) node -> 'b -> ('a, 'b) node
val bal : + ('a, 'b) node option -> + 'a -> + 'b -> + ('a, 'b) node option -> + ('a, 'b) node option
val minKey0Aux : ('a, 'b) node -> 'a
val minKey : ('a, 'b) node option -> 'a option
val minKeyUndefined : ('a, 'b) node option -> 'a option
val maxKey0Aux : ('a, 'b) node -> 'a
val maxKey : ('a, 'b) node option -> 'a option
val maxKeyUndefined : ('a, 'b) node option -> 'a option
val minKV0Aux : ('a, 'b) node -> 'a * 'b
val minimum : ('a, 'b) node option -> ('a * 'b) option
val minUndefined : ('a, 'b) node option -> ('a * 'b) option
val maxKV0Aux : ('a, 'b) node -> 'a * 'b
val maximum : ('a, 'b) node option -> ('a * 'b) option
val maxUndefined : ('a, 'b) node option -> ('a * 'b) option
val removeMinAuxWithRef : ('a, 'b) node -> 'a ref -> 'b ref -> ('a, 'b) t
val isEmpty : 'a option -> bool
val stackAllLeft : + ('a, 'b) node option -> + ('a, 'b) node list -> + ('a, 'b) node list
val forEachU : ('a, 'b) node option -> ('a -> 'b -> unit) -> unit
val forEach : ('a, 'b) node option -> ('a -> 'b -> unit) -> unit
val mapU : ('a, 'b) node option -> ('b -> 'c) -> ('a, 'c) node option
val map : ('a, 'b) node option -> ('b -> 'c) -> ('a, 'c) node option
val mapWithKeyU : + ('a, 'b) node option -> + ('a -> 'b -> 'c) -> + ('a, 'c) node option
val mapWithKey : + ('a, 'b) node option -> + ('a -> 'b -> 'c) -> + ('a, 'c) node option
val reduceU : ('a, 'b) node option -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val reduce : ('a, 'b) node option -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val everyU : ('a, 'b) node option -> ('a -> 'b -> bool) -> bool
val every : ('a, 'b) node option -> ('a -> 'b -> bool) -> bool
val someU : ('a, 'b) node option -> ('a -> 'b -> bool) -> bool
val some : ('a, 'b) node option -> ('a -> 'b -> bool) -> bool
val addMinElement : ('a, 'b) node option -> 'a -> 'b -> ('a, 'b) node option
val addMaxElement : ('a, 'b) node option -> 'a -> 'b -> ('a, 'b) node option
val join : + ('a, 'b) node option -> + 'a -> + 'b -> + ('a, 'b) node option -> + ('a, 'b) node option
val concat : + ('a, 'b) node option -> + ('a, 'b) node option -> + ('a, 'b) node option
val concatOrJoin : + ('a, 'b) node option -> + 'a -> + 'b option -> + ('a, 'b) node option -> + ('a, 'b) node option
val keepSharedU : + ('a, 'b) node option -> + ('a -> 'b -> bool) -> + ('a, 'b) node option
val keepShared : + ('a, 'b) node option -> + ('a -> 'b -> bool) -> + ('a, 'b) node option
val keepMapU : + ('a, 'b) node option -> + ('a -> 'b -> 'c option) -> + ('a, 'c) node option
val keepMap : + ('a, 'b) node option -> + ('a -> 'b -> 'c option) -> + ('a, 'c) node option
val partitionSharedU : + ('a, 'b) node option -> + ('a -> 'b -> bool) -> + ('a, 'b) node option * ('a, 'b) node option
val partitionShared : + ('a, 'b) node option -> + ('a -> 'b -> bool) -> + ('a, 'b) node option * ('a, 'b) node option
val lengthNode : ('a, 'b) node -> int
val size : ('a, 'b) node option -> int
val toListAux : ('a, 'b) node option -> ('a * 'b) list -> ('a * 'b) list
val toList : ('a, 'b) node option -> ('a * 'b) list
val checkInvariantInternal : ('a, 'b) t -> unit
val fillArrayKey : ('a, 'b) node -> int -> 'a A.t -> int
val fillArrayValue : ('a, 'b) node -> int -> 'b A.t -> int
val fillArray : ('weak55, 'a) node -> int -> ('weak55 * 'a) A.t -> int
type cursor
val cursor : forward:int -> backward:int -> cursor
val forwardSet : cursor -> int -> unit
val forward : cursor -> int
val backwardSet : cursor -> int -> unit
val backward : cursor -> int
val fillArrayWithPartition : + ('a, 'b) node -> + cursor -> + ('a * 'b) A.t -> + ('a -> bool) -> + unit
val fillArrayWithFilter : + ('a, 'b) node -> + int -> + ('a * 'b) A.t -> + ('a -> bool) -> + int
val toArray : ('a, 'b) node option -> ('a * 'b) array
val keysToArray : ('a, 'b) node option -> 'a array
val valuesToArray : ('a, 'b) node option -> 'b array
val fromSortedArrayRevAux : ('a * 'b) A.t -> int -> int -> ('a, 'b) node option
val fromSortedArrayAux : ('a * 'b) A.t -> int -> int -> ('a, 'b) node option
val fromSortedArrayUnsafe : ('a * 'b) A.t -> ('a, 'b) node option
val compareAux : + ('a, 'b) node list -> + ('a, 'c) node list -> + kcmp:('a -> 'a -> int) -> + vcmp:('b -> 'c -> int) -> + int
val eqAux : + ('a, 'b) node list -> + ('a, 'c) node list -> + kcmp:('a -> 'a -> int) -> + veq:('b -> 'c -> bool) -> + bool
val cmpU : + ('a, 'b) node option -> + ('a, 'c) node option -> + kcmp:('a -> 'a -> int) -> + vcmp:('b -> 'c -> int) -> + int
val cmp : + ('a, 'b) node option -> + ('a, 'c) node option -> + kcmp:('a -> 'a -> int) -> + vcmp:('b -> 'c -> int) -> + int
val eqU : + ('a, 'b) node option -> + ('a, 'c) node option -> + kcmp:('a -> 'a -> int) -> + veq:('b -> 'c -> bool) -> + bool
val eq : + ('a, 'b) node option -> + ('a, 'c) node option -> + kcmp:('a -> 'a -> int) -> + veq:('b -> 'c -> bool) -> + bool
val get : ('a, 'b) node option -> 'a -> cmp:('a -> 'a -> int) -> 'b option
val getUndefined : + ('a, 'b) node option -> + 'a -> + cmp:('a -> 'a -> int) -> + 'b option
val getExn : ('a, 'b) node option -> 'a -> cmp:('a -> 'a -> int) -> 'b
val getWithDefault : + ('a, 'weak59) node option -> + 'a -> + 'weak59 -> + cmp:('a -> 'a -> int) -> + 'weak59
val has : ('a, 'b) node option -> 'a -> cmp:('a -> 'a -> int) -> bool
val rotateWithLeftChild : ('a, 'b) node -> ('a, 'b) node
val rotateWithRightChild : ('a, 'b) node -> ('a, 'b) node
val doubleWithLeftChild : ('a, 'b) node -> ('a, 'b) node
val doubleWithRightChild : ('a, 'b) node -> ('a, 'b) node
val heightUpdateMutate : ('a, 'b) node -> ('a, 'b) node
val balMutate : ('a, 'b) node -> ('a, 'b) node
val updateMutate : + ('a, 'b) t -> + 'a -> + 'b -> + cmp:('a -> 'a -> int) -> + ('a, 'b) node option
val fromArray : + ('a * 'b) array -> + cmp:('a -> 'a -> int) -> + ('a, 'b) node option
val removeMinAuxWithRootMutate : ('a, 'b) node -> ('a, 'c) node -> ('a, 'c) t
val findFirstByU : ('a, 'b) t -> ('a -> 'b -> bool) -> ('a * 'b) option
val findFirstBy : ('a, 'b) t -> ('a -> 'b -> bool) -> ('a * 'b) option
diff --git a/local/server-reason-react/belt/Belt/Map/String/I/S/index.html b/local/server-reason-react/belt/Belt/Map/String/I/S/index.html new file mode 100644 index 000000000..8a73e8035 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Map/String/I/S/index.html @@ -0,0 +1,6 @@ + +S (docs.local.server-reason-react.belt.Belt.Map.String.I.S)

Module I.S

A module for Array sort relevant utiliites

module Int = Belt_SortArrayInt

Specalized when key type is int, more efficient than the generic type

module String = Belt_SortArrayString

Specalized when key type is string, more efficient than the generic type

val strictlySortedLengthU : 'a array -> ('a -> 'a -> bool) -> int
val strictlySortedLength : 'a array -> ('a -> 'a -> bool) -> int

strictlySortedLenght xs cmp return +n means increasing order -n means negative order

strictlySortedLength [|1;2;3;4;3|] (fun x y -> x < y) = 4;;
+strictlySortedLength [||] (fun x y -> x < y) = 0;;
+strictlySortedLength [|1|] (fun x y -> x < y) = 1;;
+strictlySortedLength [|4;3;2;1|] (fun x y -> x < y) = -4;;
val isSortedU : 'a array -> ('a -> 'a -> int) -> bool
val isSorted : 'a array -> ('a -> 'a -> int) -> bool

isSorted arr cmp

  • returns

    true if array is increasingly sorted (equal is okay )

    isSorted [|1;1;2;3;4|] (fun x y -> compare x y) = true
val stableSortInPlaceByU : 'a array -> ('a -> 'a -> int) -> unit
val stableSortInPlaceBy : 'a array -> ('a -> 'a -> int) -> unit

stableSortBy xs cmp

Sort xs in place using comparator cmp, the stable means if the elements are equal, their order will be preserved

val stableSortByU : 'a array -> ('a -> 'a -> int) -> 'a array
val stableSortBy : 'a array -> ('a -> 'a -> int) -> 'a array

stableSort xs cmp

val binarySearchByU : 'a array -> 'a -> ('a -> 'a -> int) -> int
val binarySearchBy : 'a array -> 'a -> ('a -> 'a -> int) -> int

If value is not found and value is less than one or more elements in array, the negative number returned is the bitwise complement of the index of the first element that is larger than value.

If value is not found and value is greater than all elements in array, the negative number returned is the bitwise complement of (the index of the last element plus 1)

for example, if key is smaller than all elements return -1 since lnot (-1) = 0 if key is larger than all elements return - (len + 1) since lnot (-(len+1)) = len

binarySearchBy [|1;2;3;4;33;35;36|] 33 = 4;;
+lnot (binarySearchBy [|1;3;5;7|] 4) = 2;;
diff --git a/local/server-reason-react/belt/Belt/Map/String/I/index.html b/local/server-reason-react/belt/Belt/Map/String/I/index.html new file mode 100644 index 000000000..20e6dc3e6 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Map/String/I/index.html @@ -0,0 +1,34 @@ + +I (docs.local.server-reason-react.belt.Belt.Map.String.I)

Module String.I

type key = string
module N : sig ... end
module A : sig ... end

Belt.Array Utililites for Array functions

module S : sig ... end

A module for Array sort relevant utiliites

type 'a t = (key, 'a) N.t
val add : (key, 'a) N.t -> key -> 'b -> (key, 'c) N.node option
val get : (key, 'a) N.t -> key -> 'b option
val getUndefined : (key, 'a) N.t -> key -> 'b Js.Undefined.t
val getExn : (key, 'a) N.t -> key -> 'b
val getWithDefault : (key, 'a) N.t -> key -> 'b -> 'c
val has : (key, 'a) N.t -> key -> bool
val remove : (key, 'a) N.t -> key -> (key, 'a) N.t
val splitAux : key -> (key, 'a) N.node -> 'b t * 'c option * 'd t
val split : key -> (key, 'a) N.node option -> 'a t * 'b option * 'a t
val mergeU : + (key, 'a) N.t -> + 'b t -> + (key -> 'c option -> 'b option -> 'd option) -> + (key, 'd) N.node option
val merge : + (key, 'a) N.t -> + 'b t -> + (key -> 'a option -> 'b option -> 'c option) -> + (key, 'c) N.node option
val compareAux : + (key, 'a) N.node list -> + (key, 'b) N.node list -> + ('c -> 'd -> int) -> + int
val cmpU : + (key, 'a) N.node option -> + (key, 'b) N.node option -> + ('c -> 'd -> int) -> + int
val cmp : + (key, 'a) N.node option -> + (key, 'b) N.node option -> + ('c -> 'd -> int) -> + int
val eqAux : + (key, 'a) N.node list -> + (key, 'b) N.node list -> + ('c -> 'd -> bool) -> + bool
val eqU : + (key, 'a) N.node option -> + (key, 'b) N.node option -> + ('c -> 'd -> bool) -> + bool
val eq : + (key, 'a) N.node option -> + (key, 'b) N.node option -> + ('c -> 'd -> bool) -> + bool
val addMutate : 'a t -> key -> 'b -> 'c t
val fromArray : (key * 'a) array -> (key, 'b) N.node option
diff --git a/local/server-reason-react/belt/Belt/Map/String/N/A/index.html b/local/server-reason-react/belt/Belt/Map/String/N/A/index.html new file mode 100644 index 000000000..5aa18b2ce --- /dev/null +++ b/local/server-reason-react/belt/Belt/Map/String/N/A/index.html @@ -0,0 +1,80 @@ + +A (docs.local.server-reason-react.belt.Belt.Map.String.N.A)

Module N.A

Belt.Array Utililites for Array functions

type 'a t = 'a array
val length : 'a t -> int

length xs return the size of the array

val size : 'a t -> int

See length

val get : 'a t -> int -> 'a option

get arr i

If i <= 0 <= length arr;returns Some value where value is the item at index i If i is out of range;returns None

Belt.Array.get [|"a";"b";"c"|] 0 = Some "a";;
+Belt.Array.get [|"a";"b";"c"|] 3 = None;;
+Belt.Array.get [|"a";"b";"c"|] (-1) = None;;
val getExn : 'a t -> int -> 'a

getExn arr i

raise an exception if i is out of range;otherwise return the value at index i in arr

val getUnsafe : 'a t -> int -> 'a

getUnsafe arr i

Unsafe

no bounds checking;this would cause type error if i does not stay within range

val getUndefined : 'a t -> int -> 'a option

getUndefined arr i

It does the samething in the runtime as getUnsafe; it is type safe since the return type still track whether it is in range or not

val set : 'a t -> int -> 'a -> bool

set arr n x modifies arr in place; it replaces the nth element of arr with x

  • returns

    false means not updated due to out of range

val setExn : 'a t -> int -> 'a -> unit

setExn arr i x raise an exception if i is out of range

val setUnsafe : 'a t -> int -> 'a -> unit
val shuffleInPlace : 'a t -> unit

shuffleInPlace arr randomly re-orders the items in arr

val shuffle : 'a t -> 'a t

shuffle xs

  • returns

    a fresh array with items in original array randomly shuffled

val reverseInPlace : 'a t -> unit

reverseInPlace arr reverses items in arr in place

let arr = [|10;11;12;13;14|];;
+let () = reverseInPlace arr;;
+arr = [|14;13;12;11;10|];;
val reverse : 'a t -> 'a t

reverse arr

  • returns

    a fresh array with items in arr in reverse order

    reverse [|10;11;12;13;14|] = [|14;13;12;11;10|];;
val makeUninitialized : int -> 'a option array

makeUninitialized n creates an array of length n filled with the undefined value. You must specify the type of data that will eventually fill the array.

let arr: string Js.undefined array = makeUninitialized 5;;
+getExn arr 0 = Js.undefined;;
val makeUninitializedUnsafe : int -> 'a -> 'a array

`makeUninitializedUnsafe n`

Unsafe

let arr = Belt.Array.makeUninitializedUnsafe 5;;
+let () = Js.log(Belt.Array.getExn arr 0);; (* undefined *)
+Belt.Array.setExn arr 0 "example";;
+let () = Js.log(Belt.Array.getExn arr 0 = "example");;
val make : int -> 'a -> 'a t

make n e return an array of size n filled with value e

  • returns

    an empty array when n is negative.

val range : int -> int -> int t

range start finish create an inclusive array

range 0 3 =  [|0;1;2;3|];;
+range 3 0 =  [||] ;;
+range 3 3 = [|3|];;
val rangeBy : int -> int -> step:int -> int t

rangeBy start finish ~step

  • returns

    empty array when step is 0 or negative it also return empty array when start > finish

    rangeBy 0 10 ~step:3 = [|0;3;6;9|];;
    +rangeBy 0 12 ~step:3 = [|0;3;6;9;12|];;
    +rangeBy 33 0 ~step:1 =  [||];;
    +rangeBy 33 0 ~step:(-1) = [||];;
    +rangeBy 3 12 ~step:(-1) = [||];;
    +rangeBy 3 3 ~step:0 = [||] ;;
    +rangeBy 3 3 ~step:(1) = [|3|] ;;
val makeByU : int -> (int -> 'a) -> 'a t
val makeBy : int -> (int -> 'a) -> 'a t

makeBy n f

return an empty array when n is negative return an array of size n populated by f i start from 0 to n - 1

makeBy 5 (fun i -> i) = [|0;1;2;3;4|];;
+makeBy 5 (fun i -> i * i) = [|0;1;4;9;16|]
val makeByAndShuffleU : int -> (int -> 'a) -> 'a t
val makeByAndShuffle : int -> (int -> 'a) -> 'a t

makeByAndShuffle n f

Equivalent to shuffle (makeBy n f)

val zip : 'a t -> 'b array -> ('a * 'b) array

zip a b

Create an array of pairs from corresponding elements of a and b. Stop with the shorter array

zip [|1;2|] [|3;4;5|] = [|(1, 3);(2, 4)|]
val zipByU : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array
val zipBy : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array

zipBy xs ys f

Create an array by applying f to corresponding elements of xs and ys Stops with shorter array

Equivalent to map (zip xs ys) (fun (a,b) -> f a b)

zipBy [|1;2;3|] [|4;5|] (fun a b -> 2 * a + b) = [|6;9|];;
val unzip : ('a * 'b) array -> 'a t * 'b array

unzip a takes an array of pairs and creates a pair of arrays. The first array contains all the first items of the pairs; the second array contains all the second items.

unzip [|(1,2) ; (3,4)|] = ([|1;3|], [|2;4|]);;
+unzip [|(1,2) ; (3,4) ; (5,6) ; (7,8)|] = ([|1;3;5;7|], [|2;4;6;8|]);;
val concat : 'a t -> 'a t -> 'a t

concat xs ys

  • returns

    a fresh array containing the concatenation of the arrays v1 and v2;so even if v1 or v2 is empty;it can not be shared

    concat [|1;2;3|] [|4;5|] = [|1;2;3;4;5|];;
    +concat [| |] [|"a";"b";"c"|] = [|"a";"b";"c"|];;
val concatMany : 'a t t -> 'a t

concatMany xss

  • returns

    a fresh array as the concatenation of xss (an array of arrays)

    concatMany [| [|1;2;3|]; [|4;5;6|]; [|7;8|] |] = [|1;2;3;4;5;6;7;8|];;
val slice : 'a t -> offset:int -> len:int -> 'a t

slice xs offset len creates a new array with the len elements of xs starting at offset for

offset can be negative;and is evaluated as length xs - offset slice xs -1 1 means get the last element as a singleton array

slice xs (-len) len will return a copy of the array

if the array does not have enough data;slice extracts through the end of sequence.

if len is negative;returns the empty array.

slice [|10;11;12;13;14;15;16|] ~offset: 2 ~len: 3 = [|12;13;14|];;
+slice [|10;11;12;13;14;15;16|] ~offset: (-4) ~len: 3 = [|13;14;15|];;
+slice [|10;11;12;13;14;15;16|] ~offset:4  ~len:9 = [|14;15;16|];;
val sliceToEnd : 'a t -> int -> 'a t

sliceToEnd xs offset creates a new array with the elements of xs starting at offset

offset can be negative;and is evaluated as length xs - offset sliceToEnd xs -1 means get the last element as a singleton array

sliceToEnd xs 0 will return a copy of the array

sliceToEnd [|10;11;12;13;14;15;16|] 2 = [|12;13;14;15;16|];;
+sliceToEnd [|10;11;12;13;14;15;16|] (-4) = [|13;14;15;16|];;
val copy : 'a t -> 'a t

copy a

  • returns

    a copy of a;that is;a fresh array containing the same elements as a.

val fill : 'a t -> offset:int -> len:int -> 'a -> unit

fill arr ~offset ~len x

Modifies arr in place, storing x in elements number offset to offset + len - 1.

offset can be negative;and is evaluated as length arr - offset

fill arr ~offset:(-1) ~len:1 means fill the last element, if the array does not have enough data;fill will ignore it

let arr = makeBy 5 (fun i -> i) ;;
+fill arr ~offset:2 ~len:2 9 ;;
+arr = [|0;1;9;9;4|];;
+fill arr ~offset:7 ~len:2 8;;
+arr = [|0;1;9;9;4|];;
val blit : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

blit ~src:v1 ~srcOffset:o1 ~dst:v2 ~dstOffset:o2 ~len

copies len elements from array v1;starting at element number o1;to array v2, starting at element number o2.

It works correctly even if v1 and v2 are the same array;and the source and destination chunks overlap.

offset can be negative;-1 means len - 1;if len + offset is still negative;it will be set as 0

For each of the examples;presume that v1 = [|10;11;12;13;14;15;16;17|] and v2 = [|20;21;22;23;24;25;26;27|]. The result shown is the content of the destination array.

Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v2 ~dstOffset: 2 ~len: 3 |.
+  [|20;21;14;15;16;25;26;27|]
+Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v1 ~dstOffset: 2 ~len: 3 |.
+  [|10;11;14;15;16;15;16;17|]
val blitUnsafe : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

Unsafe blit without bounds checking

val forEachU : 'a t -> ('a -> unit) -> unit
val forEach : 'a t -> ('a -> unit) -> unit

forEach xs f

Call f on each element of xs from the beginning to end. f returns unit;so no new array is created. Use forEach when you are primarily concerned with repetitively creating side effects.

forEach [|"a";"b";"c"|] (fun x -> Js.log("Item: " ^ x));;
+(*  prints:
+  Item: a
+  Item: b
+  Item: c
+*)
+
+let total = ref 0;;
+forEach [|1;2;3;4|] (fun x -> total := !total + x);;
+!total  = 1 + 2 + 3 + 4;;
val mapU : 'a t -> ('a -> 'b) -> 'b array
val map : 'a t -> ('a -> 'b) -> 'b array

map xs f

  • returns

    a new array by calling f for each element of xs from the beginning to end

    map [|1;2|] (fun x-> x + 10) = [|11;12|]
val flatMapU : 'a t -> ('a -> 'b t) -> 'b t
val flatMap : 'a t -> ('a -> 'b t) -> 'b t

flatMap xs f **return** a new array by calling `f` for each element of `xs` from the beginning to end, and then concatenating the results ``` flatMap |1;2| (fun x-> |x + 10;x + 20|) = |11;21;12;22| ```

val getByU : 'a t -> ('a -> bool) -> 'a option
val getBy : 'a t -> ('a -> bool) -> 'a option

getBy xs p returns Some value for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 4
+getBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val getIndexByU : 'a t -> ('a -> bool) -> int option
val getIndexBy : 'a t -> ('a -> bool) -> int option

getIndexBy xs p returns Some index for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getIndexBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 1
+getIndexBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val keepU : 'a t -> ('a -> bool) -> 'a t
val keep : 'a t -> ('a -> bool) -> 'a t

keep xs p

  • returns

    a new array that keeps all elements satisfying p

    keep [|1;2;3|] (fun x -> x mod  2 = 0) = [|2|]
val keepWithIndexU : 'a t -> ('a -> int -> bool) -> 'a t
val keepWithIndex : 'a t -> ('a -> int -> bool) -> 'a t

keepWithIndex xs p

  • returns

    a new array that keeps all elements satisfying p. The predicate p takes two arguments: the element from xs and the index starting from 0.

    keepWithIndex [|1;2;3|] (fun _x i -> i = 1) = [|2|]
val keepMapU : 'a t -> ('a -> 'b option) -> 'b array
val keepMap : 'a t -> ('a -> 'b option) -> 'b array

keepMap xs p

  • returns

    a new array that keeps all elements that return a non-None when applied to p

    keepMap [|1;2;3|] (fun x -> if x mod 2 = 0 then Some x else None)
    += [| 2 |]
val forEachWithIndexU : 'a t -> (int -> 'a -> unit) -> unit
val forEachWithIndex : 'a t -> (int -> 'a -> unit) -> unit

forEachWithIndex xs f

The same as forEach; except that f is supplied with two arguments: the index starting from 0 and the element from xs

forEachWithIndex [|"a";"b";"c"|] (fun i x -> Js.log("Item " ^ (string_of_int i) ^ " is " ^ x));;
+(*  prints:
+  Item 0 is a
+  Item 1 is b
+  Item 2 is c
+*)
+
+let total = ref 0 ;;
+forEachWithIndex [|10;11;12;13|] (fun i x -> total := !total + x + i);;
+!total  = 0 + 10 + 1 +  11 + 2 + 12 + 3 + 13;;
val mapWithIndexU : 'a t -> (int -> 'a -> 'b) -> 'b t
val mapWithIndex : 'a t -> (int -> 'a -> 'b) -> 'b t

mapWithIndex xs f applies f to each element of xs. Function f takes two arguments: the index starting from 0 and the element from xs.

mapWithIndex [|1;2;3|] (fun i x -> i + x) =
+[|0 + 1; 1 + 2; 2 + 3|]
val partitionU : 'a t -> ('a -> bool) -> 'a t * 'a t
val partition : 'a t -> ('a -> bool) -> 'a t * 'a t

partition f a split array into tuple of two arrays based on predicate f; first of tuple where predicate cause true, second where predicate cause false

partition [|1;2;3;4;5|] (fun x -> x mod 2 = 0  ) = ([|2;4|], [|1;2;3|]);;
+partition [|1;2;3;4;5|] (fun x -> x mod 2 <> 0 ) = ([|1;2;3|], [|2;4|]);;
val reduceU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduce : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduce xs init f

Applies f to each element of xs from beginning to end. Function f has two parameters: the item from the list and an “accumulator”;which starts with a value of init. reduce returns the final value of the accumulator.

reduce [|2;3;4|] 1 (+) = 10;;
+reduce [|"a";"b";"c";"d"|] "" (^) = "abcd";;
val reduceReverseU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduceReverse : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduceReverse xs init f

Works like reduce;except that function f is applied to each item of xs from the last back to the first.

reduceReverse [|"a";"b";"c";"d"|] "" (^) = "dcba";;
val reduceReverse2U : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val reduceReverse2 : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c

reduceReverse2 xs ys init f Reduces two arrays xs and ys;taking items starting at min (length xs) (length ys) down to and including zero.

reduceReverse2 [|1;2;3|] [|1;2|] 0 (fun acc x y -> acc + x + y) = 6
val reduceWithIndexU : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b
val reduceWithIndex : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b

reduceWithIndex xs f

Applies f to each element of xs from beginning to end. Function f has three parameters: the item from the array and an “accumulator”, which starts with a value of init and the index of each element. reduceWithIndex returns the final value of the accumulator.

reduceWithIndex [|1;2;3;4|] 0 (fun acc x i -> acc + x + i) = 16;
val joinWithU : 'a t -> string -> ('a -> string) -> string
val joinWith : 'a t -> string -> ('a -> string) -> string

joinWith xs sep toString

Concatenates all the elements of xs converted to string with toString, each separated by sep, the string given as the second argument, into a single string. If the array has only one element, then that element will be returned without using the separator. If the array is empty, the empty string will be returned.

joinWith [|0; 1|] ", " string_of_int = "0, 1"
+joinWith [||] " " string_of_int = ""
+joinWith [|1|] " " string_of_int = "1"
val someU : 'a t -> ('a -> bool) -> bool
val some : 'a t -> ('a -> bool) -> bool

some xs p

  • returns

    true if at least one of the elements in xs satifies p;where p is a predicate: a function taking an element and returning a bool.

    some [|2; 3; 4|] (fun x -> x mod 2 = 1) = true;;
    +some [|-1; -3; -5|] (fun x -> x > 0) = false;;
val everyU : 'a t -> ('a -> bool) -> bool
val every : 'a t -> ('a -> bool) -> bool

every xs p

  • returns

    true if all elements satisfy p;where p is a predicate: a function taking an element and returning a bool.

    every [|1; 3; 5|] (fun x -> x mod 2 = 1) = true;;
    +every [|1; -3; 5|] (fun x -> x > 0) = false;;
val every2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val every2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

every2 xs ys p returns true if p xi yi is true for all pairs of elements up to the shorter length (i.e. min (length xs) (length ys))

every2 [|1;2;3|] [|0;1|] (>) = true;;
+every2 [||] [|1|] (fun  x y -> x > y) = true;;
+every2 [|2;3|] [|1|] (fun  x y -> x > y) = true;;
+every2 [|0;1|] [|5;0|] (fun x y -> x > y) = false;
val some2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val some2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

some2 xs ys p returns true if p xi yi is true for any pair of elements up to the shorter length (i.e. min (length xs) (length ys))

some2 [|0;2|] [|1;0;3|] (>) = true ;;
+(some2 [||] [|1|] (fun   x y -> x > y)) =  false;;
+(some2 [|2;3|] [|1;4|] (fun   x y -> x > y)) = true;;
val cmpU : 'a t -> 'a t -> ('a -> 'a -> int) -> int
val cmp : 'a t -> 'a t -> ('a -> 'a -> int) -> int

cmp xs ys f

  • Compared by length if length xs <> length ys;returning -1 iflength xs < length ys or 1 if length xs > length ys
  • Otherwise compare one by one f x y. f returns
  • a negative number if x is “less than” y
  • zero if x is “equal to” y
  • a positive number if x is “greater than” y
  • The comparison returns the first non-zero result of f;or zero if f returns zero for all x and y.
cmp [|1; 3; 5|] [|1; 4; 2|] (fun a b -> compare a b) = -1;;
+cmp [|1; 3; 5|] [|1; 2; 3|] (fun a b -> compare a b) = 1;;
+cmp [|1; 3; 5|] [|1; 3; 5|] (fun a b -> compare a b) = 0;;
val eqU : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool
val eq : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool

eq xs ys

  • return false if length is not the same
  • otherwise compare items one by one using f xi yi;and return true if all results are true;false otherwise
eq [|1; 2; 3|] [|-1; -2; -3|] (fun a b -> abs a = abs b) = true
val truncateToLengthUnsafe : 'a t -> int -> 'a t

Unsafe truncateToLengthUnsafe xs n sets length of array xs to n.

If n is greater than the length of xs;the extra elements are set to Js.Null_undefined.null

If n is less than zero;raises a RangeError.

let arr = [|"ant";"bee";"cat";"dog";"elk"|];;
+let () = truncateToLengthUnsafe arr 3;;
+arr = [|"ant";"bee";"cat"|];;
val initU : int -> (int -> 'a) -> 'a t
val init : int -> (int -> 'a) -> 'a t
val push : 'a t -> 'a -> [ `Do_not_use_Array_push_in_native ]

Using Belt.Array.push in native isn't a good idea, since OCaml's Array are fixed length and can't resize the same way as JavaScript arrays.

diff --git a/local/server-reason-react/belt/Belt/Map/String/N/S/index.html b/local/server-reason-react/belt/Belt/Map/String/N/S/index.html new file mode 100644 index 000000000..ca002d845 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Map/String/N/S/index.html @@ -0,0 +1,6 @@ + +S (docs.local.server-reason-react.belt.Belt.Map.String.N.S)

Module N.S

A module for Array sort relevant utiliites

module Int = Belt_SortArrayInt

Specalized when key type is int, more efficient than the generic type

module String = Belt_SortArrayString

Specalized when key type is string, more efficient than the generic type

val strictlySortedLengthU : 'a array -> ('a -> 'a -> bool) -> int
val strictlySortedLength : 'a array -> ('a -> 'a -> bool) -> int

strictlySortedLenght xs cmp return +n means increasing order -n means negative order

strictlySortedLength [|1;2;3;4;3|] (fun x y -> x < y) = 4;;
+strictlySortedLength [||] (fun x y -> x < y) = 0;;
+strictlySortedLength [|1|] (fun x y -> x < y) = 1;;
+strictlySortedLength [|4;3;2;1|] (fun x y -> x < y) = -4;;
val isSortedU : 'a array -> ('a -> 'a -> int) -> bool
val isSorted : 'a array -> ('a -> 'a -> int) -> bool

isSorted arr cmp

  • returns

    true if array is increasingly sorted (equal is okay )

    isSorted [|1;1;2;3;4|] (fun x y -> compare x y) = true
val stableSortInPlaceByU : 'a array -> ('a -> 'a -> int) -> unit
val stableSortInPlaceBy : 'a array -> ('a -> 'a -> int) -> unit

stableSortBy xs cmp

Sort xs in place using comparator cmp, the stable means if the elements are equal, their order will be preserved

val stableSortByU : 'a array -> ('a -> 'a -> int) -> 'a array
val stableSortBy : 'a array -> ('a -> 'a -> int) -> 'a array

stableSort xs cmp

val binarySearchByU : 'a array -> 'a -> ('a -> 'a -> int) -> int
val binarySearchBy : 'a array -> 'a -> ('a -> 'a -> int) -> int

If value is not found and value is less than one or more elements in array, the negative number returned is the bitwise complement of the index of the first element that is larger than value.

If value is not found and value is greater than all elements in array, the negative number returned is the bitwise complement of (the index of the last element plus 1)

for example, if key is smaller than all elements return -1 since lnot (-1) = 0 if key is larger than all elements return - (len + 1) since lnot (-(len+1)) = len

binarySearchBy [|1;2;3;4;33;35;36|] 33 = 4;;
+lnot (binarySearchBy [|1;3;5;7|] 4) = 2;;
diff --git a/local/server-reason-react/belt/Belt/Map/String/N/index.html b/local/server-reason-react/belt/Belt/Map/String/N/index.html new file mode 100644 index 000000000..de2788525 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Map/String/N/index.html @@ -0,0 +1,110 @@ + +N (docs.local.server-reason-react.belt.Belt.Map.String.N)

Module String.N

type ('k, 'v) node = {
  1. mutable key : 'k;
  2. mutable value : 'v;
  3. mutable height : int;
  4. mutable left : ('k, 'v) t;
  5. mutable right : ('k, 'v) t;
}
and ('key, 'a) t = ('key, 'a) node option
val node : + key:'k -> + value:'v -> + height:int -> + left:('k, 'v) t -> + right:('k, 'v) t -> + ('k, 'v) node
val keySet : ('k, 'v) node -> 'k -> unit
val key : ('k, 'v) node -> 'k
val valueSet : ('k, 'v) node -> 'v -> unit
val value : ('k, 'v) node -> 'v
val heightSet : ('k, 'v) node -> int -> unit
val height : ('k, 'v) node -> int
val leftSet : ('k, 'v) node -> ('k, 'v) t -> unit
val left : ('k, 'v) node -> ('k, 'v) t
val rightSet : ('k, 'v) node -> ('k, 'v) t -> unit
val right : ('k, 'v) node -> ('k, 'v) t
type ('k, 'id) cmp = 'k -> 'k -> int
module A : sig ... end

Belt.Array Utililites for Array functions

module S : sig ... end

A module for Array sort relevant utiliites

val toOpt : 'a option -> 'a option
val return : 'a -> 'a option
val empty : 'a option
val unsafeCoerce : 'a option -> 'a
val treeHeight : ('a, 'b) t -> int
val copy : ('a, 'b) node option -> ('a, 'b) node option
val create : ('a, 'b) t -> 'a -> 'b -> ('a, 'b) t -> ('a, 'b) node option
val singleton : 'a -> 'b -> ('a, 'b) node option
val heightGe : ('a, 'b) node option -> ('c, 'd) node option -> bool
val updateValue : ('a, 'b) node -> 'b -> ('a, 'b) node
val bal : + ('a, 'b) node option -> + 'a -> + 'b -> + ('a, 'b) node option -> + ('a, 'b) node option
val minKey0Aux : ('a, 'b) node -> 'a
val minKey : ('a, 'b) node option -> 'a option
val minKeyUndefined : ('a, 'b) node option -> 'a option
val maxKey0Aux : ('a, 'b) node -> 'a
val maxKey : ('a, 'b) node option -> 'a option
val maxKeyUndefined : ('a, 'b) node option -> 'a option
val minKV0Aux : ('a, 'b) node -> 'a * 'b
val minimum : ('a, 'b) node option -> ('a * 'b) option
val minUndefined : ('a, 'b) node option -> ('a * 'b) option
val maxKV0Aux : ('a, 'b) node -> 'a * 'b
val maximum : ('a, 'b) node option -> ('a * 'b) option
val maxUndefined : ('a, 'b) node option -> ('a * 'b) option
val removeMinAuxWithRef : ('a, 'b) node -> 'a ref -> 'b ref -> ('a, 'b) t
val isEmpty : 'a option -> bool
val stackAllLeft : + ('a, 'b) node option -> + ('a, 'b) node list -> + ('a, 'b) node list
val forEachU : ('a, 'b) node option -> ('a -> 'b -> unit) -> unit
val forEach : ('a, 'b) node option -> ('a -> 'b -> unit) -> unit
val mapU : ('a, 'b) node option -> ('b -> 'c) -> ('a, 'c) node option
val map : ('a, 'b) node option -> ('b -> 'c) -> ('a, 'c) node option
val mapWithKeyU : + ('a, 'b) node option -> + ('a -> 'b -> 'c) -> + ('a, 'c) node option
val mapWithKey : + ('a, 'b) node option -> + ('a -> 'b -> 'c) -> + ('a, 'c) node option
val reduceU : ('a, 'b) node option -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val reduce : ('a, 'b) node option -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val everyU : ('a, 'b) node option -> ('a -> 'b -> bool) -> bool
val every : ('a, 'b) node option -> ('a -> 'b -> bool) -> bool
val someU : ('a, 'b) node option -> ('a -> 'b -> bool) -> bool
val some : ('a, 'b) node option -> ('a -> 'b -> bool) -> bool
val addMinElement : ('a, 'b) node option -> 'a -> 'b -> ('a, 'b) node option
val addMaxElement : ('a, 'b) node option -> 'a -> 'b -> ('a, 'b) node option
val join : + ('a, 'b) node option -> + 'a -> + 'b -> + ('a, 'b) node option -> + ('a, 'b) node option
val concat : + ('a, 'b) node option -> + ('a, 'b) node option -> + ('a, 'b) node option
val concatOrJoin : + ('a, 'b) node option -> + 'a -> + 'b option -> + ('a, 'b) node option -> + ('a, 'b) node option
val keepSharedU : + ('a, 'b) node option -> + ('a -> 'b -> bool) -> + ('a, 'b) node option
val keepShared : + ('a, 'b) node option -> + ('a -> 'b -> bool) -> + ('a, 'b) node option
val keepMapU : + ('a, 'b) node option -> + ('a -> 'b -> 'c option) -> + ('a, 'c) node option
val keepMap : + ('a, 'b) node option -> + ('a -> 'b -> 'c option) -> + ('a, 'c) node option
val partitionSharedU : + ('a, 'b) node option -> + ('a -> 'b -> bool) -> + ('a, 'b) node option * ('a, 'b) node option
val partitionShared : + ('a, 'b) node option -> + ('a -> 'b -> bool) -> + ('a, 'b) node option * ('a, 'b) node option
val lengthNode : ('a, 'b) node -> int
val size : ('a, 'b) node option -> int
val toListAux : ('a, 'b) node option -> ('a * 'b) list -> ('a * 'b) list
val toList : ('a, 'b) node option -> ('a * 'b) list
val checkInvariantInternal : ('a, 'b) t -> unit
val fillArrayKey : ('a, 'b) node -> int -> 'a A.t -> int
val fillArrayValue : ('a, 'b) node -> int -> 'b A.t -> int
val fillArray : ('weak55, 'a) node -> int -> ('weak55 * 'a) A.t -> int
type cursor
val cursor : forward:int -> backward:int -> cursor
val forwardSet : cursor -> int -> unit
val forward : cursor -> int
val backwardSet : cursor -> int -> unit
val backward : cursor -> int
val fillArrayWithPartition : + ('a, 'b) node -> + cursor -> + ('a * 'b) A.t -> + ('a -> bool) -> + unit
val fillArrayWithFilter : + ('a, 'b) node -> + int -> + ('a * 'b) A.t -> + ('a -> bool) -> + int
val toArray : ('a, 'b) node option -> ('a * 'b) array
val keysToArray : ('a, 'b) node option -> 'a array
val valuesToArray : ('a, 'b) node option -> 'b array
val fromSortedArrayRevAux : ('a * 'b) A.t -> int -> int -> ('a, 'b) node option
val fromSortedArrayAux : ('a * 'b) A.t -> int -> int -> ('a, 'b) node option
val fromSortedArrayUnsafe : ('a * 'b) A.t -> ('a, 'b) node option
val compareAux : + ('a, 'b) node list -> + ('a, 'c) node list -> + kcmp:('a -> 'a -> int) -> + vcmp:('b -> 'c -> int) -> + int
val eqAux : + ('a, 'b) node list -> + ('a, 'c) node list -> + kcmp:('a -> 'a -> int) -> + veq:('b -> 'c -> bool) -> + bool
val cmpU : + ('a, 'b) node option -> + ('a, 'c) node option -> + kcmp:('a -> 'a -> int) -> + vcmp:('b -> 'c -> int) -> + int
val cmp : + ('a, 'b) node option -> + ('a, 'c) node option -> + kcmp:('a -> 'a -> int) -> + vcmp:('b -> 'c -> int) -> + int
val eqU : + ('a, 'b) node option -> + ('a, 'c) node option -> + kcmp:('a -> 'a -> int) -> + veq:('b -> 'c -> bool) -> + bool
val eq : + ('a, 'b) node option -> + ('a, 'c) node option -> + kcmp:('a -> 'a -> int) -> + veq:('b -> 'c -> bool) -> + bool
val get : ('a, 'b) node option -> 'a -> cmp:('a -> 'a -> int) -> 'b option
val getUndefined : + ('a, 'b) node option -> + 'a -> + cmp:('a -> 'a -> int) -> + 'b option
val getExn : ('a, 'b) node option -> 'a -> cmp:('a -> 'a -> int) -> 'b
val getWithDefault : + ('a, 'weak59) node option -> + 'a -> + 'weak59 -> + cmp:('a -> 'a -> int) -> + 'weak59
val has : ('a, 'b) node option -> 'a -> cmp:('a -> 'a -> int) -> bool
val rotateWithLeftChild : ('a, 'b) node -> ('a, 'b) node
val rotateWithRightChild : ('a, 'b) node -> ('a, 'b) node
val doubleWithLeftChild : ('a, 'b) node -> ('a, 'b) node
val doubleWithRightChild : ('a, 'b) node -> ('a, 'b) node
val heightUpdateMutate : ('a, 'b) node -> ('a, 'b) node
val balMutate : ('a, 'b) node -> ('a, 'b) node
val updateMutate : + ('a, 'b) t -> + 'a -> + 'b -> + cmp:('a -> 'a -> int) -> + ('a, 'b) node option
val fromArray : + ('a * 'b) array -> + cmp:('a -> 'a -> int) -> + ('a, 'b) node option
val removeMinAuxWithRootMutate : ('a, 'b) node -> ('a, 'c) node -> ('a, 'c) t
val findFirstByU : ('a, 'b) t -> ('a -> 'b -> bool) -> ('a * 'b) option
val findFirstBy : ('a, 'b) t -> ('a -> 'b -> bool) -> ('a * 'b) option
diff --git a/local/server-reason-react/belt/Belt/Map/String/index.html b/local/server-reason-react/belt/Belt/Map/String/index.html new file mode 100644 index 000000000..4a0f39ce6 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Map/String/index.html @@ -0,0 +1,44 @@ + +String (docs.local.server-reason-react.belt.Belt.Map.String)

Module Map.String

specalized when key type is string, more efficient than the generic type, its compare behavior is fixed using the built-in comparison

type key = string
module I : sig ... end
module N : sig ... end
module A : sig ... end

Belt.Array Utililites for Array functions

type 'a t = (key, 'a) N.t
val empty : 'a option
val isEmpty : 'a option -> bool
val singleton : 'a -> 'b -> ('a, 'b) N.node option
val minKey : ('a, 'b) N.node option -> 'a option
val minKeyUndefined : ('a, 'b) N.node option -> 'a option
val maxKey : ('a, 'b) N.node option -> 'a option
val maxKeyUndefined : ('a, 'b) N.node option -> 'a option
val minimum : ('a, 'b) N.node option -> ('a * 'b) option
val minUndefined : ('a, 'b) N.node option -> ('a * 'b) option
val maximum : ('a, 'b) N.node option -> ('a * 'b) option
val maxUndefined : ('a, 'b) N.node option -> ('a * 'b) option
val forEachU : ('a, 'b) N.node option -> ('a -> 'b -> unit) -> unit
val forEach : ('a, 'b) N.node option -> ('a -> 'b -> unit) -> unit
val mapU : ('a, 'b) N.node option -> ('b -> 'c) -> ('a, 'c) N.node option
val map : ('a, 'b) N.node option -> ('b -> 'c) -> ('a, 'c) N.node option
val mapWithKeyU : + ('a, 'b) N.node option -> + ('a -> 'b -> 'c) -> + ('a, 'c) N.node option
val mapWithKey : + ('a, 'b) N.node option -> + ('a -> 'b -> 'c) -> + ('a, 'c) N.node option
val reduceU : ('a, 'b) N.node option -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val reduce : ('a, 'b) N.node option -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val everyU : ('a, 'b) N.node option -> ('a -> 'b -> bool) -> bool
val every : ('a, 'b) N.node option -> ('a -> 'b -> bool) -> bool
val someU : ('a, 'b) N.node option -> ('a -> 'b -> bool) -> bool
val some : ('a, 'b) N.node option -> ('a -> 'b -> bool) -> bool
val keepU : + ('a, 'b) N.node option -> + ('a -> 'b -> bool) -> + ('a, 'b) N.node option
val keep : + ('a, 'b) N.node option -> + ('a -> 'b -> bool) -> + ('a, 'b) N.node option
val partitionU : + ('a, 'b) N.node option -> + ('a -> 'b -> bool) -> + ('a, 'b) N.node option * ('a, 'b) N.node option
val partition : + ('a, 'b) N.node option -> + ('a -> 'b -> bool) -> + ('a, 'b) N.node option * ('a, 'b) N.node option
val size : ('a, 'b) N.node option -> int
val toList : ('a, 'b) N.node option -> ('a * 'b) list
val toArray : ('a, 'b) N.node option -> ('a * 'b) array
val keysToArray : ('a, 'b) N.node option -> 'a array
val valuesToArray : ('a, 'b) N.node option -> 'b array
val checkInvariantInternal : ('a, 'b) N.t -> unit
val set : (key, 'a) N.t -> key -> 'b -> (key, 'c) N.node option
val updateU : (key, 'a) N.t -> key -> ('b option -> 'c option) -> (key, 'a) N.t
val update : (key, 'a) N.t -> key -> ('a option -> 'a option) -> (key, 'a) N.t
val removeAux : (key, 'a) N.node -> key -> (key, 'b) N.t
val remove : (key, 'a) N.node option -> key -> (key, 'a) N.t
val removeMany0 : (key, 'a) N.node -> key A.t -> int -> int -> (key, 'a) N.t
val removeMany : (key, 'a) N.node option -> key A.t -> (key, 'a) N.t
val mergeMany : (key, 'a) N.t -> (key * 'b) A.t -> (key, 'a) N.t
val mergeArray : (key, 'a) N.t -> (key * 'a) A.t -> (key, 'a) N.t
val has : (I.key, 'a) I.N.t -> I.key -> bool
val cmpU : + (I.key, 'a) I.N.node option -> + (I.key, 'b) I.N.node option -> + ('a -> 'b -> int) -> + int
val cmp : + (I.key, 'a) I.N.node option -> + (I.key, 'b) I.N.node option -> + ('a -> 'b -> int) -> + int
val eqU : + (I.key, 'a) I.N.node option -> + (I.key, 'b) I.N.node option -> + ('a -> 'b -> bool) -> + bool
val eq : + (I.key, 'a) I.N.node option -> + (I.key, 'b) I.N.node option -> + ('a -> 'b -> bool) -> + bool
val get : (I.key, 'a) I.N.t -> I.key -> 'a option
val getUndefined : (I.key, 'a) I.N.t -> I.key -> 'a Js.Undefined.t
val getWithDefault : (I.key, 'a) I.N.t -> I.key -> 'a -> 'a
val getExn : (I.key, 'a) I.N.t -> I.key -> 'a
val split : I.key -> (I.key, 'a) I.N.node option -> 'a I.t * 'a option * 'a I.t
val mergeU : + (I.key, 'a) I.N.t -> + 'b I.t -> + (I.key -> 'a option -> 'b option -> 'c option) -> + (I.key, 'c) I.N.node option
val merge : + (I.key, 'a) I.N.t -> + 'b I.t -> + (I.key -> 'a option -> 'b option -> 'c option) -> + (I.key, 'c) I.N.node option
val fromArray : (I.key * 'a) array -> (I.key, 'a) I.N.node option
diff --git a/local/server-reason-react/belt/Belt/Map/index.html b/local/server-reason-react/belt/Belt/Map/index.html new file mode 100644 index 000000000..f68a53ca3 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Map/index.html @@ -0,0 +1,62 @@ + +Map (docs.local.server-reason-react.belt.Belt.Map)

Module Belt.Map

Belt.Map,

The top level provides generic immutable map operations.

It also has three specialized inner modules Belt.Map.Int, Belt.Map.String and

Belt.Map.Dict: This module separates data from function which is more verbose but slightly more efficient

A immutable sorted map module which allows customize compare behavior.

The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

For more info on this module's usage of identity, `make` and others, please see the top level documentation of Belt, A special encoding for collection safety.

Example usage:

module PairComparator = Belt.Id.MakeComparable(struct
+  type t = int * int
+  let cmp (a0, a1) (b0, b1) =
+    match Pervasives.compare a0 b0 with
+    | 0 -> Pervasives.compare a1 b1
+    | c -> c
+end)
+
+let myMap = Belt.Map.make ~id:(module PairComparator)
+let myMap2 = Belt.Map.set myMap (1, 2) "myValue"

The API documentation below will assume a predeclared comparator module for integers, IntCmp

module Int = Belt_MapInt

Specalized when key type is int, more efficient than the generic type, its compare behavior is fixed using the built-in comparison

module String : sig ... end

specalized when key type is string, more efficient than the generic type, its compare behavior is fixed using the built-in comparison

module Dict : sig ... end

This module seprate identity from data, it is a bit more verboe but slightly more efficient due to the fact that there is no need to pack identity and data back after each operation

type ('key, 'value, 'identity) t

('key, 'identity) t

'key is the field type

'value is the element type

'identity the identity of the collection

type ('key, 'id) id = + (module Belt__.Belt_Id.Comparable + with type identity = 'id + and type t = 'key)

The identity needed for making an empty map

val make : id:('k, 'id) id -> ('k, 'v, 'id) t

make ~id creates a new map by taking in the comparator

let m = Belt.Map.make ~id:(module IntCmp)
val isEmpty : (_, _, _) t -> bool

isEmpty m checks whether a map m is empty

isEmpty (fromArray [|1,"1"|] ~id:(module IntCmp)) = false
val has : ('k, 'v, 'id) t -> 'k -> bool

has m k checks whether m has the key k

has (fromArray [|1,"1"|] ~id:(module IntCmp)) 1 = true
val cmpU : ('k, 'v, 'id) t -> ('k, 'v, 'id) t -> ('v -> 'v -> int) -> int
val cmp : ('k, 'v, 'id) t -> ('k, 'v, 'id) t -> ('v -> 'v -> int) -> int

cmp m0 m1 vcmp

Total ordering of map given total ordering of value function.

It will compare size first and each element following the order one by one.

val eqU : ('k, 'v, 'id) t -> ('k, 'v, 'id) t -> ('v -> 'v -> bool) -> bool
val eq : ('k, 'v, 'id) t -> ('k, 'v, 'id) t -> ('v -> 'v -> bool) -> bool

eq m1 m2 veq tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. veq is the equality predicate used to compare the data associated with the keys.

val findFirstByU : ('k, 'v, 'id) t -> ('k -> 'v -> bool) -> ('k * 'v) option
val findFirstBy : ('k, 'v, 'id) t -> ('k -> 'v -> bool) -> ('k * 'v) option

findFirstBy m p uses funcion f to find the first key value pair to match predicate p.

let s0 = fromArray ~id:(module IntCmp) [|4,"4";1,"1";2,"2,"3""|];;
+findFirstBy s0 (fun k v -> k = 4 ) = option (4, "4");;
val forEachU : ('k, 'v, 'id) t -> ('k -> 'v -> unit) -> unit
val forEach : ('k, 'v, 'id) t -> ('k -> 'v -> unit) -> unit

forEach m f applies f to all bindings in map m. f receives the 'k as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

let s0 = fromArray ~id:(module IntCmp) [|4,"4";1,"1";2,"2,"3""|];;
+let acc = ref [] ;;
+forEach s0 (fun k v -> acc := (k,v) :: !acc);;
+
+!acc = [4,"4"; 3,"3"; 2,"2"; 1,"1"]
val reduceU : ('k, 'v, 'id) t -> 'acc -> ('acc -> 'k -> 'v -> 'acc) -> 'acc
val reduce : ('k, 'v, 'id) t -> 'acc -> ('acc -> 'k -> 'v -> 'acc) -> 'acc

reduce m a f computes (f kN dN ... (f k1 d1 a)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

let s0 = fromArray ~id:(module IntCmp) [|4,"4";1,"1";2,"2,"3""|];;
+reduce s0 [] (fun acc k v -> (k,v) acc ) = [4,"4";3,"3";2,"2";1,"1"];;
val everyU : ('k, 'v, 'id) t -> ('k -> 'v -> bool) -> bool
val every : ('k, 'v, 'id) t -> ('k -> 'v -> bool) -> bool

every m p checks if all the bindings of the map satisfy the predicate p. Order unspecified

val someU : ('k, 'v, 'id) t -> ('k -> 'v -> bool) -> bool
val some : ('k, 'v, 'id) t -> ('k -> 'v -> bool) -> bool

some m p checks if at least one binding of the map satisfy the predicate p. Order unspecified

val size : ('k, 'v, 'id) t -> int

size s

size (fromArray [2,"2"; 2,"1"; 3,"3"] ~id:(module IntCmp)) = 2 ;;
val toArray : ('k, 'v, 'id) t -> ('k * 'v) array

toArray s

toArray (fromArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) = [1,"1";2,"2";3,"3"]
val toList : ('k, 'v, 'id) t -> ('k * 'v) list

In increasing order

See

oArray

val fromArray : ('k * 'v) array -> id:('k, 'id) id -> ('k, 'v, 'id) t

fromArray kvs ~id

toArray (fromArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) = [1,"1";2,"2";3,"3"]
val keysToArray : ('k, 'v, 'id) t -> 'k array

keysToArray s

keysToArray (fromArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) =
+[|1;2;3|];;
val valuesToArray : ('k, 'v, 'id) t -> 'v array

valuesToArray s

valuesToArray (fromArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) =
+[|"1";"2";"3"|];;
val minKey : ('k, _, _) t -> 'k option

minKey s

  • returns

    the minimum key, None if not exist

val minKeyUndefined : ('k, _, _) t -> 'k Js.undefined

See minKey

val maxKey : ('k, _, _) t -> 'k option

maxKey s

  • returns

    the maximum key, None if not exist

val maxKeyUndefined : ('k, _, _) t -> 'k Js.undefined

See maxKey

val minimum : ('k, 'v, _) t -> ('k * 'v) option

minimum s

  • returns

    the minimum key value pair, None if not exist

val minUndefined : ('k, 'v, _) t -> ('k * 'v) Js.undefined

See minimum

val maximum : ('k, 'v, _) t -> ('k * 'v) option

maximum s

  • returns

    the maximum key value pair, None if not exist

val maxUndefined : ('k, 'v, _) t -> ('k * 'v) Js.undefined

See maximum

val get : ('k, 'v, 'id) t -> 'k -> 'v option

get s k

get (fromArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) 2 =
+Some "2";;
+get (fromArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp)) 2 =
+None;;
val getUndefined : ('k, 'v, 'id) t -> 'k -> 'v Js.undefined

See get

  • returns

    undefined when not found

val getWithDefault : ('k, 'v, 'id) t -> 'k -> 'v -> 'v

getWithDefault s k default

See get

  • returns

    default when k is not found

val getExn : ('k, 'v, 'id) t -> 'k -> 'v

getExn s k

See getExn

raise when k not exist

val remove : ('k, 'v, 'id) t -> 'k -> ('k, 'v, 'id) t

remove m x when x is not in m, m is returned reference unchanged.

let s0 =  (fromArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp));;
+
+let s1 = remove s0 1;;
+let s2 = remove s1 1;;
+s1 == s2 ;;
+keysToArray s1 = [|2;3|];;
val removeMany : ('k, 'v, 'id) t -> 'k array -> ('k, 'v, 'id) t

removeMany s xs

Removing each of xs to s, note unlike remove, the reference of return value might be changed even if none in xs exists s

val set : ('k, 'v, 'id) t -> 'k -> 'v -> ('k, 'v, 'id) t

set m x y returns a map containing the same bindings as m, with a new binding of x to y. If x was already bound in m, its previous binding disappears.

let s0 =  (fromArray [2,"2"; 1,"1"; 3,"3"] ~id:(module IntCmp));;
+
+let s1 = set s0 2 "3";;
+
+valuesToArray s1 =  ["1";"3";"3"];;
val updateU : + ('k, 'v, 'id) t -> + 'k -> + ('v option -> 'v option) -> + ('k, 'v, 'id) t
val update : + ('k, 'v, 'id) t -> + 'k -> + ('v option -> 'v option) -> + ('k, 'v, 'id) t

update m x f returns a map containing the same bindings as m, except for the binding of x. Depending on the value of y where y is f (get x m), the binding of x is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then x is associated to z in the resulting map.

val mergeMany : ('k, 'v, 'id) t -> ('k * 'v) array -> ('k, 'v, 'id) t

mergeMany s xs

Adding each of xs to s, note unlike add, the reference of return value might be changed even if all values in xs exist s

val mergeU : + ('k, 'v, 'id) t -> + ('k, 'v2, 'id) t -> + ('k -> 'v option -> 'v2 option -> 'v3 option) -> + ('k, 'v3, 'id) t
val merge : + ('k, 'v, 'id) t -> + ('k, 'v2, 'id) t -> + ('k -> 'v option -> 'v2 option -> 'v3 option) -> + ('k, 'v3, 'id) t

merge m1 m2 f computes a map whose keys is a subset of keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f.

val keepU : ('k, 'v, 'id) t -> ('k -> 'v -> bool) -> ('k, 'v, 'id) t
val keep : ('k, 'v, 'id) t -> ('k -> 'v -> bool) -> ('k, 'v, 'id) t

keep m p returns the map with all the bindings in m that satisfy predicate p.

val partitionU : + ('k, 'v, 'id) t -> + ('k -> 'v -> bool) -> + ('k, 'v, 'id) t * ('k, 'v, 'id) t
val partition : + ('k, 'v, 'id) t -> + ('k -> 'v -> bool) -> + ('k, 'v, 'id) t * ('k, 'v, 'id) t

partition m p returns a pair of maps (m1, m2), where m1 contains all the bindings of s that satisfy the predicate p, and m2 is the map with all the bindings of s that do not satisfy p.

val split : + ('k, 'v, 'id) t -> + 'k -> + (('k, 'v, 'id) t * ('k, 'v, 'id) t) * 'v option

split x m returns a tuple (l r), data, where l is the map with all the bindings of m whose 'k is strictly less than x; r is the map with all the bindings of m whose 'k is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

val mapU : ('k, 'v, 'id) t -> ('v -> 'v2) -> ('k, 'v2, 'id) t
val map : ('k, 'v, 'id) t -> ('v -> 'v2) -> ('k, 'v2, 'id) t

map m f returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapWithKeyU : ('k, 'v, 'id) t -> ('k -> 'v -> 'v2) -> ('k, 'v2, 'id) t
val mapWithKey : ('k, 'v, 'id) t -> ('k -> 'v -> 'v2) -> ('k, 'v2, 'id) t

mapWithKey m f

The same as map except that f is supplied with one more argument: the key

val getData : ('k, 'v, 'id) t -> ('k, 'v, 'id) Belt__.Belt_MapDict.t

getData s0

Advanced usage only

  • returns

    the raw data (detached from comparator), but its type is still manifested, so that user can pass identity directly without boxing

val getId : ('k, 'v, 'id) t -> ('k, 'id) id

getId s0

Advanced usage only

  • returns

    the identity of s0

val packIdData : + id:('k, 'id) id -> + data:('k, 'v, 'id) Belt__.Belt_MapDict.t -> + ('k, 'v, 'id) t

packIdData ~id ~data

Advanced usage only

  • returns

    the packed collection

diff --git a/local/server-reason-react/belt/Belt/MutableMap/index.html b/local/server-reason-react/belt/Belt/MutableMap/index.html new file mode 100644 index 000000000..0a58cbd1b --- /dev/null +++ b/local/server-reason-react/belt/Belt/MutableMap/index.html @@ -0,0 +1,5 @@ + +MutableMap (docs.local.server-reason-react.belt.Belt.MutableMap)

Module Belt.MutableMap

Belt.MutableMap

The top level provides generic mutable map operations.

It also has two specialized inner modules Belt.MutableMap.Int and Belt.MutableMap.String

module Int = Belt_MutableMapInt
module String = Belt_MutableMapString

A mutable sorted map module which allows customize compare behavior.

Same as Belt.Map, but mutable.

type ('k, 'v, 'id) t
type ('key, 'id) id = + (module Belt__.Belt_Id.Comparable + with type identity = 'id + and type t = 'key)
val make : id:('k, 'id) id -> ('k, 'a, 'id) t
val clear : (_, _, _) t -> unit
val isEmpty : (_, _, _) t -> bool
val has : ('k, _, _) t -> 'k -> bool
val cmpU : ('k, 'a, 'id) t -> ('k, 'a, 'id) t -> ('a -> 'a -> int) -> int
val cmp : ('k, 'a, 'id) t -> ('k, 'a, 'id) t -> ('a -> 'a -> int) -> int

cmp m1 m2 cmp First compare by size, if size is the same, compare by key, value pair

val eqU : ('k, 'a, 'id) t -> ('k, 'a, 'id) t -> ('a -> 'a -> bool) -> bool
val eq : ('k, 'a, 'id) t -> ('k, 'a, 'id) t -> ('a -> 'a -> bool) -> bool

eq m1 m2 eqf tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. eqf is the equality predicate used to compare the data associated with the keys.

val forEachU : ('k, 'a, 'id) t -> ('k -> 'a -> unit) -> unit
val forEach : ('k, 'a, 'id) t -> ('k -> 'a -> unit) -> unit

forEach m f applies f to all bindings in map m. f receives the 'k as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val reduceU : ('k, 'a, 'id) t -> 'b -> ('b -> 'k -> 'a -> 'b) -> 'b
val reduce : ('k, 'a, 'id) t -> 'b -> ('b -> 'k -> 'a -> 'b) -> 'b

reduce m a f computes (f kN dN ... (f k1 d1 a)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

val everyU : ('k, 'a, 'id) t -> ('k -> 'a -> bool) -> bool
val every : ('k, 'a, 'id) t -> ('k -> 'a -> bool) -> bool

every m p checks if all the bindings of the map satisfy the predicate p.

val someU : ('k, 'a, 'id) t -> ('k -> 'a -> bool) -> bool
val some : ('k, 'a, 'id) t -> ('k -> 'a -> bool) -> bool

some m p checks if at least one binding of the map satisfy the predicate p.

val size : ('k, 'a, 'id) t -> int
val toList : ('k, 'a, 'id) t -> ('k * 'a) list

In increasing order

val toArray : ('k, 'a, 'id) t -> ('k * 'a) array

In increasing order

val fromArray : ('k * 'a) array -> id:('k, 'id) id -> ('k, 'a, 'id) t
val keysToArray : ('k, _, _) t -> 'k array
val valuesToArray : (_, 'a, _) t -> 'a array
val minKey : ('k, _, _) t -> 'k option
val minKeyUndefined : ('k, _, _) t -> 'k Js.undefined
val maxKey : ('k, _, _) t -> 'k option
val maxKeyUndefined : ('k, _, _) t -> 'k Js.undefined
val minimum : ('k, 'a, _) t -> ('k * 'a) option
val minUndefined : ('k, 'a, _) t -> ('k * 'a) Js.undefined
val maximum : ('k, 'a, _) t -> ('k * 'a) option
val maxUndefined : ('k, 'a, _) t -> ('k * 'a) Js.undefined
val get : ('k, 'a, 'id) t -> 'k -> 'a option
val getUndefined : ('k, 'a, 'id) t -> 'k -> 'a Js.undefined
val getWithDefault : ('k, 'a, 'id) t -> 'k -> 'a -> 'a
val getExn : ('k, 'a, 'id) t -> 'k -> 'a
val checkInvariantInternal : (_, _, _) t -> unit

raise when invariant is not held

val remove : ('k, 'a, 'id) t -> 'k -> unit

remove m x do the in-place modification,

val removeMany : ('k, 'a, 'id) t -> 'k array -> unit
val set : ('k, 'a, 'id) t -> 'k -> 'a -> unit

set m x y do the in-place modification

val updateU : ('k, 'a, 'id) t -> 'k -> ('a option -> 'a option) -> unit
val update : ('k, 'a, 'id) t -> 'k -> ('a option -> 'a option) -> unit
val mergeMany : ('k, 'a, 'id) t -> ('k * 'a) array -> unit
val mapU : ('k, 'a, 'id) t -> ('a -> 'b) -> ('k, 'b, 'id) t
val map : ('k, 'a, 'id) t -> ('a -> 'b) -> ('k, 'b, 'id) t

map m f returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapWithKeyU : ('k, 'a, 'id) t -> ('k -> 'a -> 'b) -> ('k, 'b, 'id) t
val mapWithKey : ('k, 'a, 'id) t -> ('k -> 'a -> 'b) -> ('k, 'b, 'id) t
diff --git a/local/server-reason-react/belt/Belt/MutableQueue/index.html b/local/server-reason-react/belt/Belt/MutableQueue/index.html new file mode 100644 index 000000000..75332b9f1 --- /dev/null +++ b/local/server-reason-react/belt/Belt/MutableQueue/index.html @@ -0,0 +1,2 @@ + +MutableQueue (docs.local.server-reason-react.belt.Belt.MutableQueue)

Module Belt.MutableQueue

Belt.MutableQueue

An FIFO(first in first out) queue data structure

First-in first-out queues.

This module implements queues (FIFOs), with in-place modification.

type 'a t

The type of queues containing elements of type 'a.

val make : unit -> 'a t
  • returns

    a new queue, initially empty.

val clear : 'a t -> unit

Discard all elements from the queue.

val isEmpty : 'a t -> bool
  • returns

    true if the given queue is empty, false otherwise.

val fromArray : 'a array -> 'a t

fromArray a is equivalent to Array.forEach a (add q a)

val add : 'a t -> 'a -> unit

add q x adds the element x at the end of the queue q.

val peek : 'a t -> 'a option

peekOpt q returns the first element in queue q, without removing it from the queue.

val peekUndefined : 'a t -> 'a Js.undefined

peekUndefined q returns undefined if not found

val peekExn : 'a t -> 'a

peekExn q

raise an exception if q is empty

val pop : 'a t -> 'a option

pop q removes and returns the first element in queue q.

val popUndefined : 'a t -> 'a Js.undefined

popUndefined q removes and returns the first element in queue q. it will return undefined if it is already empty

val popExn : 'a t -> 'a

popExn q

raise an exception if q is empty

val copy : 'a t -> 'a t

copy q

  • returns

    a fresh queue

val size : 'a t -> int
  • returns

    the number of elements in a queue.

val mapU : 'a t -> ('a -> 'b) -> 'b t
val map : 'a t -> ('a -> 'b) -> 'b t
val forEachU : 'a t -> ('a -> unit) -> unit
val forEach : 'a t -> ('a -> unit) -> unit

forEach q f applies f in turn to all elements of q, from the least recently entered to the most recently entered. The queue itself is unchanged.

val reduceU : 'a t -> 'b -> ('b -> 'a -> 'b) -> 'b
val reduce : 'a t -> 'b -> ('b -> 'a -> 'b) -> 'b

reduce q accu f is equivalent to List.reduce l accu f, where l is the list of q's elements. The queue remains unchanged.

val transfer : 'a t -> 'a t -> unit

transfer q1 q2 adds all of q1's elements at the end of the queue q2, then clears q1. It is equivalent to the sequence forEach (fun x -> add x q2) q1; clear q1, but runs in constant time.

val toArray : 'a t -> 'a array

First added will be in the beginning of the array

diff --git a/local/server-reason-react/belt/Belt/MutableSet/A/index.html b/local/server-reason-react/belt/Belt/MutableSet/A/index.html new file mode 100644 index 000000000..7b9dc90af --- /dev/null +++ b/local/server-reason-react/belt/Belt/MutableSet/A/index.html @@ -0,0 +1,80 @@ + +A (docs.local.server-reason-react.belt.Belt.MutableSet.A)

Module MutableSet.A

Belt.Array Utililites for Array functions

type 'a t = 'a array
val length : 'a t -> int

length xs return the size of the array

val size : 'a t -> int

See length

val get : 'a t -> int -> 'a option

get arr i

If i <= 0 <= length arr;returns Some value where value is the item at index i If i is out of range;returns None

Belt.Array.get [|"a";"b";"c"|] 0 = Some "a";;
+Belt.Array.get [|"a";"b";"c"|] 3 = None;;
+Belt.Array.get [|"a";"b";"c"|] (-1) = None;;
val getExn : 'a t -> int -> 'a

getExn arr i

raise an exception if i is out of range;otherwise return the value at index i in arr

val getUnsafe : 'a t -> int -> 'a

getUnsafe arr i

Unsafe

no bounds checking;this would cause type error if i does not stay within range

val getUndefined : 'a t -> int -> 'a option

getUndefined arr i

It does the samething in the runtime as getUnsafe; it is type safe since the return type still track whether it is in range or not

val set : 'a t -> int -> 'a -> bool

set arr n x modifies arr in place; it replaces the nth element of arr with x

  • returns

    false means not updated due to out of range

val setExn : 'a t -> int -> 'a -> unit

setExn arr i x raise an exception if i is out of range

val setUnsafe : 'a t -> int -> 'a -> unit
val shuffleInPlace : 'a t -> unit

shuffleInPlace arr randomly re-orders the items in arr

val shuffle : 'a t -> 'a t

shuffle xs

  • returns

    a fresh array with items in original array randomly shuffled

val reverseInPlace : 'a t -> unit

reverseInPlace arr reverses items in arr in place

let arr = [|10;11;12;13;14|];;
+let () = reverseInPlace arr;;
+arr = [|14;13;12;11;10|];;
val reverse : 'a t -> 'a t

reverse arr

  • returns

    a fresh array with items in arr in reverse order

    reverse [|10;11;12;13;14|] = [|14;13;12;11;10|];;
val makeUninitialized : int -> 'a option array

makeUninitialized n creates an array of length n filled with the undefined value. You must specify the type of data that will eventually fill the array.

let arr: string Js.undefined array = makeUninitialized 5;;
+getExn arr 0 = Js.undefined;;
val makeUninitializedUnsafe : int -> 'a -> 'a array

`makeUninitializedUnsafe n`

Unsafe

let arr = Belt.Array.makeUninitializedUnsafe 5;;
+let () = Js.log(Belt.Array.getExn arr 0);; (* undefined *)
+Belt.Array.setExn arr 0 "example";;
+let () = Js.log(Belt.Array.getExn arr 0 = "example");;
val make : int -> 'a -> 'a t

make n e return an array of size n filled with value e

  • returns

    an empty array when n is negative.

val range : int -> int -> int t

range start finish create an inclusive array

range 0 3 =  [|0;1;2;3|];;
+range 3 0 =  [||] ;;
+range 3 3 = [|3|];;
val rangeBy : int -> int -> step:int -> int t

rangeBy start finish ~step

  • returns

    empty array when step is 0 or negative it also return empty array when start > finish

    rangeBy 0 10 ~step:3 = [|0;3;6;9|];;
    +rangeBy 0 12 ~step:3 = [|0;3;6;9;12|];;
    +rangeBy 33 0 ~step:1 =  [||];;
    +rangeBy 33 0 ~step:(-1) = [||];;
    +rangeBy 3 12 ~step:(-1) = [||];;
    +rangeBy 3 3 ~step:0 = [||] ;;
    +rangeBy 3 3 ~step:(1) = [|3|] ;;
val makeByU : int -> (int -> 'a) -> 'a t
val makeBy : int -> (int -> 'a) -> 'a t

makeBy n f

return an empty array when n is negative return an array of size n populated by f i start from 0 to n - 1

makeBy 5 (fun i -> i) = [|0;1;2;3;4|];;
+makeBy 5 (fun i -> i * i) = [|0;1;4;9;16|]
val makeByAndShuffleU : int -> (int -> 'a) -> 'a t
val makeByAndShuffle : int -> (int -> 'a) -> 'a t

makeByAndShuffle n f

Equivalent to shuffle (makeBy n f)

val zip : 'a t -> 'b array -> ('a * 'b) array

zip a b

Create an array of pairs from corresponding elements of a and b. Stop with the shorter array

zip [|1;2|] [|3;4;5|] = [|(1, 3);(2, 4)|]
val zipByU : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array
val zipBy : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array

zipBy xs ys f

Create an array by applying f to corresponding elements of xs and ys Stops with shorter array

Equivalent to map (zip xs ys) (fun (a,b) -> f a b)

zipBy [|1;2;3|] [|4;5|] (fun a b -> 2 * a + b) = [|6;9|];;
val unzip : ('a * 'b) array -> 'a t * 'b array

unzip a takes an array of pairs and creates a pair of arrays. The first array contains all the first items of the pairs; the second array contains all the second items.

unzip [|(1,2) ; (3,4)|] = ([|1;3|], [|2;4|]);;
+unzip [|(1,2) ; (3,4) ; (5,6) ; (7,8)|] = ([|1;3;5;7|], [|2;4;6;8|]);;
val concat : 'a t -> 'a t -> 'a t

concat xs ys

  • returns

    a fresh array containing the concatenation of the arrays v1 and v2;so even if v1 or v2 is empty;it can not be shared

    concat [|1;2;3|] [|4;5|] = [|1;2;3;4;5|];;
    +concat [| |] [|"a";"b";"c"|] = [|"a";"b";"c"|];;
val concatMany : 'a t t -> 'a t

concatMany xss

  • returns

    a fresh array as the concatenation of xss (an array of arrays)

    concatMany [| [|1;2;3|]; [|4;5;6|]; [|7;8|] |] = [|1;2;3;4;5;6;7;8|];;
val slice : 'a t -> offset:int -> len:int -> 'a t

slice xs offset len creates a new array with the len elements of xs starting at offset for

offset can be negative;and is evaluated as length xs - offset slice xs -1 1 means get the last element as a singleton array

slice xs (-len) len will return a copy of the array

if the array does not have enough data;slice extracts through the end of sequence.

if len is negative;returns the empty array.

slice [|10;11;12;13;14;15;16|] ~offset: 2 ~len: 3 = [|12;13;14|];;
+slice [|10;11;12;13;14;15;16|] ~offset: (-4) ~len: 3 = [|13;14;15|];;
+slice [|10;11;12;13;14;15;16|] ~offset:4  ~len:9 = [|14;15;16|];;
val sliceToEnd : 'a t -> int -> 'a t

sliceToEnd xs offset creates a new array with the elements of xs starting at offset

offset can be negative;and is evaluated as length xs - offset sliceToEnd xs -1 means get the last element as a singleton array

sliceToEnd xs 0 will return a copy of the array

sliceToEnd [|10;11;12;13;14;15;16|] 2 = [|12;13;14;15;16|];;
+sliceToEnd [|10;11;12;13;14;15;16|] (-4) = [|13;14;15;16|];;
val copy : 'a t -> 'a t

copy a

  • returns

    a copy of a;that is;a fresh array containing the same elements as a.

val fill : 'a t -> offset:int -> len:int -> 'a -> unit

fill arr ~offset ~len x

Modifies arr in place, storing x in elements number offset to offset + len - 1.

offset can be negative;and is evaluated as length arr - offset

fill arr ~offset:(-1) ~len:1 means fill the last element, if the array does not have enough data;fill will ignore it

let arr = makeBy 5 (fun i -> i) ;;
+fill arr ~offset:2 ~len:2 9 ;;
+arr = [|0;1;9;9;4|];;
+fill arr ~offset:7 ~len:2 8;;
+arr = [|0;1;9;9;4|];;
val blit : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

blit ~src:v1 ~srcOffset:o1 ~dst:v2 ~dstOffset:o2 ~len

copies len elements from array v1;starting at element number o1;to array v2, starting at element number o2.

It works correctly even if v1 and v2 are the same array;and the source and destination chunks overlap.

offset can be negative;-1 means len - 1;if len + offset is still negative;it will be set as 0

For each of the examples;presume that v1 = [|10;11;12;13;14;15;16;17|] and v2 = [|20;21;22;23;24;25;26;27|]. The result shown is the content of the destination array.

Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v2 ~dstOffset: 2 ~len: 3 |.
+  [|20;21;14;15;16;25;26;27|]
+Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v1 ~dstOffset: 2 ~len: 3 |.
+  [|10;11;14;15;16;15;16;17|]
val blitUnsafe : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

Unsafe blit without bounds checking

val forEachU : 'a t -> ('a -> unit) -> unit
val forEach : 'a t -> ('a -> unit) -> unit

forEach xs f

Call f on each element of xs from the beginning to end. f returns unit;so no new array is created. Use forEach when you are primarily concerned with repetitively creating side effects.

forEach [|"a";"b";"c"|] (fun x -> Js.log("Item: " ^ x));;
+(*  prints:
+  Item: a
+  Item: b
+  Item: c
+*)
+
+let total = ref 0;;
+forEach [|1;2;3;4|] (fun x -> total := !total + x);;
+!total  = 1 + 2 + 3 + 4;;
val mapU : 'a t -> ('a -> 'b) -> 'b array
val map : 'a t -> ('a -> 'b) -> 'b array

map xs f

  • returns

    a new array by calling f for each element of xs from the beginning to end

    map [|1;2|] (fun x-> x + 10) = [|11;12|]
val flatMapU : 'a t -> ('a -> 'b t) -> 'b t
val flatMap : 'a t -> ('a -> 'b t) -> 'b t

flatMap xs f **return** a new array by calling `f` for each element of `xs` from the beginning to end, and then concatenating the results ``` flatMap |1;2| (fun x-> |x + 10;x + 20|) = |11;21;12;22| ```

val getByU : 'a t -> ('a -> bool) -> 'a option
val getBy : 'a t -> ('a -> bool) -> 'a option

getBy xs p returns Some value for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 4
+getBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val getIndexByU : 'a t -> ('a -> bool) -> int option
val getIndexBy : 'a t -> ('a -> bool) -> int option

getIndexBy xs p returns Some index for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getIndexBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 1
+getIndexBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val keepU : 'a t -> ('a -> bool) -> 'a t
val keep : 'a t -> ('a -> bool) -> 'a t

keep xs p

  • returns

    a new array that keeps all elements satisfying p

    keep [|1;2;3|] (fun x -> x mod  2 = 0) = [|2|]
val keepWithIndexU : 'a t -> ('a -> int -> bool) -> 'a t
val keepWithIndex : 'a t -> ('a -> int -> bool) -> 'a t

keepWithIndex xs p

  • returns

    a new array that keeps all elements satisfying p. The predicate p takes two arguments: the element from xs and the index starting from 0.

    keepWithIndex [|1;2;3|] (fun _x i -> i = 1) = [|2|]
val keepMapU : 'a t -> ('a -> 'b option) -> 'b array
val keepMap : 'a t -> ('a -> 'b option) -> 'b array

keepMap xs p

  • returns

    a new array that keeps all elements that return a non-None when applied to p

    keepMap [|1;2;3|] (fun x -> if x mod 2 = 0 then Some x else None)
    += [| 2 |]
val forEachWithIndexU : 'a t -> (int -> 'a -> unit) -> unit
val forEachWithIndex : 'a t -> (int -> 'a -> unit) -> unit

forEachWithIndex xs f

The same as forEach; except that f is supplied with two arguments: the index starting from 0 and the element from xs

forEachWithIndex [|"a";"b";"c"|] (fun i x -> Js.log("Item " ^ (string_of_int i) ^ " is " ^ x));;
+(*  prints:
+  Item 0 is a
+  Item 1 is b
+  Item 2 is c
+*)
+
+let total = ref 0 ;;
+forEachWithIndex [|10;11;12;13|] (fun i x -> total := !total + x + i);;
+!total  = 0 + 10 + 1 +  11 + 2 + 12 + 3 + 13;;
val mapWithIndexU : 'a t -> (int -> 'a -> 'b) -> 'b t
val mapWithIndex : 'a t -> (int -> 'a -> 'b) -> 'b t

mapWithIndex xs f applies f to each element of xs. Function f takes two arguments: the index starting from 0 and the element from xs.

mapWithIndex [|1;2;3|] (fun i x -> i + x) =
+[|0 + 1; 1 + 2; 2 + 3|]
val partitionU : 'a t -> ('a -> bool) -> 'a t * 'a t
val partition : 'a t -> ('a -> bool) -> 'a t * 'a t

partition f a split array into tuple of two arrays based on predicate f; first of tuple where predicate cause true, second where predicate cause false

partition [|1;2;3;4;5|] (fun x -> x mod 2 = 0  ) = ([|2;4|], [|1;2;3|]);;
+partition [|1;2;3;4;5|] (fun x -> x mod 2 <> 0 ) = ([|1;2;3|], [|2;4|]);;
val reduceU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduce : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduce xs init f

Applies f to each element of xs from beginning to end. Function f has two parameters: the item from the list and an “accumulator”;which starts with a value of init. reduce returns the final value of the accumulator.

reduce [|2;3;4|] 1 (+) = 10;;
+reduce [|"a";"b";"c";"d"|] "" (^) = "abcd";;
val reduceReverseU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduceReverse : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduceReverse xs init f

Works like reduce;except that function f is applied to each item of xs from the last back to the first.

reduceReverse [|"a";"b";"c";"d"|] "" (^) = "dcba";;
val reduceReverse2U : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val reduceReverse2 : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c

reduceReverse2 xs ys init f Reduces two arrays xs and ys;taking items starting at min (length xs) (length ys) down to and including zero.

reduceReverse2 [|1;2;3|] [|1;2|] 0 (fun acc x y -> acc + x + y) = 6
val reduceWithIndexU : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b
val reduceWithIndex : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b

reduceWithIndex xs f

Applies f to each element of xs from beginning to end. Function f has three parameters: the item from the array and an “accumulator”, which starts with a value of init and the index of each element. reduceWithIndex returns the final value of the accumulator.

reduceWithIndex [|1;2;3;4|] 0 (fun acc x i -> acc + x + i) = 16;
val joinWithU : 'a t -> string -> ('a -> string) -> string
val joinWith : 'a t -> string -> ('a -> string) -> string

joinWith xs sep toString

Concatenates all the elements of xs converted to string with toString, each separated by sep, the string given as the second argument, into a single string. If the array has only one element, then that element will be returned without using the separator. If the array is empty, the empty string will be returned.

joinWith [|0; 1|] ", " string_of_int = "0, 1"
+joinWith [||] " " string_of_int = ""
+joinWith [|1|] " " string_of_int = "1"
val someU : 'a t -> ('a -> bool) -> bool
val some : 'a t -> ('a -> bool) -> bool

some xs p

  • returns

    true if at least one of the elements in xs satifies p;where p is a predicate: a function taking an element and returning a bool.

    some [|2; 3; 4|] (fun x -> x mod 2 = 1) = true;;
    +some [|-1; -3; -5|] (fun x -> x > 0) = false;;
val everyU : 'a t -> ('a -> bool) -> bool
val every : 'a t -> ('a -> bool) -> bool

every xs p

  • returns

    true if all elements satisfy p;where p is a predicate: a function taking an element and returning a bool.

    every [|1; 3; 5|] (fun x -> x mod 2 = 1) = true;;
    +every [|1; -3; 5|] (fun x -> x > 0) = false;;
val every2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val every2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

every2 xs ys p returns true if p xi yi is true for all pairs of elements up to the shorter length (i.e. min (length xs) (length ys))

every2 [|1;2;3|] [|0;1|] (>) = true;;
+every2 [||] [|1|] (fun  x y -> x > y) = true;;
+every2 [|2;3|] [|1|] (fun  x y -> x > y) = true;;
+every2 [|0;1|] [|5;0|] (fun x y -> x > y) = false;
val some2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val some2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

some2 xs ys p returns true if p xi yi is true for any pair of elements up to the shorter length (i.e. min (length xs) (length ys))

some2 [|0;2|] [|1;0;3|] (>) = true ;;
+(some2 [||] [|1|] (fun   x y -> x > y)) =  false;;
+(some2 [|2;3|] [|1;4|] (fun   x y -> x > y)) = true;;
val cmpU : 'a t -> 'a t -> ('a -> 'a -> int) -> int
val cmp : 'a t -> 'a t -> ('a -> 'a -> int) -> int

cmp xs ys f

  • Compared by length if length xs <> length ys;returning -1 iflength xs < length ys or 1 if length xs > length ys
  • Otherwise compare one by one f x y. f returns
  • a negative number if x is “less than” y
  • zero if x is “equal to” y
  • a positive number if x is “greater than” y
  • The comparison returns the first non-zero result of f;or zero if f returns zero for all x and y.
cmp [|1; 3; 5|] [|1; 4; 2|] (fun a b -> compare a b) = -1;;
+cmp [|1; 3; 5|] [|1; 2; 3|] (fun a b -> compare a b) = 1;;
+cmp [|1; 3; 5|] [|1; 3; 5|] (fun a b -> compare a b) = 0;;
val eqU : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool
val eq : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool

eq xs ys

  • return false if length is not the same
  • otherwise compare items one by one using f xi yi;and return true if all results are true;false otherwise
eq [|1; 2; 3|] [|-1; -2; -3|] (fun a b -> abs a = abs b) = true
val truncateToLengthUnsafe : 'a t -> int -> 'a t

Unsafe truncateToLengthUnsafe xs n sets length of array xs to n.

If n is greater than the length of xs;the extra elements are set to Js.Null_undefined.null

If n is less than zero;raises a RangeError.

let arr = [|"ant";"bee";"cat";"dog";"elk"|];;
+let () = truncateToLengthUnsafe arr 3;;
+arr = [|"ant";"bee";"cat"|];;
val initU : int -> (int -> 'a) -> 'a t
val init : int -> (int -> 'a) -> 'a t
val push : 'a t -> 'a -> [ `Do_not_use_Array_push_in_native ]

Using Belt.Array.push in native isn't a good idea, since OCaml's Array are fixed length and can't resize the same way as JavaScript arrays.

diff --git a/local/server-reason-react/belt/Belt/MutableSet/N/A/index.html b/local/server-reason-react/belt/Belt/MutableSet/N/A/index.html new file mode 100644 index 000000000..df0dd6394 --- /dev/null +++ b/local/server-reason-react/belt/Belt/MutableSet/N/A/index.html @@ -0,0 +1,80 @@ + +A (docs.local.server-reason-react.belt.Belt.MutableSet.N.A)

Module N.A

Belt.Array Utililites for Array functions

type 'a t = 'a array
val length : 'a t -> int

length xs return the size of the array

val size : 'a t -> int

See length

val get : 'a t -> int -> 'a option

get arr i

If i <= 0 <= length arr;returns Some value where value is the item at index i If i is out of range;returns None

Belt.Array.get [|"a";"b";"c"|] 0 = Some "a";;
+Belt.Array.get [|"a";"b";"c"|] 3 = None;;
+Belt.Array.get [|"a";"b";"c"|] (-1) = None;;
val getExn : 'a t -> int -> 'a

getExn arr i

raise an exception if i is out of range;otherwise return the value at index i in arr

val getUnsafe : 'a t -> int -> 'a

getUnsafe arr i

Unsafe

no bounds checking;this would cause type error if i does not stay within range

val getUndefined : 'a t -> int -> 'a option

getUndefined arr i

It does the samething in the runtime as getUnsafe; it is type safe since the return type still track whether it is in range or not

val set : 'a t -> int -> 'a -> bool

set arr n x modifies arr in place; it replaces the nth element of arr with x

  • returns

    false means not updated due to out of range

val setExn : 'a t -> int -> 'a -> unit

setExn arr i x raise an exception if i is out of range

val setUnsafe : 'a t -> int -> 'a -> unit
val shuffleInPlace : 'a t -> unit

shuffleInPlace arr randomly re-orders the items in arr

val shuffle : 'a t -> 'a t

shuffle xs

  • returns

    a fresh array with items in original array randomly shuffled

val reverseInPlace : 'a t -> unit

reverseInPlace arr reverses items in arr in place

let arr = [|10;11;12;13;14|];;
+let () = reverseInPlace arr;;
+arr = [|14;13;12;11;10|];;
val reverse : 'a t -> 'a t

reverse arr

  • returns

    a fresh array with items in arr in reverse order

    reverse [|10;11;12;13;14|] = [|14;13;12;11;10|];;
val makeUninitialized : int -> 'a option array

makeUninitialized n creates an array of length n filled with the undefined value. You must specify the type of data that will eventually fill the array.

let arr: string Js.undefined array = makeUninitialized 5;;
+getExn arr 0 = Js.undefined;;
val makeUninitializedUnsafe : int -> 'a -> 'a array

`makeUninitializedUnsafe n`

Unsafe

let arr = Belt.Array.makeUninitializedUnsafe 5;;
+let () = Js.log(Belt.Array.getExn arr 0);; (* undefined *)
+Belt.Array.setExn arr 0 "example";;
+let () = Js.log(Belt.Array.getExn arr 0 = "example");;
val make : int -> 'a -> 'a t

make n e return an array of size n filled with value e

  • returns

    an empty array when n is negative.

val range : int -> int -> int t

range start finish create an inclusive array

range 0 3 =  [|0;1;2;3|];;
+range 3 0 =  [||] ;;
+range 3 3 = [|3|];;
val rangeBy : int -> int -> step:int -> int t

rangeBy start finish ~step

  • returns

    empty array when step is 0 or negative it also return empty array when start > finish

    rangeBy 0 10 ~step:3 = [|0;3;6;9|];;
    +rangeBy 0 12 ~step:3 = [|0;3;6;9;12|];;
    +rangeBy 33 0 ~step:1 =  [||];;
    +rangeBy 33 0 ~step:(-1) = [||];;
    +rangeBy 3 12 ~step:(-1) = [||];;
    +rangeBy 3 3 ~step:0 = [||] ;;
    +rangeBy 3 3 ~step:(1) = [|3|] ;;
val makeByU : int -> (int -> 'a) -> 'a t
val makeBy : int -> (int -> 'a) -> 'a t

makeBy n f

return an empty array when n is negative return an array of size n populated by f i start from 0 to n - 1

makeBy 5 (fun i -> i) = [|0;1;2;3;4|];;
+makeBy 5 (fun i -> i * i) = [|0;1;4;9;16|]
val makeByAndShuffleU : int -> (int -> 'a) -> 'a t
val makeByAndShuffle : int -> (int -> 'a) -> 'a t

makeByAndShuffle n f

Equivalent to shuffle (makeBy n f)

val zip : 'a t -> 'b array -> ('a * 'b) array

zip a b

Create an array of pairs from corresponding elements of a and b. Stop with the shorter array

zip [|1;2|] [|3;4;5|] = [|(1, 3);(2, 4)|]
val zipByU : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array
val zipBy : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array

zipBy xs ys f

Create an array by applying f to corresponding elements of xs and ys Stops with shorter array

Equivalent to map (zip xs ys) (fun (a,b) -> f a b)

zipBy [|1;2;3|] [|4;5|] (fun a b -> 2 * a + b) = [|6;9|];;
val unzip : ('a * 'b) array -> 'a t * 'b array

unzip a takes an array of pairs and creates a pair of arrays. The first array contains all the first items of the pairs; the second array contains all the second items.

unzip [|(1,2) ; (3,4)|] = ([|1;3|], [|2;4|]);;
+unzip [|(1,2) ; (3,4) ; (5,6) ; (7,8)|] = ([|1;3;5;7|], [|2;4;6;8|]);;
val concat : 'a t -> 'a t -> 'a t

concat xs ys

  • returns

    a fresh array containing the concatenation of the arrays v1 and v2;so even if v1 or v2 is empty;it can not be shared

    concat [|1;2;3|] [|4;5|] = [|1;2;3;4;5|];;
    +concat [| |] [|"a";"b";"c"|] = [|"a";"b";"c"|];;
val concatMany : 'a t t -> 'a t

concatMany xss

  • returns

    a fresh array as the concatenation of xss (an array of arrays)

    concatMany [| [|1;2;3|]; [|4;5;6|]; [|7;8|] |] = [|1;2;3;4;5;6;7;8|];;
val slice : 'a t -> offset:int -> len:int -> 'a t

slice xs offset len creates a new array with the len elements of xs starting at offset for

offset can be negative;and is evaluated as length xs - offset slice xs -1 1 means get the last element as a singleton array

slice xs (-len) len will return a copy of the array

if the array does not have enough data;slice extracts through the end of sequence.

if len is negative;returns the empty array.

slice [|10;11;12;13;14;15;16|] ~offset: 2 ~len: 3 = [|12;13;14|];;
+slice [|10;11;12;13;14;15;16|] ~offset: (-4) ~len: 3 = [|13;14;15|];;
+slice [|10;11;12;13;14;15;16|] ~offset:4  ~len:9 = [|14;15;16|];;
val sliceToEnd : 'a t -> int -> 'a t

sliceToEnd xs offset creates a new array with the elements of xs starting at offset

offset can be negative;and is evaluated as length xs - offset sliceToEnd xs -1 means get the last element as a singleton array

sliceToEnd xs 0 will return a copy of the array

sliceToEnd [|10;11;12;13;14;15;16|] 2 = [|12;13;14;15;16|];;
+sliceToEnd [|10;11;12;13;14;15;16|] (-4) = [|13;14;15;16|];;
val copy : 'a t -> 'a t

copy a

  • returns

    a copy of a;that is;a fresh array containing the same elements as a.

val fill : 'a t -> offset:int -> len:int -> 'a -> unit

fill arr ~offset ~len x

Modifies arr in place, storing x in elements number offset to offset + len - 1.

offset can be negative;and is evaluated as length arr - offset

fill arr ~offset:(-1) ~len:1 means fill the last element, if the array does not have enough data;fill will ignore it

let arr = makeBy 5 (fun i -> i) ;;
+fill arr ~offset:2 ~len:2 9 ;;
+arr = [|0;1;9;9;4|];;
+fill arr ~offset:7 ~len:2 8;;
+arr = [|0;1;9;9;4|];;
val blit : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

blit ~src:v1 ~srcOffset:o1 ~dst:v2 ~dstOffset:o2 ~len

copies len elements from array v1;starting at element number o1;to array v2, starting at element number o2.

It works correctly even if v1 and v2 are the same array;and the source and destination chunks overlap.

offset can be negative;-1 means len - 1;if len + offset is still negative;it will be set as 0

For each of the examples;presume that v1 = [|10;11;12;13;14;15;16;17|] and v2 = [|20;21;22;23;24;25;26;27|]. The result shown is the content of the destination array.

Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v2 ~dstOffset: 2 ~len: 3 |.
+  [|20;21;14;15;16;25;26;27|]
+Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v1 ~dstOffset: 2 ~len: 3 |.
+  [|10;11;14;15;16;15;16;17|]
val blitUnsafe : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

Unsafe blit without bounds checking

val forEachU : 'a t -> ('a -> unit) -> unit
val forEach : 'a t -> ('a -> unit) -> unit

forEach xs f

Call f on each element of xs from the beginning to end. f returns unit;so no new array is created. Use forEach when you are primarily concerned with repetitively creating side effects.

forEach [|"a";"b";"c"|] (fun x -> Js.log("Item: " ^ x));;
+(*  prints:
+  Item: a
+  Item: b
+  Item: c
+*)
+
+let total = ref 0;;
+forEach [|1;2;3;4|] (fun x -> total := !total + x);;
+!total  = 1 + 2 + 3 + 4;;
val mapU : 'a t -> ('a -> 'b) -> 'b array
val map : 'a t -> ('a -> 'b) -> 'b array

map xs f

  • returns

    a new array by calling f for each element of xs from the beginning to end

    map [|1;2|] (fun x-> x + 10) = [|11;12|]
val flatMapU : 'a t -> ('a -> 'b t) -> 'b t
val flatMap : 'a t -> ('a -> 'b t) -> 'b t

flatMap xs f **return** a new array by calling `f` for each element of `xs` from the beginning to end, and then concatenating the results ``` flatMap |1;2| (fun x-> |x + 10;x + 20|) = |11;21;12;22| ```

val getByU : 'a t -> ('a -> bool) -> 'a option
val getBy : 'a t -> ('a -> bool) -> 'a option

getBy xs p returns Some value for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 4
+getBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val getIndexByU : 'a t -> ('a -> bool) -> int option
val getIndexBy : 'a t -> ('a -> bool) -> int option

getIndexBy xs p returns Some index for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getIndexBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 1
+getIndexBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val keepU : 'a t -> ('a -> bool) -> 'a t
val keep : 'a t -> ('a -> bool) -> 'a t

keep xs p

  • returns

    a new array that keeps all elements satisfying p

    keep [|1;2;3|] (fun x -> x mod  2 = 0) = [|2|]
val keepWithIndexU : 'a t -> ('a -> int -> bool) -> 'a t
val keepWithIndex : 'a t -> ('a -> int -> bool) -> 'a t

keepWithIndex xs p

  • returns

    a new array that keeps all elements satisfying p. The predicate p takes two arguments: the element from xs and the index starting from 0.

    keepWithIndex [|1;2;3|] (fun _x i -> i = 1) = [|2|]
val keepMapU : 'a t -> ('a -> 'b option) -> 'b array
val keepMap : 'a t -> ('a -> 'b option) -> 'b array

keepMap xs p

  • returns

    a new array that keeps all elements that return a non-None when applied to p

    keepMap [|1;2;3|] (fun x -> if x mod 2 = 0 then Some x else None)
    += [| 2 |]
val forEachWithIndexU : 'a t -> (int -> 'a -> unit) -> unit
val forEachWithIndex : 'a t -> (int -> 'a -> unit) -> unit

forEachWithIndex xs f

The same as forEach; except that f is supplied with two arguments: the index starting from 0 and the element from xs

forEachWithIndex [|"a";"b";"c"|] (fun i x -> Js.log("Item " ^ (string_of_int i) ^ " is " ^ x));;
+(*  prints:
+  Item 0 is a
+  Item 1 is b
+  Item 2 is c
+*)
+
+let total = ref 0 ;;
+forEachWithIndex [|10;11;12;13|] (fun i x -> total := !total + x + i);;
+!total  = 0 + 10 + 1 +  11 + 2 + 12 + 3 + 13;;
val mapWithIndexU : 'a t -> (int -> 'a -> 'b) -> 'b t
val mapWithIndex : 'a t -> (int -> 'a -> 'b) -> 'b t

mapWithIndex xs f applies f to each element of xs. Function f takes two arguments: the index starting from 0 and the element from xs.

mapWithIndex [|1;2;3|] (fun i x -> i + x) =
+[|0 + 1; 1 + 2; 2 + 3|]
val partitionU : 'a t -> ('a -> bool) -> 'a t * 'a t
val partition : 'a t -> ('a -> bool) -> 'a t * 'a t

partition f a split array into tuple of two arrays based on predicate f; first of tuple where predicate cause true, second where predicate cause false

partition [|1;2;3;4;5|] (fun x -> x mod 2 = 0  ) = ([|2;4|], [|1;2;3|]);;
+partition [|1;2;3;4;5|] (fun x -> x mod 2 <> 0 ) = ([|1;2;3|], [|2;4|]);;
val reduceU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduce : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduce xs init f

Applies f to each element of xs from beginning to end. Function f has two parameters: the item from the list and an “accumulator”;which starts with a value of init. reduce returns the final value of the accumulator.

reduce [|2;3;4|] 1 (+) = 10;;
+reduce [|"a";"b";"c";"d"|] "" (^) = "abcd";;
val reduceReverseU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduceReverse : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduceReverse xs init f

Works like reduce;except that function f is applied to each item of xs from the last back to the first.

reduceReverse [|"a";"b";"c";"d"|] "" (^) = "dcba";;
val reduceReverse2U : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val reduceReverse2 : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c

reduceReverse2 xs ys init f Reduces two arrays xs and ys;taking items starting at min (length xs) (length ys) down to and including zero.

reduceReverse2 [|1;2;3|] [|1;2|] 0 (fun acc x y -> acc + x + y) = 6
val reduceWithIndexU : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b
val reduceWithIndex : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b

reduceWithIndex xs f

Applies f to each element of xs from beginning to end. Function f has three parameters: the item from the array and an “accumulator”, which starts with a value of init and the index of each element. reduceWithIndex returns the final value of the accumulator.

reduceWithIndex [|1;2;3;4|] 0 (fun acc x i -> acc + x + i) = 16;
val joinWithU : 'a t -> string -> ('a -> string) -> string
val joinWith : 'a t -> string -> ('a -> string) -> string

joinWith xs sep toString

Concatenates all the elements of xs converted to string with toString, each separated by sep, the string given as the second argument, into a single string. If the array has only one element, then that element will be returned without using the separator. If the array is empty, the empty string will be returned.

joinWith [|0; 1|] ", " string_of_int = "0, 1"
+joinWith [||] " " string_of_int = ""
+joinWith [|1|] " " string_of_int = "1"
val someU : 'a t -> ('a -> bool) -> bool
val some : 'a t -> ('a -> bool) -> bool

some xs p

  • returns

    true if at least one of the elements in xs satifies p;where p is a predicate: a function taking an element and returning a bool.

    some [|2; 3; 4|] (fun x -> x mod 2 = 1) = true;;
    +some [|-1; -3; -5|] (fun x -> x > 0) = false;;
val everyU : 'a t -> ('a -> bool) -> bool
val every : 'a t -> ('a -> bool) -> bool

every xs p

  • returns

    true if all elements satisfy p;where p is a predicate: a function taking an element and returning a bool.

    every [|1; 3; 5|] (fun x -> x mod 2 = 1) = true;;
    +every [|1; -3; 5|] (fun x -> x > 0) = false;;
val every2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val every2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

every2 xs ys p returns true if p xi yi is true for all pairs of elements up to the shorter length (i.e. min (length xs) (length ys))

every2 [|1;2;3|] [|0;1|] (>) = true;;
+every2 [||] [|1|] (fun  x y -> x > y) = true;;
+every2 [|2;3|] [|1|] (fun  x y -> x > y) = true;;
+every2 [|0;1|] [|5;0|] (fun x y -> x > y) = false;
val some2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val some2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

some2 xs ys p returns true if p xi yi is true for any pair of elements up to the shorter length (i.e. min (length xs) (length ys))

some2 [|0;2|] [|1;0;3|] (>) = true ;;
+(some2 [||] [|1|] (fun   x y -> x > y)) =  false;;
+(some2 [|2;3|] [|1;4|] (fun   x y -> x > y)) = true;;
val cmpU : 'a t -> 'a t -> ('a -> 'a -> int) -> int
val cmp : 'a t -> 'a t -> ('a -> 'a -> int) -> int

cmp xs ys f

  • Compared by length if length xs <> length ys;returning -1 iflength xs < length ys or 1 if length xs > length ys
  • Otherwise compare one by one f x y. f returns
  • a negative number if x is “less than” y
  • zero if x is “equal to” y
  • a positive number if x is “greater than” y
  • The comparison returns the first non-zero result of f;or zero if f returns zero for all x and y.
cmp [|1; 3; 5|] [|1; 4; 2|] (fun a b -> compare a b) = -1;;
+cmp [|1; 3; 5|] [|1; 2; 3|] (fun a b -> compare a b) = 1;;
+cmp [|1; 3; 5|] [|1; 3; 5|] (fun a b -> compare a b) = 0;;
val eqU : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool
val eq : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool

eq xs ys

  • return false if length is not the same
  • otherwise compare items one by one using f xi yi;and return true if all results are true;false otherwise
eq [|1; 2; 3|] [|-1; -2; -3|] (fun a b -> abs a = abs b) = true
val truncateToLengthUnsafe : 'a t -> int -> 'a t

Unsafe truncateToLengthUnsafe xs n sets length of array xs to n.

If n is greater than the length of xs;the extra elements are set to Js.Null_undefined.null

If n is less than zero;raises a RangeError.

let arr = [|"ant";"bee";"cat";"dog";"elk"|];;
+let () = truncateToLengthUnsafe arr 3;;
+arr = [|"ant";"bee";"cat"|];;
val initU : int -> (int -> 'a) -> 'a t
val init : int -> (int -> 'a) -> 'a t
val push : 'a t -> 'a -> [ `Do_not_use_Array_push_in_native ]

Using Belt.Array.push in native isn't a good idea, since OCaml's Array are fixed length and can't resize the same way as JavaScript arrays.

diff --git a/local/server-reason-react/belt/Belt/MutableSet/N/S/index.html b/local/server-reason-react/belt/Belt/MutableSet/N/S/index.html new file mode 100644 index 000000000..0e3cbb0d8 --- /dev/null +++ b/local/server-reason-react/belt/Belt/MutableSet/N/S/index.html @@ -0,0 +1,6 @@ + +S (docs.local.server-reason-react.belt.Belt.MutableSet.N.S)

Module N.S

A module for Array sort relevant utiliites

module Int = Belt_SortArrayInt

Specalized when key type is int, more efficient than the generic type

module String = Belt_SortArrayString

Specalized when key type is string, more efficient than the generic type

val strictlySortedLengthU : 'a array -> ('a -> 'a -> bool) -> int
val strictlySortedLength : 'a array -> ('a -> 'a -> bool) -> int

strictlySortedLenght xs cmp return +n means increasing order -n means negative order

strictlySortedLength [|1;2;3;4;3|] (fun x y -> x < y) = 4;;
+strictlySortedLength [||] (fun x y -> x < y) = 0;;
+strictlySortedLength [|1|] (fun x y -> x < y) = 1;;
+strictlySortedLength [|4;3;2;1|] (fun x y -> x < y) = -4;;
val isSortedU : 'a array -> ('a -> 'a -> int) -> bool
val isSorted : 'a array -> ('a -> 'a -> int) -> bool

isSorted arr cmp

  • returns

    true if array is increasingly sorted (equal is okay )

    isSorted [|1;1;2;3;4|] (fun x y -> compare x y) = true
val stableSortInPlaceByU : 'a array -> ('a -> 'a -> int) -> unit
val stableSortInPlaceBy : 'a array -> ('a -> 'a -> int) -> unit

stableSortBy xs cmp

Sort xs in place using comparator cmp, the stable means if the elements are equal, their order will be preserved

val stableSortByU : 'a array -> ('a -> 'a -> int) -> 'a array
val stableSortBy : 'a array -> ('a -> 'a -> int) -> 'a array

stableSort xs cmp

val binarySearchByU : 'a array -> 'a -> ('a -> 'a -> int) -> int
val binarySearchBy : 'a array -> 'a -> ('a -> 'a -> int) -> int

If value is not found and value is less than one or more elements in array, the negative number returned is the bitwise complement of the index of the first element that is larger than value.

If value is not found and value is greater than all elements in array, the negative number returned is the bitwise complement of (the index of the last element plus 1)

for example, if key is smaller than all elements return -1 since lnot (-1) = 0 if key is larger than all elements return - (len + 1) since lnot (-(len+1)) = len

binarySearchBy [|1;2;3;4;33;35;36|] 33 = 4;;
+lnot (binarySearchBy [|1;3;5;7|] 4) = 2;;
diff --git a/local/server-reason-react/belt/Belt/MutableSet/N/index.html b/local/server-reason-react/belt/Belt/MutableSet/N/index.html new file mode 100644 index 000000000..e0f7b8452 --- /dev/null +++ b/local/server-reason-react/belt/Belt/MutableSet/N/index.html @@ -0,0 +1,24 @@ + +N (docs.local.server-reason-react.belt.Belt.MutableSet.N)

Module MutableSet.N

type 'value node = {
  1. mutable value : 'value;
  2. mutable height : int;
  3. mutable left : 'value t;
  4. mutable right : 'value t;
}
and 'value t = 'value node option
val node : + value:'value -> + height:int -> + left:'value t -> + right:'value t -> + 'value node
val valueSet : 'value node -> 'value -> unit
val value : 'value node -> 'value
val heightSet : 'value node -> int -> unit
val height : 'value node -> int
val leftSet : 'value node -> 'value t -> unit
val left : 'value node -> 'value t
val rightSet : 'value node -> 'value t -> unit
val right : 'value node -> 'value t
module A : sig ... end

Belt.Array Utililites for Array functions

module S : sig ... end

A module for Array sort relevant utiliites

val toOpt : 'a option -> 'a option
val return : 'a -> 'a option
val empty : 'a option
val unsafeCoerce : 'a option -> 'a
type ('a, 'b) cmp = 'a -> 'a -> int
val treeHeight : 'a t -> int
val copy : 'a node option -> 'a node option
val create : 'a t -> 'a -> 'a t -> 'a node option
val singleton : 'a -> 'a node option
val heightGe : 'a node option -> 'b node option -> bool
val bal : 'a node option -> 'a -> 'a node option -> 'a node option
val min0Aux : 'a node -> 'a
val minimum : 'a node option -> 'a option
val minUndefined : 'a node option -> 'a option
val max0Aux : 'a node -> 'a
val maximum : 'a node option -> 'a option
val maxUndefined : 'a node option -> 'a option
val removeMinAuxWithRef : 'a node -> 'a ref -> 'a t
val isEmpty : 'a option -> bool
val stackAllLeft : 'a node option -> 'a node list -> 'a node list
val forEachU : 'a node option -> ('a -> unit) -> unit
val forEach : 'a node option -> ('a -> unit) -> unit
val reduceU : 'a node option -> 'b -> ('b -> 'a -> 'b) -> 'b
val reduce : 'a node option -> 'b -> ('b -> 'a -> 'b) -> 'b
val everyU : 'a node option -> ('a -> bool) -> bool
val every : 'a node option -> ('a -> bool) -> bool
val someU : 'a node option -> ('a -> bool) -> bool
val some : 'a node option -> ('a -> bool) -> bool
val addMinElement : 'a node option -> 'a -> 'a node option
val addMaxElement : 'a node option -> 'a -> 'a node option
val joinShared : 'a node option -> 'a -> 'a node option -> 'a node option
val concatShared : 'a node option -> 'a node option -> 'a node option
val partitionSharedU : + 'a node option -> + ('a -> bool) -> + 'a node option * 'a node option
val partitionShared : + 'a node option -> + ('a -> bool) -> + 'a node option * 'a node option
val lengthNode : 'a node -> int
val size : 'a node option -> int
val toListAux : 'a node option -> 'a list -> 'a list
val toList : 'a node option -> 'a list
val checkInvariantInternal : 'a t -> unit
val fillArray : 'a node -> int -> 'a A.t -> int
type cursor
val cursor : forward:int -> backward:int -> cursor
val forwardSet : cursor -> int -> unit
val forward : cursor -> int
val backwardSet : cursor -> int -> unit
val backward : cursor -> int
val fillArrayWithPartition : + 'a node -> + cursor -> + 'a A.t -> + ('a -> bool) -> + unit
val fillArrayWithFilter : 'a node -> int -> 'a A.t -> ('a -> bool) -> int
val toArray : 'a node option -> 'a array
val fromSortedArrayRevAux : 'a A.t -> int -> int -> 'a node option
val fromSortedArrayAux : 'a A.t -> int -> int -> 'a node option
val fromSortedArrayUnsafe : 'a A.t -> 'a node option
val keepSharedU : 'a node option -> ('a -> bool) -> 'a t
val keepShared : 'a node option -> ('a -> bool) -> 'a t
val keepCopyU : 'a node option -> ('a -> bool) -> 'a t
val keepCopy : 'a node option -> ('a -> bool) -> 'a t
val partitionCopyU : + 'a node option -> + ('a -> bool) -> + 'a node option * 'a node option
val partitionCopy : + 'a node option -> + ('a -> bool) -> + 'a node option * 'a node option
val has : 'a t -> 'a -> cmp:('a -> 'a -> int) -> bool
val compareAux : 'a node list -> 'a node list -> cmp:('a -> 'a -> int) -> int
val cmp : 'a node option -> 'a node option -> cmp:('a -> 'a -> int) -> int
val eq : 'a node option -> 'a node option -> cmp:('a -> 'a -> int) -> bool
val subset : 'a t -> 'a t -> cmp:('a -> 'a -> int) -> bool
val get : 'a t -> 'a -> cmp:('a -> 'a -> int) -> 'a option
val getUndefined : 'a t -> 'a -> cmp:('a -> 'a -> int) -> 'a option
val getExn : 'a t -> 'a -> cmp:('a -> 'a -> int) -> 'a
val rotateWithLeftChild : 'a node -> 'a node
val rotateWithRightChild : 'a node -> 'a node
val doubleWithLeftChild : 'a node -> 'a node
val doubleWithRightChild : 'a node -> 'a node
val heightUpdateMutate : 'a node -> 'a node
val balMutate : 'a node -> 'a node
val addMutate : cmp:('a -> 'a -> int) -> 'a t -> 'a -> 'a node option
val fromArray : 'a array -> cmp:('a -> 'a -> int) -> 'a node option
val removeMinAuxWithRootMutate : 'a node -> 'a node -> 'a t
diff --git a/local/server-reason-react/belt/Belt/MutableSet/S/index.html b/local/server-reason-react/belt/Belt/MutableSet/S/index.html new file mode 100644 index 000000000..40591597d --- /dev/null +++ b/local/server-reason-react/belt/Belt/MutableSet/S/index.html @@ -0,0 +1,2 @@ + +S (docs.local.server-reason-react.belt.Belt.MutableSet.S)

Module MutableSet.S

type ('value, 'id) t
val t : cmp:('value, 'id) cmp -> data:'value N.t -> ('value, 'id) t
val cmp : ('value, 'id) t -> ('value, 'id) cmp
val dataSet : ('value, 'id) t -> 'value N.t -> unit
val data : ('value, 'id) t -> 'value N.t
diff --git a/local/server-reason-react/belt/Belt/MutableSet/Sort/index.html b/local/server-reason-react/belt/Belt/MutableSet/Sort/index.html new file mode 100644 index 000000000..6fcaec48c --- /dev/null +++ b/local/server-reason-react/belt/Belt/MutableSet/Sort/index.html @@ -0,0 +1,6 @@ + +Sort (docs.local.server-reason-react.belt.Belt.MutableSet.Sort)

Module MutableSet.Sort

A module for Array sort relevant utiliites

module Int = Belt_SortArrayInt

Specalized when key type is int, more efficient than the generic type

module String = Belt_SortArrayString

Specalized when key type is string, more efficient than the generic type

val strictlySortedLengthU : 'a array -> ('a -> 'a -> bool) -> int
val strictlySortedLength : 'a array -> ('a -> 'a -> bool) -> int

strictlySortedLenght xs cmp return +n means increasing order -n means negative order

strictlySortedLength [|1;2;3;4;3|] (fun x y -> x < y) = 4;;
+strictlySortedLength [||] (fun x y -> x < y) = 0;;
+strictlySortedLength [|1|] (fun x y -> x < y) = 1;;
+strictlySortedLength [|4;3;2;1|] (fun x y -> x < y) = -4;;
val isSortedU : 'a array -> ('a -> 'a -> int) -> bool
val isSorted : 'a array -> ('a -> 'a -> int) -> bool

isSorted arr cmp

  • returns

    true if array is increasingly sorted (equal is okay )

    isSorted [|1;1;2;3;4|] (fun x y -> compare x y) = true
val stableSortInPlaceByU : 'a array -> ('a -> 'a -> int) -> unit
val stableSortInPlaceBy : 'a array -> ('a -> 'a -> int) -> unit

stableSortBy xs cmp

Sort xs in place using comparator cmp, the stable means if the elements are equal, their order will be preserved

val stableSortByU : 'a array -> ('a -> 'a -> int) -> 'a array
val stableSortBy : 'a array -> ('a -> 'a -> int) -> 'a array

stableSort xs cmp

val binarySearchByU : 'a array -> 'a -> ('a -> 'a -> int) -> int
val binarySearchBy : 'a array -> 'a -> ('a -> 'a -> int) -> int

If value is not found and value is less than one or more elements in array, the negative number returned is the bitwise complement of the index of the first element that is larger than value.

If value is not found and value is greater than all elements in array, the negative number returned is the bitwise complement of (the index of the last element plus 1)

for example, if key is smaller than all elements return -1 since lnot (-1) = 0 if key is larger than all elements return - (len + 1) since lnot (-(len+1)) = len

binarySearchBy [|1;2;3;4;33;35;36|] 33 = 4;;
+lnot (binarySearchBy [|1;3;5;7|] 4) = 2;;
diff --git a/local/server-reason-react/belt/Belt/MutableSet/index.html b/local/server-reason-react/belt/Belt/MutableSet/index.html new file mode 100644 index 000000000..e35a99187 --- /dev/null +++ b/local/server-reason-react/belt/Belt/MutableSet/index.html @@ -0,0 +1,19 @@ + +MutableSet (docs.local.server-reason-react.belt.Belt.MutableSet)

Module Belt.MutableSet

Belt.MutableSet

The top level provides generic mutable set operations.

It also has two specialized inner modules Belt.MutableSet.Int and Belt.MutableSet.String

module Int = Belt_MutableSetInt
module String = Belt_MutableSetString
module N : sig ... end
module A : sig ... end

Belt.Array Utililites for Array functions

module Sort : sig ... end

A module for Array sort relevant utiliites

type ('k, 'id) id = + (module Belt__.Belt_Id.Comparable + with type identity = 'id + and type t = 'k)
type ('key, 'id) cmp = 'key -> 'key -> int
module S : sig ... end
type ('k, 'id) t = ('k, 'id) S.t
val remove0 : 'a N.node -> 'b -> cmp:('b -> 'a -> int) -> 'a N.t
val remove : ('a, 'b) S.t -> 'a -> unit
val removeMany0 : + 'a N.node -> + 'weak237 A.t -> + int -> + int -> + cmp:('weak237 -> 'a -> int) -> + 'a N.node option
val removeMany : ('a, 'b) S.t -> 'a A.t -> unit
val removeCheck0 : + 'a N.node -> + 'a -> + bool ref -> + cmp:('a -> 'a -> int) -> + 'a N.t
val removeCheck : ('a, 'b) S.t -> 'a -> bool
val addCheck0 : 'a N.t -> 'a -> bool ref -> cmp:('a -> 'a -> int) -> 'a N.t
val addCheck : ('a, 'b) S.t -> 'a -> bool
val add : ('a, 'b) S.t -> 'a -> unit
val addArrayMutate : 'a N.t -> 'a A.t -> cmp:('a -> 'a -> int) -> 'a N.t
val mergeMany : ('a, 'b) S.t -> 'a A.t -> unit
val make : id:('value, 'identity) id -> ('value, 'a) S.t
val isEmpty : ('a, 'b) S.t -> bool
val minimum : ('a, 'b) S.t -> 'a option
val minUndefined : ('a, 'b) S.t -> 'a option
val maximum : ('a, 'b) S.t -> 'a option
val maxUndefined : ('a, 'b) S.t -> 'a option
val forEachU : ('a, 'b) S.t -> ('a -> unit) -> unit
val forEach : ('a, 'b) S.t -> ('a -> unit) -> unit
val reduceU : ('a, 'b) S.t -> 'c -> ('c -> 'a -> 'c) -> 'c
val reduce : ('a, 'b) S.t -> 'c -> ('c -> 'a -> 'c) -> 'c
val everyU : ('a, 'b) S.t -> ('a -> bool) -> bool
val every : ('a, 'b) S.t -> ('a -> bool) -> bool
val someU : ('a, 'b) S.t -> ('a -> bool) -> bool
val some : ('a, 'b) S.t -> ('a -> bool) -> bool
val size : ('a, 'b) S.t -> int
val toList : ('a, 'b) S.t -> 'a list
val toArray : ('a, 'b) S.t -> 'a array
val fromSortedArrayUnsafe : + 'value A.t -> + id:('value, 'identity) id -> + ('value, 'a) t
val checkInvariantInternal : ('a, 'b) S.t -> unit
val fromArray : 'value array -> id:('value, 'identity) id -> ('value, 'a) S.t
val cmp : ('a, 'b) S.t -> ('a, 'c) S.t -> int
val eq : ('a, 'b) S.t -> ('a, 'c) S.t -> bool
val get : ('a, 'b) S.t -> 'a -> 'a option
val getUndefined : ('a, 'b) S.t -> 'a -> 'a option
val getExn : ('a, 'b) S.t -> 'a -> 'a
val split : ('a, 'b) S.t -> 'a -> (('a, 'c) S.t * ('a, 'd) S.t) * bool
val keepU : ('a, 'b) S.t -> ('a -> bool) -> ('a, 'c) S.t
val keep : ('a, 'b) S.t -> ('a -> bool) -> ('a, 'c) S.t
val partitionU : ('a, 'b) S.t -> ('a -> bool) -> ('a, 'c) S.t * ('a, 'd) S.t
val partition : ('a, 'b) S.t -> ('a -> bool) -> ('a, 'c) S.t * ('a, 'd) S.t
val subset : ('a, 'b) S.t -> ('a, 'c) S.t -> bool
val intersect : ('a, 'b) S.t -> ('a, 'c) S.t -> ('a, 'd) t
val diff : ('a, 'b) S.t -> ('a, 'c) S.t -> ('a, 'd) t
val union : ('a, 'b) S.t -> ('a, 'c) S.t -> ('a, 'd) S.t
val has : ('a, 'b) S.t -> 'a -> bool
val copy : ('a, 'b) S.t -> ('a, 'c) S.t
diff --git a/local/server-reason-react/belt/Belt/MutableStack/index.html b/local/server-reason-react/belt/Belt/MutableStack/index.html new file mode 100644 index 000000000..f47ac00b2 --- /dev/null +++ b/local/server-reason-react/belt/Belt/MutableStack/index.html @@ -0,0 +1,2 @@ + +MutableStack (docs.local.server-reason-react.belt.Belt.MutableStack)

Module Belt.MutableStack

Belt.MutableStack

An FILO(first in last out) stack data structure

First in last out stack.

This module implements stacks, with in-place modification.

type 'a t
val make : unit -> 'a t
  • returns

    a new stack, initially empty.

val clear : 'a t -> unit

Discard all elements from the stack.

val copy : 'a t -> 'a t

copy x O(1) operation, return a new stack

val push : 'a t -> 'a -> unit
val popUndefined : 'a t -> 'a Js.undefined
val pop : 'a t -> 'a option
val topUndefined : 'a t -> 'a Js.undefined
val top : 'a t -> 'a option
val isEmpty : 'a t -> bool
val size : 'a t -> int
val forEachU : 'a t -> ('a -> unit) -> unit
val forEach : 'a t -> ('a -> unit) -> unit
val dynamicPopIterU : 'a t -> ('a -> unit) -> unit
val dynamicPopIter : 'a t -> ('a -> unit) -> unit

dynamicPopIter s f apply f to each element of s. The item is poped before applying f, s will be empty after this opeartion. This function is useful for worklist algorithm

diff --git a/local/server-reason-react/belt/Belt/Option/index.html b/local/server-reason-react/belt/Belt/Option/index.html new file mode 100644 index 000000000..9770a8400 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Option/index.html @@ -0,0 +1,27 @@ + +Option (docs.local.server-reason-react.belt.Belt.Option)

Module Belt.Option

Belt.Option

Utilities for option data type.

Belt.Option

Utilities for option data type

val keepU : 'a option -> ('a -> bool) -> 'a option

Uncurried version of keep

val keep : 'a option -> ('a -> bool) -> 'a option

keep optionValue p

If optionValue is Some value and p value = true, it returns Some value; otherwise returns None

keep (Some 10)(fun x -> x > 5);; (* returns [Some 10] *)
+keep (Some 4)(fun x -> x > 5);; (* returns [None] *)
+keep None (fun x -> x > 5);; (* returns [None] *)
val forEachU : 'a option -> ('a -> unit) -> unit

Uncurried version of forEach

val forEach : 'a option -> ('a -> unit) -> unit

forEach optionValue f

If optionValue is Some value, it calls f value; otherwise returns ()

forEach (Some "thing")(fun x -> Js.log x);; (* logs "thing" *)
+forEach None (fun x -> Js.log x);; (* returns () *)
val getExn : 'a option -> 'a

getExn optionalValue Returns value if optionalValue is Some value, otherwise raises getExn

getExn (Some 3) = 3;;
+getExn None (* Raises getExn error *)
val getUnsafe : 'a option -> 'a

getUnsafe x returns x This is an unsafe operation, it assumes x is neither not None or (Some (None .. ))

val mapWithDefaultU : 'a option -> 'b -> ('a -> 'b) -> 'b

Uncurried version of mapWithDefault

val mapWithDefault : 'a option -> 'b -> ('a -> 'b) -> 'b

mapWithDefault optionValue default f

If optionValue is Some value, returns f value; otherwise returns default

mapWithDefault (Some 3) 0 (fun x -> x + 5) = 8;;
+mapWithDefault None 0 (fun x -> x + 5) = 0;;
val mapU : 'a option -> ('a -> 'b) -> 'b option

Uncurried version of map

val map : 'a option -> ('a -> 'b) -> 'b option

map optionValue f

If optionValue is Some value, returns Some (f value); otherwise returns None

map (Some 3) (fun x -> x * x) = (Some 9);;
+map None (fun x -> x * x) = None;;
val flatMapU : 'a option -> ('a -> 'b option) -> 'b option

Uncurried version of flatMap

val flatMap : 'a option -> ('a -> 'b option) -> 'b option

flatMap optionValue f

If optionValue is Some value, returns f value; otherwise returns None The function f must have a return type of 'a option

let f (x : float) =
+    if x >= 0.0 then
+      Some (sqrt x)
+    else
+      None;;
+
+flatMap (Some 4.0) f = Some 2.0;;
+flatMap (Some (-4.0)) f = None;;
+flatMap None f = None;;
val getWithDefault : 'a option -> 'a -> 'a

getWithDefault optionalValue default

If optionalValue is Some value, returns value, otherwise default

getWithDefault (Some 1812) 1066 = 1812;;
+getWithDefault None 1066 = 1066;;
val isSome : 'a option -> bool

Returns true if the argument is Some value, false otherwise

val isNone : 'a option -> bool

Returns true if the argument is None, false otherwise

val eqU : 'a option -> 'b option -> ('a -> 'b -> bool) -> bool

Uncurried version of eq

val eq : 'a option -> 'b option -> ('a -> 'b -> bool) -> bool

eq optValue1 optvalue2 predicate

Evaluates two optional values for equality with respect to a predicate function.

If both optValue1 and optValue2 are None, returns true.

If one of the arguments is Some value and the other is None, returns false

If arguments are Some value1 and Some value2, returns the result of predicate value1 value2; the predicate function must return a bool

let clockEqual = (fun a b -> a mod 12 = b mod 12);;
+eq (Some 3) (Some 15) clockEqual = true;;
+eq (Some 3) None clockEqual = false;;
+eq None (Some 3) clockEqual = false;;
+eq None None clockEqual = true;;
val cmpU : 'a option -> 'b option -> ('a -> 'b -> int) -> int

Uncurried version of cmp

val cmp : 'a option -> 'b option -> ('a -> 'b -> int) -> int

cmp optValue1 optvalue2 comparisonFcn

Compares two optional values with respect to a comparison function

If both optValue1 and optValue2 are None, returns 0.

If the first argument is Some value1 and the second is None, returns 1 (something is greater than nothing)

If the first argument is None and the second is Some value2, returns -1 (nothing is less than something)

If the arguments are Some value1 and Some value2, returns the result of comparisonFcn value1 value2; comparisonFcn takes two arguments and returns -1 if the first argument is less than the second, 0 if the arguments are equal, and 1 if the first argument is greater than the second.

let clockCompare = fun a b -> compare (a mod 12) (b mod 12);;
+cmp (Some 3) (Some 15) clockCompare = 0;;
+cmp (Some 3) (Some 14) clockCompare = 1;;
+cmp (Some 2) (Some 15) clockCompare = -1;;
+cmp None (Some 15) clockCompare = -1;;
+cmp (Some 14) None clockCompare = 1;;
+cmp None None clockCompare = 0;;
diff --git a/local/server-reason-react/belt/Belt/Range/index.html b/local/server-reason-react/belt/Belt/Range/index.html new file mode 100644 index 000000000..f533709c6 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Range/index.html @@ -0,0 +1,2 @@ + +Range (docs.local.server-reason-react.belt.Belt.Range)

Module Belt.Range

Belt.Range

Utilities for a closed range (from, start)

A small module to provide a inclusive range operations [start, finsish], it use a for-loop internally instead of creating an array

val forEachU : int -> int -> (int -> unit) -> unit
val forEach : int -> int -> (int -> unit) -> unit

forEach start finish action

equivalent to Belt.Array.(forEach (range start finish) action)

val everyU : int -> int -> (int -> bool) -> bool
val every : int -> int -> (int -> bool) -> bool

every start finish p

equivalent to Belt.Array.(every (range start finish) p )

val everyByU : int -> int -> step:int -> (int -> bool) -> bool
val everyBy : int -> int -> step:int -> (int -> bool) -> bool

everyBy start finish ~step p

See Belt.Array.rangeBy

equivalent to Belt.Array.(every (rangeBy start finish ~step) p)

val someU : int -> int -> (int -> bool) -> bool
val some : int -> int -> (int -> bool) -> bool

some start finish p

equivalent to Belt.Array.(some (range start finish) p)

val someByU : int -> int -> step:int -> (int -> bool) -> bool
val someBy : int -> int -> step:int -> (int -> bool) -> bool

someBy start finish ~step p

See Belt.Array.rangeBy

equivalent to Belt.Array.(some (rangeBy start finish ~step) p)

diff --git a/local/server-reason-react/belt/Belt/Result/index.html b/local/server-reason-react/belt/Belt/Result/index.html new file mode 100644 index 000000000..acc36bb6c --- /dev/null +++ b/local/server-reason-react/belt/Belt/Result/index.html @@ -0,0 +1,40 @@ + +Result (docs.local.server-reason-react.belt.Belt.Result)

Module Belt.Result

Belt.Result

Utilities for result data type.

Belt.Result is a data type with two variants: Ok and Error. Each of these variants can contain data, and those two pieces of data need not have the same data type. Belt.Result is useful when you need to not only determine whether some data is valid or not (use Belt.Option for that), but also keep information about the invalid data.

In the examples, we presume the existence of two variables:

let good = Ok 42
+let bad = Error "Invalid data"
type ('a, 'b) t =
  1. | Ok of 'a
  2. | Error of 'b
val getExn : ('a, 'b) t -> 'a

getExn res

when res is Ok n, returns n when res is Error m, raise an exception

getExn good = 42;;
+getExn bad;; (* raises exception *)
val mapWithDefaultU : ('a, 'c) t -> 'b -> ('a -> 'b) -> 'b
val mapWithDefault : ('a, 'c) t -> 'b -> ('a -> 'b) -> 'b

mapWithDefault res default f

When res is Ok n, returns f n, otherwise default.

mapWithDefault good 0 (fun x -> x / 2) = 21
+mapWithDefault bad 0 (fun x -> x / 2) = 0
val mapU : ('a, 'c) t -> ('a -> 'b) -> ('b, 'c) t
val map : ('a, 'c) t -> ('a -> 'b) -> ('b, 'c) t

map res f

When res is Ok n, returns Ok (f n). Otherwise returns res unchanged. Function f takes a value of the same type as n and returns an ordinary value.

let f x = sqrt (float_of_int x)
+map (Ok 64) f = Ok 8.0
+map (Error "Invalid data") f = Error "Invalid data"
val flatMapU : ('a, 'c) t -> ('a -> ('b, 'c) t) -> ('b, 'c) t
val flatMap : ('a, 'c) t -> ('a -> ('b, 'c) t) -> ('b, 'c) t

flatMap res f

When res is Ok n, returns f n. Otherwise, returns res unchanged. Function f takes a value of the same type as n and returns a Belt.Result.

let recip x =
+  if x != 0.0
+  then
+    Ok (1.0 /. x)
+  else
+    Error "Divide by zero"
+
+    flatMap (Ok 2.0) recip = Ok 0.5
+    flatMap (Ok 0.0) recip = Error "Divide by zero"
+    flatMap (Error "Already bad") recip = Error "Already bad"
val getWithDefault : ('a, 'b) t -> 'a -> 'a

getWithDefault res defaultValue

if res is Ok n, returns n, otherwise default

getWithDefault (Ok 42) 0 = 42
+getWithDefault (Error "Invalid Data") = 0
val isOk : ('a, 'b) t -> bool

isOk res

Returns true if res is of the form Ok n, false if it is the Error e variant.

val isError : ('a, 'b) t -> bool

isError res

Returns true if res is of the form Error e, false if it is the Ok n variant.

val eqU : ('a, 'c) t -> ('b, 'd) t -> ('a -> 'b -> bool) -> bool
val eq : ('a, 'c) t -> ('b, 'd) t -> ('a -> 'b -> bool) -> bool

eq res1 res2 f

Determine if two Belt.Result variables are equal with respect to an equality function. If res1 and res2 are of the form Ok n and Ok m, return the result of f n m. If one of res1 and res2 are of the form Error e, return false If both res1 and res2 are of the form Error e, return true

let good1 = Ok 42
+let good2 = Ok 32
+let bad1 = Error "invalid"
+let bad2 = Error "really invalid"
+
+let mod10equal a b =
+  a mod 10 == b mod 10
+
+eq good1 good2 mod10equal = true
+eq good1 bad1 mod10equal = false
+eq bad2 good2 mod10equal = false
+eq bad1 bad2 mod10equal = true
val cmpU : ('a, 'c) t -> ('b, 'd) t -> ('a -> 'b -> int) -> int
val cmp : ('a, 'c) t -> ('b, 'd) t -> ('a -> 'b -> int) -> int

cmp res1 res2 f

Compare two Belt.Result variables with respect to a comparison function. The comparison function returns -1 if the first variable is "less than" the second, 0 if the two variables are equal, and 1 if the first is "greater than" the second.

If res1 and res2 are of the form Ok n and Ok m, return the result of f n m. If res1 is of the form Error e and res2 of the form Ok n, return -1 (nothing is less than something) If res1 is of the form Ok n and res2 of the form Error e, return 1 (something is greater than nothing) If both res1 and res2 are of the form Error e, return 0 (equal)

let good1 = Ok 59
+let good2 = Ok 37
+let bad1 = Error "invalid"
+let bad2 = Error "really invalid"
+
+let mod10cmp a b =
+  Pervasives.compare (a mod 10) (b mod 10)
+
+cmp (Ok 39) (Ok 57) mod10cmp = 1
+cmp (Ok 57) (Ok 39) mod10cmp = -1
+cmp (Ok 39) (Error "y") mod10cmp = 1
+cmp (Error "x") (Ok 57) mod10cmp = -1
+cmp (Error "x") (Error "y") mod10cmp = 0
diff --git a/local/server-reason-react/belt/Belt/Set/Dict/A/index.html b/local/server-reason-react/belt/Belt/Set/Dict/A/index.html new file mode 100644 index 000000000..60cc7c8c9 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Set/Dict/A/index.html @@ -0,0 +1,80 @@ + +A (docs.local.server-reason-react.belt.Belt.Set.Dict.A)

Module Dict.A

Belt.Array Utililites for Array functions

type 'a t = 'a array
val length : 'a t -> int

length xs return the size of the array

val size : 'a t -> int

See length

val get : 'a t -> int -> 'a option

get arr i

If i <= 0 <= length arr;returns Some value where value is the item at index i If i is out of range;returns None

Belt.Array.get [|"a";"b";"c"|] 0 = Some "a";;
+Belt.Array.get [|"a";"b";"c"|] 3 = None;;
+Belt.Array.get [|"a";"b";"c"|] (-1) = None;;
val getExn : 'a t -> int -> 'a

getExn arr i

raise an exception if i is out of range;otherwise return the value at index i in arr

val getUnsafe : 'a t -> int -> 'a

getUnsafe arr i

Unsafe

no bounds checking;this would cause type error if i does not stay within range

val getUndefined : 'a t -> int -> 'a option

getUndefined arr i

It does the samething in the runtime as getUnsafe; it is type safe since the return type still track whether it is in range or not

val set : 'a t -> int -> 'a -> bool

set arr n x modifies arr in place; it replaces the nth element of arr with x

  • returns

    false means not updated due to out of range

val setExn : 'a t -> int -> 'a -> unit

setExn arr i x raise an exception if i is out of range

val setUnsafe : 'a t -> int -> 'a -> unit
val shuffleInPlace : 'a t -> unit

shuffleInPlace arr randomly re-orders the items in arr

val shuffle : 'a t -> 'a t

shuffle xs

  • returns

    a fresh array with items in original array randomly shuffled

val reverseInPlace : 'a t -> unit

reverseInPlace arr reverses items in arr in place

let arr = [|10;11;12;13;14|];;
+let () = reverseInPlace arr;;
+arr = [|14;13;12;11;10|];;
val reverse : 'a t -> 'a t

reverse arr

  • returns

    a fresh array with items in arr in reverse order

    reverse [|10;11;12;13;14|] = [|14;13;12;11;10|];;
val makeUninitialized : int -> 'a option array

makeUninitialized n creates an array of length n filled with the undefined value. You must specify the type of data that will eventually fill the array.

let arr: string Js.undefined array = makeUninitialized 5;;
+getExn arr 0 = Js.undefined;;
val makeUninitializedUnsafe : int -> 'a -> 'a array

`makeUninitializedUnsafe n`

Unsafe

let arr = Belt.Array.makeUninitializedUnsafe 5;;
+let () = Js.log(Belt.Array.getExn arr 0);; (* undefined *)
+Belt.Array.setExn arr 0 "example";;
+let () = Js.log(Belt.Array.getExn arr 0 = "example");;
val make : int -> 'a -> 'a t

make n e return an array of size n filled with value e

  • returns

    an empty array when n is negative.

val range : int -> int -> int t

range start finish create an inclusive array

range 0 3 =  [|0;1;2;3|];;
+range 3 0 =  [||] ;;
+range 3 3 = [|3|];;
val rangeBy : int -> int -> step:int -> int t

rangeBy start finish ~step

  • returns

    empty array when step is 0 or negative it also return empty array when start > finish

    rangeBy 0 10 ~step:3 = [|0;3;6;9|];;
    +rangeBy 0 12 ~step:3 = [|0;3;6;9;12|];;
    +rangeBy 33 0 ~step:1 =  [||];;
    +rangeBy 33 0 ~step:(-1) = [||];;
    +rangeBy 3 12 ~step:(-1) = [||];;
    +rangeBy 3 3 ~step:0 = [||] ;;
    +rangeBy 3 3 ~step:(1) = [|3|] ;;
val makeByU : int -> (int -> 'a) -> 'a t
val makeBy : int -> (int -> 'a) -> 'a t

makeBy n f

return an empty array when n is negative return an array of size n populated by f i start from 0 to n - 1

makeBy 5 (fun i -> i) = [|0;1;2;3;4|];;
+makeBy 5 (fun i -> i * i) = [|0;1;4;9;16|]
val makeByAndShuffleU : int -> (int -> 'a) -> 'a t
val makeByAndShuffle : int -> (int -> 'a) -> 'a t

makeByAndShuffle n f

Equivalent to shuffle (makeBy n f)

val zip : 'a t -> 'b array -> ('a * 'b) array

zip a b

Create an array of pairs from corresponding elements of a and b. Stop with the shorter array

zip [|1;2|] [|3;4;5|] = [|(1, 3);(2, 4)|]
val zipByU : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array
val zipBy : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array

zipBy xs ys f

Create an array by applying f to corresponding elements of xs and ys Stops with shorter array

Equivalent to map (zip xs ys) (fun (a,b) -> f a b)

zipBy [|1;2;3|] [|4;5|] (fun a b -> 2 * a + b) = [|6;9|];;
val unzip : ('a * 'b) array -> 'a t * 'b array

unzip a takes an array of pairs and creates a pair of arrays. The first array contains all the first items of the pairs; the second array contains all the second items.

unzip [|(1,2) ; (3,4)|] = ([|1;3|], [|2;4|]);;
+unzip [|(1,2) ; (3,4) ; (5,6) ; (7,8)|] = ([|1;3;5;7|], [|2;4;6;8|]);;
val concat : 'a t -> 'a t -> 'a t

concat xs ys

  • returns

    a fresh array containing the concatenation of the arrays v1 and v2;so even if v1 or v2 is empty;it can not be shared

    concat [|1;2;3|] [|4;5|] = [|1;2;3;4;5|];;
    +concat [| |] [|"a";"b";"c"|] = [|"a";"b";"c"|];;
val concatMany : 'a t t -> 'a t

concatMany xss

  • returns

    a fresh array as the concatenation of xss (an array of arrays)

    concatMany [| [|1;2;3|]; [|4;5;6|]; [|7;8|] |] = [|1;2;3;4;5;6;7;8|];;
val slice : 'a t -> offset:int -> len:int -> 'a t

slice xs offset len creates a new array with the len elements of xs starting at offset for

offset can be negative;and is evaluated as length xs - offset slice xs -1 1 means get the last element as a singleton array

slice xs (-len) len will return a copy of the array

if the array does not have enough data;slice extracts through the end of sequence.

if len is negative;returns the empty array.

slice [|10;11;12;13;14;15;16|] ~offset: 2 ~len: 3 = [|12;13;14|];;
+slice [|10;11;12;13;14;15;16|] ~offset: (-4) ~len: 3 = [|13;14;15|];;
+slice [|10;11;12;13;14;15;16|] ~offset:4  ~len:9 = [|14;15;16|];;
val sliceToEnd : 'a t -> int -> 'a t

sliceToEnd xs offset creates a new array with the elements of xs starting at offset

offset can be negative;and is evaluated as length xs - offset sliceToEnd xs -1 means get the last element as a singleton array

sliceToEnd xs 0 will return a copy of the array

sliceToEnd [|10;11;12;13;14;15;16|] 2 = [|12;13;14;15;16|];;
+sliceToEnd [|10;11;12;13;14;15;16|] (-4) = [|13;14;15;16|];;
val copy : 'a t -> 'a t

copy a

  • returns

    a copy of a;that is;a fresh array containing the same elements as a.

val fill : 'a t -> offset:int -> len:int -> 'a -> unit

fill arr ~offset ~len x

Modifies arr in place, storing x in elements number offset to offset + len - 1.

offset can be negative;and is evaluated as length arr - offset

fill arr ~offset:(-1) ~len:1 means fill the last element, if the array does not have enough data;fill will ignore it

let arr = makeBy 5 (fun i -> i) ;;
+fill arr ~offset:2 ~len:2 9 ;;
+arr = [|0;1;9;9;4|];;
+fill arr ~offset:7 ~len:2 8;;
+arr = [|0;1;9;9;4|];;
val blit : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

blit ~src:v1 ~srcOffset:o1 ~dst:v2 ~dstOffset:o2 ~len

copies len elements from array v1;starting at element number o1;to array v2, starting at element number o2.

It works correctly even if v1 and v2 are the same array;and the source and destination chunks overlap.

offset can be negative;-1 means len - 1;if len + offset is still negative;it will be set as 0

For each of the examples;presume that v1 = [|10;11;12;13;14;15;16;17|] and v2 = [|20;21;22;23;24;25;26;27|]. The result shown is the content of the destination array.

Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v2 ~dstOffset: 2 ~len: 3 |.
+  [|20;21;14;15;16;25;26;27|]
+Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v1 ~dstOffset: 2 ~len: 3 |.
+  [|10;11;14;15;16;15;16;17|]
val blitUnsafe : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

Unsafe blit without bounds checking

val forEachU : 'a t -> ('a -> unit) -> unit
val forEach : 'a t -> ('a -> unit) -> unit

forEach xs f

Call f on each element of xs from the beginning to end. f returns unit;so no new array is created. Use forEach when you are primarily concerned with repetitively creating side effects.

forEach [|"a";"b";"c"|] (fun x -> Js.log("Item: " ^ x));;
+(*  prints:
+  Item: a
+  Item: b
+  Item: c
+*)
+
+let total = ref 0;;
+forEach [|1;2;3;4|] (fun x -> total := !total + x);;
+!total  = 1 + 2 + 3 + 4;;
val mapU : 'a t -> ('a -> 'b) -> 'b array
val map : 'a t -> ('a -> 'b) -> 'b array

map xs f

  • returns

    a new array by calling f for each element of xs from the beginning to end

    map [|1;2|] (fun x-> x + 10) = [|11;12|]
val flatMapU : 'a t -> ('a -> 'b t) -> 'b t
val flatMap : 'a t -> ('a -> 'b t) -> 'b t

flatMap xs f **return** a new array by calling `f` for each element of `xs` from the beginning to end, and then concatenating the results ``` flatMap |1;2| (fun x-> |x + 10;x + 20|) = |11;21;12;22| ```

val getByU : 'a t -> ('a -> bool) -> 'a option
val getBy : 'a t -> ('a -> bool) -> 'a option

getBy xs p returns Some value for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 4
+getBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val getIndexByU : 'a t -> ('a -> bool) -> int option
val getIndexBy : 'a t -> ('a -> bool) -> int option

getIndexBy xs p returns Some index for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getIndexBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 1
+getIndexBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val keepU : 'a t -> ('a -> bool) -> 'a t
val keep : 'a t -> ('a -> bool) -> 'a t

keep xs p

  • returns

    a new array that keeps all elements satisfying p

    keep [|1;2;3|] (fun x -> x mod  2 = 0) = [|2|]
val keepWithIndexU : 'a t -> ('a -> int -> bool) -> 'a t
val keepWithIndex : 'a t -> ('a -> int -> bool) -> 'a t

keepWithIndex xs p

  • returns

    a new array that keeps all elements satisfying p. The predicate p takes two arguments: the element from xs and the index starting from 0.

    keepWithIndex [|1;2;3|] (fun _x i -> i = 1) = [|2|]
val keepMapU : 'a t -> ('a -> 'b option) -> 'b array
val keepMap : 'a t -> ('a -> 'b option) -> 'b array

keepMap xs p

  • returns

    a new array that keeps all elements that return a non-None when applied to p

    keepMap [|1;2;3|] (fun x -> if x mod 2 = 0 then Some x else None)
    += [| 2 |]
val forEachWithIndexU : 'a t -> (int -> 'a -> unit) -> unit
val forEachWithIndex : 'a t -> (int -> 'a -> unit) -> unit

forEachWithIndex xs f

The same as forEach; except that f is supplied with two arguments: the index starting from 0 and the element from xs

forEachWithIndex [|"a";"b";"c"|] (fun i x -> Js.log("Item " ^ (string_of_int i) ^ " is " ^ x));;
+(*  prints:
+  Item 0 is a
+  Item 1 is b
+  Item 2 is c
+*)
+
+let total = ref 0 ;;
+forEachWithIndex [|10;11;12;13|] (fun i x -> total := !total + x + i);;
+!total  = 0 + 10 + 1 +  11 + 2 + 12 + 3 + 13;;
val mapWithIndexU : 'a t -> (int -> 'a -> 'b) -> 'b t
val mapWithIndex : 'a t -> (int -> 'a -> 'b) -> 'b t

mapWithIndex xs f applies f to each element of xs. Function f takes two arguments: the index starting from 0 and the element from xs.

mapWithIndex [|1;2;3|] (fun i x -> i + x) =
+[|0 + 1; 1 + 2; 2 + 3|]
val partitionU : 'a t -> ('a -> bool) -> 'a t * 'a t
val partition : 'a t -> ('a -> bool) -> 'a t * 'a t

partition f a split array into tuple of two arrays based on predicate f; first of tuple where predicate cause true, second where predicate cause false

partition [|1;2;3;4;5|] (fun x -> x mod 2 = 0  ) = ([|2;4|], [|1;2;3|]);;
+partition [|1;2;3;4;5|] (fun x -> x mod 2 <> 0 ) = ([|1;2;3|], [|2;4|]);;
val reduceU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduce : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduce xs init f

Applies f to each element of xs from beginning to end. Function f has two parameters: the item from the list and an “accumulator”;which starts with a value of init. reduce returns the final value of the accumulator.

reduce [|2;3;4|] 1 (+) = 10;;
+reduce [|"a";"b";"c";"d"|] "" (^) = "abcd";;
val reduceReverseU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduceReverse : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduceReverse xs init f

Works like reduce;except that function f is applied to each item of xs from the last back to the first.

reduceReverse [|"a";"b";"c";"d"|] "" (^) = "dcba";;
val reduceReverse2U : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val reduceReverse2 : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c

reduceReverse2 xs ys init f Reduces two arrays xs and ys;taking items starting at min (length xs) (length ys) down to and including zero.

reduceReverse2 [|1;2;3|] [|1;2|] 0 (fun acc x y -> acc + x + y) = 6
val reduceWithIndexU : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b
val reduceWithIndex : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b

reduceWithIndex xs f

Applies f to each element of xs from beginning to end. Function f has three parameters: the item from the array and an “accumulator”, which starts with a value of init and the index of each element. reduceWithIndex returns the final value of the accumulator.

reduceWithIndex [|1;2;3;4|] 0 (fun acc x i -> acc + x + i) = 16;
val joinWithU : 'a t -> string -> ('a -> string) -> string
val joinWith : 'a t -> string -> ('a -> string) -> string

joinWith xs sep toString

Concatenates all the elements of xs converted to string with toString, each separated by sep, the string given as the second argument, into a single string. If the array has only one element, then that element will be returned without using the separator. If the array is empty, the empty string will be returned.

joinWith [|0; 1|] ", " string_of_int = "0, 1"
+joinWith [||] " " string_of_int = ""
+joinWith [|1|] " " string_of_int = "1"
val someU : 'a t -> ('a -> bool) -> bool
val some : 'a t -> ('a -> bool) -> bool

some xs p

  • returns

    true if at least one of the elements in xs satifies p;where p is a predicate: a function taking an element and returning a bool.

    some [|2; 3; 4|] (fun x -> x mod 2 = 1) = true;;
    +some [|-1; -3; -5|] (fun x -> x > 0) = false;;
val everyU : 'a t -> ('a -> bool) -> bool
val every : 'a t -> ('a -> bool) -> bool

every xs p

  • returns

    true if all elements satisfy p;where p is a predicate: a function taking an element and returning a bool.

    every [|1; 3; 5|] (fun x -> x mod 2 = 1) = true;;
    +every [|1; -3; 5|] (fun x -> x > 0) = false;;
val every2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val every2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

every2 xs ys p returns true if p xi yi is true for all pairs of elements up to the shorter length (i.e. min (length xs) (length ys))

every2 [|1;2;3|] [|0;1|] (>) = true;;
+every2 [||] [|1|] (fun  x y -> x > y) = true;;
+every2 [|2;3|] [|1|] (fun  x y -> x > y) = true;;
+every2 [|0;1|] [|5;0|] (fun x y -> x > y) = false;
val some2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val some2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

some2 xs ys p returns true if p xi yi is true for any pair of elements up to the shorter length (i.e. min (length xs) (length ys))

some2 [|0;2|] [|1;0;3|] (>) = true ;;
+(some2 [||] [|1|] (fun   x y -> x > y)) =  false;;
+(some2 [|2;3|] [|1;4|] (fun   x y -> x > y)) = true;;
val cmpU : 'a t -> 'a t -> ('a -> 'a -> int) -> int
val cmp : 'a t -> 'a t -> ('a -> 'a -> int) -> int

cmp xs ys f

  • Compared by length if length xs <> length ys;returning -1 iflength xs < length ys or 1 if length xs > length ys
  • Otherwise compare one by one f x y. f returns
  • a negative number if x is “less than” y
  • zero if x is “equal to” y
  • a positive number if x is “greater than” y
  • The comparison returns the first non-zero result of f;or zero if f returns zero for all x and y.
cmp [|1; 3; 5|] [|1; 4; 2|] (fun a b -> compare a b) = -1;;
+cmp [|1; 3; 5|] [|1; 2; 3|] (fun a b -> compare a b) = 1;;
+cmp [|1; 3; 5|] [|1; 3; 5|] (fun a b -> compare a b) = 0;;
val eqU : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool
val eq : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool

eq xs ys

  • return false if length is not the same
  • otherwise compare items one by one using f xi yi;and return true if all results are true;false otherwise
eq [|1; 2; 3|] [|-1; -2; -3|] (fun a b -> abs a = abs b) = true
val truncateToLengthUnsafe : 'a t -> int -> 'a t

Unsafe truncateToLengthUnsafe xs n sets length of array xs to n.

If n is greater than the length of xs;the extra elements are set to Js.Null_undefined.null

If n is less than zero;raises a RangeError.

let arr = [|"ant";"bee";"cat";"dog";"elk"|];;
+let () = truncateToLengthUnsafe arr 3;;
+arr = [|"ant";"bee";"cat"|];;
val initU : int -> (int -> 'a) -> 'a t
val init : int -> (int -> 'a) -> 'a t
val push : 'a t -> 'a -> [ `Do_not_use_Array_push_in_native ]

Using Belt.Array.push in native isn't a good idea, since OCaml's Array are fixed length and can't resize the same way as JavaScript arrays.

diff --git a/local/server-reason-react/belt/Belt/Set/Dict/N/A/index.html b/local/server-reason-react/belt/Belt/Set/Dict/N/A/index.html new file mode 100644 index 000000000..e7c3f16b0 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Set/Dict/N/A/index.html @@ -0,0 +1,80 @@ + +A (docs.local.server-reason-react.belt.Belt.Set.Dict.N.A)

Module N.A

Belt.Array Utililites for Array functions

type 'a t = 'a array
val length : 'a t -> int

length xs return the size of the array

val size : 'a t -> int

See length

val get : 'a t -> int -> 'a option

get arr i

If i <= 0 <= length arr;returns Some value where value is the item at index i If i is out of range;returns None

Belt.Array.get [|"a";"b";"c"|] 0 = Some "a";;
+Belt.Array.get [|"a";"b";"c"|] 3 = None;;
+Belt.Array.get [|"a";"b";"c"|] (-1) = None;;
val getExn : 'a t -> int -> 'a

getExn arr i

raise an exception if i is out of range;otherwise return the value at index i in arr

val getUnsafe : 'a t -> int -> 'a

getUnsafe arr i

Unsafe

no bounds checking;this would cause type error if i does not stay within range

val getUndefined : 'a t -> int -> 'a option

getUndefined arr i

It does the samething in the runtime as getUnsafe; it is type safe since the return type still track whether it is in range or not

val set : 'a t -> int -> 'a -> bool

set arr n x modifies arr in place; it replaces the nth element of arr with x

  • returns

    false means not updated due to out of range

val setExn : 'a t -> int -> 'a -> unit

setExn arr i x raise an exception if i is out of range

val setUnsafe : 'a t -> int -> 'a -> unit
val shuffleInPlace : 'a t -> unit

shuffleInPlace arr randomly re-orders the items in arr

val shuffle : 'a t -> 'a t

shuffle xs

  • returns

    a fresh array with items in original array randomly shuffled

val reverseInPlace : 'a t -> unit

reverseInPlace arr reverses items in arr in place

let arr = [|10;11;12;13;14|];;
+let () = reverseInPlace arr;;
+arr = [|14;13;12;11;10|];;
val reverse : 'a t -> 'a t

reverse arr

  • returns

    a fresh array with items in arr in reverse order

    reverse [|10;11;12;13;14|] = [|14;13;12;11;10|];;
val makeUninitialized : int -> 'a option array

makeUninitialized n creates an array of length n filled with the undefined value. You must specify the type of data that will eventually fill the array.

let arr: string Js.undefined array = makeUninitialized 5;;
+getExn arr 0 = Js.undefined;;
val makeUninitializedUnsafe : int -> 'a -> 'a array

`makeUninitializedUnsafe n`

Unsafe

let arr = Belt.Array.makeUninitializedUnsafe 5;;
+let () = Js.log(Belt.Array.getExn arr 0);; (* undefined *)
+Belt.Array.setExn arr 0 "example";;
+let () = Js.log(Belt.Array.getExn arr 0 = "example");;
val make : int -> 'a -> 'a t

make n e return an array of size n filled with value e

  • returns

    an empty array when n is negative.

val range : int -> int -> int t

range start finish create an inclusive array

range 0 3 =  [|0;1;2;3|];;
+range 3 0 =  [||] ;;
+range 3 3 = [|3|];;
val rangeBy : int -> int -> step:int -> int t

rangeBy start finish ~step

  • returns

    empty array when step is 0 or negative it also return empty array when start > finish

    rangeBy 0 10 ~step:3 = [|0;3;6;9|];;
    +rangeBy 0 12 ~step:3 = [|0;3;6;9;12|];;
    +rangeBy 33 0 ~step:1 =  [||];;
    +rangeBy 33 0 ~step:(-1) = [||];;
    +rangeBy 3 12 ~step:(-1) = [||];;
    +rangeBy 3 3 ~step:0 = [||] ;;
    +rangeBy 3 3 ~step:(1) = [|3|] ;;
val makeByU : int -> (int -> 'a) -> 'a t
val makeBy : int -> (int -> 'a) -> 'a t

makeBy n f

return an empty array when n is negative return an array of size n populated by f i start from 0 to n - 1

makeBy 5 (fun i -> i) = [|0;1;2;3;4|];;
+makeBy 5 (fun i -> i * i) = [|0;1;4;9;16|]
val makeByAndShuffleU : int -> (int -> 'a) -> 'a t
val makeByAndShuffle : int -> (int -> 'a) -> 'a t

makeByAndShuffle n f

Equivalent to shuffle (makeBy n f)

val zip : 'a t -> 'b array -> ('a * 'b) array

zip a b

Create an array of pairs from corresponding elements of a and b. Stop with the shorter array

zip [|1;2|] [|3;4;5|] = [|(1, 3);(2, 4)|]
val zipByU : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array
val zipBy : 'a t -> 'b array -> ('a -> 'b -> 'c) -> 'c array

zipBy xs ys f

Create an array by applying f to corresponding elements of xs and ys Stops with shorter array

Equivalent to map (zip xs ys) (fun (a,b) -> f a b)

zipBy [|1;2;3|] [|4;5|] (fun a b -> 2 * a + b) = [|6;9|];;
val unzip : ('a * 'b) array -> 'a t * 'b array

unzip a takes an array of pairs and creates a pair of arrays. The first array contains all the first items of the pairs; the second array contains all the second items.

unzip [|(1,2) ; (3,4)|] = ([|1;3|], [|2;4|]);;
+unzip [|(1,2) ; (3,4) ; (5,6) ; (7,8)|] = ([|1;3;5;7|], [|2;4;6;8|]);;
val concat : 'a t -> 'a t -> 'a t

concat xs ys

  • returns

    a fresh array containing the concatenation of the arrays v1 and v2;so even if v1 or v2 is empty;it can not be shared

    concat [|1;2;3|] [|4;5|] = [|1;2;3;4;5|];;
    +concat [| |] [|"a";"b";"c"|] = [|"a";"b";"c"|];;
val concatMany : 'a t t -> 'a t

concatMany xss

  • returns

    a fresh array as the concatenation of xss (an array of arrays)

    concatMany [| [|1;2;3|]; [|4;5;6|]; [|7;8|] |] = [|1;2;3;4;5;6;7;8|];;
val slice : 'a t -> offset:int -> len:int -> 'a t

slice xs offset len creates a new array with the len elements of xs starting at offset for

offset can be negative;and is evaluated as length xs - offset slice xs -1 1 means get the last element as a singleton array

slice xs (-len) len will return a copy of the array

if the array does not have enough data;slice extracts through the end of sequence.

if len is negative;returns the empty array.

slice [|10;11;12;13;14;15;16|] ~offset: 2 ~len: 3 = [|12;13;14|];;
+slice [|10;11;12;13;14;15;16|] ~offset: (-4) ~len: 3 = [|13;14;15|];;
+slice [|10;11;12;13;14;15;16|] ~offset:4  ~len:9 = [|14;15;16|];;
val sliceToEnd : 'a t -> int -> 'a t

sliceToEnd xs offset creates a new array with the elements of xs starting at offset

offset can be negative;and is evaluated as length xs - offset sliceToEnd xs -1 means get the last element as a singleton array

sliceToEnd xs 0 will return a copy of the array

sliceToEnd [|10;11;12;13;14;15;16|] 2 = [|12;13;14;15;16|];;
+sliceToEnd [|10;11;12;13;14;15;16|] (-4) = [|13;14;15;16|];;
val copy : 'a t -> 'a t

copy a

  • returns

    a copy of a;that is;a fresh array containing the same elements as a.

val fill : 'a t -> offset:int -> len:int -> 'a -> unit

fill arr ~offset ~len x

Modifies arr in place, storing x in elements number offset to offset + len - 1.

offset can be negative;and is evaluated as length arr - offset

fill arr ~offset:(-1) ~len:1 means fill the last element, if the array does not have enough data;fill will ignore it

let arr = makeBy 5 (fun i -> i) ;;
+fill arr ~offset:2 ~len:2 9 ;;
+arr = [|0;1;9;9;4|];;
+fill arr ~offset:7 ~len:2 8;;
+arr = [|0;1;9;9;4|];;
val blit : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

blit ~src:v1 ~srcOffset:o1 ~dst:v2 ~dstOffset:o2 ~len

copies len elements from array v1;starting at element number o1;to array v2, starting at element number o2.

It works correctly even if v1 and v2 are the same array;and the source and destination chunks overlap.

offset can be negative;-1 means len - 1;if len + offset is still negative;it will be set as 0

For each of the examples;presume that v1 = [|10;11;12;13;14;15;16;17|] and v2 = [|20;21;22;23;24;25;26;27|]. The result shown is the content of the destination array.

Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v2 ~dstOffset: 2 ~len: 3 |.
+  [|20;21;14;15;16;25;26;27|]
+Belt.Array.blit ~src: v1 ~srcOffset: 4 ~dst: v1 ~dstOffset: 2 ~len: 3 |.
+  [|10;11;14;15;16;15;16;17|]
val blitUnsafe : + src:'a t -> + srcOffset:int -> + dst:'a t -> + dstOffset:int -> + len:int -> + unit

Unsafe blit without bounds checking

val forEachU : 'a t -> ('a -> unit) -> unit
val forEach : 'a t -> ('a -> unit) -> unit

forEach xs f

Call f on each element of xs from the beginning to end. f returns unit;so no new array is created. Use forEach when you are primarily concerned with repetitively creating side effects.

forEach [|"a";"b";"c"|] (fun x -> Js.log("Item: " ^ x));;
+(*  prints:
+  Item: a
+  Item: b
+  Item: c
+*)
+
+let total = ref 0;;
+forEach [|1;2;3;4|] (fun x -> total := !total + x);;
+!total  = 1 + 2 + 3 + 4;;
val mapU : 'a t -> ('a -> 'b) -> 'b array
val map : 'a t -> ('a -> 'b) -> 'b array

map xs f

  • returns

    a new array by calling f for each element of xs from the beginning to end

    map [|1;2|] (fun x-> x + 10) = [|11;12|]
val flatMapU : 'a t -> ('a -> 'b t) -> 'b t
val flatMap : 'a t -> ('a -> 'b t) -> 'b t

flatMap xs f **return** a new array by calling `f` for each element of `xs` from the beginning to end, and then concatenating the results ``` flatMap |1;2| (fun x-> |x + 10;x + 20|) = |11;21;12;22| ```

val getByU : 'a t -> ('a -> bool) -> 'a option
val getBy : 'a t -> ('a -> bool) -> 'a option

getBy xs p returns Some value for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 4
+getBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val getIndexByU : 'a t -> ('a -> bool) -> int option
val getIndexBy : 'a t -> ('a -> bool) -> int option

getIndexBy xs p returns Some index for the first value in xs that satisifies the predicate function p; returns None if no element satisifies the function.

getIndexBy [|1;4;3;2|] (fun x -> x mod 2 = 0) = Some 1
+getIndexBy [|15;13;11|] (fun x -> x mod 2 = 0) = None
val keepU : 'a t -> ('a -> bool) -> 'a t
val keep : 'a t -> ('a -> bool) -> 'a t

keep xs p

  • returns

    a new array that keeps all elements satisfying p

    keep [|1;2;3|] (fun x -> x mod  2 = 0) = [|2|]
val keepWithIndexU : 'a t -> ('a -> int -> bool) -> 'a t
val keepWithIndex : 'a t -> ('a -> int -> bool) -> 'a t

keepWithIndex xs p

  • returns

    a new array that keeps all elements satisfying p. The predicate p takes two arguments: the element from xs and the index starting from 0.

    keepWithIndex [|1;2;3|] (fun _x i -> i = 1) = [|2|]
val keepMapU : 'a t -> ('a -> 'b option) -> 'b array
val keepMap : 'a t -> ('a -> 'b option) -> 'b array

keepMap xs p

  • returns

    a new array that keeps all elements that return a non-None when applied to p

    keepMap [|1;2;3|] (fun x -> if x mod 2 = 0 then Some x else None)
    += [| 2 |]
val forEachWithIndexU : 'a t -> (int -> 'a -> unit) -> unit
val forEachWithIndex : 'a t -> (int -> 'a -> unit) -> unit

forEachWithIndex xs f

The same as forEach; except that f is supplied with two arguments: the index starting from 0 and the element from xs

forEachWithIndex [|"a";"b";"c"|] (fun i x -> Js.log("Item " ^ (string_of_int i) ^ " is " ^ x));;
+(*  prints:
+  Item 0 is a
+  Item 1 is b
+  Item 2 is c
+*)
+
+let total = ref 0 ;;
+forEachWithIndex [|10;11;12;13|] (fun i x -> total := !total + x + i);;
+!total  = 0 + 10 + 1 +  11 + 2 + 12 + 3 + 13;;
val mapWithIndexU : 'a t -> (int -> 'a -> 'b) -> 'b t
val mapWithIndex : 'a t -> (int -> 'a -> 'b) -> 'b t

mapWithIndex xs f applies f to each element of xs. Function f takes two arguments: the index starting from 0 and the element from xs.

mapWithIndex [|1;2;3|] (fun i x -> i + x) =
+[|0 + 1; 1 + 2; 2 + 3|]
val partitionU : 'a t -> ('a -> bool) -> 'a t * 'a t
val partition : 'a t -> ('a -> bool) -> 'a t * 'a t

partition f a split array into tuple of two arrays based on predicate f; first of tuple where predicate cause true, second where predicate cause false

partition [|1;2;3;4;5|] (fun x -> x mod 2 = 0  ) = ([|2;4|], [|1;2;3|]);;
+partition [|1;2;3;4;5|] (fun x -> x mod 2 <> 0 ) = ([|1;2;3|], [|2;4|]);;
val reduceU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduce : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduce xs init f

Applies f to each element of xs from beginning to end. Function f has two parameters: the item from the list and an “accumulator”;which starts with a value of init. reduce returns the final value of the accumulator.

reduce [|2;3;4|] 1 (+) = 10;;
+reduce [|"a";"b";"c";"d"|] "" (^) = "abcd";;
val reduceReverseU : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a
val reduceReverse : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a

reduceReverse xs init f

Works like reduce;except that function f is applied to each item of xs from the last back to the first.

reduceReverse [|"a";"b";"c";"d"|] "" (^) = "dcba";;
val reduceReverse2U : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c
val reduceReverse2 : 'a t -> 'b array -> 'c -> ('c -> 'a -> 'b -> 'c) -> 'c

reduceReverse2 xs ys init f Reduces two arrays xs and ys;taking items starting at min (length xs) (length ys) down to and including zero.

reduceReverse2 [|1;2;3|] [|1;2|] 0 (fun acc x y -> acc + x + y) = 6
val reduceWithIndexU : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b
val reduceWithIndex : 'a t -> 'b -> ('b -> 'a -> int -> 'b) -> 'b

reduceWithIndex xs f

Applies f to each element of xs from beginning to end. Function f has three parameters: the item from the array and an “accumulator”, which starts with a value of init and the index of each element. reduceWithIndex returns the final value of the accumulator.

reduceWithIndex [|1;2;3;4|] 0 (fun acc x i -> acc + x + i) = 16;
val joinWithU : 'a t -> string -> ('a -> string) -> string
val joinWith : 'a t -> string -> ('a -> string) -> string

joinWith xs sep toString

Concatenates all the elements of xs converted to string with toString, each separated by sep, the string given as the second argument, into a single string. If the array has only one element, then that element will be returned without using the separator. If the array is empty, the empty string will be returned.

joinWith [|0; 1|] ", " string_of_int = "0, 1"
+joinWith [||] " " string_of_int = ""
+joinWith [|1|] " " string_of_int = "1"
val someU : 'a t -> ('a -> bool) -> bool
val some : 'a t -> ('a -> bool) -> bool

some xs p

  • returns

    true if at least one of the elements in xs satifies p;where p is a predicate: a function taking an element and returning a bool.

    some [|2; 3; 4|] (fun x -> x mod 2 = 1) = true;;
    +some [|-1; -3; -5|] (fun x -> x > 0) = false;;
val everyU : 'a t -> ('a -> bool) -> bool
val every : 'a t -> ('a -> bool) -> bool

every xs p

  • returns

    true if all elements satisfy p;where p is a predicate: a function taking an element and returning a bool.

    every [|1; 3; 5|] (fun x -> x mod 2 = 1) = true;;
    +every [|1; -3; 5|] (fun x -> x > 0) = false;;
val every2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val every2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

every2 xs ys p returns true if p xi yi is true for all pairs of elements up to the shorter length (i.e. min (length xs) (length ys))

every2 [|1;2;3|] [|0;1|] (>) = true;;
+every2 [||] [|1|] (fun  x y -> x > y) = true;;
+every2 [|2;3|] [|1|] (fun  x y -> x > y) = true;;
+every2 [|0;1|] [|5;0|] (fun x y -> x > y) = false;
val some2U : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool
val some2 : 'a t -> 'b t -> ('a -> 'b -> bool) -> bool

some2 xs ys p returns true if p xi yi is true for any pair of elements up to the shorter length (i.e. min (length xs) (length ys))

some2 [|0;2|] [|1;0;3|] (>) = true ;;
+(some2 [||] [|1|] (fun   x y -> x > y)) =  false;;
+(some2 [|2;3|] [|1;4|] (fun   x y -> x > y)) = true;;
val cmpU : 'a t -> 'a t -> ('a -> 'a -> int) -> int
val cmp : 'a t -> 'a t -> ('a -> 'a -> int) -> int

cmp xs ys f

  • Compared by length if length xs <> length ys;returning -1 iflength xs < length ys or 1 if length xs > length ys
  • Otherwise compare one by one f x y. f returns
  • a negative number if x is “less than” y
  • zero if x is “equal to” y
  • a positive number if x is “greater than” y
  • The comparison returns the first non-zero result of f;or zero if f returns zero for all x and y.
cmp [|1; 3; 5|] [|1; 4; 2|] (fun a b -> compare a b) = -1;;
+cmp [|1; 3; 5|] [|1; 2; 3|] (fun a b -> compare a b) = 1;;
+cmp [|1; 3; 5|] [|1; 3; 5|] (fun a b -> compare a b) = 0;;
val eqU : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool
val eq : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool

eq xs ys

  • return false if length is not the same
  • otherwise compare items one by one using f xi yi;and return true if all results are true;false otherwise
eq [|1; 2; 3|] [|-1; -2; -3|] (fun a b -> abs a = abs b) = true
val truncateToLengthUnsafe : 'a t -> int -> 'a t

Unsafe truncateToLengthUnsafe xs n sets length of array xs to n.

If n is greater than the length of xs;the extra elements are set to Js.Null_undefined.null

If n is less than zero;raises a RangeError.

let arr = [|"ant";"bee";"cat";"dog";"elk"|];;
+let () = truncateToLengthUnsafe arr 3;;
+arr = [|"ant";"bee";"cat"|];;
val initU : int -> (int -> 'a) -> 'a t
val init : int -> (int -> 'a) -> 'a t
val push : 'a t -> 'a -> [ `Do_not_use_Array_push_in_native ]

Using Belt.Array.push in native isn't a good idea, since OCaml's Array are fixed length and can't resize the same way as JavaScript arrays.

diff --git a/local/server-reason-react/belt/Belt/Set/Dict/N/S/index.html b/local/server-reason-react/belt/Belt/Set/Dict/N/S/index.html new file mode 100644 index 000000000..92f1f8cd3 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Set/Dict/N/S/index.html @@ -0,0 +1,6 @@ + +S (docs.local.server-reason-react.belt.Belt.Set.Dict.N.S)

Module N.S

A module for Array sort relevant utiliites

module Int = Belt_SortArrayInt

Specalized when key type is int, more efficient than the generic type

module String = Belt_SortArrayString

Specalized when key type is string, more efficient than the generic type

val strictlySortedLengthU : 'a array -> ('a -> 'a -> bool) -> int
val strictlySortedLength : 'a array -> ('a -> 'a -> bool) -> int

strictlySortedLenght xs cmp return +n means increasing order -n means negative order

strictlySortedLength [|1;2;3;4;3|] (fun x y -> x < y) = 4;;
+strictlySortedLength [||] (fun x y -> x < y) = 0;;
+strictlySortedLength [|1|] (fun x y -> x < y) = 1;;
+strictlySortedLength [|4;3;2;1|] (fun x y -> x < y) = -4;;
val isSortedU : 'a array -> ('a -> 'a -> int) -> bool
val isSorted : 'a array -> ('a -> 'a -> int) -> bool

isSorted arr cmp

  • returns

    true if array is increasingly sorted (equal is okay )

    isSorted [|1;1;2;3;4|] (fun x y -> compare x y) = true
val stableSortInPlaceByU : 'a array -> ('a -> 'a -> int) -> unit
val stableSortInPlaceBy : 'a array -> ('a -> 'a -> int) -> unit

stableSortBy xs cmp

Sort xs in place using comparator cmp, the stable means if the elements are equal, their order will be preserved

val stableSortByU : 'a array -> ('a -> 'a -> int) -> 'a array
val stableSortBy : 'a array -> ('a -> 'a -> int) -> 'a array

stableSort xs cmp

val binarySearchByU : 'a array -> 'a -> ('a -> 'a -> int) -> int
val binarySearchBy : 'a array -> 'a -> ('a -> 'a -> int) -> int

If value is not found and value is less than one or more elements in array, the negative number returned is the bitwise complement of the index of the first element that is larger than value.

If value is not found and value is greater than all elements in array, the negative number returned is the bitwise complement of (the index of the last element plus 1)

for example, if key is smaller than all elements return -1 since lnot (-1) = 0 if key is larger than all elements return - (len + 1) since lnot (-(len+1)) = len

binarySearchBy [|1;2;3;4;33;35;36|] 33 = 4;;
+lnot (binarySearchBy [|1;3;5;7|] 4) = 2;;
diff --git a/local/server-reason-react/belt/Belt/Set/Dict/N/index.html b/local/server-reason-react/belt/Belt/Set/Dict/N/index.html new file mode 100644 index 000000000..c7a2d1a9a --- /dev/null +++ b/local/server-reason-react/belt/Belt/Set/Dict/N/index.html @@ -0,0 +1,24 @@ + +N (docs.local.server-reason-react.belt.Belt.Set.Dict.N)

Module Dict.N

type 'value node = {
  1. mutable value : 'value;
  2. mutable height : int;
  3. mutable left : 'value t;
  4. mutable right : 'value t;
}
and 'value t = 'value node option
val node : + value:'value -> + height:int -> + left:'value t -> + right:'value t -> + 'value node
val valueSet : 'value node -> 'value -> unit
val value : 'value node -> 'value
val heightSet : 'value node -> int -> unit
val height : 'value node -> int
val leftSet : 'value node -> 'value t -> unit
val left : 'value node -> 'value t
val rightSet : 'value node -> 'value t -> unit
val right : 'value node -> 'value t
module A : sig ... end

Belt.Array Utililites for Array functions

module S : sig ... end

A module for Array sort relevant utiliites

val toOpt : 'a option -> 'a option
val return : 'a -> 'a option
val empty : 'a option
val unsafeCoerce : 'a option -> 'a
type ('a, 'b) cmp = 'a -> 'a -> int
val treeHeight : 'a t -> int
val copy : 'a node option -> 'a node option
val create : 'a t -> 'a -> 'a t -> 'a node option
val singleton : 'a -> 'a node option
val heightGe : 'a node option -> 'b node option -> bool
val bal : 'a node option -> 'a -> 'a node option -> 'a node option
val min0Aux : 'a node -> 'a
val minimum : 'a node option -> 'a option
val minUndefined : 'a node option -> 'a option
val max0Aux : 'a node -> 'a
val maximum : 'a node option -> 'a option
val maxUndefined : 'a node option -> 'a option
val removeMinAuxWithRef : 'a node -> 'a ref -> 'a t
val isEmpty : 'a option -> bool
val stackAllLeft : 'a node option -> 'a node list -> 'a node list
val forEachU : 'a node option -> ('a -> unit) -> unit
val forEach : 'a node option -> ('a -> unit) -> unit
val reduceU : 'a node option -> 'b -> ('b -> 'a -> 'b) -> 'b
val reduce : 'a node option -> 'b -> ('b -> 'a -> 'b) -> 'b
val everyU : 'a node option -> ('a -> bool) -> bool
val every : 'a node option -> ('a -> bool) -> bool
val someU : 'a node option -> ('a -> bool) -> bool
val some : 'a node option -> ('a -> bool) -> bool
val addMinElement : 'a node option -> 'a -> 'a node option
val addMaxElement : 'a node option -> 'a -> 'a node option
val joinShared : 'a node option -> 'a -> 'a node option -> 'a node option
val concatShared : 'a node option -> 'a node option -> 'a node option
val partitionSharedU : + 'a node option -> + ('a -> bool) -> + 'a node option * 'a node option
val partitionShared : + 'a node option -> + ('a -> bool) -> + 'a node option * 'a node option
val lengthNode : 'a node -> int
val size : 'a node option -> int
val toListAux : 'a node option -> 'a list -> 'a list
val toList : 'a node option -> 'a list
val checkInvariantInternal : 'a t -> unit
val fillArray : 'a node -> int -> 'a A.t -> int
type cursor
val cursor : forward:int -> backward:int -> cursor
val forwardSet : cursor -> int -> unit
val forward : cursor -> int
val backwardSet : cursor -> int -> unit
val backward : cursor -> int
val fillArrayWithPartition : + 'a node -> + cursor -> + 'a A.t -> + ('a -> bool) -> + unit
val fillArrayWithFilter : 'a node -> int -> 'a A.t -> ('a -> bool) -> int
val toArray : 'a node option -> 'a array
val fromSortedArrayRevAux : 'a A.t -> int -> int -> 'a node option
val fromSortedArrayAux : 'a A.t -> int -> int -> 'a node option
val fromSortedArrayUnsafe : 'a A.t -> 'a node option
val keepSharedU : 'a node option -> ('a -> bool) -> 'a t
val keepShared : 'a node option -> ('a -> bool) -> 'a t
val keepCopyU : 'a node option -> ('a -> bool) -> 'a t
val keepCopy : 'a node option -> ('a -> bool) -> 'a t
val partitionCopyU : + 'a node option -> + ('a -> bool) -> + 'a node option * 'a node option
val partitionCopy : + 'a node option -> + ('a -> bool) -> + 'a node option * 'a node option
val has : 'a t -> 'a -> cmp:('a -> 'a -> int) -> bool
val compareAux : 'a node list -> 'a node list -> cmp:('a -> 'a -> int) -> int
val cmp : 'a node option -> 'a node option -> cmp:('a -> 'a -> int) -> int
val eq : 'a node option -> 'a node option -> cmp:('a -> 'a -> int) -> bool
val subset : 'a t -> 'a t -> cmp:('a -> 'a -> int) -> bool
val get : 'a t -> 'a -> cmp:('a -> 'a -> int) -> 'a option
val getUndefined : 'a t -> 'a -> cmp:('a -> 'a -> int) -> 'a option
val getExn : 'a t -> 'a -> cmp:('a -> 'a -> int) -> 'a
val rotateWithLeftChild : 'a node -> 'a node
val rotateWithRightChild : 'a node -> 'a node
val doubleWithLeftChild : 'a node -> 'a node
val doubleWithRightChild : 'a node -> 'a node
val heightUpdateMutate : 'a node -> 'a node
val balMutate : 'a node -> 'a node
val addMutate : cmp:('a -> 'a -> int) -> 'a t -> 'a -> 'a node option
val fromArray : 'a array -> cmp:('a -> 'a -> int) -> 'a node option
val removeMinAuxWithRootMutate : 'a node -> 'a node -> 'a t
diff --git a/local/server-reason-react/belt/Belt/Set/Dict/index.html b/local/server-reason-react/belt/Belt/Set/Dict/index.html new file mode 100644 index 000000000..7f9000b73 --- /dev/null +++ b/local/server-reason-react/belt/Belt/Set/Dict/index.html @@ -0,0 +1,17 @@ + +Dict (docs.local.server-reason-react.belt.Belt.Set.Dict)

Module Set.Dict

module N : sig ... end
module A : sig ... end

Belt.Array Utililites for Array functions

type ('k, 'id) t = 'k N.t
type ('key, 'id) cmp = 'key -> 'key -> int
val add : 'a N.t -> 'b -> cmp:('c -> 'c -> int) -> 'd N.t
val remove : 'a N.t -> 'b -> cmp:('c -> 'c -> int) -> 'd N.t
val mergeMany : 'a N.t -> 'b A.t -> cmp:('a -> 'a -> int) -> 'a N.t
val removeMany : 'a N.t -> 'b A.t -> cmp:('a -> 'a -> int) -> 'a N.t
val splitAuxNoPivot : + cmp:('a -> 'a -> int) -> + 'b N.node -> + 'c -> + 'd N.t * 'e N.t
val splitAuxPivot : + cmp:('a -> 'a -> int) -> + 'b N.node -> + 'c -> + bool ref -> + 'd N.t * 'e N.t
val split : 'a N.t -> 'b -> cmp:('c -> 'c -> int) -> ('c N.t * 'c N.t) * bool
val union : 'a N.t -> 'b N.t -> cmp:('c -> 'c -> int) -> ('d, 'e) t
val intersect : 'a N.t -> 'b N.t -> cmp:('c -> 'c -> int) -> 'd N.node option
val diff : 'a N.t -> 'b N.t -> cmp:('b -> 'b -> int) -> 'a N.t
val empty : 'a option
val fromArray : 'a array -> cmp:('a -> 'a -> int) -> 'a N.node option
val isEmpty : 'a option -> bool
val cmp : 'a N.node option -> 'a N.node option -> cmp:('a -> 'a -> int) -> int
val eq : 'a N.node option -> 'a N.node option -> cmp:('a -> 'a -> int) -> bool
val has : 'a N.t -> 'a -> cmp:('a -> 'a -> int) -> bool
val forEachU : 'a N.node option -> ('a -> unit) -> unit
val forEach : 'a N.node option -> ('a -> unit) -> unit
val reduceU : 'a N.node option -> 'b -> ('b -> 'a -> 'b) -> 'b
val reduce : 'a N.node option -> 'b -> ('b -> 'a -> 'b) -> 'b
val everyU : 'a N.node option -> ('a -> bool) -> bool
val every : 'a N.node option -> ('a -> bool) -> bool
val someU : 'a N.node option -> ('a -> bool) -> bool
val some : 'a N.node option -> ('a -> bool) -> bool
val size : 'a N.node option -> int
val toList : 'a N.node option -> 'a list
val toArray : 'a N.node option -> 'a array
val minimum : 'a N.node option -> 'a option
val maximum : 'a N.node option -> 'a option
val maxUndefined : 'a N.node option -> 'a option
val minUndefined : 'a N.node option -> 'a option
val get : 'a N.t -> 'a -> cmp:('a -> 'a -> int) -> 'a option
val getExn : 'a N.t -> 'a -> cmp:('a -> 'a -> int) -> 'a
val getUndefined : 'a N.t -> 'a -> cmp:('a -> 'a -> int) -> 'a option
val fromSortedArrayUnsafe : 'a N.A.t -> 'a N.node option
val subset : 'a N.t -> 'a N.t -> cmp:('a -> 'a -> int) -> bool
val keep : 'a N.node option -> ('a -> bool) -> 'a N.t
val keepU : 'a N.node option -> ('a -> bool) -> 'a N.t
val partitionU : + 'a N.node option -> + ('a -> bool) -> + 'a N.node option * 'a N.node option
val partition : + 'a N.node option -> + ('a -> bool) -> + 'a N.node option * 'a N.node option
val checkInvariantInternal : 'a N.t -> unit
diff --git a/local/server-reason-react/belt/Belt/Set/index.html b/local/server-reason-react/belt/Belt/Set/index.html new file mode 100644 index 000000000..d76c131bb --- /dev/null +++ b/local/server-reason-react/belt/Belt/Set/index.html @@ -0,0 +1,11 @@ + +Set (docs.local.server-reason-react.belt.Belt.Set)

Module Belt.Set

Belt.Set

The top level provides generic immutable set operations.

It also has three specialized inner modules Belt.Set.Int, Belt.Set.String and

Belt.Set.Dict: This module separates data from function which is more verbose but slightly more efficient

module Int = Belt_SetInt
module String = Belt_SetString
module Dict : sig ... end
type ('value, 'id) id = + (module Belt__.Belt_Id.Comparable + with type identity = 'id + and type t = 'value)
type ('value, 'id) cmp = 'value -> 'value -> int
type ('value, 'id) t = {
  1. cmp : ('value, 'id) cmp;
  2. data : ('value, 'id) Dict.t;
}
val fromArray : 'value array -> id:('value0, 'identity) id -> ('value, 'a) t
val remove : ('a, 'b) t -> 'c -> ('a, 'b) t
val add : ('a, 'b) t -> 'c -> ('a, 'b) t
val mergeMany : ('a, 'b) t -> 'c Dict.A.t -> ('d, 'e) t
val removeMany : ('a, 'b) t -> 'c Dict.A.t -> ('d, 'e) t
val union : ('a, 'b) t -> ('c, 'd) t -> ('e, 'f) t
val intersect : ('a, 'b) t -> ('c, 'd) t -> ('e, 'f) t
val diff : ('a, 'b) t -> ('c, 'd) t -> ('e, 'f) t
val subset : ('a, 'b) t -> ('c, 'd) t -> bool
val split : ('a, 'b) t -> 'c -> (('d, 'e) t * ('f, 'g) t) * bool
val make : id:('value, 'identity) id -> ('value0, 'a) t
val isEmpty : ('a, 'b) t -> bool
val cmp : ('a, 'b) t -> ('c, 'd) t -> int
val eq : ('a, 'b) t -> ('c, 'd) t -> bool
val forEachU : ('a, 'b) t -> ('c -> unit) -> unit
val forEach : ('a, 'b) t -> ('c -> unit) -> unit
val reduceU : ('a, 'b) t -> 'c -> ('d -> 'e -> 'd) -> 'f
val reduce : ('a, 'b) t -> 'c -> ('d -> 'e -> 'f) -> 'g
val everyU : ('a, 'b) t -> ('c -> bool) -> bool
val every : ('a, 'b) t -> ('c -> bool) -> bool
val someU : ('a, 'b) t -> ('c -> bool) -> bool
val some : ('a, 'b) t -> ('c -> bool) -> bool
val keepU : ('a, 'b) t -> ('c -> bool) -> ('d, 'e) t
val keep : ('a, 'b) t -> ('c -> bool) -> ('a, 'd) t
val partitionU : ('a, 'b) t -> ('c -> bool) -> ('d, 'e) t * ('f, 'g) t
val partition : ('a, 'b) t -> ('c -> bool) -> ('a, 'd) t * ('a, 'e) t
val size : ('a, 'b) t -> int
val toList : ('a, 'b) t -> 'c list
val toArray : ('a, 'b) t -> 'c array
val minimum : ('a, 'b) t -> 'c option
val minUndefined : ('a, 'b) t -> 'c option
val maximum : ('a, 'b) t -> 'c option
val maxUndefined : ('a, 'b) t -> 'c option
val get : ('a, 'b) t -> 'c -> 'd option
val getUndefined : ('a, 'b) t -> 'c -> 'd option
val getExn : ('a, 'b) t -> 'c -> 'd
val has : ('a, 'b) t -> 'c -> bool
val fromSortedArrayUnsafe : + 'value Dict.N.A.t -> + id:('value0, 'identity) id -> + ('value, 'a) t
val getData : ('a, 'b) t -> 'a Dict.N.t
val getId : ('value, 'identity) t -> ('value0, 'identity0) id
val packIdData : + id:('value, 'identity) id -> + data:'value0 Dict.N.t -> + ('value0, 'a) t
val checkInvariantInternal : ('a, 'b) t -> unit
diff --git a/local/server-reason-react/belt/Belt/SortArray/index.html b/local/server-reason-react/belt/Belt/SortArray/index.html new file mode 100644 index 000000000..9f4d60b9b --- /dev/null +++ b/local/server-reason-react/belt/Belt/SortArray/index.html @@ -0,0 +1,6 @@ + +SortArray (docs.local.server-reason-react.belt.Belt.SortArray)

Module Belt.SortArray

Belt.SortArray

The top level provides some generic sort related utilities.

It also has two specialized inner modules Belt.SortArray.Int and Belt.SortArray.String

A module for Array sort relevant utiliites

module Int = Belt_SortArrayInt

Specalized when key type is int, more efficient than the generic type

module String = Belt_SortArrayString

Specalized when key type is string, more efficient than the generic type

val strictlySortedLengthU : 'a array -> ('a -> 'a -> bool) -> int
val strictlySortedLength : 'a array -> ('a -> 'a -> bool) -> int

strictlySortedLenght xs cmp return +n means increasing order -n means negative order

strictlySortedLength [|1;2;3;4;3|] (fun x y -> x < y) = 4;;
+strictlySortedLength [||] (fun x y -> x < y) = 0;;
+strictlySortedLength [|1|] (fun x y -> x < y) = 1;;
+strictlySortedLength [|4;3;2;1|] (fun x y -> x < y) = -4;;
val isSortedU : 'a array -> ('a -> 'a -> int) -> bool
val isSorted : 'a array -> ('a -> 'a -> int) -> bool

isSorted arr cmp

  • returns

    true if array is increasingly sorted (equal is okay )

    isSorted [|1;1;2;3;4|] (fun x y -> compare x y) = true
val stableSortInPlaceByU : 'a array -> ('a -> 'a -> int) -> unit
val stableSortInPlaceBy : 'a array -> ('a -> 'a -> int) -> unit

stableSortBy xs cmp

Sort xs in place using comparator cmp, the stable means if the elements are equal, their order will be preserved

val stableSortByU : 'a array -> ('a -> 'a -> int) -> 'a array
val stableSortBy : 'a array -> ('a -> 'a -> int) -> 'a array

stableSort xs cmp

val binarySearchByU : 'a array -> 'a -> ('a -> 'a -> int) -> int
val binarySearchBy : 'a array -> 'a -> ('a -> 'a -> int) -> int

If value is not found and value is less than one or more elements in array, the negative number returned is the bitwise complement of the index of the first element that is larger than value.

If value is not found and value is greater than all elements in array, the negative number returned is the bitwise complement of (the index of the last element plus 1)

for example, if key is smaller than all elements return -1 since lnot (-1) = 0 if key is larger than all elements return - (len + 1) since lnot (-(len+1)) = len

binarySearchBy [|1;2;3;4;33;35;36|] 33 = 4;;
+lnot (binarySearchBy [|1;3;5;7|] 4) = 2;;
diff --git a/local/server-reason-react/belt/Belt/index.html b/local/server-reason-react/belt/Belt/index.html new file mode 100644 index 000000000..d57806b13 --- /dev/null +++ b/local/server-reason-react/belt/Belt/index.html @@ -0,0 +1,2 @@ + +Belt (docs.local.server-reason-react.belt.Belt)

Module Belt

The stdlib shipped with Melange, but working on native

module Id : sig ... end
module Array : sig ... end
module SortArray : sig ... end
module MutableQueue : sig ... end
module MutableStack : sig ... end
module List : sig ... end
module Range : sig ... end
module Set : sig ... end
module Map : sig ... end
module MutableSet : sig ... end
module MutableMap : sig ... end
module HashSet : sig ... end
module HashMap : sig ... end
module Option : sig ... end

Belt.Result

Utilities for result data type.

module Result : sig ... end

Belt.Int Utilities for Int.

module Int : sig ... end

Belt.Float Utilities for Float.

module Float : sig ... end
diff --git a/local/server-reason-react/belt/index.html b/local/server-reason-react/belt/index.html new file mode 100644 index 000000000..40a65367d --- /dev/null +++ b/local/server-reason-react/belt/index.html @@ -0,0 +1,2 @@ + +belt (docs.local.server-reason-react.belt)

Package server-reason-react.belt

Library server-reason-react.belt

The entry point of this library is the module: Belt.

diff --git a/local/server-reason-react/browser_only.html b/local/server-reason-react/browser_only.html new file mode 100644 index 000000000..59592eec0 --- /dev/null +++ b/local/server-reason-react/browser_only.html @@ -0,0 +1,28 @@ + +browser_only (docs.local.server-reason-react.browser_only)

Exclude client code from the native build

browser_only is the ppx to exclude client code from the server build, making sure a library can run on both build targets.

For example, if you're using Webapi to query the DOM or using LocalStorage. This code should only run on the client, and there's no equivalent or fallback on the server, in order to compile and run successfully on the server, you can use browser_only or switch%platform.

Usage

The ppx expose a browser_only attribute that can be used to discard a function or a value, and switch%platform to conditionally execute code based on the platform.

Add server-reason-react.browser_ppx into to your pps field under a dune stanzas (melange.emit, libraries or executable) in your dune files.

You would need to add it on both "server" and "client" dune files. Adding the -js flag server-reason-react.browser_ppx -js for the client and without for the server:

; server exectuable
+(executable
+ (name server)
+ (preprocess
+  (pps server-reason-react.browser_ppx)))
+
+; melange emitting JavaScript
+(melange.emit
+ (target app)
+ (preprocess
+  (pps server-reason-react.browser_ppx -js)))

browser_only

let%browser_only countDomNodes = (id) => {
+  let elements = Webapi.Element.querySelector("#" ++ id);
+  let arr_elements = Webapi.Element.toArray(elements);
+  Array.length(arr_elements);
+};

The method tagged by browser_only will keep the function untouched for the client build, but for the server build, will be transformed to a function that raises the exception Runtime.Impossible_in_ssr.

If this function runs on the server, it will raise an exception, and the server will crash. In order to prevent this, you can use try to catch the exception and provide a default behaviour/value.

Following with the example from above:

let%browser_only countDomNodes = (id) => {
+  let elements = Webapi.Element.querySelector("#" ++ id);
+  let arr_elements = Webapi.Element.toArray(elements);
+  Array.length(arr_elements);
+}
+
+let main = id =>
+  try(countDomNodes(id)) {
+  | _ => 0
+  };

switch%platform

switch%platform allows to conditionally execute code based on the platform. There are some cases where you need to run a specific code only on the server or only on the client.

switch%platform (Runtime.platform) {
+| Server => print_endline("This prints to the terminal")
+| Client => Js.log("This prints to the console")
+};

Next

Externals and melange attributes

diff --git a/local/server-reason-react/browser_ppx/Browser_ppx/Ppx/Browser_only/index.html b/local/server-reason-react/browser_ppx/Browser_ppx/Ppx/Browser_only/index.html new file mode 100644 index 000000000..9b9d82813 --- /dev/null +++ b/local/server-reason-react/browser_ppx/Browser_ppx/Ppx/Browser_only/index.html @@ -0,0 +1,39 @@ + +Browser_only (docs.local.server-reason-react.browser_ppx.Browser_ppx.Ppx.Browser_only)

Module Ppx.Browser_only

val get_function_name : Ppxlib.pattern_desc -> string
val error_only_works_on : loc:Ppxlib.location -> Ppxlib_ast.Ast.expression
val remove_alert_browser_only : + loc:Astlib.Location.t -> + Astlib.Ast_500.Parsetree.attribute
val browser_only_value_binding : + Ppxlib.pattern -> + Ppxlib.expression -> + Astlib.Ast_500.Parsetree.value_binding
val expression_rule : Ppxlib.Context_free.Rule.t
val make_vb_with_browser_only : + loc:Ppxlib.location -> + ?type_constraint:Ppxlib_ast.Ast.core_type -> + Ppxlib_ast.Ast.pattern -> + Ppxlib_ast.Ast.expression -> + Ppxlib_ast.Ast.structure_item
val structure_item_rule : Ppxlib.Context_free.Rule.t
val has_browser_only_attribute : Ppxlib.expression -> bool
val use_effects : Ppxlib.Context_free.Rule.t list
diff --git a/local/server-reason-react/browser_ppx/Browser_ppx/Ppx/Platform/index.html b/local/server-reason-react/browser_ppx/Browser_ppx/Ppx/Platform/index.html new file mode 100644 index 000000000..5dc040153 --- /dev/null +++ b/local/server-reason-react/browser_ppx/Browser_ppx/Ppx/Platform/index.html @@ -0,0 +1,8 @@ + +Platform (docs.local.server-reason-react.browser_ppx.Browser_ppx.Ppx.Platform)

Module Ppx.Platform

val pattern : ('a, 'a Ppxlib.Loc.t -> 'b, 'b) Ppxlib.Ast_pattern.t
val switch_platform_requires_a_match : + loc:Ppxlib.location -> + Ppxlib_ast.Ast.expression
val handler : ctxt:'a -> Ppxlib.payload Ppxlib.loc -> Ppxlib.expression
diff --git a/local/server-reason-react/browser_ppx/Browser_ppx/Ppx/Preprocess/index.html b/local/server-reason-react/browser_ppx/Browser_ppx/Ppx/Preprocess/index.html new file mode 100644 index 000000000..1c5eff75c --- /dev/null +++ b/local/server-reason-react/browser_ppx/Browser_ppx/Ppx/Preprocess/index.html @@ -0,0 +1,11 @@ + +Preprocess (docs.local.server-reason-react.browser_ppx.Browser_ppx.Ppx.Preprocess)

Module Ppx.Preprocess

val eval_attr : Ppxlib.attribute -> [> `drop | `keep ]
val should_keep : Ppxlib.attribute list -> [> `drop | `keep ]
val should_keep_many : + 'a list -> + ('b -> Ppxlib.attribute list) -> + [> `drop | `keep ]
val apply_config_on_types : + Ppxlib.type_declaration list -> + Ppxlib.type_declaration list
val apply_config_on_structure_item : + Ppxlib.structure_item -> + Ppxlib.structure_item option
val apply_config_on_signature_item : + Ppxlib.signature_item -> + Ppxlib.signature_item option
diff --git a/local/server-reason-react/browser_ppx/Browser_ppx/Ppx/index.html b/local/server-reason-react/browser_ppx/Browser_ppx/Ppx/index.html new file mode 100644 index 000000000..8bf1c8d02 --- /dev/null +++ b/local/server-reason-react/browser_ppx/Browser_ppx/Ppx/index.html @@ -0,0 +1,6 @@ + +Ppx (docs.local.server-reason-react.browser_ppx.Browser_ppx.Ppx)

Module Browser_ppx.Ppx

type target =
  1. | Native
  2. | Js
val mode : target ref
val browser_ppx : string
val platform_tag : string
val is_platform_tag : String.t -> bool
module Platform : sig ... end
val remove_type_constraint : Ppxlib.pattern -> Ppxlib.pattern
val last_expr_to_raise_impossible : + loc:Astlib.Location.t -> + string -> + Ppxlib.expression -> + Astlib.Ast_500.Parsetree.expression
module Browser_only : sig ... end
module Preprocess : sig ... end
diff --git a/local/server-reason-react/browser_ppx/Browser_ppx/index.html b/local/server-reason-react/browser_ppx/Browser_ppx/index.html new file mode 100644 index 000000000..c8ec70a32 --- /dev/null +++ b/local/server-reason-react/browser_ppx/Browser_ppx/index.html @@ -0,0 +1,2 @@ + +Browser_ppx (docs.local.server-reason-react.browser_ppx.Browser_ppx)

Module Browser_ppx

module Ppx : sig ... end
diff --git a/local/server-reason-react/browser_ppx/index.html b/local/server-reason-react/browser_ppx/index.html new file mode 100644 index 000000000..b2b2b9a0d --- /dev/null +++ b/local/server-reason-react/browser_ppx/index.html @@ -0,0 +1,2 @@ + +browser_ppx (docs.local.server-reason-react.browser_ppx)

Package server-reason-react.browser_ppx

Library server-reason-react.browser_ppx

The entry point of this library is the module: Browser_ppx.

diff --git a/local/server-reason-react/code-structure.html b/local/server-reason-react/code-structure.html new file mode 100644 index 000000000..364c7e28b --- /dev/null +++ b/local/server-reason-react/code-structure.html @@ -0,0 +1,129 @@ + +code-structure (docs.local.server-reason-react.code-structure)

How to organise the universal code

While using server-reason-react it's important to know how to organise the code. Sometimes you may want to have components that are shared between the client and the server, and sometimes you want to have components that are only used by the client or the server.

In this guide, we will asume you are using Melange and dune, and will show a few examples of universal code and how to setup the dune files accordingly.

Pure universal library

It's a library without any client or server dependency, you can just have a library with all modes: (modes native byte melange). This is common for type-only libraries or libraries that only rely on the standard library. I often refer to this as "pure universal" library.

A tiny library to handle remote data named Remote_data:

(library
+ (name remote_data)
+ (modes native melange)) ; Contains both modes for melange and native
type t('data, 'error) =
+  | NotAsked
+  | InitialLoading
+  | Loading('data)
+  | Failure('error)
+  | Success('data);
+
+let map = (remoteData, fn) =>
+  switch (remoteData) {
+  | NotAsked => NotAsked
+  | InitialLoading
+  | Loading(_) => InitialLoading
+  | Failure(error) => Failure(error)
+  | Success(data) => Success(fn(data))
+  };
+
+let getWithDefault = (remoteData, defaultValue) =>
+  switch (remoteData) {
+  | NotAsked
+  | InitialLoading
+  | Loading(_)
+  | Failure(_) => defaultValue
+  | Success(data) => data
+  };
+
+let isLoading =
+  fun
+  | InitialLoading
+  | Loading(_) => true
+  | _ => false;

This is a cut down version of the library for demonstration purposes, you can imagine to have all necessary functions to operate on this type.

This library can be used in both "native" and "melagne" stanzas interchangeably.

Same API, different implementations

There are some other cases where you want to expose the same API, but the implementation is different.

For example, another tiny example: you may want to have a library that exposes a function to get the current time. On the client, you may want to use the browser API, while on the server you may want to use the system time.

dune allows to have 2 libraries with the same name, but available in different modes. For example:

(library
+  (name url_js)
+  (modes melange)
+  (libraries melange.js)
+  (modules Url)
+  (wrapped false))
+
+(library
+  (name url_native)
+  (modes native)
+  (modules Url)
+  (wrapped false))

url_js and url_native are two different libraries, but they expose the same module called Url with the same API.

Both libraries need to be (wrapped false) so they expose all the modules (which in this case is only Url) directly.

wrapped true means that the library is wrapped in a entry module, so the modules are exposed under the library name. In this case, wrapped false expose the modules directly.

copy_files

In order to reuse the same code, you can use (copy_files ...). It seems hacky, and eventually we will have better ways of doing so, but is the method I found to be more reliable in terms of developer experience, mostly editor support and error messages.

- src
+  - client/
+    - dune
+  - server/
+    - shared/
+        <library-code-here>
+    - dune
(* src/client/dune *)
+
+(library
+  (name url_js)
+  (modes melange)
+  (libraries melange.js)
+  (wrapped false)
+  (modules Url)
+  (preprocess (pps melange.ppx))
+
+(copy_files#
+ (mode fallback) ; `mode fallback` means you can override files in the client folder
+ (files "../native/shared/**.{re,rei}"))
(* src/server/dune *)
+
+(library
+  (name url_native)
+  (modes native)
+  (modules Url)
+  (wrapped false))

Here's an example https://github.com/ml-in-barcelona/server-reason-react/tree/main/demo/universal

reason-react and server-reason-react

Asuming you want to share react.components between the client and the server, you can use the same technique as above.

(library
+ (name shared_js)
+ (modes melange)
+ (libraries reason_react melange.belt bs_webapi)
+ (wrapped false)
+ (preprocess
+  (pps melange.ppx reason-react-ppx)))
+
+(copy_files# "../native/lib/*.re")
+
+(library
+ (name shared_native)
+ (modes native)
+ (libraries
+  server-reason-react.react
+  server-reason-react.reactDom
+  server-reason-react.belt
+  server-reason-react.webapi)
+ (wrapped false)
+ (preprocess
+  (pps
+    server-reason-react.ppx
+    server-reason-react.browser_ppx
+    server-reason-react.melange_ppx)))
+
+(copy_files# "../*.re")

This will expose all modules under a `Shared` module. You can then use those modules in both the client and the server.

// client.re
+
+switch (ReactDOM.querySelector("#root")) {
+| Some(el) =>
+  let root = ReactDOM.Client.hydrateRoot(el);
+  ReactDOM.Client.hydrate(<Shared.App />, root);
+| None => Js.log("Can't find a 'root' element")
+};
// server.re
+// Given a random server library, and a random Page component
+
+module Page = {
+  [@react.component]
+  let make = (~children, ~scripts) => {
+    <html>
+      <head>
+        <meta charSet="UTF-8" />
+        <meta
+          name="viewport"
+          content="width=device-width, initial-scale=1.0"
+        />
+        <title> {React.string("Server Reason React demo")} </title>
+        <link
+          rel="shortcut icon"
+          href="https://reasonml.github.io/img/icon_50.png"
+        />
+        <script src="https://cdn.tailwindcss.com" />
+      </head>
+      <body> <div id="root"> children </div> </body>
+    </html>;
+  };
+};
+
+// ...
+req => {
+  let html = ReactDOM.renderToString(<Page> <Shared.App /> </Page>);
+  Httpd.Response.make_string(Ok(html));
+}

Note on virtual_libraries

There's a better mechanismo of doing the same thing by dune, which is Virtual libraries.

However, there are a few limitations on virtual libraries:

I found that this mechanism is not as reliable as copy_files, and it's not well supported by editors. I would recommend to use copy_files instead, while we explore better ways of doing so with the dune team.

Next

  1. Exclude client code from the native build
  2. Externals and melange attributes
diff --git a/local/server-reason-react/dom/Dom/Storage/index.html b/local/server-reason-react/dom/Dom/Storage/index.html new file mode 100644 index 000000000..74933edb9 --- /dev/null +++ b/local/server-reason-react/dom/Dom/Storage/index.html @@ -0,0 +1,2 @@ + +Storage (docs.local.server-reason-react.dom.Dom.Storage)

Module Dom.Storage

type t
val getItem : string -> t -> string option
val setItem : string -> string -> t -> unit
val removeItem : string -> t -> unit
val clear : unit -> t
val key : int -> t -> string option
val length : t -> int
diff --git a/local/server-reason-react/dom/Dom/index.html b/local/server-reason-react/dom/Dom/index.html new file mode 100644 index 000000000..7fded9838 --- /dev/null +++ b/local/server-reason-react/dom/Dom/index.html @@ -0,0 +1,2 @@ + +Dom (docs.local.server-reason-react.dom.Dom)

Module Dom

type _baseClass
type animation
type cssStyleDeclaration
type cssStyleSheet
type 'a eventTarget_like
type eventTarget = _baseClass eventTarget_like
type 'a _node
type 'a node_like = 'a _node eventTarget_like
type node = _baseClass node_like
type _attr
type attr = _attr node_like
type 'a _characterData
type 'a characterData_like = 'a _characterData node_like
type characterData = _baseClass characterData_like
type _cdataSection
type cdataSection = _cdataSection characterData_like
type _comment
type 'a _document
type 'a document_like = 'a _document node_like
type document = _baseClass document_like
type _documentFragment
type documentFragment = _documentFragment node_like
type _documentType
type documentType = _documentType node_like
type domImplementation
type 'a _element
type 'a element_like = 'a _element node_like
type element = _baseClass element_like
type htmlCollection
type htmlFormControlsCollection
type htmlOptionsCollection
type intersectionObserver
type intersectionObserverEntry
type mutationObserver
type mutationRecord
type performanceObserver
type performanceObserverEntryList
type reportingObserver
type reportingObserverOptions
type resizeObserver
type resizeObserverEntry
type namedNodeMap
type nodeList
type radioNodeList
type processingInstruction
type _shadowRoot
type shadowRoot = _shadowRoot node_like
type _text
type domRect
type dataTransfer
type domStringMap
type history
type _htmlDocument
type htmlDocument = _htmlDocument document_like
type 'a _htmlElement
type 'a htmlElement_like = 'a _htmlElement element_like
type htmlElement = _baseClass htmlElement_like
type _htmlAnchorElement
type htmlAnchorElement = _htmlAnchorElement htmlElement_like
type _htmlAreaElement
type htmlAreaElement = _htmlAreaElement htmlElement_like
type _htmlAudioElement
type htmlAudioElement = _htmlAudioElement htmlElement_like
type _htmlBaseElement
type htmlBaseElement = _htmlBaseElement htmlElement_like
type _htmlBodyElement
type htmlBodyElement = _htmlBodyElement htmlElement_like
type _htmlBrElement
type htmlBrElement = _htmlBrElement htmlElement_like
type _htmlButtonElement
type htmlButtonElement = _htmlButtonElement htmlElement_like
type _htmlCanvasElement
type htmlCanvasElement = _htmlCanvasElement htmlElement_like
type _htmlDataElement
type htmlDataElement = _htmlDataElement htmlElement_like
type _htmlDataListElement
type htmlDataListElement = _htmlDataListElement htmlElement_like
type _htmlDialogElement
type htmlDialogElement = _htmlDialogElement htmlElement_like
type _htmlDivElement
type htmlDivElement = _htmlDivElement htmlElement_like
type _htmlDlistElement
type htmlDlistElement = _htmlDlistElement htmlElement_like
type _htmlEmbedElement
type htmlEmbedElement = _htmlEmbedElement htmlElement_like
type _htmlFieldSetElement
type htmlFieldSetElement = _htmlFieldSetElement htmlElement_like
type _htmlFormElement
type htmlFormElement = _htmlFormElement htmlElement_like
type _htmlHeadElement
type htmlHeadElement = _htmlHeadElement htmlElement_like
type _htmlHeadingElement
type htmlHeadingElement = _htmlHeadingElement htmlElement_like
type _htmlHrElement
type htmlHrElement = _htmlHrElement htmlElement_like
type _htmlHtmlElement
type htmlHtmlElement = _htmlHtmlElement htmlElement_like
type _htmlIframeElement
type htmlIframeElement = _htmlIframeElement htmlElement_like
type _htmlImageElement
type htmlImageElement = _htmlImageElement htmlElement_like
type _htmlInputElement
type htmlInputElement = _htmlInputElement htmlElement_like
type _htmlLabelElement
type htmlLabelElement = _htmlLabelElement htmlElement_like
type _htmlLegendElement
type htmlLegendElement = _htmlLegendElement htmlElement_like
type _htmlLiElement
type htmlLiElement = _htmlLiElement htmlElement_like
type _htmlLinkElement
type htmlLinkElement = _htmlLinkElement htmlElement_like
type _htmlMapElement
type htmlMapElement = _htmlMapElement htmlElement_like
type _htmlMediaElement
type htmlMediaElement = _htmlMediaElement htmlElement_like
type _htmlMenuElement
type htmlMenuElement = _htmlMenuElement htmlElement_like
type _htmlMetaElement
type htmlMetaElement = _htmlMetaElement htmlElement_like
type _htmlMeterElement
type htmlMeterElement = _htmlMeterElement htmlElement_like
type _htmlModElement
type htmlModElement = _htmlModElement htmlElement_like
type _htmlOListElement
type htmlOListElement = _htmlOListElement htmlElement_like
type _htmlObjectElement
type htmlObjectElement = _htmlObjectElement htmlElement_like
type _htmlOptGroupElement
type htmlOptGroupElement = _htmlOptGroupElement htmlElement_like
type _htmlOptionElement
type htmlOptionElement = _htmlOptionElement htmlElement_like
type _htmlOutputElement
type htmlOutputElement = _htmlOutputElement htmlElement_like
type _htmlParagraphElement
type htmlParagraphElement = _htmlParagraphElement htmlElement_like
type _htmlParamElement
type htmlParamElement = _htmlParamElement htmlElement_like
type _htmlPreElement
type htmlPreElement = _htmlPreElement htmlElement_like
type _htmlProgressElement
type htmlProgressElement = _htmlProgressElement htmlElement_like
type _htmlQuoteElement
type htmlQuoteElement = _htmlQuoteElement htmlElement_like
type _htmlScriptElement
type htmlScriptElement = _htmlScriptElement htmlElement_like
type _htmlSelectElement
type htmlSelectElement = _htmlSelectElement htmlElement_like
type _htmlSlotElement
type htmlSlotElement = _htmlSlotElement htmlElement_like
type _htmlSourceElement
type htmlSourceElement = _htmlSourceElement htmlElement_like
type _htmlSpanElement
type htmlSpanElement = _htmlSpanElement htmlElement_like
type _htmlStyleElement
type htmlStyleElement = _htmlStyleElement htmlElement_like
type _htmlTableCaptionElement
type htmlTableCaptionElement = _htmlTableCaptionElement htmlElement_like
type _htmlTableCellElement
type htmlTableCellElement = _htmlTableCellElement htmlElement_like
type _htmlTableColElement
type htmlTableColElement = _htmlTableColElement htmlElement_like
type _htmlTableDataCellElement
type htmlTableDataCellElement = _htmlTableDataCellElement htmlElement_like
type _htmlTableElement
type htmlTableElement = _htmlTableElement htmlElement_like
type _htmlTableHeaderCellElement
type htmlTableHeaderCellElement = _htmlTableHeaderCellElement htmlElement_like
type _htmlTableRowElement
type htmlTableRowElement = _htmlTableRowElement htmlElement_like
type _htmlTableSectionElement
type htmlTableSectionElement = _htmlTableSectionElement htmlElement_like
type _htmlTextAreaElement
type htmlTextAreaElement = _htmlTextAreaElement htmlElement_like
type _htmlTimeElement
type htmlTimeElement = _htmlTimeElement htmlElement_like
type _htmlTitleElement
type htmlTitleElement = _htmlTitleElement htmlElement_like
type _htmlTrackElement
type htmlTrackElement = _htmlTrackElement htmlElement_like
type _htmlUlistElement
type htmlUlistElement = _htmlUlistElement htmlElement_like
type _htmlUnknownElement
type htmlUnknownElement = _htmlUnknownElement htmlElement_like
type _htmlVideoElement
type htmlVideoElement = _htmlVideoElement htmlElement_like
type location
type window
type _xmlDocument
type xmlDocument = _xmlDocument document_like
type 'a event_like
type event = _baseClass event_like
type 'a _uiEvent
type 'a uiEvent_like = 'a _uiEvent event_like
type uiEvent = _baseClass uiEvent_like
type _animationEvent
type animationEvent = _animationEvent event_like
type _beforeUnloadEvent
type beforeUnloadEvent = _beforeUnloadEvent event_like
type _clipboardEvent
type clipboardEvent = _clipboardEvent event_like
type _closeEvent
type closeEvent = _closeEvent event_like
type _compositionEvent
type compositionEvent = _compositionEvent uiEvent_like
type _customEvent
type customEvent = _customEvent event_like
type _dragEvent
type dragEvent = _dragEvent event_like
type _errorEvent
type errorEvent = _errorEvent event_like
type _focusEvent
type focusEvent = _focusEvent uiEvent_like
type _idbVersionChangeEvent
type idbVersionChangeEvent = _idbVersionChangeEvent event_like
type _inputEvent
type inputEvent = _inputEvent uiEvent_like
type _keyboardEvent
type keyboardEvent = _keyboardEvent uiEvent_like
type 'a _mouseEvent
type 'a mouseEvent_like = 'a _mouseEvent uiEvent_like
type mouseEvent = _baseClass mouseEvent_like
type _pageTransitionEvent
type pageTransitionEvent = _pageTransitionEvent event_like
type _pointerEvent
type pointerEvent = _pointerEvent mouseEvent_like
type _popStateEvent
type popStateEvent = _popStateEvent event_like
type _progressEvent
type progressEvent = _progressEvent event_like
type _relatedEvent
type relatedEvent = _relatedEvent event_like
type _storageEvent
type storageEvent = _storageEvent event_like
type _svgZoomEvent
type svgZoomEvent = _svgZoomEvent event_like
type _timeEvent
type timeEvent = _timeEvent event_like
type _touchEvent
type touchEvent = _touchEvent uiEvent_like
type _trackEvent
type trackEvent = _trackEvent event_like
type _transitionEvent
type transitionEvent = _transitionEvent event_like
type _webGlContextEvent
type webGlContextEvent = _webGlContextEvent event_like
type _wheelEvent
type wheelEvent = _wheelEvent uiEvent_like
type range
type selection
type domTokenList
type domSettableTokenList
type nodeFilter = {
  1. acceptNode : element -> int;
}
type nodeIterator
type treeWalker
type svgRect
type svgPoint
type eventPointerId
module Storage : sig ... end
diff --git a/local/server-reason-react/dom/index.html b/local/server-reason-react/dom/index.html new file mode 100644 index 000000000..c1b00f132 --- /dev/null +++ b/local/server-reason-react/dom/index.html @@ -0,0 +1,2 @@ + +dom (docs.local.server-reason-react.dom)

Package server-reason-react.dom

Library server-reason-react.dom

The entry point of this library is the module: Dom.

diff --git a/local/server-reason-react/externals-melange-attributes.html b/local/server-reason-react/externals-melange-attributes.html new file mode 100644 index 000000000..6bf45b8f8 --- /dev/null +++ b/local/server-reason-react/externals-melange-attributes.html @@ -0,0 +1,5 @@ + +externals-melange-attributes (docs.local.server-reason-react.externals-melange-attributes)

Externals and melange attributes

melange.ppx is designed to preprocess Melange programs (simplifying code generation for common use cases like generating bindings or code from types). It's not compatible with native, but if you want to share a module with melange.ppx we provide a drop-in replacement called: server-reason-react.melange_ppx.

Most of the features are shimmed to not work on the server and the compiler will warn to wrap it in browser_only expressions.

server-reason-react.melange_ppx supports

All mel. attributes

mel.* attributes are stripped out of the native build, and transformed into raising functions to raise at server runtime.

Enables pipe_first ->

Pipe first is the operator to apply a function to a value where data is passed as the first argument. -> is a convenient operator that allows you to "flip" your code inside-out.

It's not supported in native OCaml, but server-reason-react.melange_ppx enables it and works as expected.

Supports RegExp [%re "/regex/"]

Transforms [%re ...] into Js.Re.t from server-reason-react.js and it uses a C implementation of the regex engine from QuickJS from quickjs.ml. (Experimental)

Debugger %debugger

It removes the debugger in native. It's a noop on the server context, and it's pretty uncommon it's usage.

Supports Js.t (object access ## and mel.obj)

let john = {"name": "john", "age": 99};
+/* The type of john is `{ . "age": int, "name": string }` which represents a
+JavaScript Object. */
+let name = john##name;

https://melange.re/v3.0.0/communicate-with-javascript.html#using-js-t-objects

Object creation and object field access is designed to interact with JavaScript Objects, in native we reperesent those as OCaml Objects (which are very different) and server-reason-react-ppx.melange_ppx proviedes the implementation to make it work. (Experimental)

Usage

To use server-reason-react.melange_ppx you need to add it to your dune's pps field:

(preprocess (pps server-reason-react.melange_ppx)) 

Next

How to structure the code

diff --git a/local/server-reason-react/get-started.html b/local/server-reason-react/get-started.html new file mode 100644 index 000000000..8df1bf8e4 --- /dev/null +++ b/local/server-reason-react/get-started.html @@ -0,0 +1,10 @@ + +get-started (docs.local.server-reason-react.get-started)

Getting started with server-reason-react

This documentation will explain the different modules available in server-reason-react, and how to use them, however it is assumed a minimum understanding of Reason, reason-react, Melange and a bit of dune.

Let's start with a React component written in Reason:

module Greetings = {
+  [@react.component]
+  let make = (~name) => {
+    <div>
+      <h1> {React.string("Hello " ++ name)} </h1>
+    </div>
+  }
+};

A module with a make function that returns a React.element. This component is both a reason-react component and a server-reason-react component.

server-reason-react provides React and ReactDOM modules with the same interface as reason-react, including the JSX transformation via server-reason-react.ppx.

The main difference is, with server-reason-react you can render it on the server with ReactDOM (server-reason-react.reactDom):

let html = ReactDOM.renderToStaticMarkup(<Greetings name="visitor" />)
+// <div><h1>Hello visitor</h1></div>

This is usually part of your server-side code

The ReactDOM module exposes the renderTo* methods: ReactDOM.renderToStaticMarkup, ReactDOM.renderToString and ReactDOM.renderToLwtStream.

Install from opam's registry (recommended)

opam install server-reason-react

Install from source

If you want to use the development version of server-reason-react, you can install it via opam pinning:

opam pin server-reason-react.dev "https://github.com/ml-in-barcelona/server-reason-react.git#main" -y

Usage

Add server-reason-react.react and server-reason-react.reactDom to your dune file:

(libraries (server-reason-react.react server-reason-react.reactDom) 

and also server-reason-react.ppx to your preprocess list

(preprocess (pps server-reason-react.ppx)) 

Next

How universal code works

diff --git a/local/server-reason-react/html/Html/index.html b/local/server-reason-react/html/Html/index.html new file mode 100644 index 000000000..481a7cb7f --- /dev/null +++ b/local/server-reason-react/html/Html/index.html @@ -0,0 +1,2 @@ + +Html (docs.local.server-reason-react.html.Html)

Module Html

val is_self_closing_tag : string -> bool
val escape_and_add : Buffer.t -> string -> unit
type attribute = [
  1. | `Present of string
  2. | `Value of string * string
  3. | `Omitted
]
val attribute : 'a -> 'b -> [> `Value of 'a * 'b ]
val present : 'a -> [> `Present of 'a ]
val omitted : unit -> [> `Omitted ]
val write_attribute : Buffer.t -> attribute -> unit
type element =
  1. | Null
  2. | String of string
  3. | Raw of string
  4. | Node of {
    1. tag : string;
    2. attributes : attribute list;
    3. children : element list;
    }
  5. | List of string * element list
val string : string -> element
val raw : string -> element
val null : element
val int : int -> element
val float : float -> element
val list : ?separator:string -> element list -> element
val fragment : (string * element list) -> element
val node : string -> attribute list -> element list -> element
val render : element -> string
diff --git a/local/server-reason-react/html/index.html b/local/server-reason-react/html/index.html new file mode 100644 index 000000000..9f9a5b880 --- /dev/null +++ b/local/server-reason-react/html/index.html @@ -0,0 +1,2 @@ + +html (docs.local.server-reason-react.html)

Package server-reason-react.html

Library server-reason-react.html

The entry point of this library is the module: Html.

diff --git a/local/server-reason-react/index.html b/local/server-reason-react/index.html new file mode 100644 index 000000000..7f655a141 --- /dev/null +++ b/local/server-reason-react/index.html @@ -0,0 +1,2 @@ + +server-reason-react (docs.local.server-reason-react)

server-reason-react

This is the documentation and API for server-reason-react, an implementation of react, react-dom and react-dom/server to run on the server with Reason/OCaml, with the purpose to Server-side render HTML markup from a reason-react application natively (for both SSR and SSG).

Why

Explained more about the motivation in this blog post sancho.dev/blog/server-side-rendering-react-in-ocaml and also in my talk about Server side rendering React natively with Reason at ReactAlicante 2023.

Guides

  1. Get started
  2. How universal code works
  3. How to structure the code
  4. Exclude client code from the native build
  5. Externals and melange attributes

Core API

Those are the core libraries of server-reason-react.

Other libraries

Aside from the core, server-reason-react exposes some needed known libraries from melange or melange-community to help make components universal:

This would eventually be extracted into their own packages

Next

Get started

diff --git a/local/server-reason-react/js/Js/Array/index.html b/local/server-reason-react/js/Js/Array/index.html new file mode 100644 index 000000000..c13f9a1d4 --- /dev/null +++ b/local/server-reason-react/js/Js/Array/index.html @@ -0,0 +1,2 @@ + +Array (docs.local.server-reason-react.js.Js.Array)

Module Js.Array

type 'a t = 'a array
type 'a array_like
val from : 'a array_like -> 'a t
  • alert not_implemented is not implemented in native under server-reason-react.js
val fromMap : 'a array_like -> f:('a -> 'b) -> 'b t
  • alert not_implemented is not implemented in native under server-reason-react.js
val isArray : 'a array -> bool
val length : 'a array -> int
val copyWithin : to_:int -> ?start:int -> ?end_:int -> 'a t -> 'a t
  • alert not_implemented is not implemented in native under server-reason-react.js
val fill : value:'a -> ?start:int -> ?end_:int -> 'a t -> 'a t
  • alert not_implemented is not implemented in native under server-reason-react.js
val pop : 'a t -> 'a nullable
  • alert not_implemented is not implemented in native under server-reason-react.js
val push : value:'a -> 'a t -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val pushMany : values:'a t -> 'a t -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val reverseInPlace : 'a t -> 'a t
  • alert not_implemented is not implemented in native under server-reason-react.js
val shift : 'a t -> 'a option
  • alert not_implemented is not implemented in native under server-reason-react.js
val sortInPlace : 'a t -> 'a t
  • alert not_implemented is not implemented in native under server-reason-react.js
val sortInPlaceWith : f:('a -> 'a -> int) -> 'a t -> 'a t
  • alert not_implemented is not implemented in native under server-reason-react.js
val spliceInPlace : start:int -> remove:int -> add:'a t -> 'a t -> 'a t
  • alert not_implemented is not implemented in native under server-reason-react.js
val removeFromInPlace : start:int -> 'a t -> 'a t
  • alert not_implemented is not implemented in native under server-reason-react.js
val removeCountInPlace : start:int -> count:int -> 'a t -> 'a t
  • alert not_implemented is not implemented in native under server-reason-react.js
val unshift : value:'a -> 'a t -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val unshiftMany : values:'a t -> 'a t -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val concat : other:'a t -> 'a t -> 'a t
val concatMany : arrays:'a t t -> 'a t -> 'a t
val includes : value:'a -> 'a t -> bool
val indexOf : value:'a -> ?start:int -> 'a t -> int
val join : ?sep:string -> string t -> string
val lastIndexOf : value:'a -> 'a t -> int
val lastIndexOfFrom : value:'a -> start:int -> 'a t -> int
val slice : ?start:int -> ?end_:int -> 'a t -> 'a t
val copy : 'a array -> 'a array
val toString : 'a t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val toLocaleString : 'a t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val everyi : f:('a -> int -> bool) -> 'a t -> bool
val every : f:('a -> bool) -> 'a t -> bool
val filter : f:('a -> bool) -> 'a t -> 'a t
val filteri : f:('a -> int -> bool) -> 'a t -> 'a t
val findi : f:('a -> int -> bool) -> 'a t -> 'a nullable
val find : f:('a -> bool) -> 'a t -> 'a nullable
val findIndexi : f:('a -> int -> bool) -> 'a t -> int
val findIndex : f:('a -> bool) -> 'a t -> int
val forEach : f:('a -> unit) -> 'a t -> unit
val forEachi : f:('a -> int -> unit) -> 'a t -> unit
val map : f:('a -> 'b) -> 'a t -> 'b t
val mapi : f:('a -> int -> 'b) -> 'a t -> 'b t
val reduce : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b
val reducei : f:('b -> 'a -> int -> 'b) -> init:'b -> 'a t -> 'b
val reduceRight : f:('b -> 'a -> 'b) -> init:'b -> 'a t -> 'b
val reduceRighti : f:('b -> 'a -> int -> 'b) -> init:'b -> 'a t -> 'b
val some : f:('a -> bool) -> 'a t -> bool
val somei : f:('a -> int -> bool) -> 'a t -> bool
val unsafe_get : 'a array -> int -> 'a
val unsafe_set : 'a array -> int -> 'a -> unit
diff --git a/local/server-reason-react/js/Js/Bigint/index.html b/local/server-reason-react/js/Js/Bigint/index.html new file mode 100644 index 000000000..f58e06e14 --- /dev/null +++ b/local/server-reason-react/js/Js/Bigint/index.html @@ -0,0 +1,2 @@ + +Bigint (docs.local.server-reason-react.js.Js.Bigint)

Module Js.Bigint

diff --git a/local/server-reason-react/js/Js/Console/index.html b/local/server-reason-react/js/Js/Console/index.html new file mode 100644 index 000000000..cf21fbb96 --- /dev/null +++ b/local/server-reason-react/js/Js/Console/index.html @@ -0,0 +1,2 @@ + +Console (docs.local.server-reason-react.js.Js.Console)

Module Js.Console

val log : string -> unit
val log2 : string -> string -> unit
val log3 : string -> string -> string -> unit
val log4 : string -> string -> string -> string -> unit
val logMany : string array -> unit
val info : string -> unit
val info2 : string -> string -> unit
val info3 : string -> string -> string -> unit
val info4 : string -> string -> string -> string -> unit
val infoMany : string array -> unit
val error : string -> unit
val error2 : string -> string -> unit
val error3 : string -> string -> string -> unit
val error4 : string -> string -> string -> string -> unit
val errorMany : string array -> unit
val warn : string -> unit
val warn2 : string -> string -> unit
val warn3 : string -> string -> string -> unit
val warn4 : string -> string -> string -> string -> unit
val warnMany : string array -> unit
val trace : unit -> unit
  • alert not_implemented is not implemented in native under server-reason-react.js
val timeStart : 'a -> unit
  • alert not_implemented is not implemented in native under server-reason-react.js
val timeEnd : 'a -> unit
  • alert not_implemented is not implemented in native under server-reason-react.js
diff --git a/local/server-reason-react/js/Js/Date/index.html b/local/server-reason-react/js/Js/Date/index.html new file mode 100644 index 000000000..be1cb99c2 --- /dev/null +++ b/local/server-reason-react/js/Js/Date/index.html @@ -0,0 +1,55 @@ + +Date (docs.local.server-reason-react.js.Js.Date)

Module Js.Date

type t
val valueOf : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val make : unit -> t
  • alert not_implemented is not implemented in native under server-reason-react.js
val fromFloat : float -> t
  • alert not_implemented is not implemented in native under server-reason-react.js
val fromString : string -> t
  • alert not_implemented is not implemented in native under server-reason-react.js
val makeWithYM : year:float -> month:float -> t
  • alert not_implemented is not implemented in native under server-reason-react.js
val makeWithYMD : year:float -> month:float -> date:float -> t
  • alert not_implemented is not implemented in native under server-reason-react.js
val makeWithYMDH : year:float -> month:float -> date:float -> hours:float -> t
  • alert not_implemented is not implemented in native under server-reason-react.js
val makeWithYMDHM : + year:float -> + month:float -> + date:float -> + hours:float -> + minutes:float -> + t
  • alert not_implemented is not implemented in native under server-reason-react.js
val makeWithYMDHMS : + year:float -> + month:float -> + date:float -> + hours:float -> + minutes:float -> + seconds:float -> + t
  • alert not_implemented is not implemented in native under server-reason-react.js
val utcWithYM : year:float -> month:float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val utcWithYMD : year:float -> month:float -> date:float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val utcWithYMDH : + year:float -> + month:float -> + date:float -> + hours:float -> + float
  • alert not_implemented is not implemented in native under server-reason-react.js
val utcWithYMDHM : + year:float -> + month:float -> + date:float -> + hours:float -> + minutes:float -> + float
  • alert not_implemented is not implemented in native under server-reason-react.js
val utcWithYMDHMS : + year:float -> + month:float -> + date:float -> + hours:float -> + minutes:float -> + seconds:float -> + float
  • alert not_implemented is not implemented in native under server-reason-react.js
val now : unit -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val parseAsFloat : string -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getDate : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getDay : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getFullYear : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getHours : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getMilliseconds : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getMinutes : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getMonth : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getSeconds : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getTime : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getTimezoneOffset : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getUTCDate : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getUTCDay : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getUTCFullYear : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getUTCHours : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getUTCMilliseconds : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getUTCMinutes : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getUTCMonth : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val getUTCSeconds : t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setDate : float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setFullYear : float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setFullYearM : year:float -> month:float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setFullYearMD : year:float -> month:float -> date:float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setHours : float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setHoursM : hours:float -> minutes:float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setHoursMS : hours:float -> minutes:float -> seconds:float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setHoursMSMs : + hours:float -> + minutes:float -> + seconds:float -> + milliseconds:float -> + t -> + float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setMilliseconds : float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setMinutes : float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setMinutesS : minutes:float -> seconds:float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setMinutesSMs : + minutes:float -> + seconds:float -> + milliseconds:float -> + t -> + float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setMonth : float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setMonthD : month:float -> date:float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setSeconds : float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setSecondsMs : seconds:float -> milliseconds:float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setTime : float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCDate : float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCFullYear : float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCFullYearM : year:float -> month:float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCFullYearMD : year:float -> month:float -> date:float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCHours : float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCHoursM : hours:float -> minutes:float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCHoursMS : hours:float -> minutes:float -> seconds:float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCHoursMSMs : + hours:float -> + minutes:float -> + seconds:float -> + milliseconds:float -> + t -> + float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCMilliseconds : float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCMinutes : float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCMinutesS : minutes:float -> seconds:float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCMinutesSMs : + minutes:float -> + seconds:float -> + milliseconds:float -> + t -> + float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCMonth : float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCMonthD : month:float -> date:float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCSeconds : float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCSecondsMs : seconds:float -> milliseconds:float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val setUTCTime : float -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val toDateString : t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val toISOString : t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val toJSON : t -> string option
  • alert not_implemented is not implemented in native under server-reason-react.js
val toJSONUnsafe : t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val toLocaleDateString : t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val toLocaleString : t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val toLocaleTimeString : t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val toString : t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val toTimeString : t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val toUTCString : t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
diff --git a/local/server-reason-react/js/Js/Dict/index.html b/local/server-reason-react/js/Js/Dict/index.html new file mode 100644 index 000000000..48cc1d808 --- /dev/null +++ b/local/server-reason-react/js/Js/Dict/index.html @@ -0,0 +1,2 @@ + +Dict (docs.local.server-reason-react.js.Js.Dict)

Module Js.Dict

type 'a t
type key = string

Key type

val get : 'a t -> key -> 'a option

get dict key returns None if the key is not found in the dictionary, Some value otherwise

val unsafeGet : 'a t -> key -> 'a
val set : 'a t -> key -> 'a -> unit

set dict key value sets the key/value in dict

val keys : 'a t -> string array

keys dict returns all the keys in the dictionary dict

val empty : unit -> 'a t

empty () returns an empty dictionary

val unsafeDeleteKey : string t -> string -> unit

Experimental internal function

val entries : 'a t -> (key * 'a) array

entries dict returns the key value pairs in dict

val values : 'a t -> 'a array

values dict returns the values in dict

val fromList : (key * 'a) list -> 'a t

fromList entries creates a new dictionary containing each (key, value) pair in entries

val fromArray : (key * 'a) array -> 'a t

fromArray entries creates a new dictionary containing each (key, value) pair in entries

val map : f:('a -> 'b) -> 'a t -> 'b t

map f dict maps dict to a new dictionary with the same keys, using f to map each value

diff --git a/local/server-reason-react/js/Js/Exn/index.html b/local/server-reason-react/js/Js/Exn/index.html new file mode 100644 index 000000000..152ca2468 --- /dev/null +++ b/local/server-reason-react/js/Js/Exn/index.html @@ -0,0 +1,2 @@ + +Exn (docs.local.server-reason-react.js.Js.Exn)

Module Js.Exn

type t
type exn +=
  1. | Error of string
  2. | EvalError of string
  3. | RangeError of string
  4. | ReferenceError of string
  5. | SyntaxError of string
  6. | TypeError of string
  7. | UriError of string
val asJsExn : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val stack : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val message : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val name : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val fileName : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val anyToExnInternal : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val isCamlExceptionOrOpenVariant : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val raiseError : string -> 'a
val raiseEvalError : string -> 'a
val raiseRangeError : string -> 'a
val raiseReferenceError : string -> 'a
val raiseSyntaxError : string -> 'a
val raiseTypeError : string -> 'a
val raiseUriError : string -> 'a
diff --git a/local/server-reason-react/js/Js/Float/index.html b/local/server-reason-react/js/Js/Float/index.html new file mode 100644 index 000000000..23d56ae75 --- /dev/null +++ b/local/server-reason-react/js/Js/Float/index.html @@ -0,0 +1,2 @@ + +Float (docs.local.server-reason-react.js.Js.Float)

Module Js.Float

type t = float
val _NaN : float
val isNaN : float -> bool
val isFinite : float -> bool
val toExponential : ?digits:int -> t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val toFixed : ?digits:int -> t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val toPrecision : ?digits:int -> t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val toString : ?radix:int -> t -> string
val fromString : string -> float
diff --git a/local/server-reason-react/js/Js/Fn/index.html b/local/server-reason-react/js/Js/Fn/index.html new file mode 100644 index 000000000..c1bb95d42 --- /dev/null +++ b/local/server-reason-react/js/Js/Fn/index.html @@ -0,0 +1,2 @@ + +Fn (docs.local.server-reason-react.js.Js.Fn)

Module Js.Fn

type 'a arity0 = {
  1. i0 : unit -> 'a;
}
type 'a arity1 = {
  1. i1 : 'a;
}
type 'a arity2 = {
  1. i2 : 'a;
}
type 'a arity3 = {
  1. i3 : 'a;
}
type 'a arity4 = {
  1. i4 : 'a;
}
type 'a arity5 = {
  1. i5 : 'a;
}
type 'a arity6 = {
  1. i6 : 'a;
}
type 'a arity7 = {
  1. i7 : 'a;
}
type 'a arity8 = {
  1. i8 : 'a;
}
type 'a arity9 = {
  1. i9 : 'a;
}
type 'a arity10 = {
  1. i10 : 'a;
}
type 'a arity11 = {
  1. i11 : 'a;
}
type 'a arity12 = {
  1. i12 : 'a;
}
type 'a arity13 = {
  1. i13 : 'a;
}
type 'a arity14 = {
  1. i14 : 'a;
}
type 'a arity15 = {
  1. i15 : 'a;
}
type 'a arity16 = {
  1. i16 : 'a;
}
type 'a arity17 = {
  1. i17 : 'a;
}
type 'a arity18 = {
  1. i18 : 'a;
}
type 'a arity19 = {
  1. i19 : 'a;
}
type 'a arity20 = {
  1. i20 : 'a;
}
type 'a arity21 = {
  1. i21 : 'a;
}
type 'a arity22 = {
  1. i22 : 'a;
}
diff --git a/local/server-reason-react/js/Js/Global/index.html b/local/server-reason-react/js/Js/Global/index.html new file mode 100644 index 000000000..5bc7fe24d --- /dev/null +++ b/local/server-reason-react/js/Js/Global/index.html @@ -0,0 +1,2 @@ + +Global (docs.local.server-reason-react.js.Js.Global)

Module Js.Global

type intervalId
type timeoutId
val clearInterval : intervalId -> unit
  • alert not_implemented is not implemented in native under server-reason-react.js
val clearTimeout : timeoutId -> unit
  • alert not_implemented is not implemented in native under server-reason-react.js
val setInterval : f:(unit -> unit) -> int -> intervalId
  • alert not_implemented is not implemented in native under server-reason-react.js
val setIntervalFloat : f:(unit -> unit) -> float -> intervalId
  • alert not_implemented is not implemented in native under server-reason-react.js
val setTimeout : f:(unit -> unit) -> int -> timeoutId
  • alert not_implemented is not implemented in native under server-reason-react.js
val setTimeoutFloat : f:(unit -> unit) -> float -> timeoutId
  • alert not_implemented is not implemented in native under server-reason-react.js
val encodeURI : string -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val decodeURI : string -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val encodeURIComponent : string -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val decodeURIComponent : string -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
diff --git a/local/server-reason-react/js/Js/Int/index.html b/local/server-reason-react/js/Js/Int/index.html new file mode 100644 index 000000000..09d2f7892 --- /dev/null +++ b/local/server-reason-react/js/Js/Int/index.html @@ -0,0 +1,2 @@ + +Int (docs.local.server-reason-react.js.Js.Int)

Module Js.Int

type t = int
val toExponential : ?digits:int -> t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val toPrecision : ?digits:t -> t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val toString : ?radix:t -> t -> string
val toFloat : int -> float
val equal : t -> t -> bool
val max : int
val min : int
diff --git a/local/server-reason-react/js/Js/Internal/index.html b/local/server-reason-react/js/Js/Internal/index.html new file mode 100644 index 000000000..6f4f5b9c4 --- /dev/null +++ b/local/server-reason-react/js/Js/Internal/index.html @@ -0,0 +1,2 @@ + +Internal (docs.local.server-reason-react.js.Js.Internal)

Module Js.Internal

diff --git a/local/server-reason-react/js/Js/Json/index.html b/local/server-reason-react/js/Js/Json/index.html new file mode 100644 index 000000000..f469546f8 --- /dev/null +++ b/local/server-reason-react/js/Js/Json/index.html @@ -0,0 +1,2 @@ + +Json (docs.local.server-reason-react.js.Js.Json)

Module Js.Json

type t
type _ kind =
  1. | String : string kind
  2. | Number : float kind
  3. | Object : t Dict.t kind
  4. | Array : t array kind
  5. | Boolean : bool kind
  6. | Null : Types.null_val kind
type tagged_t =
  1. | JSONFalse
  2. | JSONTrue
  3. | JSONNull
  4. | JSONString of string
  5. | JSONNumber of float
  6. | JSONObject of t Dict.t
  7. | JSONArray of t array
val classify : t -> tagged_t
  • alert not_implemented is not implemented in native under server-reason-react.js
val test : 'a -> bool
  • alert not_implemented is not implemented in native under server-reason-react.js
val decodeString : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val decodeNumber : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val decodeObject : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val decodeArray : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val decodeBoolean : t -> 'a
  • alert not_implemented is not implemented in native under server-reason-react.js
val decodeNull : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val parseExn : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val stringifyAny : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val null : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val string : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val number : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val boolean : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val object_ : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val array : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val stringArray : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val numberArray : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val booleanArray : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val objectArray : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val stringify : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val stringifyWithSpace : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val patch : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val serializeExn : t -> string
  • alert not_implemented is not implemented in native under server-reason-react.js
val deserializeUnsafe : string -> 'a
  • alert not_implemented is not implemented in native under server-reason-react.js
diff --git a/local/server-reason-react/js/Js/Map/index.html b/local/server-reason-react/js/Js/Map/index.html new file mode 100644 index 000000000..f9036fc54 --- /dev/null +++ b/local/server-reason-react/js/Js/Map/index.html @@ -0,0 +1,2 @@ + +Map (docs.local.server-reason-react.js.Js.Map)

Module Js.Map

type ('k, 'v) t
diff --git a/local/server-reason-react/js/Js/Math/index.html b/local/server-reason-react/js/Js/Math/index.html new file mode 100644 index 000000000..f1aa92718 --- /dev/null +++ b/local/server-reason-react/js/Js/Math/index.html @@ -0,0 +1,2 @@ + +Math (docs.local.server-reason-react.js.Js.Math)

Module Js.Math

val _E : float
val _LN2 : float
val _LN10 : float
val _LOG2E : float
val _LOG10E : float
val _PI : float
val _SQRT1_2 : float
val _SQRT2 : float
val abs_int : int -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val abs_float : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val acos : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val acosh : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val asin : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val asinh : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val atan : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val atanh : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val atan2 : y:float -> x:float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val cbrt : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val unsafe_ceil_int : float -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val ceil_int : float -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val ceil_float : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val clz32 : int -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val cos : float -> float
val cosh : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val exp : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val expm1 : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val unsafe_floor_int : float -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val floor_int : float -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val floor_float : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val fround : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val hypot : float -> float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val hypotMany : float array -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val imul : int -> int -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val log : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val log1p : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val log10 : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val log2 : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val max_int : int -> int -> int
val maxMany_int : int array -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val max_float : float -> float -> float
val maxMany_float : float array -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val min_int : int -> int -> int
val minMany_int : int array -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val min_float : float -> float -> float
val minMany_float : float array -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val pow_float : base:float -> exp:float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val random : unit -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val random_int : int -> int -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val unsafe_round : float -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val round : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val sign_int : int -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val sign_float : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val sin : float -> float
val sinh : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val sqrt : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val tan : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val tanh : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val unsafe_trunc : float -> int
  • alert not_implemented is not implemented in native under server-reason-react.js
val trunc : float -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
diff --git a/local/server-reason-react/js/Js/Null/index.html b/local/server-reason-react/js/Js/Null/index.html new file mode 100644 index 000000000..7baeadf8f --- /dev/null +++ b/local/server-reason-react/js/Js/Null/index.html @@ -0,0 +1,2 @@ + +Null (docs.local.server-reason-react.js.Js.Null)

Module Js.Null

type 'a t = 'a nullable
val toOption : 'a t -> 'a nullable
val fromOpt : 'a nullable -> 'a t
val empty : 'a nullable
val return : 'a -> 'a nullable
val getUnsafe : 'a t -> 'a
val test : 'a nullable -> bool
val getExn : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val bind : 'a -> 'b -> 'c
  • alert not_implemented is not implemented in native under server-reason-react.js
val iter : 'a -> 'b -> 'c
  • alert not_implemented is not implemented in native under server-reason-react.js
val fromOption : 'a nullable -> 'a t
val from_opt : 'a nullable -> 'a t
diff --git a/local/server-reason-react/js/Js/Nullable/index.html b/local/server-reason-react/js/Js/Nullable/index.html new file mode 100644 index 000000000..67e6cd2f1 --- /dev/null +++ b/local/server-reason-react/js/Js/Nullable/index.html @@ -0,0 +1,2 @@ + +Nullable (docs.local.server-reason-react.js.Js.Nullable)

Module Js.Nullable

type 'a t = 'a nullable
val toOption : 'a t -> 'a nullable
val to_opt : 'a t -> 'a nullable
val return : 'a -> 'a t
val isNullable : 'a t -> bool
val null : 'a t
val undefined : 'a t
val bind : 'b t -> ('b -> 'b) -> 'b t
val iter : 'a t -> ('a -> unit) -> unit
val fromOption : 'a nullable -> 'a t
val from_opt : 'a nullable -> 'a t
diff --git a/local/server-reason-react/js/Js/Obj/index.html b/local/server-reason-react/js/Js/Obj/index.html new file mode 100644 index 000000000..ee6b83849 --- /dev/null +++ b/local/server-reason-react/js/Js/Obj/index.html @@ -0,0 +1,2 @@ + +Obj (docs.local.server-reason-react.js.Js.Obj)

Module Js.Obj

val empty : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val assign : 'a -> 'b -> 'c
  • alert not_implemented is not implemented in native under server-reason-react.js
val keys : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
diff --git a/local/server-reason-react/js/Js/Promise/index.html b/local/server-reason-react/js/Js/Promise/index.html new file mode 100644 index 000000000..b305124c5 --- /dev/null +++ b/local/server-reason-react/js/Js/Promise/index.html @@ -0,0 +1,8 @@ + +Promise (docs.local.server-reason-react.js.Js.Promise)

Module Js.Promise

type 'a t = 'a Lwt.t
type error = exn
val make : (resolve:('a -> unit) -> reject:(exn -> unit) -> unit) -> 'a Lwt.t
val resolve : 'a -> 'a Lwt.t
val reject : exn -> 'a Lwt.t
val all : 'a Lwt.t array -> 'a array Lwt.t
val all2 : ('a Lwt.t * 'b Lwt.t) -> ('a * 'b) Lwt.t
val all3 : ('a Lwt.t * 'b Lwt.t * 'c Lwt.t) -> ('a * 'b * 'c) Lwt.t
val all4 : + ('a Lwt.t * 'b Lwt.t * 'c Lwt.t * 'd Lwt.t) -> + ('a * 'b * 'c * 'd) Lwt.t
val all5 : + ('a Lwt.t * 'b Lwt.t * 'c Lwt.t * 'd Lwt.t * 'e Lwt.t) -> + ('a * 'b * 'c * 'd * 'e) Lwt.t
val all6 : + ('a Lwt.t * 'b Lwt.t * 'c Lwt.t * 'd Lwt.t * 'e Lwt.t * 'f Lwt.t) -> + ('a * 'b * 'c * 'd * 'e * 'f) Lwt.t
val race : 'a Lwt.t array -> 'a Lwt.t
val then_ : ('a -> 'b Lwt.t) -> 'a Lwt.t -> 'b Lwt.t
val catch : (exn -> 'a Lwt.t) -> 'a Lwt.t -> 'a Lwt.t
diff --git a/local/server-reason-react/js/Js/Re/index.html b/local/server-reason-react/js/Js/Re/index.html new file mode 100644 index 000000000..57a1ea2d5 --- /dev/null +++ b/local/server-reason-react/js/Js/Re/index.html @@ -0,0 +1,2 @@ + +Re (docs.local.server-reason-react.js.Js.Re)

Module Js.Re

type t
type result
val index : result -> int
val input : result -> string
val fromString : string -> t
val fromStringWithFlags : string -> flags:string -> t
val flags : t -> string
val global : t -> bool
val ignoreCase : t -> bool
val lastIndex : t -> int
val setLastIndex : t -> int -> unit
val multiline : t -> bool
val source : t -> string
val sticky : t -> bool
val unicode : t -> bool
val exec : str:string -> t -> result option
val test : str:string -> t -> bool
val captures : result -> string Nullable.t array
diff --git a/local/server-reason-react/js/Js/Set/index.html b/local/server-reason-react/js/Js/Set/index.html new file mode 100644 index 000000000..e594e18c5 --- /dev/null +++ b/local/server-reason-react/js/Js/Set/index.html @@ -0,0 +1,2 @@ + +Set (docs.local.server-reason-react.js.Js.Set)

Module Js.Set

type 'a t
diff --git a/local/server-reason-react/js/Js/String/index.html b/local/server-reason-react/js/Js/String/index.html new file mode 100644 index 000000000..61b7663d4 --- /dev/null +++ b/local/server-reason-react/js/Js/String/index.html @@ -0,0 +1,10 @@ + +String (docs.local.server-reason-react.js.Js.String)

Module Js.String

type t = string
val make : 'a -> t
  • alert not_implemented is not implemented in native under server-reason-react.js
val fromCharCode : int -> t
val fromCharCodeMany : int array -> t
  • alert not_implemented is not implemented in native under server-reason-react.js
val fromCodePoint : int -> t
val fromCodePointMany : int array -> t
  • alert not_implemented is not implemented in native under server-reason-react.js
val length : t -> int
val get : t -> int -> t
val charAt : index:int -> t -> t
val charCodeAt : index:int -> t -> float
val codePointAt : index:int -> t -> int nullable
val concat : other:t -> t -> t
val concatMany : strings:t array -> t -> t
val endsWith : suffix:t -> ?len:int -> t -> bool
val includes : search:t -> ?start:int -> t -> bool
val indexOf : search:t -> ?start:int -> t -> int
val lastIndexOf : search:t -> ?start:int -> t -> int
val localeCompare : other:t -> t -> float
  • alert not_implemented is not implemented in native under server-reason-react.js
val match_ : regexp:Re.t -> t -> t nullable array nullable
val normalize : ?form:[ `NFC | `NFD | `NFKC | `NFKD ] -> t -> t
  • alert not_implemented is not implemented in native under server-reason-react.js
val repeat : count:int -> t -> t
val replace : search:t -> replacement:t -> t -> t
val replaceByRe : regexp:Re.t -> replacement:t -> t -> t
val unsafeReplaceBy0 : regexp:Re.t -> f:(t -> int -> t -> t) -> t -> t
  • alert not_implemented is not implemented in native under server-reason-react.js
val unsafeReplaceBy1 : regexp:Re.t -> f:(t -> t -> int -> t -> t) -> t -> t
  • alert not_implemented is not implemented in native under server-reason-react.js
val unsafeReplaceBy2 : + regexp:Re.t -> + f:(t -> t -> t -> int -> t -> t) -> + t -> + t
  • alert not_implemented is not implemented in native under server-reason-react.js
val unsafeReplaceBy3 : + regexp:Re.t -> + f:(t -> t -> t -> t -> int -> t -> t) -> + t -> + t
  • alert not_implemented is not implemented in native under server-reason-react.js
  • alert not_implemented is not implemented in native under server-reason-react.js
val slice : ?start:int -> ?end_:int -> t -> t
val split : ?sep:t -> ?limit:int -> t -> t array
val splitByRe : regexp:Re.t -> ?limit:int -> t -> t nullable array
val startsWith : prefix:t -> ?start:int -> t -> bool
val substr : ?start:int -> ?len:int -> t -> t
val substring : ?start:int -> ?end_:int -> t -> t
val toLowerCase : t -> t
val toLocaleLowerCase : t -> t
  • alert not_implemented is not implemented in native under server-reason-react.js
val toUpperCase : t -> t
val toLocaleUpperCase : t -> t
  • alert not_implemented is not implemented in native under server-reason-react.js
val trim : t -> t
val anchor : name:t -> t -> t
  • alert not_implemented is not implemented in native under server-reason-react.js
  • alert not_implemented is not implemented in native under server-reason-react.js
diff --git a/local/server-reason-react/js/Js/TypedArray2/index.html b/local/server-reason-react/js/Js/TypedArray2/index.html new file mode 100644 index 000000000..6204fa3a3 --- /dev/null +++ b/local/server-reason-react/js/Js/TypedArray2/index.html @@ -0,0 +1,2 @@ + +TypedArray2 (docs.local.server-reason-react.js.Js.TypedArray2)

Module Js.TypedArray2

diff --git a/local/server-reason-react/js/Js/Typed_array/Float32Array/index.html b/local/server-reason-react/js/Js/Typed_array/Float32Array/index.html new file mode 100644 index 000000000..cc3dcb877 --- /dev/null +++ b/local/server-reason-react/js/Js/Typed_array/Float32Array/index.html @@ -0,0 +1,2 @@ + +Float32Array (docs.local.server-reason-react.js.Js.Typed_array.Float32Array)

Module Typed_array.Float32Array

type t
diff --git a/local/server-reason-react/js/Js/Typed_array/Uint16Array/index.html b/local/server-reason-react/js/Js/Typed_array/Uint16Array/index.html new file mode 100644 index 000000000..a0ccd88d4 --- /dev/null +++ b/local/server-reason-react/js/Js/Typed_array/Uint16Array/index.html @@ -0,0 +1,2 @@ + +Uint16Array (docs.local.server-reason-react.js.Js.Typed_array.Uint16Array)

Module Typed_array.Uint16Array

type t
diff --git a/local/server-reason-react/js/Js/Typed_array/Uint8ClampedArray/index.html b/local/server-reason-react/js/Js/Typed_array/Uint8ClampedArray/index.html new file mode 100644 index 000000000..222c34d7c --- /dev/null +++ b/local/server-reason-react/js/Js/Typed_array/Uint8ClampedArray/index.html @@ -0,0 +1,2 @@ + +Uint8ClampedArray (docs.local.server-reason-react.js.Js.Typed_array.Uint8ClampedArray)

Module Typed_array.Uint8ClampedArray

type t
diff --git a/local/server-reason-react/js/Js/Typed_array/index.html b/local/server-reason-react/js/Js/Typed_array/index.html new file mode 100644 index 000000000..732444916 --- /dev/null +++ b/local/server-reason-react/js/Js/Typed_array/index.html @@ -0,0 +1,2 @@ + +Typed_array (docs.local.server-reason-react.js.Js.Typed_array)

Module Js.Typed_array

module Uint16Array : sig ... end
module Uint8ClampedArray : sig ... end
module Float32Array : sig ... end
diff --git a/local/server-reason-react/js/Js/Types/index.html b/local/server-reason-react/js/Js/Types/index.html new file mode 100644 index 000000000..81f640df3 --- /dev/null +++ b/local/server-reason-react/js/Js/Types/index.html @@ -0,0 +1,2 @@ + +Types (docs.local.server-reason-react.js.Js.Types)

Module Js.Types

type symbol
type bigint_val
type obj_val
type undefined_val
type null_val
type function_val
type _ t =
  1. | Undefined : undefined_val t
  2. | Null : null_val t
  3. | Boolean : bool t
  4. | Number : float t
  5. | String : string t
  6. | Function : function_val t
  7. | Object : obj_val t
  8. | Symbol : symbol t
  9. | BigInt : bigint_val t
val test : 'a -> 'b -> 'c
  • alert not_implemented is not implemented in native under server-reason-react.js
type tagged_t =
  1. | JSFalse
  2. | JSTrue
  3. | JSNull
  4. | JSUndefined
  5. | JSNumber of float
  6. | JSString of string
  7. | JSFunction of function_val
  8. | JSObject of obj_val
  9. | JSSymbol of symbol
  10. | JSBigInt of bigint_val
val classify : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
diff --git a/local/server-reason-react/js/Js/Undefined/index.html b/local/server-reason-react/js/Js/Undefined/index.html new file mode 100644 index 000000000..4db4cf7f2 --- /dev/null +++ b/local/server-reason-react/js/Js/Undefined/index.html @@ -0,0 +1,2 @@ + +Undefined (docs.local.server-reason-react.js.Js.Undefined)

Module Js.Undefined

type 'a t = 'a nullable
val return : 'a -> 'a t
val empty : 'a nullable
val toOption : 'a t -> 'a nullable
val fromOpt : 'a nullable -> 'a t
val getExn : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val getUnsafe : 'a t -> 'a
val bind : 'a -> 'b -> 'c
  • alert not_implemented is not implemented in native under server-reason-react.js
val iter : 'a -> 'b -> 'c
  • alert not_implemented is not implemented in native under server-reason-react.js
val testAny : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val test : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val fromOption : 'a nullable -> 'a t
val from_opt : 'a nullable -> 'a t
diff --git a/local/server-reason-react/js/Js/Vector/index.html b/local/server-reason-react/js/Js/Vector/index.html new file mode 100644 index 000000000..8c2ac130e --- /dev/null +++ b/local/server-reason-react/js/Js/Vector/index.html @@ -0,0 +1,2 @@ + +Vector (docs.local.server-reason-react.js.Js.Vector)

Module Js.Vector

type 'a t = 'a array
val filterInPlace : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val empty : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val pushBack : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val copy : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val memByRef : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val iter : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val iteri : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val toList : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val map : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val mapi : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val foldLeft : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val foldRight : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val length : 'a t -> int
val get : 'a t -> int -> 'a
val set : 'a t -> int -> 'a -> unit
val make : int -> 'a -> 'a t
val init : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val append : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
val unsafe_get : 'a t -> int -> 'a
val unsafe_set : 'a t -> int -> 'a -> unit
diff --git a/local/server-reason-react/js/Js/WeakMap/index.html b/local/server-reason-react/js/Js/WeakMap/index.html new file mode 100644 index 000000000..bc48932e0 --- /dev/null +++ b/local/server-reason-react/js/Js/WeakMap/index.html @@ -0,0 +1,2 @@ + +WeakMap (docs.local.server-reason-react.js.Js.WeakMap)

Module Js.WeakMap

type ('k, 'v) t
diff --git a/local/server-reason-react/js/Js/WeakSet/index.html b/local/server-reason-react/js/Js/WeakSet/index.html new file mode 100644 index 000000000..089db2f67 --- /dev/null +++ b/local/server-reason-react/js/Js/WeakSet/index.html @@ -0,0 +1,2 @@ + +WeakSet (docs.local.server-reason-react.js.Js.WeakSet)

Module Js.WeakSet

type 'a t
diff --git a/local/server-reason-react/js/Js/index.html b/local/server-reason-react/js/Js/index.html new file mode 100644 index 000000000..c07e0ef20 --- /dev/null +++ b/local/server-reason-react/js/Js/index.html @@ -0,0 +1,2 @@ + +Js (docs.local.server-reason-react.js.Js)

Module Js

The Js equivalent library (very unsafe)

type 'a t = 'a constraint 'a = < .. >
module Fn : sig ... end
module Internal : sig ... end
type 'a null = 'a option
type 'a undefined = 'a null
type 'a nullable = 'a undefined
val toOption : 'a null -> 'a option
val nullToOption : 'a null -> 'a option
val undefinedToOption : 'a null -> 'a option
val fromOpt : 'a option -> 'a undefined
val undefined : 'a option
val null : 'a option
val empty : 'a option
type (+'a, +'e) promise
val typeof : 'a -> 'b
  • alert not_implemented is not implemented in native under server-reason-react.js
module Null : sig ... end
module Undefined : sig ... end
module Nullable : sig ... end
module Null_undefined = Nullable
module Exn : sig ... end
module Array : sig ... end
module Re : sig ... end
module String : sig ... end
module Promise : sig ... end
module Date : sig ... end
module type Dictionary = sig ... end
module Dict : Dictionary
module Global : sig ... end
module Types : sig ... end
module Json : sig ... end
module Math : sig ... end
module Obj : sig ... end
module Typed_array : sig ... end
module TypedArray2 : sig ... end
module Float : sig ... end
module Int : sig ... end
module Bigint : sig ... end
module Vector : sig ... end
module Console : sig ... end
val log : string -> unit
val log2 : string -> string -> unit
val log3 : string -> string -> string -> unit
val log4 : string -> string -> string -> string -> unit
val logMany : string array -> unit
module Set : sig ... end
module WeakSet : sig ... end
module Map : sig ... end
module WeakMap : sig ... end
diff --git a/local/server-reason-react/js/Js/module-type-Dictionary/index.html b/local/server-reason-react/js/Js/module-type-Dictionary/index.html new file mode 100644 index 000000000..d0a666020 --- /dev/null +++ b/local/server-reason-react/js/Js/module-type-Dictionary/index.html @@ -0,0 +1,2 @@ + +Dictionary (docs.local.server-reason-react.js.Js.Dictionary)

Module type Js.Dictionary

type 'a t
type key = string

Key type

val get : 'a t -> key -> 'a option

get dict key returns None if the key is not found in the dictionary, Some value otherwise

val unsafeGet : 'a t -> key -> 'a
val set : 'a t -> key -> 'a -> unit

set dict key value sets the key/value in dict

val keys : 'a t -> string array

keys dict returns all the keys in the dictionary dict

val empty : unit -> 'a t

empty () returns an empty dictionary

val unsafeDeleteKey : string t -> string -> unit

Experimental internal function

val entries : 'a t -> (key * 'a) array

entries dict returns the key value pairs in dict

val values : 'a t -> 'a array

values dict returns the values in dict

val fromList : (key * 'a) list -> 'a t

fromList entries creates a new dictionary containing each (key, value) pair in entries

val fromArray : (key * 'a) array -> 'a t

fromArray entries creates a new dictionary containing each (key, value) pair in entries

val map : f:('a -> 'b) -> 'a t -> 'b t

map f dict maps dict to a new dictionary with the same keys, using f to map each value

diff --git a/local/server-reason-react/js/index.html b/local/server-reason-react/js/index.html new file mode 100644 index 000000000..e940181be --- /dev/null +++ b/local/server-reason-react/js/index.html @@ -0,0 +1,2 @@ + +js (docs.local.server-reason-react.js)

Package server-reason-react.js

Library server-reason-react.js

The entry point of this library is the module: Js.

diff --git a/local/server-reason-react/melange-fetch/Fetch/AbortController/index.html b/local/server-reason-react/melange-fetch/Fetch/AbortController/index.html new file mode 100644 index 000000000..b8d85c8a7 --- /dev/null +++ b/local/server-reason-react/melange-fetch/Fetch/AbortController/index.html @@ -0,0 +1,2 @@ + +AbortController (docs.local.server-reason-react.melange-fetch.Fetch.AbortController)

Module Fetch.AbortController

val signal : abortController -> signal
val abort : abortController -> unit
val make : unit -> abortController
diff --git a/local/server-reason-react/melange-fetch/Fetch/Body/Impl/argument-1-T/index.html b/local/server-reason-react/melange-fetch/Fetch/Body/Impl/argument-1-T/index.html new file mode 100644 index 000000000..8d1ab8bb9 --- /dev/null +++ b/local/server-reason-react/melange-fetch/Fetch/Body/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.melange-fetch.Fetch.Body.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/melange-fetch/Fetch/Body/Impl/index.html b/local/server-reason-react/melange-fetch/Fetch/Body/Impl/index.html new file mode 100644 index 000000000..09d747909 --- /dev/null +++ b/local/server-reason-react/melange-fetch/Fetch/Body/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.local.server-reason-react.melange-fetch.Fetch.Body.Impl)

Module Body.Impl

Parameters

module T : sig ... end

Signature

val body : T.t -> readableStream
val bodyUsed : T.t -> bool
val arrayBuffer : arrayBuffer Js.Promise.t -> T.t
val blob : blob Js.Promise.t -> T.t
val formData : formData Js.Promise.t -> T.t
val json : Js.Json.t Js.Promise.t -> T.t
val text : string Js.Promise.t -> T.t
diff --git a/local/server-reason-react/melange-fetch/Fetch/Body/index.html b/local/server-reason-react/melange-fetch/Fetch/Body/index.html new file mode 100644 index 000000000..5e19abab2 --- /dev/null +++ b/local/server-reason-react/melange-fetch/Fetch/Body/index.html @@ -0,0 +1,2 @@ + +Body (docs.local.server-reason-react.melange-fetch.Fetch.Body)

Module Fetch.Body

module Impl (T : sig ... end) : sig ... end
type t = body
include sig ... end
val body : t -> readableStream
val bodyUsed : t -> bool
val arrayBuffer : arrayBuffer Js.Promise.t -> t
val blob : blob Js.Promise.t -> t
val formData : formData Js.Promise.t -> t
val json : Js.Json.t Js.Promise.t -> t
val text : string Js.Promise.t -> t
diff --git a/local/server-reason-react/melange-fetch/Fetch/BodyInit/index.html b/local/server-reason-react/melange-fetch/Fetch/BodyInit/index.html new file mode 100644 index 000000000..a1e9bae33 --- /dev/null +++ b/local/server-reason-react/melange-fetch/Fetch/BodyInit/index.html @@ -0,0 +1,2 @@ + +BodyInit (docs.local.server-reason-react.melange-fetch.Fetch.BodyInit)

Module Fetch.BodyInit

type t = bodyInit
val make : string -> t
val makeWithBlob : blob -> t
val makeWithBufferSource : bufferSource -> t
val makeWithFormData : formData -> t
val makeWithUrlSearchParams : urlSearchParams -> t
diff --git a/local/server-reason-react/melange-fetch/Fetch/FormData/EntryValue/index.html b/local/server-reason-react/melange-fetch/Fetch/FormData/EntryValue/index.html new file mode 100644 index 000000000..fb48ce970 --- /dev/null +++ b/local/server-reason-react/melange-fetch/Fetch/FormData/EntryValue/index.html @@ -0,0 +1,2 @@ + +EntryValue (docs.local.server-reason-react.melange-fetch.Fetch.FormData.EntryValue)

Module FormData.EntryValue

type t
val classify : 'a -> 'b
diff --git a/local/server-reason-react/melange-fetch/Fetch/FormData/Iterator/Next/index.html b/local/server-reason-react/melange-fetch/Fetch/FormData/Iterator/Next/index.html new file mode 100644 index 000000000..85ab6a846 --- /dev/null +++ b/local/server-reason-react/melange-fetch/Fetch/FormData/Iterator/Next/index.html @@ -0,0 +1,2 @@ + +Next (docs.local.server-reason-react.melange-fetch.Fetch.FormData.Iterator.Next)

Module Iterator.Next

type 'a t
val done_ : 'a t -> bool option
val value : 'a t -> 'a option
diff --git a/local/server-reason-react/melange-fetch/Fetch/FormData/Iterator/index.html b/local/server-reason-react/melange-fetch/Fetch/FormData/Iterator/index.html new file mode 100644 index 000000000..18b12ddf6 --- /dev/null +++ b/local/server-reason-react/melange-fetch/Fetch/FormData/Iterator/index.html @@ -0,0 +1,2 @@ + +Iterator (docs.local.server-reason-react.melange-fetch.Fetch.FormData.Iterator)

Module FormData.Iterator

module Next : sig ... end
type 'a t
val next : 'a t -> 'a Next.t
val forEach : f:('a -> unit) -> 'b t -> unit
diff --git a/local/server-reason-react/melange-fetch/Fetch/FormData/index.html b/local/server-reason-react/melange-fetch/Fetch/FormData/index.html new file mode 100644 index 000000000..ac6a0d445 --- /dev/null +++ b/local/server-reason-react/melange-fetch/Fetch/FormData/index.html @@ -0,0 +1,2 @@ + +FormData (docs.local.server-reason-react.melange-fetch.Fetch.FormData)

Module Fetch.FormData

module EntryValue : sig ... end
module Iterator : sig ... end
type t = formData
val make : unit -> t
val append : string -> string -> t -> unit
val delete : string -> t -> unit
val get : string -> t -> EntryValue.t option
val getAll : string -> t -> EntryValue.t array
val set : string -> string -> t -> unit
val has : string -> t -> bool
val keys : t -> string Iterator.t
val values : t -> EntryValue.t Iterator.t
val appendObject : string -> < .. > Js.t -> ?filename:string -> t -> unit
val appendBlob : string -> blob -> ?filename:string -> t -> unit
val appendFile : string -> file -> ?filename:string -> t -> unit
val setObject : string -> < .. > Js.t -> ?filename:string -> t -> unit
val setBlob : string -> blob -> ?filename:string -> t -> unit
val setFile : string -> file -> ?filename:string -> t -> unit
val entries : t -> (string * EntryValue.t) Iterator.t
diff --git a/local/server-reason-react/melange-fetch/Fetch/Headers/index.html b/local/server-reason-react/melange-fetch/Fetch/Headers/index.html new file mode 100644 index 000000000..eac034628 --- /dev/null +++ b/local/server-reason-react/melange-fetch/Fetch/Headers/index.html @@ -0,0 +1,2 @@ + +Headers (docs.local.server-reason-react.melange-fetch.Fetch.Headers)

Module Fetch.Headers

type t = headers
val make : unit -> 'a Js.Dict.t
val makeWithInit : headersInit -> t
val append : string -> string -> t -> unit
val delete : string -> t -> unit
val get : string -> t -> string option
val has : string -> t -> bool
val set : string -> string -> t -> unit
diff --git a/local/server-reason-react/melange-fetch/Fetch/HeadersInit/index.html b/local/server-reason-react/melange-fetch/Fetch/HeadersInit/index.html new file mode 100644 index 000000000..1b0ab8653 --- /dev/null +++ b/local/server-reason-react/melange-fetch/Fetch/HeadersInit/index.html @@ -0,0 +1,2 @@ + +HeadersInit (docs.local.server-reason-react.melange-fetch.Fetch.HeadersInit)

Module Fetch.HeadersInit

type t = headersInit
val make : < .. > Js.t -> t
val makeWithDict : string Js.Dict.t -> t
val makeWithArray : (Js.Dict.key * string) array -> t
diff --git a/local/server-reason-react/melange-fetch/Fetch/Request/index.html b/local/server-reason-react/melange-fetch/Fetch/Request/index.html new file mode 100644 index 000000000..ca06c063b --- /dev/null +++ b/local/server-reason-react/melange-fetch/Fetch/Request/index.html @@ -0,0 +1,2 @@ + +Request (docs.local.server-reason-react.melange-fetch.Fetch.Request)

Module Fetch.Request

type t = request
include sig ... end
val body : t -> readableStream
val bodyUsed : t -> bool
val arrayBuffer : arrayBuffer Js.Promise.t -> t
val blob : blob Js.Promise.t -> t
val formData : formData Js.Promise.t -> t
val json : Js.Json.t Js.Promise.t -> t
val text : string Js.Promise.t -> t
val make : string -> t
val makeWithInit : string -> requestInit -> t
val makeWithRequest : t -> t
val makeWithRequestInit : t -> requestInit -> t
val method_ : t -> requestMethod
val url : t -> string
val headers : t -> headers
val type_ : t -> requestType
val destination : t -> requestDestination
val referrer : t -> string
val referrerPolicy : t -> referrerPolicy
val mode : t -> requestMode
val credentials : t -> requestCredentials
val cache : t -> requestCache
val redirect : t -> requestRedirect
val integrity : t -> string
val keepalive : t -> bool
val signal : t -> signal
diff --git a/local/server-reason-react/melange-fetch/Fetch/RequestInit/index.html b/local/server-reason-react/melange-fetch/Fetch/RequestInit/index.html new file mode 100644 index 000000000..04b9809d7 --- /dev/null +++ b/local/server-reason-react/melange-fetch/Fetch/RequestInit/index.html @@ -0,0 +1,16 @@ + +RequestInit (docs.local.server-reason-react.melange-fetch.Fetch.RequestInit)

Module Fetch.RequestInit

type t = requestInit
val map : ('a -> 'b) -> 'c option -> 'd option
val make : + ?method_:requestMethod -> + ?headers:headersInit -> + ?body:bodyInit -> + ?referrer:string -> + ?referrerPolicy:referrerPolicy -> + ?mode:requestMode -> + ?credentials:requestCredentials -> + ?cache:requestCache -> + ?redirect:requestRedirect -> + ?integrity:string -> + ?keepalive:bool -> + ?signal:signal -> + unit -> + requestInit
diff --git a/local/server-reason-react/melange-fetch/Fetch/Response/index.html b/local/server-reason-react/melange-fetch/Fetch/Response/index.html new file mode 100644 index 000000000..9ad7cf8a5 --- /dev/null +++ b/local/server-reason-react/melange-fetch/Fetch/Response/index.html @@ -0,0 +1,2 @@ + +Response (docs.local.server-reason-react.melange-fetch.Fetch.Response)

Module Fetch.Response

type t = response
include sig ... end
val body : t -> readableStream
val bodyUsed : t -> bool
val arrayBuffer : arrayBuffer Js.Promise.t -> t
val blob : blob Js.Promise.t -> t
val formData : formData Js.Promise.t -> t
val json : Js.Json.t Js.Promise.t -> t
val text : string Js.Promise.t -> t
val error : unit -> t
val redirect : string -> t
val redirectWithStatus : string -> int -> t
val headers : t -> headers
val ok : t -> bool
val redirected : t -> bool
val status : t -> int
val statusText : t -> string
val type_ : t -> string
val url : t -> string
val clone : t -> t
diff --git a/local/server-reason-react/melange-fetch/Fetch/index.html b/local/server-reason-react/melange-fetch/Fetch/index.html new file mode 100644 index 000000000..a6393d23a --- /dev/null +++ b/local/server-reason-react/melange-fetch/Fetch/index.html @@ -0,0 +1,2 @@ + +Fetch (docs.local.server-reason-react.melange-fetch.Fetch)

Module Fetch

type body
type bodyInit
type headers = string Js.Dict.t
type headersInit
type response
type request
type requestInit
type signal = {
  1. aborted : bool;
  2. onabort : (unit -> unit) option;
  3. reason : string option;
}
type abortController = {
  1. signal : signal;
  2. abort : unit -> unit;
}
type arrayBuffer
type bufferSource
type formData
type readableStream
type urlSearchParams
type blob
type file
module AbortController : sig ... end
type requestMethod =
  1. | Get
  2. | Head
  3. | Post
  4. | Put
  5. | Delete
  6. | Connect
  7. | Options
  8. | Trace
  9. | Patch
  10. | Other of string
val encodeRequestMethod : requestMethod -> string
val decodeRequestMethod : string -> requestMethod
type referrerPolicy =
  1. | None
  2. | NoReferrer
  3. | NoReferrerWhenDowngrade
  4. | SameOrigin
  5. | Origin
  6. | StrictOrigin
  7. | OriginWhenCrossOrigin
  8. | StrictOriginWhenCrossOrigin
  9. | UnsafeUrl
val encodeReferrerPolicy : referrerPolicy -> string
val decodeReferrerPolicy : string -> referrerPolicy
type requestType =
  1. | None
  2. | Audio
  3. | Font
  4. | Image
  5. | Script
  6. | Style
  7. | Track
  8. | Video
val decodeRequestType : string -> requestType
type requestDestination =
  1. | None
  2. | Document
  3. | Embed
  4. | Font
  5. | Image
  6. | Manifest
  7. | Media
  8. | Object
  9. | Report
  10. | Script
  11. | ServiceWorker
  12. | SharedWorker
  13. | Style
  14. | Worker
  15. | Xslt
val decodeRequestDestination : string -> requestDestination
type requestMode =
  1. | Navigate
  2. | SameOrigin
  3. | NoCORS
  4. | CORS
val encodeRequestMode : requestMode -> string
val decodeRequestMode : string -> requestMode
type requestCredentials =
  1. | Omit
  2. | SameOrigin
  3. | Include
val encodeRequestCredentials : requestCredentials -> string
val decodeRequestCredentials : string -> requestCredentials
type requestCache =
  1. | Default
  2. | NoStore
  3. | Reload
  4. | NoCache
  5. | ForceCache
  6. | OnlyIfCached
val encodeRequestCache : requestCache -> string
val decodeRequestCache : string -> requestCache
type requestRedirect =
  1. | Follow
  2. | Error
  3. | Manual
val encodeRequestRedirect : requestRedirect -> string
val decodeRequestRedirect : string -> requestRedirect
module HeadersInit : sig ... end
module Headers : sig ... end
module BodyInit : sig ... end
module Body : sig ... end
module RequestInit : sig ... end
module Request : sig ... end
module Response : sig ... end
module FormData : sig ... end
val fetch : string -> response Js.Promise.t
val fetchWithInit : string -> requestInit -> response Js.Promise.t
val fetchWithRequest : request -> response Js.Promise.t
val fetchWithRequestInit : request -> requestInit -> response Js.Promise.t
diff --git a/local/server-reason-react/melange-fetch/index.html b/local/server-reason-react/melange-fetch/index.html new file mode 100644 index 000000000..f15904909 --- /dev/null +++ b/local/server-reason-react/melange-fetch/index.html @@ -0,0 +1,2 @@ + +melange-fetch (docs.local.server-reason-react.melange-fetch)

Package server-reason-react.melange-fetch

Library server-reason-react.melange-fetch

The entry point of this library is the module: Fetch.

diff --git a/local/server-reason-react/melange_ppx/Melange_native_ppx/Double_hash/index.html b/local/server-reason-react/melange_ppx/Melange_native_ppx/Double_hash/index.html new file mode 100644 index 000000000..d1eecbaa6 --- /dev/null +++ b/local/server-reason-react/melange_ppx/Melange_native_ppx/Double_hash/index.html @@ -0,0 +1,2 @@ + +Double_hash (docs.local.server-reason-react.melange_ppx.Melange_native_ppx.Double_hash)

Module Melange_native_ppx.Double_hash

diff --git a/local/server-reason-react/melange_ppx/Melange_native_ppx/Pipe_first/index.html b/local/server-reason-react/melange_ppx/Melange_native_ppx/Pipe_first/index.html new file mode 100644 index 000000000..a0568bd5e --- /dev/null +++ b/local/server-reason-react/melange_ppx/Melange_native_ppx/Pipe_first/index.html @@ -0,0 +1,2 @@ + +Pipe_first (docs.local.server-reason-react.melange_ppx.Melange_native_ppx.Pipe_first)

Module Melange_native_ppx.Pipe_first

val expander : Ppxlib.expression -> Ppxlib.expression option
diff --git a/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/Debug/index.html b/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/Debug/index.html new file mode 100644 index 000000000..c28aba4c3 --- /dev/null +++ b/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/Debug/index.html @@ -0,0 +1,2 @@ + +Debug (docs.local.server-reason-react.melange_ppx.Melange_native_ppx.Ppx.Debug)

Module Ppx.Debug

diff --git a/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/Mel_module/Esbuild/index.html b/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/Mel_module/Esbuild/index.html new file mode 100644 index 000000000..4857c7dbe --- /dev/null +++ b/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/Mel_module/Esbuild/index.html @@ -0,0 +1,2 @@ + +Esbuild (docs.local.server-reason-react.melange_ppx.Melange_native_ppx.Ppx.Mel_module.Esbuild)

Module Mel_module.Esbuild

val hash_for_filename : bytes -> string
val sum : string -> bytes
val hash : string -> string
val filename : base:string -> string -> string
diff --git a/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/Mel_module/Webpack/index.html b/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/Mel_module/Webpack/index.html new file mode 100644 index 000000000..ff192ea41 --- /dev/null +++ b/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/Mel_module/Webpack/index.html @@ -0,0 +1,2 @@ + +Webpack (docs.local.server-reason-react.melange_ppx.Melange_native_ppx.Ppx.Mel_module.Webpack)

Module Mel_module.Webpack

val hash : string -> string
val filename : base:string -> string -> string
diff --git a/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/Mel_module/index.html b/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/Mel_module/index.html new file mode 100644 index 000000000..3b127ec8d --- /dev/null +++ b/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/Mel_module/index.html @@ -0,0 +1,2 @@ + +Mel_module (docs.local.server-reason-react.melange_ppx.Melange_native_ppx.Ppx.Mel_module)

Module Ppx.Mel_module

type bundler =
  1. | Webpack
  2. | Esbuild
val bundler : bundler ref
val prefix : string ref
val is_melange_attr : Ppxlib.attribute -> bool
val has_attr : Ppxlib.attribute list -> bool
val asset_payload : Ppxlib.attribute list -> string option
module Esbuild : sig ... end
module Webpack : sig ... end
diff --git a/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/String_interpolation/Utf8_string/index.html b/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/String_interpolation/Utf8_string/index.html new file mode 100644 index 000000000..859b038fe --- /dev/null +++ b/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/String_interpolation/Utf8_string/index.html @@ -0,0 +1,2 @@ + +Utf8_string (docs.local.server-reason-react.melange_ppx.Melange_native_ppx.Ppx.String_interpolation.Utf8_string)

Module String_interpolation.Utf8_string

type byte =
  1. | Single of int
  2. | Cont of int
  3. | Leading of int * int
  4. | Invalid
val classify : char -> byte

classify chr returns the byte corresponding to chr

diff --git a/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/String_interpolation/index.html b/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/String_interpolation/index.html new file mode 100644 index 000000000..055bbba40 --- /dev/null +++ b/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/String_interpolation/index.html @@ -0,0 +1,9 @@ + +String_interpolation (docs.local.server-reason-react.melange_ppx.Melange_native_ppx.Ppx.String_interpolation)

Module Ppx.String_interpolation

module Utf8_string : sig ... end
type error =
  1. | Invalid_code_point
  2. | Unterminated_backslash
  3. | Unterminated_variable
  4. | Unmatched_paren
  5. | Invalid_syntax_of_var of string
type kind =
  1. | String
  2. | Var of int * int
type pos = {
  1. lnum : int;
  2. offset : int;
  3. byte_bol : int;
}
type segment = {
  1. start : pos;
  2. finish : pos;
  3. kind : kind;
  4. content : string;
}
type cxt = {
  1. mutable segment_start : pos;
  2. buf : Buffer.t;
  3. s_len : int;
  4. mutable segments : segment list;
  5. pos_bol : int;
  6. byte_bol : int;
  7. pos_lnum : int;
}
exception Error of pos * pos * error
val pp_error : Format.formatter -> error -> unit
val valid_lead_identifier_char : char -> bool
val valid_identifier_char : char -> bool
val valid_identifier : string -> bool
val update_position : int -> pos -> Lexing.position -> Lexing.position
val update : int -> pos -> pos -> Ppxlib.Location.t -> Ppxlib.Location.t
val pos_error : cxt -> loc:int -> error -> 'a
val add_var_segment : cxt -> int -> int -> int -> unit
val add_str_segment : cxt -> int -> unit
val check_and_transform : int -> string -> int -> cxt -> unit
val expect_simple_var : int -> string -> int -> cxt -> unit
val expect_var_paren : int -> string -> int -> cxt -> unit
val border : int
val handle_segments : + Ppxlib.location -> + segment list -> + Astlib.Ast_500.Parsetree.expression
val transform : + loc:Ppxlib.Location.t -> + Ppxlib.expression -> + string -> + Astlib.Ast_500.Parsetree.expression
diff --git a/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/class-raise_exception_mapper/index.html b/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/class-raise_exception_mapper/index.html new file mode 100644 index 000000000..8c4411827 --- /dev/null +++ b/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/class-raise_exception_mapper/index.html @@ -0,0 +1,3 @@ + +raise_exception_mapper (docs.local.server-reason-react.melange_ppx.Melange_native_ppx.Ppx.raise_exception_mapper)

Class Ppx.raise_exception_mapper

diff --git a/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/index.html b/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/index.html new file mode 100644 index 000000000..fdba04f5e --- /dev/null +++ b/local/server-reason-react/melange_ppx/Melange_native_ppx/Ppx/index.html @@ -0,0 +1,37 @@ + +Ppx (docs.local.server-reason-react.melange_ppx.Melange_native_ppx.Ppx)

Module Melange_native_ppx.Ppx

module Mel_module : sig ... end
module String_interpolation : sig ... end
val is_send_pipe : Ppxlib.attribute list -> bool
val get_function_name : Ppxlib.pattern_desc -> string option
val get_label : Ppxlib.core_type_desc -> string option
val get_send_pipe : Ppxlib.attribute list -> Ppxlib.core_type option
val has_ptyp_attribute : Ppxlib.attribute list -> string -> bool
val is_mel_as : Ppxlib.core_type -> bool
val inject_send_pipe_as_last_argument : 'a option -> 'b list -> 'b list
val is_mel_raw : Ppxlib.expression_desc -> bool
val capture_payload : Ppxlib.payload -> string
val get_payload_from_mel_raw : Ppxlib.expression_desc -> string
val expression_has_mel_raw : Ppxlib.expression_desc -> bool
val raise_failure : loc:Ppxlib.location -> string -> Ppxlib_ast.Ast.expression
val mel_raw_found_in_native_message : + loc:Astlib.Location.t -> + string -> + Astlib.Ast_500.Parsetree.expression
val mel_module_found_in_native_message : + loc:Astlib.Location.t -> + Astlib.Ast_500.Parsetree.expression
val external_found_in_native_message : + loc:Astlib.Location.t -> + Astlib.Ast_500.Parsetree.expression
val get_function_arity : Ppxlib.expression_desc -> int
val transform_external_arrow : + loc:Astlib.Location.t -> + string Ppxlib.loc -> + Ppxlib.attribute list -> + Ppxlib.core_type -> + Astlib.Ast_500.Parsetree.structure_item
val ptyp_humanize : Ppxlib.core_type_desc -> string
val transform_external : + module_path:string -> + string Ppxlib.loc -> + Ppxlib.attribute list -> + Astlib.Location.t -> + Ppxlib.core_type -> + Astlib.Ast_500.Parsetree.structure_item
val tranform_record_to_object : + loc:Astlib.Location.t -> + (string * Ppxlib.expression) list -> + Astlib.Ast_500.Parsetree.expression
val validate_record_labels : + loc:Ppxlib.Location.t -> + (Ppxlib.longident Ppxlib.loc * 'a) list -> + ((string * 'b) list, + string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) + result
class raise_exception_mapper : string -> object ... end
module Debug : sig ... end
diff --git a/local/server-reason-react/melange_ppx/Melange_native_ppx/Regex/index.html b/local/server-reason-react/melange_ppx/Melange_native_ppx/Regex/index.html new file mode 100644 index 000000000..b9a9b4b56 --- /dev/null +++ b/local/server-reason-react/melange_ppx/Melange_native_ppx/Regex/index.html @@ -0,0 +1,5 @@ + +Regex (docs.local.server-reason-react.melange_ppx.Melange_native_ppx.Regex)

Module Melange_native_ppx.Regex

val parse_re : string -> (string * string option, string) result
val extractor : ('a, 'a Ppxlib.Loc.t -> 'b, 'b) Ppxlib.Ast_pattern.t
diff --git a/local/server-reason-react/melange_ppx/Melange_native_ppx/index.html b/local/server-reason-react/melange_ppx/Melange_native_ppx/index.html new file mode 100644 index 000000000..5644bd291 --- /dev/null +++ b/local/server-reason-react/melange_ppx/Melange_native_ppx/index.html @@ -0,0 +1,2 @@ + +Melange_native_ppx (docs.local.server-reason-react.melange_ppx.Melange_native_ppx)

Module Melange_native_ppx

module Double_hash : sig ... end
module Pipe_first : sig ... end
module Ppx : sig ... end
module Regex : sig ... end
diff --git a/local/server-reason-react/melange_ppx/index.html b/local/server-reason-react/melange_ppx/index.html new file mode 100644 index 000000000..616633bc7 --- /dev/null +++ b/local/server-reason-react/melange_ppx/index.html @@ -0,0 +1,2 @@ + +melange_ppx (docs.local.server-reason-react.melange_ppx)

Package server-reason-react.melange_ppx

Library server-reason-react.melange_ppx

The entry point of this library is the module: Melange_native_ppx.

diff --git a/local/server-reason-react/ppx/Server_reason_react_ppx/index.html b/local/server-reason-react/ppx/Server_reason_react_ppx/index.html new file mode 100644 index 000000000..942bdae12 --- /dev/null +++ b/local/server-reason-react/ppx/Server_reason_react_ppx/index.html @@ -0,0 +1,57 @@ + +Server_reason_react_ppx (docs.local.server-reason-react.ppx.Server_reason_react_ppx)

Module Server_reason_react_ppx

module List = ListLabels
val repo_url : string
val issues_url : string
val pexp_list : + loc:Ppxlib.location -> + Ppxlib.expression list -> + Ppxlib_ast.Ast.expression
exception Error of Ppxlib.expression
val raise_errorf : + loc:Astlib.Location.t -> + ('a, unit, string, 'b) format4 -> + 'c
val make_string : + loc:Astlib.Location.t -> + string -> + Astlib.Ast_500.Parsetree.expression
val react_dot_component : string
val react_dot_async_dot_component : string
val hasAttr : Ppxlib.attribute -> string -> bool
val hasReactComponentAttr : Ppxlib.attribute -> bool
val otherAttrsPure : Ppxlib.attribute -> bool
val hasNotAttrOnBinding : Ppxlib.value_binding -> string -> bool
val hasAttrOnBinding : Ppxlib.value_binding -> string -> bool
val unwrap_children : + Ppxlib.expression list -> + Ppxlib.expression -> + Ppxlib.expression list
val is_jsx : Ppxlib.attribute -> bool
val has_jsx_attr : Ppxlib.attribute list -> bool
val validate_prop : loc:Astlib.Location.t -> string -> string -> DomProps.prop
val make_prop : + is_optional:bool -> + prop:DomProps.prop -> + Ppxlib_ast.Ast.expression -> + Ppxlib.expression -> + Ppxlib_ast.Ast.expression
val is_optional : Ppxlib.arg_label -> bool
val transform_labelled : + loc:Astlib.Location.t -> + tag_name:string -> + (Ppxlib.arg_label * Ppxlib.expression) -> + Ppxlib_ast.Ast.expression -> + Ppxlib_ast.Ast.expression
val transform_lowercase_props : + loc:Ppxlib.location -> + tag_name:string -> + (Ppxlib.arg_label * Ppxlib.expression) list -> + Ppxlib_ast.Ast.expression
val rewrite_lowercase : + loc:Ppxlib.Location.t -> + string -> + (Ppxlib.arg_label * Ppxlib.expression) list -> + Ppxlib.expression list option -> + Ppxlib_ast.Ast.expression
val split_args : + (Ppxlib.arg_label * Ppxlib.expression) list -> + Ppxlib.expression list option * (Ppxlib.arg_label * Ppxlib.expression) list
val list_have_tail : Ppxlib.expression_desc -> bool
val transform_items_of_list : + loc:Ppxlib.location -> + Ppxlib_ast.Ast.expression -> + Ppxlib_ast.Ast.expression
val remove_warning_16_optional_argument_cannot_be_erased : + loc:Ppxlib.location -> + Ppxlib.attribute
val remove_warning_27_unused_var_strict : + loc:Ppxlib.location -> + Ppxlib.attribute
val get_function_name : Ppxlib.value_binding -> string
val transform_function_with_warning : Ppxlib.expression -> Ppxlib.expression
val rewrite_signature_item : Ppxlib.signature_item -> Ppxlib.signature_item
val rewrite_structure_item : Ppxlib.structure_item -> Ppxlib.structure_item
val rewrite_jsx : Ppxlib.Ast_traverse.map
diff --git a/local/server-reason-react/ppx/index.html b/local/server-reason-react/ppx/index.html new file mode 100644 index 000000000..ee4111664 --- /dev/null +++ b/local/server-reason-react/ppx/index.html @@ -0,0 +1,2 @@ + +ppx (docs.local.server-reason-react.ppx)

Package server-reason-react.ppx

Library server-reason-react.ppx

The entry point of this library is the module: Server_reason_react_ppx.

diff --git a/local/server-reason-react/promise-js/Promise/Js/index.html b/local/server-reason-react/promise-js/Promise/Js/index.html new file mode 100644 index 000000000..1b7c01b02 --- /dev/null +++ b/local/server-reason-react/promise-js/Promise/Js/index.html @@ -0,0 +1,8 @@ + +Js (docs.local.server-reason-react.promise-js.Promise.Js)

Module Promise.Js

type (+'a, +'e) t = ('a, 'e) rejectable
val pending : unit -> ('a, 'e) rejectable * ('a -> unit) * ('e -> unit)
val resolved : 'a -> ('a, 'e) rejectable
val rejected : 'e -> ('a, 'e) rejectable
val get : ('a, 'e) rejectable -> ('a -> unit) -> unit
val tap : ('a, 'e) rejectable -> ('a -> unit) -> ('a, 'e) rejectable
val map : ('a, 'e) rejectable -> ('a -> 'b) -> ('b, 'e) rejectable
val flatMap : + ('a, 'e) rejectable -> + ('a -> ('b, 'e) rejectable) -> + ('b, 'e) rejectable
val catch : + ('a, 'e) rejectable -> + ('e -> ('a, 'e2) rejectable) -> + ('a, 'e2) rejectable
val all : ('a, 'e) rejectable list -> ('a list, 'e) rejectable
val race : ('a, 'e) rejectable list -> ('a, 'e) rejectable
val relax : 'a promise -> ('a, 'e) rejectable
val toResult : ('a, 'e) rejectable -> ('a, 'e) result promise
val fromResult : ('a, 'e) result promise -> ('a, 'e) rejectable
val fromBsPromise : 'a Js.Promise.t -> ('a, Js.Promise.error) rejectable
val toBsPromise : ('a, _) rejectable -> 'a Js.Promise.t
diff --git a/local/server-reason-react/promise-js/Promise/Operators/index.html b/local/server-reason-react/promise-js/Promise/Operators/index.html new file mode 100644 index 000000000..74433a773 --- /dev/null +++ b/local/server-reason-react/promise-js/Promise/Operators/index.html @@ -0,0 +1,5 @@ + +Operators (docs.local.server-reason-react.promise-js.Promise.Operators)

Module Promise.Operators

val (>|=) : ('a, 'e) result promise -> ('a -> 'b) -> ('b, 'e) result promise
  • deprecated Use bs-let
val (>>=) : + ('a, 'e) result promise -> + ('a -> ('b, 'e) result promise) -> + ('b, 'e) result promise
  • deprecated Use bs-let
diff --git a/local/server-reason-react/promise-js/Promise/PipeFirst/index.html b/local/server-reason-react/promise-js/Promise/PipeFirst/index.html new file mode 100644 index 000000000..796533de9 --- /dev/null +++ b/local/server-reason-react/promise-js/Promise/PipeFirst/index.html @@ -0,0 +1,2 @@ + +PipeFirst (docs.local.server-reason-react.promise-js.Promise.PipeFirst)

Module Promise.PipeFirst

diff --git a/local/server-reason-react/promise-js/Promise/index.html b/local/server-reason-react/promise-js/Promise/index.html new file mode 100644 index 000000000..972a851bd --- /dev/null +++ b/local/server-reason-react/promise-js/Promise/index.html @@ -0,0 +1,60 @@ + +Promise (docs.local.server-reason-react.promise-js.Promise)

Module Promise

type (+'a, +'e) rejectable
type never
type +'a promise = ('a, never) rejectable
type +'a t = 'a promise
val pending : unit -> 'a promise * ('a -> unit)
val resolved : 'a -> 'a promise
val exec : (('a -> unit) -> unit) -> 'a promise
val get : 'a promise -> ('a -> unit) -> unit
val tap : 'a promise -> ('a -> unit) -> 'a promise
val map : 'a promise -> ('a -> 'b) -> 'b promise
val flatMap : 'a promise -> ('a -> 'b promise) -> 'b promise
val getOk : ('a, 'e) result promise -> ('a -> unit) -> unit
val tapOk : ('a, 'e) result promise -> ('a -> unit) -> ('a, 'e) result promise
val mapOk : ('a, 'e) result promise -> ('a -> 'b) -> ('b, 'e) result promise
val flatMapOk : + ('a, 'e) result promise -> + ('a -> ('b, 'e) result promise) -> + ('b, 'e) result promise
val getError : ('a, 'e) result promise -> ('e -> unit) -> unit
val tapError : + ('a, 'e) result promise -> + ('e -> unit) -> + ('a, 'e) result promise
val mapError : + ('a, 'e) result promise -> + ('e -> 'e2) -> + ('a, 'e2) result promise
val flatMapError : + ('a, 'e) result promise -> + ('e -> ('a, 'e2) result promise) -> + ('a, 'e2) result promise
module Operators : sig ... end
val getSome : 'a option promise -> ('a -> unit) -> unit
val tapSome : 'a option promise -> ('a -> unit) -> 'a option promise
val mapSome : 'a option promise -> ('a -> 'b) -> 'b option promise
val flatMapSome : + 'a option promise -> + ('a -> 'b option promise) -> + 'b option promise
val race : 'a promise list -> 'a promise
val all : 'a promise list -> 'a list promise
val allArray : 'a promise array -> 'a array promise
val all2 : 'a promise -> 'b promise -> ('a * 'b) promise
val all3 : 'a promise -> 'b promise -> 'c promise -> ('a * 'b * 'c) promise
val all4 : + 'a promise -> + 'b promise -> + 'c promise -> + 'd promise -> + ('a * 'b * 'c * 'd) promise
val all5 : + 'a promise -> + 'b promise -> + 'c promise -> + 'd promise -> + 'e promise -> + ('a * 'b * 'c * 'd * 'e) promise
val all6 : + 'a promise -> + 'b promise -> + 'c promise -> + 'd promise -> + 'e promise -> + 'f promise -> + ('a * 'b * 'c * 'd * 'e * 'f) promise
val allOk : ('a, 'e) result promise list -> ('a list, 'e) result promise
val allOkArray : ('a, 'e) result promise array -> ('a array, 'e) result promise
val allOk2 : + ('a, 'err) result promise -> + ('b, 'err) result promise -> + ('a * 'b, 'err) result promise
val allOk3 : + ('a, 'err) result promise -> + ('b, 'err) result promise -> + ('c, 'err) result promise -> + ('a * 'b * 'c, 'err) result promise
val allOk4 : + ('a, 'err) result promise -> + ('b, 'err) result promise -> + ('c, 'err) result promise -> + ('d, 'err) result promise -> + ('a * 'b * 'c * 'd, 'err) result promise
val allOk5 : + ('a, 'err) result promise -> + ('b, 'err) result promise -> + ('c, 'err) result promise -> + ('d, 'err) result promise -> + ('e, 'err) result promise -> + ('a * 'b * 'c * 'd * 'e, 'err) result promise
val allOk6 : + ('a, 'err) result promise -> + ('b, 'err) result promise -> + ('c, 'err) result promise -> + ('d, 'err) result promise -> + ('e, 'err) result promise -> + ('f, 'err) result promise -> + ('a * 'b * 'c * 'd * 'e * 'f, 'err) result promise
module Js : sig ... end
module PipeFirst : sig ... end
val onUnhandledException : (exn -> unit) ref
diff --git a/local/server-reason-react/promise-js/index.html b/local/server-reason-react/promise-js/index.html new file mode 100644 index 000000000..76cfa9f5d --- /dev/null +++ b/local/server-reason-react/promise-js/index.html @@ -0,0 +1,2 @@ + +promise-js (docs.local.server-reason-react.promise-js)

Package server-reason-react.promise-js

Library server-reason-react.promise-js

The entry point of this library is the module: Promise.

diff --git a/local/server-reason-react/promise-native/Promise/Js/index.html b/local/server-reason-react/promise-native/Promise/Js/index.html new file mode 100644 index 000000000..cff3fc621 --- /dev/null +++ b/local/server-reason-react/promise-native/Promise/Js/index.html @@ -0,0 +1,8 @@ + +Js (docs.local.server-reason-react.promise-native.Promise.Js)

Module Promise.Js

type ('a, 'e) t = ('a, 'e) rejectable
val pending : unit -> ('a, 'e) rejectable * ('a -> unit) * ('e -> unit)
val resolved : 'a -> ('a, 'e) rejectable
val rejected : 'e -> ('a, 'e) rejectable
val get : ('a, 'e) rejectable -> ('a -> unit) -> unit
val tap : ('a, 'e) rejectable -> ('a -> unit) -> ('a, 'e) rejectable
val map : ('a, 'e) rejectable -> ('a -> 'b) -> ('b, 'e) rejectable
val flatMap : + ('a, 'e) rejectable -> + ('a -> ('b, 'e) rejectable) -> + ('b, 'e) rejectable
val catch : + ('a, 'e) rejectable -> + ('e -> ('a, 'e2) rejectable) -> + ('a, 'e2) rejectable
val all : ('a, 'e) rejectable list -> ('a list, 'e) rejectable
val race : ('a, 'e) rejectable list -> ('a, 'e) rejectable
val relax : 'a promise -> ('a, 'e) rejectable
val toResult : ('a, 'e) rejectable -> ('a, 'e) result promise
val fromResult : ('a, 'e) result promise -> ('a, 'e) rejectable
diff --git a/local/server-reason-react/promise-native/Promise/Operators/index.html b/local/server-reason-react/promise-native/Promise/Operators/index.html new file mode 100644 index 000000000..4ef33ca82 --- /dev/null +++ b/local/server-reason-react/promise-native/Promise/Operators/index.html @@ -0,0 +1,5 @@ + +Operators (docs.local.server-reason-react.promise-native.Promise.Operators)

Module Promise.Operators

val (>|=) : ('a, 'e) result promise -> ('a -> 'b) -> ('b, 'e) result promise
  • deprecated Use the let* syntax
val (>>=) : + ('a, 'e) result promise -> + ('a -> ('b, 'e) result promise) -> + ('b, 'e) result promise
  • deprecated Use the let* syntax
diff --git a/local/server-reason-react/promise-native/Promise/PipeFirst/index.html b/local/server-reason-react/promise-native/Promise/PipeFirst/index.html new file mode 100644 index 000000000..bfefe5a00 --- /dev/null +++ b/local/server-reason-react/promise-native/Promise/PipeFirst/index.html @@ -0,0 +1,2 @@ + +PipeFirst (docs.local.server-reason-react.promise-native.Promise.PipeFirst)

Module Promise.PipeFirst

val (|.) : 'a -> ('a -> 'b) -> 'b
diff --git a/local/server-reason-react/promise-native/Promise/ReadyCallbacks/index.html b/local/server-reason-react/promise-native/Promise/ReadyCallbacks/index.html new file mode 100644 index 000000000..04674b22d --- /dev/null +++ b/local/server-reason-react/promise-native/Promise/ReadyCallbacks/index.html @@ -0,0 +1,2 @@ + +ReadyCallbacks (docs.local.server-reason-react.promise-native.Promise.ReadyCallbacks)

Module Promise.ReadyCallbacks

val callbacksPending : unit -> bool
type snapshot
val snapshot : unit -> snapshot
val isEmpty : snapshot -> bool
val call : snapshot -> unit
diff --git a/local/server-reason-react/promise-native/Promise/index.html b/local/server-reason-react/promise-native/Promise/index.html new file mode 100644 index 000000000..7998adb6f --- /dev/null +++ b/local/server-reason-react/promise-native/Promise/index.html @@ -0,0 +1,60 @@ + +Promise (docs.local.server-reason-react.promise-native.Promise)

Module Promise

type ('a, 'e) rejectable
type never
type 'a promise = ('a, never) rejectable
type 'a t = 'a promise
val pending : unit -> 'a promise * ('a -> unit)
val resolved : 'a -> 'a promise
val exec : (('a -> unit) -> unit) -> 'a promise
val get : 'a promise -> ('a -> unit) -> unit
val tap : 'a promise -> ('a -> unit) -> 'a promise
val map : 'a promise -> ('a -> 'b) -> 'b promise
val flatMap : 'a promise -> ('a -> 'b promise) -> 'b promise
val getOk : ('a, 'e) result promise -> ('a -> unit) -> unit
val tapOk : ('a, 'e) result promise -> ('a -> unit) -> ('a, 'e) result promise
val mapOk : ('a, 'e) result promise -> ('a -> 'b) -> ('b, 'e) result promise
val flatMapOk : + ('a, 'e) result promise -> + ('a -> ('b, 'e) result promise) -> + ('b, 'e) result promise
val getError : ('a, 'e) result promise -> ('e -> unit) -> unit
val tapError : + ('a, 'e) result promise -> + ('e -> unit) -> + ('a, 'e) result promise
val mapError : + ('a, 'e) result promise -> + ('e -> 'e2) -> + ('a, 'e2) result promise
val flatMapError : + ('a, 'e) result promise -> + ('e -> ('a, 'e2) result promise) -> + ('a, 'e2) result promise
module Operators : sig ... end
val getSome : 'a option promise -> ('a -> unit) -> unit
val tapSome : 'a option promise -> ('a -> unit) -> 'a option promise
val mapSome : 'a option promise -> ('a -> 'b) -> 'b option promise
val flatMapSome : + 'a option promise -> + ('a -> 'b option promise) -> + 'b option promise
val race : 'a promise list -> 'a promise
val all : 'a promise list -> 'a list promise
val allArray : 'a promise array -> 'a array promise
val all2 : 'a promise -> 'b promise -> ('a * 'b) promise
val all3 : 'a promise -> 'b promise -> 'c promise -> ('a * 'b * 'c) promise
val all4 : + 'a promise -> + 'b promise -> + 'c promise -> + 'd promise -> + ('a * 'b * 'c * 'd) promise
val all5 : + 'a promise -> + 'b promise -> + 'c promise -> + 'd promise -> + 'e promise -> + ('a * 'b * 'c * 'd * 'e) promise
val all6 : + 'a promise -> + 'b promise -> + 'c promise -> + 'd promise -> + 'e promise -> + 'f promise -> + ('a * 'b * 'c * 'd * 'e * 'f) promise
val allOk : ('a, 'e) result promise list -> ('a list, 'e) result promise
val allOkArray : ('a, 'e) result promise array -> ('a array, 'e) result promise
val allOk2 : + ('a, 'err) result promise -> + ('b, 'err) result promise -> + ('a * 'b, 'err) result promise
val allOk3 : + ('a, 'err) result promise -> + ('b, 'err) result promise -> + ('c, 'err) result promise -> + ('a * 'b * 'c, 'err) result promise
val allOk4 : + ('a, 'err) result promise -> + ('b, 'err) result promise -> + ('c, 'err) result promise -> + ('d, 'err) result promise -> + ('a * 'b * 'c * 'd, 'err) result promise
val allOk5 : + ('a, 'err) result promise -> + ('b, 'err) result promise -> + ('c, 'err) result promise -> + ('d, 'err) result promise -> + ('e, 'err) result promise -> + ('a * 'b * 'c * 'd * 'e, 'err) result promise
val allOk6 : + ('a, 'err) result promise -> + ('b, 'err) result promise -> + ('c, 'err) result promise -> + ('d, 'err) result promise -> + ('e, 'err) result promise -> + ('f, 'err) result promise -> + ('a * 'b * 'c * 'd * 'e * 'f, 'err) result promise
module Js : sig ... end
module PipeFirst : sig ... end
val onUnhandledException : (exn -> unit) ref
module ReadyCallbacks : sig ... end
diff --git a/local/server-reason-react/promise-native/index.html b/local/server-reason-react/promise-native/index.html new file mode 100644 index 000000000..eaf07e65b --- /dev/null +++ b/local/server-reason-react/promise-native/index.html @@ -0,0 +1,2 @@ + +promise-native (docs.local.server-reason-react.promise-native)

Package server-reason-react.promise-native

Library server-reason-react.promise-native

The entry point of this library is the module: Promise.

diff --git a/local/server-reason-react/react/DomProps/index.html b/local/server-reason-react/react/DomProps/index.html new file mode 100644 index 000000000..b851760b2 --- /dev/null +++ b/local/server-reason-react/react/DomProps/index.html @@ -0,0 +1,2 @@ + +DomProps (docs.local.server-reason-react.react.DomProps)

Module DomProps

type attributeType =
  1. | String
  2. | Int
  3. | Bool
  4. | BooleanishString
  5. | Style
  6. | Ref
  7. | InnerHtml
type eventType =
  1. | Clipboard
  2. | Composition
  3. | Keyboard
  4. | Focus
  5. | Form
  6. | Mouse
  7. | Selection
  8. | Touch
  9. | UI
  10. | Wheel
  11. | Media
  12. | Image
  13. | Animation
  14. | Transition
  15. | Pointer
  16. | Inline
  17. | Drag
type attribute = {
  1. type_ : attributeType;
  2. name : string;
  3. jsxName : string;
}
type event = {
  1. type_ : eventType;
  2. jsxName : string;
}
type prop =
  1. | Attribute of attribute
  2. | Event of event
type errors = [
  1. | `ElementNotFound
  2. | `AttributeNotFound
]
val getJSXName : prop -> string
val getName : prop -> string
val findByName : string -> string -> (prop, errors) result
val isReactValidProp : string -> bool
val find_closest_name : string -> string option
diff --git a/local/server-reason-react/react/React/Children/index.html b/local/server-reason-react/react/React/Children/index.html new file mode 100644 index 000000000..b04a49df2 --- /dev/null +++ b/local/server-reason-react/react/React/Children/index.html @@ -0,0 +1,2 @@ + +Children (docs.local.server-reason-react.react.React.Children)

Module React.Children

val map : element -> (element -> element) -> element
val mapWithIndex : element -> (element -> int -> element) -> element
val forEach : element -> (element -> unit) -> unit
val forEachWithIndex : element -> (element -> int -> unit) -> unit
val count : element -> int
val only : element -> element
val toArray : element -> element array
diff --git a/local/server-reason-react/react/React/Context/index.html b/local/server-reason-react/react/React/Context/index.html new file mode 100644 index 000000000..eb14dd0b3 --- /dev/null +++ b/local/server-reason-react/react/React/Context/index.html @@ -0,0 +1,2 @@ + +Context (docs.local.server-reason-react.react.React.Context)

Module React.Context

type 'a t = 'a context
val provider : 'a t -> 'a provider
diff --git a/local/server-reason-react/react/React/Event/Animation/index.html b/local/server-reason-react/react/React/Event/Animation/index.html new file mode 100644 index 000000000..e85df12fe --- /dev/null +++ b/local/server-reason-react/react/React/Event/Animation/index.html @@ -0,0 +1,2 @@ + +Animation (docs.local.server-reason-react.react.React.Event.Animation)

Module Event.Animation

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < >
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < >
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < >
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val animationName : t -> string
val pseudoElement : t -> string
val elapsedTime : t -> float
diff --git a/local/server-reason-react/react/React/Event/Clipboard/index.html b/local/server-reason-react/react/React/Event/Clipboard/index.html new file mode 100644 index 000000000..034058796 --- /dev/null +++ b/local/server-reason-react/react/React/Event/Clipboard/index.html @@ -0,0 +1,2 @@ + +Clipboard (docs.local.server-reason-react.react.React.Event.Clipboard)

Module Event.Clipboard

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < >
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < >
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < >
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val clipboardData : t -> < >
diff --git a/local/server-reason-react/react/React/Event/Composition/index.html b/local/server-reason-react/react/React/Event/Composition/index.html new file mode 100644 index 000000000..b2df74aa9 --- /dev/null +++ b/local/server-reason-react/react/React/Event/Composition/index.html @@ -0,0 +1,2 @@ + +Composition (docs.local.server-reason-react.react.React.Event.Composition)

Module Event.Composition

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < >
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < >
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < >
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val data : t -> string
diff --git a/local/server-reason-react/react/React/Event/Drag/index.html b/local/server-reason-react/react/React/Event/Drag/index.html new file mode 100644 index 000000000..d5016612e --- /dev/null +++ b/local/server-reason-react/react/React/Event/Drag/index.html @@ -0,0 +1,2 @@ + +Drag (docs.local.server-reason-react.react.React.Event.Drag)

Module Event.Drag

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < >
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < >
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < >
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val altKey : t -> bool
val button : t -> int
val buttons : t -> int
val clientX : t -> int
val clientY : t -> int
val ctrlKey : t -> bool
val getModifierState : t -> string -> bool
val metaKey : t -> bool
val movementX : t -> int
val movementY : t -> int
val pageX : t -> int
val pageY : t -> int
val relatedTarget : t -> < .. > option
val screenX : t -> int
val screenY : t -> int
val shiftKey : t -> bool
val dataTransfer : t -> < .. > option
diff --git a/local/server-reason-react/react/React/Event/Focus/index.html b/local/server-reason-react/react/React/Event/Focus/index.html new file mode 100644 index 000000000..cae70efb5 --- /dev/null +++ b/local/server-reason-react/react/React/Event/Focus/index.html @@ -0,0 +1,2 @@ + +Focus (docs.local.server-reason-react.react.React.Event.Focus)

Module Event.Focus

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < >
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < >
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < >
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val relatedTarget : t -> < .. > option
diff --git a/local/server-reason-react/react/React/Event/Form/index.html b/local/server-reason-react/react/React/Event/Form/index.html new file mode 100644 index 000000000..fe208e8c9 --- /dev/null +++ b/local/server-reason-react/react/React/Event/Form/index.html @@ -0,0 +1,2 @@ + +Form (docs.local.server-reason-react.react.React.Event.Form)

Module Event.Form

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < >
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < >
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < >
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
diff --git a/local/server-reason-react/react/React/Event/Image/index.html b/local/server-reason-react/react/React/Event/Image/index.html new file mode 100644 index 000000000..44eba3fca --- /dev/null +++ b/local/server-reason-react/react/React/Event/Image/index.html @@ -0,0 +1,2 @@ + +Image (docs.local.server-reason-react.react.React.Event.Image)

Module Event.Image

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < >
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < >
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < >
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
diff --git a/local/server-reason-react/react/React/Event/Keyboard/index.html b/local/server-reason-react/react/React/Event/Keyboard/index.html new file mode 100644 index 000000000..c6ade7263 --- /dev/null +++ b/local/server-reason-react/react/React/Event/Keyboard/index.html @@ -0,0 +1,2 @@ + +Keyboard (docs.local.server-reason-react.react.React.Event.Keyboard)

Module Event.Keyboard

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < >
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < >
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < >
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val altKey : t -> bool
val charCode : t -> int
val ctrlKey : t -> bool
val getModifierState : t -> string -> bool
val key : t -> string
val keyCode : t -> int
val locale : t -> string
val location : t -> int
val metaKey : t -> bool
val repeat : t -> bool
val shiftKey : t -> bool
val which : t -> int
diff --git a/local/server-reason-react/react/React/Event/MakeEventWithType/argument-1-Type/index.html b/local/server-reason-react/react/React/Event/MakeEventWithType/argument-1-Type/index.html new file mode 100644 index 000000000..5de8145b7 --- /dev/null +++ b/local/server-reason-react/react/React/Event/MakeEventWithType/argument-1-Type/index.html @@ -0,0 +1,2 @@ + +Type (docs.local.server-reason-react.react.React.Event.MakeEventWithType.Type)

Parameter MakeEventWithType.Type

type t
diff --git a/local/server-reason-react/react/React/Event/MakeEventWithType/index.html b/local/server-reason-react/react/React/Event/MakeEventWithType/index.html new file mode 100644 index 000000000..ba5de03b9 --- /dev/null +++ b/local/server-reason-react/react/React/Event/MakeEventWithType/index.html @@ -0,0 +1,2 @@ + +MakeEventWithType (docs.local.server-reason-react.react.React.Event.MakeEventWithType)

Module Event.MakeEventWithType

Parameters

module Type : sig ... end

Signature

val bubbles : Type.t -> bool
val cancelable : Type.t -> bool
val currentTarget : Type.t -> < >
val defaultPrevented : Type.t -> bool
val eventPhase : Type.t -> int
val isTrusted : Type.t -> bool
val nativeEvent : Type.t -> < >
val preventDefault : Type.t -> unit
val isDefaultPrevented : Type.t -> bool
val stopPropagation : Type.t -> unit
val isPropagationStopped : Type.t -> bool
val target : Type.t -> < >
val timeStamp : Type.t -> float
val type_ : Type.t -> string
val persist : Type.t -> unit
diff --git a/local/server-reason-react/react/React/Event/Media/index.html b/local/server-reason-react/react/React/Event/Media/index.html new file mode 100644 index 000000000..e0c0d8a0f --- /dev/null +++ b/local/server-reason-react/react/React/Event/Media/index.html @@ -0,0 +1,2 @@ + +Media (docs.local.server-reason-react.react.React.Event.Media)

Module Event.Media

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < >
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < >
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < >
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
diff --git a/local/server-reason-react/react/React/Event/Mouse/index.html b/local/server-reason-react/react/React/Event/Mouse/index.html new file mode 100644 index 000000000..4182258e5 --- /dev/null +++ b/local/server-reason-react/react/React/Event/Mouse/index.html @@ -0,0 +1,2 @@ + +Mouse (docs.local.server-reason-react.react.React.Event.Mouse)

Module Event.Mouse

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < >
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < >
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < >
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val altKey : t -> bool
val button : t -> int
val buttons : t -> int
val clientX : t -> int
val clientY : t -> int
val ctrlKey : t -> bool
val getModifierState : t -> string -> bool
val metaKey : t -> bool
val movementX : t -> int
val movementY : t -> int
val pageX : t -> int
val pageY : t -> int
val relatedTarget : t -> < .. > option
val screenX : t -> int
val screenY : t -> int
val shiftKey : t -> bool
diff --git a/local/server-reason-react/react/React/Event/Pointer/index.html b/local/server-reason-react/react/React/Event/Pointer/index.html new file mode 100644 index 000000000..759a21541 --- /dev/null +++ b/local/server-reason-react/react/React/Event/Pointer/index.html @@ -0,0 +1,2 @@ + +Pointer (docs.local.server-reason-react.react.React.Event.Pointer)

Module Event.Pointer

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < >
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < >
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < >
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val detail : t -> int
val screenX : t -> int
val screenY : t -> int
val clientX : t -> int
val clientY : t -> int
val pageX : t -> int
val pageY : t -> int
val movementX : t -> int
val movementY : t -> int
val ctrlKey : t -> bool
val shiftKey : t -> bool
val altKey : t -> bool
val metaKey : t -> bool
val getModifierState : t -> string -> bool
val button : t -> int
val buttons : t -> int
val relatedTarget : t -> < .. > option
val width : t -> float
val height : t -> float
val pressure : t -> float
val tangentialPressure : t -> float
val tiltX : t -> int
val tiltY : t -> int
val twist : t -> int
val pointerType : t -> string
val isPrimary : t -> bool
diff --git a/local/server-reason-react/react/React/Event/Selection/index.html b/local/server-reason-react/react/React/Event/Selection/index.html new file mode 100644 index 000000000..11368c6fe --- /dev/null +++ b/local/server-reason-react/react/React/Event/Selection/index.html @@ -0,0 +1,2 @@ + +Selection (docs.local.server-reason-react.react.React.Event.Selection)

Module Event.Selection

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < >
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < >
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < >
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
diff --git a/local/server-reason-react/react/React/Event/Synthetic/index.html b/local/server-reason-react/react/React/Event/Synthetic/index.html new file mode 100644 index 000000000..e380cd60c --- /dev/null +++ b/local/server-reason-react/react/React/Event/Synthetic/index.html @@ -0,0 +1,2 @@ + +Synthetic (docs.local.server-reason-react.react.React.Event.Synthetic)

Module Event.Synthetic

type tag
type t = tag synthetic
val bubbles : 'a synthetic -> bool
val cancelable : 'a synthetic -> bool
val currentTarget : 'a synthetic -> < >
val defaultPrevented : 'a synthetic -> bool
val eventPhase : 'a synthetic -> int
val isTrusted : 'a synthetic -> bool
val nativeEvent : 'a synthetic -> < >
val preventDefault : 'a synthetic -> unit
val isDefaultPrevented : 'a synthetic -> bool
val stopPropagation : 'a synthetic -> unit
val isPropagationStopped : 'a synthetic -> bool
val target : 'a synthetic -> < >
val timeStamp : 'a synthetic -> float
val type_ : 'a synthetic -> string
val persist : 'a synthetic -> unit
diff --git a/local/server-reason-react/react/React/Event/Touch/index.html b/local/server-reason-react/react/React/Event/Touch/index.html new file mode 100644 index 000000000..40030b467 --- /dev/null +++ b/local/server-reason-react/react/React/Event/Touch/index.html @@ -0,0 +1,2 @@ + +Touch (docs.local.server-reason-react.react.React.Event.Touch)

Module Event.Touch

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < >
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < >
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < >
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val altKey : t -> bool
val changedTouches : t -> < >
val ctrlKey : t -> bool
val getModifierState : t -> string -> bool
val metaKey : t -> bool
val shiftKey : t -> bool
val targetTouches : t -> < >
val touches : t -> < >
diff --git a/local/server-reason-react/react/React/Event/Transition/index.html b/local/server-reason-react/react/React/Event/Transition/index.html new file mode 100644 index 000000000..545b56afc --- /dev/null +++ b/local/server-reason-react/react/React/Event/Transition/index.html @@ -0,0 +1,2 @@ + +Transition (docs.local.server-reason-react.react.React.Event.Transition)

Module Event.Transition

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < >
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < >
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < >
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val propertyName : t -> string
val pseudoElement : t -> string
val elapsedTime : t -> float
diff --git a/local/server-reason-react/react/React/Event/UI/index.html b/local/server-reason-react/react/React/Event/UI/index.html new file mode 100644 index 000000000..218105650 --- /dev/null +++ b/local/server-reason-react/react/React/Event/UI/index.html @@ -0,0 +1,2 @@ + +UI (docs.local.server-reason-react.react.React.Event.UI)

Module Event.UI

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < >
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < >
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < >
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val detail : t -> int
diff --git a/local/server-reason-react/react/React/Event/Wheel/index.html b/local/server-reason-react/react/React/Event/Wheel/index.html new file mode 100644 index 000000000..7825db3e1 --- /dev/null +++ b/local/server-reason-react/react/React/Event/Wheel/index.html @@ -0,0 +1,2 @@ + +Wheel (docs.local.server-reason-react.react.React.Event.Wheel)

Module Event.Wheel

type tag
type t = tag synthetic
val bubbles : t -> bool
val cancelable : t -> bool
val currentTarget : t -> < >
val defaultPrevented : t -> bool
val eventPhase : t -> int
val isTrusted : t -> bool
val nativeEvent : t -> < >
val preventDefault : t -> unit
val isDefaultPrevented : t -> bool
val stopPropagation : t -> unit
val isPropagationStopped : t -> bool
val target : t -> < >
val timeStamp : t -> float
val type_ : t -> string
val persist : t -> unit
val deltaMode : t -> int
val deltaX : t -> float
val deltaY : t -> float
val deltaZ : t -> float
diff --git a/local/server-reason-react/react/React/Event/index.html b/local/server-reason-react/react/React/Event/index.html new file mode 100644 index 000000000..0f5bd081a --- /dev/null +++ b/local/server-reason-react/react/React/Event/index.html @@ -0,0 +1,2 @@ + +Event (docs.local.server-reason-react.react.React.Event)

Module React.Event

type 'a synthetic
module MakeEventWithType (Type : sig ... end) : sig ... end
module Synthetic : sig ... end
module Clipboard : sig ... end
module Composition : sig ... end
module Keyboard : sig ... end
module Focus : sig ... end
module Form : sig ... end
module Mouse : sig ... end
module Pointer : sig ... end
module Selection : sig ... end
module Touch : sig ... end
module UI : sig ... end
module Wheel : sig ... end
module Media : sig ... end
module Image : sig ... end
module Animation : sig ... end
module Transition : sig ... end
module Drag : sig ... end
diff --git a/local/server-reason-react/react/React/Experimental/index.html b/local/server-reason-react/react/React/Experimental/index.html new file mode 100644 index 000000000..1e18ff99d --- /dev/null +++ b/local/server-reason-react/react/React/Experimental/index.html @@ -0,0 +1,2 @@ + +Experimental (docs.local.server-reason-react.react.React.Experimental)

Module React.Experimental

val use : 'a Lwt.t -> 'a
diff --git a/local/server-reason-react/react/React/Fragment/index.html b/local/server-reason-react/react/React/Fragment/index.html new file mode 100644 index 000000000..5565ca3a4 --- /dev/null +++ b/local/server-reason-react/react/React/Fragment/index.html @@ -0,0 +1,2 @@ + +Fragment (docs.local.server-reason-react.react.React.Fragment)

Module React.Fragment

val make : children:element -> ?key:string -> unit -> element
diff --git a/local/server-reason-react/react/React/JSX/Event/index.html b/local/server-reason-react/react/React/JSX/Event/index.html new file mode 100644 index 000000000..4ce4bf4e6 --- /dev/null +++ b/local/server-reason-react/react/React/JSX/Event/index.html @@ -0,0 +1,2 @@ + +Event (docs.local.server-reason-react.react.React.JSX.Event)

Module JSX.Event

val drag : string -> (Event.Drag.t -> unit) -> prop
val mouse : string -> (Event.Mouse.t -> unit) -> prop
val selection : string -> (Event.Selection.t -> unit) -> prop
val touch : string -> (Event.Touch.t -> unit) -> prop
val ui : string -> (Event.UI.t -> unit) -> prop
val wheel : string -> (Event.Wheel.t -> unit) -> prop
val clipboard : string -> (Event.Clipboard.t -> unit) -> prop
val composition : string -> (Event.Composition.t -> unit) -> prop
val transition : string -> (Event.Transition.t -> unit) -> prop
val animation : string -> (Event.Animation.t -> unit) -> prop
val pointer : string -> (Event.Pointer.t -> unit) -> prop
val keyboard : string -> (Event.Keyboard.t -> unit) -> prop
val focus : string -> (Event.Focus.t -> unit) -> prop
val form : string -> (Event.Form.t -> unit) -> prop
val media : string -> (Event.Media.t -> unit) -> prop
diff --git a/local/server-reason-react/react/React/JSX/index.html b/local/server-reason-react/react/React/JSX/index.html new file mode 100644 index 000000000..6f7d7d283 --- /dev/null +++ b/local/server-reason-react/react/React/JSX/index.html @@ -0,0 +1,2 @@ + +JSX (docs.local.server-reason-react.react.React.JSX)

Module React.JSX

All of those types are used by the server-reason-react.ppx internally to represent valid React code from the server. It currently different from reason-react-ppx due to a need for knowing the types since ReactDOM needs to render differently depending on the type.

type event =
  1. | Drag of Event.Drag.t -> unit
  2. | Mouse of Event.Mouse.t -> unit
  3. | Selection of Event.Selection.t -> unit
  4. | Touch of Event.Touch.t -> unit
  5. | UI of Event.UI.t -> unit
  6. | Wheel of Event.Wheel.t -> unit
  7. | Clipboard of Event.Clipboard.t -> unit
  8. | Composition of Event.Composition.t -> unit
  9. | Transition of Event.Transition.t -> unit
  10. | Animation of Event.Animation.t -> unit
  11. | Pointer of Event.Pointer.t -> unit
  12. | Keyboard of Event.Keyboard.t -> unit
  13. | Focus of Event.Focus.t -> unit
  14. | Form of Event.Form.t -> unit
  15. | Media of Event.Media.t -> unit
  16. | Inline of string

All event callbacks

type prop =
  1. | Bool of string * bool
  2. | String of string * string
  3. | Style of string
  4. | DangerouslyInnerHtml of string
  5. | Ref of domRef
  6. | Event of string * event

JSX.prop is the representation of HTML/SVG attributes and DOM events

Helpers to create JSX.prop without variants, helpful for function application

val bool : string -> bool -> prop
val string : string -> string -> prop
val style : string -> prop
val dangerouslyInnerHtml : < __html : string.. > -> prop
val int : string -> int -> prop
val float : string -> float -> prop
val ref : domRef -> prop
val event : string -> event -> prop
module Event : sig ... end
diff --git a/local/server-reason-react/react/React/Ref/index.html b/local/server-reason-react/react/React/Ref/index.html new file mode 100644 index 000000000..bf678b348 --- /dev/null +++ b/local/server-reason-react/react/React/Ref/index.html @@ -0,0 +1,2 @@ + +Ref (docs.local.server-reason-react.react.React.Ref)

Module React.Ref

type t = domRef
type currentDomRef = Dom.element Js.nullable ref
type callbackDomRef = Dom.element Js.nullable -> unit
val domRef : currentDomRef -> t
val callbackDomRef : callbackDomRef -> t
diff --git a/local/server-reason-react/react/React/Suspense/index.html b/local/server-reason-react/react/React/Suspense/index.html new file mode 100644 index 000000000..f3594f012 --- /dev/null +++ b/local/server-reason-react/react/React/Suspense/index.html @@ -0,0 +1,2 @@ + +Suspense (docs.local.server-reason-react.react.React.Suspense)

Module React.Suspense

val make : ?fallback:element -> ?children:element -> unit -> element
diff --git a/local/server-reason-react/react/React/index.html b/local/server-reason-react/react/React/index.html new file mode 100644 index 000000000..0c4cb47c0 --- /dev/null +++ b/local/server-reason-react/react/React/index.html @@ -0,0 +1,52 @@ + +React (docs.local.server-reason-react.react.React)

Module React

The React library

type domRef
type 'value ref = {
  1. mutable current : 'value;
}
module Ref : sig ... end
val createRef : unit -> 'a option ref
val useRef : 'a -> 'a ref
val forwardRef : (unit -> 'a) -> 'a
module Event : sig ... end
module JSX : sig ... end

All of those types are used by the server-reason-react.ppx internally to represent valid React code from the server. It currently different from reason-react-ppx due to a need for knowing the types since ReactDOM needs to render differently depending on the type.

type lower_case_element = {
  1. tag : string;
  2. attributes : JSX.prop list;
  3. children : element list;
}
and element =
  1. | Lower_case_element of lower_case_element
  2. | Upper_case_component of unit -> element
  3. | Async_component of unit -> element Lwt.t
  4. | List of element array
  5. | Text of string
  6. | InnerHtml of string
  7. | Fragment of element
  8. | Empty
  9. | Provider of element
  10. | Consumer of element
  11. | Suspense of {
    1. children : element;
    2. fallback : element;
    }
exception Invalid_children of string
module Fragment : sig ... end
val createElement : string -> JSX.prop list -> element list -> element
val fragment : element -> element
val cloneElement : element -> JSX.prop list -> element
val string : string -> element
val null : element
val int : int -> element
val float : float -> element
val array : element array -> element
val list : element list -> element
type 'a provider = value:'a -> children:element -> unit -> element
type 'a context = {
  1. current_value : 'a ref;
  2. provider : 'a provider;
  3. consumer : children:element -> element;
}
module Context : sig ... end
val createContext : 'a -> 'a Context.t
module Suspense : sig ... end
type any_promise =
  1. | Any_promise : 'a Lwt.t -> any_promise
exception Suspend of any_promise
val useContext : 'a Context.t -> 'a
val useState : (unit -> 'state) -> 'state * (('state -> 'state) -> unit)
val useMemo : (unit -> 'a) -> 'a
val useMemo0 : (unit -> 'a) -> 'a
val useMemo1 : (unit -> 'a) -> 'b -> 'a
val useMemo2 : (unit -> 'a) -> 'b -> 'a
val useMemo3 : (unit -> 'a) -> 'b -> 'a
val useMemo4 : (unit -> 'a) -> 'b -> 'a
val useMemo5 : (unit -> 'a) -> 'b -> 'a
val useMemo6 : (unit -> 'a) -> 'b -> 'a
val useCallback : 'a -> 'a
val useCallback0 : 'a -> 'a
val useCallback1 : 'a -> 'b -> 'a
val useCallback2 : 'a -> 'b -> 'a
val useCallback3 : 'a -> 'b -> 'a
val useCallback4 : 'a -> 'b -> 'a
val useCallback5 : 'a -> 'b -> 'a
val useCallback6 : 'a -> 'b -> 'a
val useId : unit -> string
val useReducer : + ('state -> 'action -> 'state) -> + 'state -> + 'state * ('action -> unit)
val useReducerWithMapState : + ('state -> 'action -> 'initialState) -> + 'initialState -> + ('initialState -> 'state) -> + 'state * ('action -> unit)
val useEffect : (unit -> (unit -> unit) option) -> unit
val useEffect0 : (unit -> (unit -> unit) option) -> unit
val useEffect1 : (unit -> (unit -> unit) option) -> 'dependency array -> unit
val useEffect2 : + (unit -> (unit -> unit) option) -> + ('dependency1 * 'dependency2) -> + unit
val useEffect3 : + (unit -> (unit -> unit) option) -> + ('dependency1 * 'dependency2 * 'dependency3) -> + unit
val useEffect4 : + (unit -> (unit -> unit) option) -> + ('dependency1 * 'dependency2 * 'dependency3 * 'dependency4) -> + unit
val useEffect5 : + (unit -> (unit -> unit) option) -> + ('dependency1 * 'dependency2 * 'dependency3 * 'dependency4 * 'dependency5) -> + unit
val useEffect6 : + (unit -> (unit -> unit) option) -> + ('dependency1 + * 'dependency2 + * 'dependency3 + * 'dependency4 + * 'dependency5 + * 'dependency6) -> + unit
val useLayoutEffect0 : (unit -> (unit -> unit) option) -> unit
val useLayoutEffect1 : + (unit -> (unit -> unit) option) -> + 'dependency array -> + unit
val useLayoutEffect2 : + (unit -> (unit -> unit) option) -> + ('dependency1 * 'dependency2) -> + unit
val useLayoutEffect3 : + (unit -> (unit -> unit) option) -> + ('dependency1 * 'dependency2 * 'dependency3) -> + unit
val useLayoutEffect4 : + (unit -> (unit -> unit) option) -> + ('dependency1 * 'dependency2 * 'dependency3 * 'dependency4) -> + unit
val useLayoutEffect5 : + (unit -> (unit -> unit) option) -> + ('dependency1 * 'dependency2 * 'dependency3 * 'dependency4 * 'dependency5) -> + unit
val useLayoutEffect6 : + (unit -> (unit -> unit) option) -> + ('dependency1 + * 'dependency2 + * 'dependency3 + * 'dependency4 + * 'dependency5 + * 'dependency6) -> + unit
val setDisplayName : 'component -> string -> unit
module Children : sig ... end
module Experimental : sig ... end
val useTransition : unit -> bool * ((unit -> unit) -> unit)
val useDebugValue : 'value -> ?format:('value -> string) -> unit
val useDeferredValue : 'value -> 'value
diff --git a/local/server-reason-react/react/ReactEvent/index.html b/local/server-reason-react/react/ReactEvent/index.html new file mode 100644 index 000000000..0eba0f081 --- /dev/null +++ b/local/server-reason-react/react/ReactEvent/index.html @@ -0,0 +1,2 @@ + +ReactEvent (docs.local.server-reason-react.react.ReactEvent)

Module ReactEvent

include module type of struct include React.Event end
type 'a synthetic = 'a React.Event.synthetic
module MakeEventWithType = React.Event.MakeEventWithType
module Synthetic = React.Event.Synthetic
module Clipboard = React.Event.Clipboard
module Composition = React.Event.Composition
module Keyboard = React.Event.Keyboard
module Focus = React.Event.Focus
module Form = React.Event.Form
module Mouse = React.Event.Mouse
module Pointer = React.Event.Pointer
module Selection = React.Event.Selection
module Touch = React.Event.Touch
module UI = React.Event.UI
module Wheel = React.Event.Wheel
module Media = React.Event.Media
module Image = React.Event.Image
module Animation = React.Event.Animation
module Transition = React.Event.Transition
module Drag = React.Event.Drag
diff --git a/local/server-reason-react/react/ReasonReactRouter/index.html b/local/server-reason-react/react/ReasonReactRouter/index.html new file mode 100644 index 000000000..3e221a871 --- /dev/null +++ b/local/server-reason-react/react/ReasonReactRouter/index.html @@ -0,0 +1,2 @@ + +ReasonReactRouter (docs.local.server-reason-react.react.ReasonReactRouter)

Module ReasonReactRouter

val push : string -> unit

update the url with the string path. Example: `push("/book/1")`, `push("/books#title")`

val replace : string -> unit

update the url with the string path. modifies the current history entry instead of creating a new one. Example: `replace("/book/1")`, `replace("/books#title")`

type watcherID
type url = {
  1. path : string list;
  2. hash : string;
  3. search : string;
}
val watchUrl : (url -> unit) -> watcherID

start watching for URL changes. Returns a subscription token. Upon url change, calls the callback and passes it the url record

val unwatchUrl : watcherID -> unit

stop watching for URL changes

this is marked as "dangerous" because you technically shouldn't be accessing the URL outside of watchUrl's callback you'd read a potentially stale url, instead of the fresh one inside watchUrl.

But this helper is sometimes needed, if you'd like to initialize a page whose display/state depends on the URL, instead of reading from it in watchUrl's callback, which you'd probably have put inside didMount (aka too late, the page's already rendered).

So, the correct (and idiomatic) usage of this helper is to only use it in a component that's also subscribed to watchUrl. Please see https://github.com/reasonml-community/reason-react-example/blob/master/src/todomvc/TodoItem.re for an example.

val dangerouslyGetInitialUrl : ?serverUrlString:string -> unit -> url
val useUrl : ?serverUrl:url -> unit -> url

hook for watching url changes. * serverUrl is used for ssr. it allows you to specify the url without relying on browser apis existing/working as expected

diff --git a/local/server-reason-react/react/index.html b/local/server-reason-react/react/index.html new file mode 100644 index 000000000..1b2a25887 --- /dev/null +++ b/local/server-reason-react/react/index.html @@ -0,0 +1,2 @@ + +react (docs.local.server-reason-react.react)

Package server-reason-react.react

Library server-reason-react.react

This library exposes the following toplevel modules:

diff --git a/local/server-reason-react/reactDom/ReactDOM/index.html b/local/server-reason-react/reactDom/ReactDOM/index.html new file mode 100644 index 000000000..8b2328868 --- /dev/null +++ b/local/server-reason-react/reactDom/ReactDOM/index.html @@ -0,0 +1,497 @@ + +ReactDOM (docs.local.server-reason-react.reactDom.ReactDOM)

Module ReactDOM

The ReactDOM library

val renderToString : React.element -> string

renderToString renders a React tree to as an HTML string.

Similar to https://react.dev/reference/react-dom/server/renderToString

val renderToStaticMarkup : React.element -> string

renderToStaticMarkup renders a non-interactive React tree to an HTML string.

Similar to https://react.dev/reference/react-dom/server/renderToStaticMarkup

val renderToLwtStream : + React.element -> + (string Lwt_stream.t * (unit -> unit)) Lwt.t

renderToPipeableStream renders a React tree to a Lwt_stream.t.

Similar to https://react.dev/reference/react-dom/server/renderToPipeableStream

The rest of the API is there for compatibility with ReactDOM's reason-react

val querySelector : 'a -> 'b option

Do nothing on the server, always returns None

val render : 'a -> 'b -> 'c

Do nothing on the server

val hydrate : 'a -> 'b -> 'c

Do nothing on the server

val createPortal : 'a -> 'b -> 'a

Do nothing on the server

module Style = ReactDOMStyle

ReactDOM.Style generates the inline styles for the `style` prop.

val createDOMElementVariadic : + string -> + props:React.JSX.prop list -> + React.element array -> + React.element

Create a React.element by giving the HTML tag, an array of props and children

type dangerouslySetInnerHTML = < __html : string >
val domProps : + ?key:string -> + ?ref:React.domRef -> + ?ariaDetails:string -> + ?ariaDisabled:bool -> + ?ariaHidden:bool -> + ?ariaKeyshortcuts:string -> + ?ariaLabel:string -> + ?ariaRoledescription:string -> + ?ariaExpanded:bool -> + ?ariaLevel:int -> + ?ariaModal:bool -> + ?ariaMultiline:bool -> + ?ariaMultiselectable:bool -> + ?ariaPlaceholder:string -> + ?ariaReadonly:bool -> + ?ariaRequired:bool -> + ?ariaSelected:bool -> + ?ariaSort:string -> + ?ariaValuemax:float -> + ?ariaValuemin:float -> + ?ariaValuenow:float -> + ?ariaValuetext:string -> + ?ariaAtomic:bool -> + ?ariaBusy:bool -> + ?ariaRelevant:string -> + ?ariaGrabbed:bool -> + ?ariaActivedescendant:string -> + ?ariaColcount:int -> + ?ariaColindex:int -> + ?ariaColspan:int -> + ?ariaControls:string -> + ?ariaDescribedby:string -> + ?ariaErrormessage:string -> + ?ariaFlowto:string -> + ?ariaLabelledby:string -> + ?ariaOwns:string -> + ?ariaPosinset:int -> + ?ariaRowcount:int -> + ?ariaRowindex:int -> + ?ariaRowspan:int -> + ?ariaSetsize:int -> + ?defaultChecked:bool -> + ?defaultValue:string -> + ?accessKey:string -> + ?className:string -> + ?contentEditable:bool -> + ?contextMenu:string -> + ?dir:string -> + ?draggable:bool -> + ?hidden:bool -> + ?id:string -> + ?lang:string -> + ?role:string -> + ?style:ReactDOMStyle.t -> + ?spellCheck:bool -> + ?tabIndex:int -> + ?title:string -> + ?itemID:string -> + ?itemProp:string -> + ?itemRef:string -> + ?itemScope:bool -> + ?itemType:string -> + ?accept:string -> + ?acceptCharset:string -> + ?action:string -> + ?allowFullScreen:bool -> + ?alt:string -> + ?async:bool -> + ?autoComplete:string -> + ?autoCapitalize:string -> + ?autoFocus:bool -> + ?autoPlay:bool -> + ?challenge:string -> + ?charSet:string -> + ?checked:bool -> + ?cite:string -> + ?crossOrigin:string -> + ?cols:int -> + ?colSpan:int -> + ?content:string -> + ?controls:bool -> + ?coords:string -> + ?data:string -> + ?dateTime:string -> + ?default:bool -> + ?defer:bool -> + ?disabled:bool -> + ?download:string -> + ?encType:string -> + ?form:string -> + ?formAction:string -> + ?formTarget:string -> + ?formMethod:string -> + ?headers:string -> + ?height:string -> + ?high:int -> + ?href:string -> + ?hrefLang:string -> + ?htmlFor:string -> + ?httpEquiv:string -> + ?icon:string -> + ?inputMode:string -> + ?integrity:string -> + ?keyType:string -> + ?kind:string -> + ?label:string -> + ?list:string -> + ?loop:bool -> + ?low:int -> + ?manifest:string -> + ?max:string -> + ?maxLength:int -> + ?media:string -> + ?mediaGroup:string -> + ?method_:string -> + ?min:string -> + ?minLength:int -> + ?multiple:bool -> + ?muted:bool -> + ?name:string -> + ?nonce:string -> + ?noValidate:bool -> + ?open_:bool -> + ?optimum:int -> + ?pattern:string -> + ?placeholder:string -> + ?playsInline:bool -> + ?poster:string -> + ?preload:string -> + ?radioGroup:string -> + ?readOnly:bool -> + ?rel:string -> + ?required:bool -> + ?reversed:bool -> + ?rows:int -> + ?rowSpan:int -> + ?sandbox:string -> + ?scope:string -> + ?scoped:bool -> + ?scrolling:string -> + ?selected:bool -> + ?shape:string -> + ?size:int -> + ?sizes:string -> + ?span:int -> + ?src:string -> + ?srcDoc:string -> + ?srcLang:string -> + ?srcSet:string -> + ?start:int -> + ?step:float -> + ?summary:string -> + ?target:string -> + ?type_:string -> + ?useMap:string -> + ?value:string -> + ?width:string -> + ?wrap:string -> + ?onCopy:(React.Event.Clipboard.t -> unit) -> + ?onCut:(React.Event.Clipboard.t -> unit) -> + ?onPaste:(React.Event.Clipboard.t -> unit) -> + ?onCompositionEnd:(React.Event.Composition.t -> unit) -> + ?onCompositionStart:(React.Event.Composition.t -> unit) -> + ?onCompositionUpdate:(React.Event.Composition.t -> unit) -> + ?onKeyDown:(React.Event.Keyboard.t -> unit) -> + ?onKeyPress:(React.Event.Keyboard.t -> unit) -> + ?onKeyUp:(React.Event.Keyboard.t -> unit) -> + ?onFocus:(React.Event.Focus.t -> unit) -> + ?onBlur:(React.Event.Focus.t -> unit) -> + ?onChange:(React.Event.Form.t -> unit) -> + ?onInput:(React.Event.Form.t -> unit) -> + ?onSubmit:(React.Event.Form.t -> unit) -> + ?onInvalid:(React.Event.Form.t -> unit) -> + ?onClick:(React.Event.Mouse.t -> unit) -> + ?onContextMenu:(React.Event.Mouse.t -> unit) -> + ?onDoubleClick:(React.Event.Mouse.t -> unit) -> + ?onDrag:(React.Event.Mouse.t -> unit) -> + ?onDragEnd:(React.Event.Mouse.t -> unit) -> + ?onDragEnter:(React.Event.Mouse.t -> unit) -> + ?onDragExit:(React.Event.Mouse.t -> unit) -> + ?onDragLeave:(React.Event.Mouse.t -> unit) -> + ?onDragOver:(React.Event.Mouse.t -> unit) -> + ?onDragStart:(React.Event.Mouse.t -> unit) -> + ?onDrop:(React.Event.Mouse.t -> unit) -> + ?onMouseDown:(React.Event.Mouse.t -> unit) -> + ?onMouseEnter:(React.Event.Mouse.t -> unit) -> + ?onMouseLeave:(React.Event.Mouse.t -> unit) -> + ?onMouseMove:(React.Event.Mouse.t -> unit) -> + ?onMouseOut:(React.Event.Mouse.t -> unit) -> + ?onMouseOver:(React.Event.Mouse.t -> unit) -> + ?onMouseUp:(React.Event.Mouse.t -> unit) -> + ?onSelect:(React.Event.Selection.t -> unit) -> + ?onTouchCancel:(React.Event.Touch.t -> unit) -> + ?onTouchEnd:(React.Event.Touch.t -> unit) -> + ?onTouchMove:(React.Event.Touch.t -> unit) -> + ?onTouchStart:(React.Event.Touch.t -> unit) -> + ?onPointerOver:(React.Event.Pointer.t -> unit) -> + ?onPointerEnter:(React.Event.Pointer.t -> unit) -> + ?onPointerDown:(React.Event.Pointer.t -> unit) -> + ?onPointerMove:(React.Event.Pointer.t -> unit) -> + ?onPointerUp:(React.Event.Pointer.t -> unit) -> + ?onPointerCancel:(React.Event.Pointer.t -> unit) -> + ?onPointerOut:(React.Event.Pointer.t -> unit) -> + ?onPointerLeave:(React.Event.Pointer.t -> unit) -> + ?onGotPointerCapture:(React.Event.Pointer.t -> unit) -> + ?onLostPointerCapture:(React.Event.Pointer.t -> unit) -> + ?onScroll:(React.Event.UI.t -> unit) -> + ?onWheel:(React.Event.Wheel.t -> unit) -> + ?onAbort:(React.Event.Media.t -> unit) -> + ?onCanPlay:(React.Event.Media.t -> unit) -> + ?onCanPlayThrough:(React.Event.Media.t -> unit) -> + ?onDurationChange:(React.Event.Media.t -> unit) -> + ?onEmptied:(React.Event.Media.t -> unit) -> + ?onEncrypetd:(React.Event.Media.t -> unit) -> + ?onEnded:(React.Event.Media.t -> unit) -> + ?onError:(React.Event.Media.t -> unit) -> + ?onLoadedData:(React.Event.Media.t -> unit) -> + ?onLoadedMetadata:(React.Event.Media.t -> unit) -> + ?onLoadStart:(React.Event.Media.t -> unit) -> + ?onPause:(React.Event.Media.t -> unit) -> + ?onPlay:(React.Event.Media.t -> unit) -> + ?onPlaying:(React.Event.Media.t -> unit) -> + ?onProgress:(React.Event.Media.t -> unit) -> + ?onRateChange:(React.Event.Media.t -> unit) -> + ?onSeeked:(React.Event.Media.t -> unit) -> + ?onSeeking:(React.Event.Media.t -> unit) -> + ?onStalled:(React.Event.Media.t -> unit) -> + ?onSuspend:(React.Event.Media.t -> unit) -> + ?onTimeUpdate:(React.Event.Media.t -> unit) -> + ?onVolumeChange:(React.Event.Media.t -> unit) -> + ?onWaiting:(React.Event.Media.t -> unit) -> + ?onAnimationStart:(React.Event.Animation.t -> unit) -> + ?onAnimationEnd:(React.Event.Animation.t -> unit) -> + ?onAnimationIteration:(React.Event.Animation.t -> unit) -> + ?onTransitionEnd:(React.Event.Transition.t -> unit) -> + ?accentHeight:string -> + ?accumulate:string -> + ?additive:string -> + ?alignmentBaseline:string -> + ?allowReorder:string -> + ?alphabetic:string -> + ?amplitude:string -> + ?arabicForm:string -> + ?ascent:string -> + ?attributeName:string -> + ?attributeType:string -> + ?autoReverse:string -> + ?azimuth:string -> + ?baseFrequency:string -> + ?baseProfile:string -> + ?baselineShift:string -> + ?bbox:string -> + ?begin_:string -> + ?bias:string -> + ?by:string -> + ?calcMode:string -> + ?capHeight:string -> + ?clip:string -> + ?clipPath:string -> + ?clipPathUnits:string -> + ?clipRule:string -> + ?colorInterpolation:string -> + ?colorInterpolationFilters:string -> + ?colorProfile:string -> + ?colorRendering:string -> + ?contentScriptType:string -> + ?contentStyleType:string -> + ?cursor:string -> + ?cx:string -> + ?cy:string -> + ?d:string -> + ?decelerate:string -> + ?descent:string -> + ?diffuseConstant:string -> + ?direction:string -> + ?display:string -> + ?divisor:string -> + ?dominantBaseline:string -> + ?dur:string -> + ?dx:string -> + ?dy:string -> + ?edgeMode:string -> + ?elevation:string -> + ?enableBackground:string -> + ?end_:string -> + ?exponent:string -> + ?externalResourcesRequired:string -> + ?fill:string -> + ?fillOpacity:string -> + ?fillRule:string -> + ?filter:string -> + ?filterRes:string -> + ?filterUnits:string -> + ?floodColor:string -> + ?floodOpacity:string -> + ?focusable:string -> + ?fontFamily:string -> + ?fontSize:string -> + ?fontSizeAdjust:string -> + ?fontStretch:string -> + ?fontStyle:string -> + ?fontVariant:string -> + ?fontWeight:string -> + ?fomat:string -> + ?from:string -> + ?fx:string -> + ?fy:string -> + ?g1:string -> + ?g2:string -> + ?glyphName:string -> + ?glyphOrientationHorizontal:string -> + ?glyphOrientationVertical:string -> + ?glyphRef:string -> + ?gradientTransform:string -> + ?gradientUnits:string -> + ?hanging:string -> + ?horizAdvX:string -> + ?horizOriginX:string -> + ?ideographic:string -> + ?imageRendering:string -> + ?in_:string -> + ?in2:string -> + ?intercept:string -> + ?k:string -> + ?k1:string -> + ?k2:string -> + ?k3:string -> + ?k4:string -> + ?kernelMatrix:string -> + ?kernelUnitLength:string -> + ?kerning:string -> + ?keyPoints:string -> + ?keySplines:string -> + ?keyTimes:string -> + ?lengthAdjust:string -> + ?letterSpacing:string -> + ?lightingColor:string -> + ?limitingConeAngle:string -> + ?local:string -> + ?markerEnd:string -> + ?markerHeight:string -> + ?markerMid:string -> + ?markerStart:string -> + ?markerUnits:string -> + ?markerWidth:string -> + ?mask:string -> + ?maskContentUnits:string -> + ?maskUnits:string -> + ?mathematical:string -> + ?mode:string -> + ?numOctaves:string -> + ?offset:string -> + ?opacity:string -> + ?operator:string -> + ?order:string -> + ?orient:string -> + ?orientation:string -> + ?origin:string -> + ?overflow:string -> + ?overflowX:string -> + ?overflowY:string -> + ?overlinePosition:string -> + ?overlineThickness:string -> + ?paintOrder:string -> + ?panose1:string -> + ?pathLength:string -> + ?patternContentUnits:string -> + ?patternTransform:string -> + ?patternUnits:string -> + ?pointerEvents:string -> + ?points:string -> + ?pointsAtX:string -> + ?pointsAtY:string -> + ?pointsAtZ:string -> + ?preserveAlpha:string -> + ?preserveAspectRatio:string -> + ?primitiveUnits:string -> + ?r:string -> + ?radius:string -> + ?refX:string -> + ?refY:string -> + ?renderingIntent:string -> + ?repeatCount:string -> + ?repeatDur:string -> + ?requiredExtensions:string -> + ?requiredFeatures:string -> + ?restart:string -> + ?result:string -> + ?rotate:string -> + ?rx:string -> + ?ry:string -> + ?scale:string -> + ?seed:string -> + ?shapeRendering:string -> + ?slope:string -> + ?spacing:string -> + ?specularConstant:string -> + ?specularExponent:string -> + ?speed:string -> + ?spreadMethod:string -> + ?startOffset:string -> + ?stdDeviation:string -> + ?stemh:string -> + ?stemv:string -> + ?stitchTiles:string -> + ?stopColor:string -> + ?stopOpacity:string -> + ?strikethroughPosition:string -> + ?strikethroughThickness:string -> + ?stroke:string -> + ?strokeDasharray:string -> + ?strokeDashoffset:string -> + ?strokeLinecap:string -> + ?strokeLinejoin:string -> + ?strokeMiterlimit:string -> + ?strokeOpacity:string -> + ?strokeWidth:string -> + ?surfaceScale:string -> + ?systemLanguage:string -> + ?tableValues:string -> + ?targetX:string -> + ?targetY:string -> + ?textAnchor:string -> + ?textDecoration:string -> + ?textLength:string -> + ?textRendering:string -> + ?to_:string -> + ?transform:string -> + ?u1:string -> + ?u2:string -> + ?underlinePosition:string -> + ?underlineThickness:string -> + ?unicode:string -> + ?unicodeBidi:string -> + ?unicodeRange:string -> + ?unitsPerEm:string -> + ?vAlphabetic:string -> + ?vHanging:string -> + ?vIdeographic:string -> + ?vMathematical:string -> + ?values:string -> + ?vectorEffect:string -> + ?version:string -> + ?vertAdvX:string -> + ?vertAdvY:string -> + ?vertOriginX:string -> + ?vertOriginY:string -> + ?viewBox:string -> + ?viewTarget:string -> + ?visibility:string -> + ?widths:string -> + ?wordSpacing:string -> + ?writingMode:string -> + ?x:string -> + ?x1:string -> + ?x2:string -> + ?xChannelSelector:string -> + ?xHeight:string -> + ?xlinkActuate:string -> + ?xlinkArcrole:string -> + ?xlinkHref:string -> + ?xlinkRole:string -> + ?xlinkShow:string -> + ?xlinkTitle:string -> + ?xlinkType:string -> + ?xmlns:string -> + ?xmlnsXlink:string -> + ?xmlBase:string -> + ?xmlLang:string -> + ?xmlSpace:string -> + ?y:string -> + ?y1:string -> + ?y2:string -> + ?yChannelSelector:string -> + ?z:string -> + ?zoomAndPan:string -> + ?about:string -> + ?datatype:string -> + ?inlist:string -> + ?prefix:string -> + ?property:string -> + ?resource:string -> + ?typeof:string -> + ?vocab:string -> + ?dangerouslySetInnerHTML:dangerouslySetInnerHTML -> + ?suppressContentEditableWarning:bool -> + ?suppressHydrationWarning:bool -> + unit -> + React.JSX.prop list
module Ref = React.Ref
type domRef = Ref.t
diff --git a/local/server-reason-react/reactDom/ReactDOMStyle/index.html b/local/server-reason-react/reactDom/ReactDOMStyle/index.html new file mode 100644 index 000000000..3a6dcafa9 --- /dev/null +++ b/local/server-reason-react/reactDom/ReactDOMStyle/index.html @@ -0,0 +1,346 @@ + +ReactDOMStyle (docs.local.server-reason-react.reactDom.ReactDOMStyle)

Module ReactDOMStyle

type t

Abstract type for Styles. ReactDOM.Style.make to generate `t`

val make : + ?azimuth:string -> + ?background:string -> + ?backgroundAttachment:string -> + ?backgroundColor:string -> + ?backgroundImage:string -> + ?backgroundPosition:string -> + ?backgroundRepeat:string -> + ?border:string -> + ?borderCollapse:string -> + ?borderColor:string -> + ?borderSpacing:string -> + ?borderStyle:string -> + ?borderTop:string -> + ?borderRight:string -> + ?borderBottom:string -> + ?borderLeft:string -> + ?borderTopColor:string -> + ?borderRightColor:string -> + ?borderBottomColor:string -> + ?borderLeftColor:string -> + ?borderTopStyle:string -> + ?borderRightStyle:string -> + ?borderBottomStyle:string -> + ?borderLeftStyle:string -> + ?borderTopWidth:string -> + ?borderRightWidth:string -> + ?borderBottomWidth:string -> + ?borderLeftWidth:string -> + ?borderWidth:string -> + ?bottom:string -> + ?captionSide:string -> + ?clear:string -> + ?color:string -> + ?content:string -> + ?counterIncrement:string -> + ?counterReset:string -> + ?cue:string -> + ?cueAfter:string -> + ?cueBefore:string -> + ?cursor:string -> + ?direction:string -> + ?display:string -> + ?elevation:string -> + ?emptyCells:string -> + ?float:string -> + ?font:string -> + ?fontFamily:string -> + ?fontSize:string -> + ?fontSizeAdjust:string -> + ?fontStretch:string -> + ?fontStyle:string -> + ?fontVariant:string -> + ?fontWeight:string -> + ?height:string -> + ?left:string -> + ?letterSpacing:string -> + ?lineHeight:string -> + ?listStyle:string -> + ?listStyleImage:string -> + ?listStylePosition:string -> + ?listStyleType:string -> + ?margin:string -> + ?marginTop:string -> + ?marginRight:string -> + ?marginBottom:string -> + ?marginLeft:string -> + ?markerOffset:string -> + ?marks:string -> + ?maxHeight:string -> + ?maxWidth:string -> + ?minHeight:string -> + ?minWidth:string -> + ?orphans:string -> + ?outline:string -> + ?outlineColor:string -> + ?outlineStyle:string -> + ?outlineWidth:string -> + ?overflow:string -> + ?overflowX:string -> + ?overflowY:string -> + ?padding:string -> + ?paddingTop:string -> + ?paddingRight:string -> + ?paddingBottom:string -> + ?paddingLeft:string -> + ?page:string -> + ?pageBreakAfter:string -> + ?pageBreakBefore:string -> + ?pageBreakInside:string -> + ?pause:string -> + ?pauseAfter:string -> + ?pauseBefore:string -> + ?pitch:string -> + ?pitchRange:string -> + ?playDuring:string -> + ?position:string -> + ?quotes:string -> + ?richness:string -> + ?right:string -> + ?size:string -> + ?speak:string -> + ?speakHeader:string -> + ?speakNumeral:string -> + ?speakPunctuation:string -> + ?speechRate:string -> + ?stress:string -> + ?tableLayout:string -> + ?textAlign:string -> + ?textDecoration:string -> + ?textIndent:string -> + ?textShadow:string -> + ?textTransform:string -> + ?top:string -> + ?unicodeBidi:string -> + ?verticalAlign:string -> + ?visibility:string -> + ?voiceFamily:string -> + ?volume:string -> + ?whiteSpace:string -> + ?widows:string -> + ?width:string -> + ?wordSpacing:string -> + ?zIndex:string -> + ?opacity:string -> + ?backgroundOrigin:string -> + ?backgroundSize:string -> + ?backgroundClip:string -> + ?borderRadius:string -> + ?borderTopLeftRadius:string -> + ?borderTopRightRadius:string -> + ?borderBottomLeftRadius:string -> + ?borderBottomRightRadius:string -> + ?borderImage:string -> + ?borderImageSource:string -> + ?borderImageSlice:string -> + ?borderImageWidth:string -> + ?borderImageOutset:string -> + ?borderImageRepeat:string -> + ?boxShadow:string -> + ?columns:string -> + ?columnCount:string -> + ?columnFill:string -> + ?columnGap:string -> + ?columnRule:string -> + ?columnRuleColor:string -> + ?columnRuleStyle:string -> + ?columnRuleWidth:string -> + ?columnSpan:string -> + ?columnWidth:string -> + ?breakAfter:string -> + ?breakBefore:string -> + ?breakInside:string -> + ?rest:string -> + ?restAfter:string -> + ?restBefore:string -> + ?speakAs:string -> + ?voiceBalance:string -> + ?voiceDuration:string -> + ?voicePitch:string -> + ?voiceRange:string -> + ?voiceRate:string -> + ?voiceStress:string -> + ?voiceVolume:string -> + ?objectFit:string -> + ?objectPosition:string -> + ?imageResolution:string -> + ?imageOrientation:string -> + ?alignContent:string -> + ?alignItems:string -> + ?alignSelf:string -> + ?flex:string -> + ?flexBasis:string -> + ?flexDirection:string -> + ?flexFlow:string -> + ?flexGrow:string -> + ?flexShrink:string -> + ?flexWrap:string -> + ?justifyContent:string -> + ?order:string -> + ?textDecorationColor:string -> + ?textDecorationLine:string -> + ?textDecorationSkip:string -> + ?textDecorationStyle:string -> + ?textEmphasis:string -> + ?textEmphasisColor:string -> + ?textEmphasisPosition:string -> + ?textEmphasisStyle:string -> + ?textUnderlinePosition:string -> + ?fontFeatureSettings:string -> + ?fontKerning:string -> + ?fontLanguageOverride:string -> + ?fontSynthesis:string -> + ?forntVariantAlternates:string -> + ?fontVariantCaps:string -> + ?fontVariantEastAsian:string -> + ?fontVariantLigatures:string -> + ?fontVariantNumeric:string -> + ?fontVariantPosition:string -> + ?all:string -> + ?textCombineUpright:string -> + ?textOrientation:string -> + ?writingMode:string -> + ?shapeImageThreshold:string -> + ?shapeMargin:string -> + ?shapeOutside:string -> + ?mask:string -> + ?maskBorder:string -> + ?maskBorderMode:string -> + ?maskBorderOutset:string -> + ?maskBorderRepeat:string -> + ?maskBorderSlice:string -> + ?maskBorderSource:string -> + ?maskBorderWidth:string -> + ?maskClip:string -> + ?maskComposite:string -> + ?maskImage:string -> + ?maskMode:string -> + ?maskOrigin:string -> + ?maskPosition:string -> + ?maskRepeat:string -> + ?maskSize:string -> + ?maskType:string -> + ?backgroundBlendMode:string -> + ?isolation:string -> + ?mixBlendMode:string -> + ?boxDecorationBreak:string -> + ?boxSizing:string -> + ?caretColor:string -> + ?navDown:string -> + ?navLeft:string -> + ?navRight:string -> + ?navUp:string -> + ?outlineOffset:string -> + ?resize:string -> + ?textOverflow:string -> + ?grid:string -> + ?gridArea:string -> + ?gridAutoColumns:string -> + ?gridAutoFlow:string -> + ?gridAutoRows:string -> + ?gridColumn:string -> + ?gridColumnEnd:string -> + ?gridColumnGap:string -> + ?gridColumnStart:string -> + ?gridGap:string -> + ?gridRow:string -> + ?gridRowEnd:string -> + ?gridRowGap:string -> + ?gridRowStart:string -> + ?gridTemplate:string -> + ?gridTemplateAreas:string -> + ?gridTemplateColumns:string -> + ?gridTemplateRows:string -> + ?willChange:string -> + ?hangingPunctuation:string -> + ?hyphens:string -> + ?lineBreak:string -> + ?overflowWrap:string -> + ?tabSize:string -> + ?textAlignLast:string -> + ?textJustify:string -> + ?wordBreak:string -> + ?wordWrap:string -> + ?animation:string -> + ?animationDelay:string -> + ?animationDirection:string -> + ?animationDuration:string -> + ?animationFillMode:string -> + ?animationIterationCount:string -> + ?animationName:string -> + ?animationPlayState:string -> + ?animationTimingFunction:string -> + ?transition:string -> + ?transitionDelay:string -> + ?transitionDuration:string -> + ?transitionProperty:string -> + ?transitionTimingFunction:string -> + ?backfaceVisibility:string -> + ?perspective:string -> + ?perspectiveOrigin:string -> + ?transform:string -> + ?transformOrigin:string -> + ?transformStyle:string -> + ?justifyItems:string -> + ?justifySelf:string -> + ?placeContent:string -> + ?placeItems:string -> + ?placeSelf:string -> + ?appearance:string -> + ?caret:string -> + ?caretAnimation:string -> + ?caretShape:string -> + ?userSelect:string -> + ?maxLines:string -> + ?marqueeDirection:string -> + ?marqueeLoop:string -> + ?marqueeSpeed:string -> + ?marqueeStyle:string -> + ?overflowStyle:string -> + ?rotation:string -> + ?rotationPoint:string -> + ?alignmentBaseline:string -> + ?baselineShift:string -> + ?clip:string -> + ?clipPath:string -> + ?clipRule:string -> + ?colorInterpolation:string -> + ?colorInterpolationFilters:string -> + ?colorProfile:string -> + ?colorRendering:string -> + ?dominantBaseline:string -> + ?fill:string -> + ?fillOpacity:string -> + ?fillRule:string -> + ?filter:string -> + ?floodColor:string -> + ?floodOpacity:string -> + ?glyphOrientationHorizontal:string -> + ?glyphOrientationVertical:string -> + ?imageRendering:string -> + ?kerning:string -> + ?lightingColor:string -> + ?markerEnd:string -> + ?markerMid:string -> + ?markerStart:string -> + ?pointerEvents:string -> + ?shapeRendering:string -> + ?stopColor:string -> + ?stopOpacity:string -> + ?stroke:string -> + ?strokeDasharray:string -> + ?strokeDashoffset:string -> + ?strokeLinecap:string -> + ?strokeLinejoin:string -> + ?strokeMiterlimit:string -> + ?strokeOpacity:string -> + ?strokeWidth:string -> + ?textAnchor:string -> + ?textRendering:string -> + ?rubyAlign:string -> + ?rubyMerge:string -> + ?rubyPosition:string -> + unit -> + t

All CSS properties defined as strings. Last argument must be a `unit`

val to_string : t -> string
val combine : t -> t -> t

Combine 2 ReactDOM.Styles.t into one

val unsafeAddProp : t -> string -> string -> t

A scape hatch to add properties to ReactDOM.Styles.t that aren't supported on ReactDOM.Styles.make

diff --git a/local/server-reason-react/reactDom/index.html b/local/server-reason-react/reactDom/index.html new file mode 100644 index 000000000..bef4b1c97 --- /dev/null +++ b/local/server-reason-react/reactDom/index.html @@ -0,0 +1,2 @@ + +reactDom (docs.local.server-reason-react.reactDom)

Package server-reason-react.reactDom

Library server-reason-react.reactDom

This library exposes the following toplevel modules:

diff --git a/local/server-reason-react/runtime/Runtime/index.html b/local/server-reason-react/runtime/Runtime/index.html new file mode 100644 index 000000000..0095d6a09 --- /dev/null +++ b/local/server-reason-react/runtime/Runtime/index.html @@ -0,0 +1,2 @@ + +Runtime (docs.local.server-reason-react.runtime.Runtime)

Module Runtime

A small utility to raise issues with SSR

Mostly used internally by the ppxes

exception Impossible_in_ssr of string

Exception to throw when operations aren't meant to be running on native, mostly used by browser_ppx or ReactDOM

val fail_impossible_action_in_ssr : string -> 'a
type platform =
  1. | Server
  2. | Client
    (*

    `Runtime.platform` is required to use switch%platform. It's a simple variant that expresses the 2 platforms

    *)
diff --git a/local/server-reason-react/runtime/index.html b/local/server-reason-react/runtime/index.html new file mode 100644 index 000000000..52bc1f914 --- /dev/null +++ b/local/server-reason-react/runtime/index.html @@ -0,0 +1,2 @@ + +runtime (docs.local.server-reason-react.runtime)

Package server-reason-react.runtime

Library server-reason-react.runtime

The entry point of this library is the module: Runtime.

diff --git a/local/server-reason-react/universal-code.html b/local/server-reason-react/universal-code.html new file mode 100644 index 000000000..cb27cf27a --- /dev/null +++ b/local/server-reason-react/universal-code.html @@ -0,0 +1,2 @@ + +universal-code (docs.local.server-reason-react.universal-code)

What does universal code mean

The goal of server-reason-react is to enable running your client components in the server, but not only that, it also makes it easier to write code that can be shared between the server and the client. This is what we call universal code.

Challenges of universal code

One of the challenges of sharing code is that the server and the client platforms have different APIs available. You can't use browser's APIs on the server, such as document.querySelectorAll and you can't use server related APIs on the client such as any filsystem operations.

In this aspect server-reason-react is not much different than Node.js. Node.js doesn't provide the global window/document objects and leaves the user to ensure the usages of those are handled manually.

In our case, we don't have any implementation for the browser APIs but we need the code to compile, so we provide a few utilities to make it easier to have code compiled.

Universal modules from server-reason-react

server-reason-react comes with a few modules that are compatible with both server and client, to make it easier to write universal code and don't worry about the platform.

Next

How to structure the code

diff --git a/local/server-reason-react/url_js/URL/SearchParams/index.html b/local/server-reason-react/url_js/URL/SearchParams/index.html new file mode 100644 index 000000000..fac8951dd --- /dev/null +++ b/local/server-reason-react/url_js/URL/SearchParams/index.html @@ -0,0 +1,2 @@ + +SearchParams (docs.local.server-reason-react.url_js.URL.SearchParams)

Module URL.SearchParams

type t
val makeExn : string -> t
val make : string -> t option
val makeWithArray : (string * string) array -> t
val append : t -> string -> string -> t
val delete : t -> string -> t
val entries : t -> (string * string) array
val forEach : t -> (string -> string -> unit) -> unit
val get : t -> string -> string option
val getAll : t -> string -> string array
val has : t -> string -> bool
val keys : t -> string array
val set : t -> string -> string -> t
val sort : t -> t
val toString : t -> string
val values : t -> string array
diff --git a/local/server-reason-react/url_js/URL/index.html b/local/server-reason-react/url_js/URL/index.html new file mode 100644 index 000000000..203494191 --- /dev/null +++ b/local/server-reason-react/url_js/URL/index.html @@ -0,0 +1,16 @@ + +URL (docs.local.server-reason-react.url_js.URL)

Module URL

URL module is universal and has 2 implementations with the same API:

Setup with dune

Depending on you setup, you would need to add the following dependencies to your `dune` stanzas:

(library
+  (name ...)
+  (modes melange)
+  (libraries (server-reason-react.url_js))
+
+(library
+  (name ...)
+  (modes native)
+  (libraries (server-reason-react.url_native))

Usage

let url = URL.make("https://example.com:8080/path?query=1#hash");
+URL.protocol(url); (* => Some("https:") *)
+URL.hostname(url); (* => "example.com" *)
+URL.port(url); (* => Some("8080") *)
+URL.pathname(url); (* => "/path" *)
+URL.search(url); (* => Some("?query=1") *)
+URL.hash(url); (* => Some("#hash") *)

URL.SearchParams

module SearchParams : sig ... end

URL

type t
val makeExn : string -> t
val make : string -> t option
val makeWith : string -> base:string -> t
val hash : t -> string option
val setHash : t -> string -> t
val host : t -> string option
val setHost : t -> string -> t
val hostname : t -> string
val setHostname : t -> string -> t
val href : t -> string
val setHref : t -> string -> t
val origin : t -> string option
val password : t -> string option
val setPassword : t -> string -> t
val pathname : t -> string
val setPathname : t -> string -> t
val port : t -> string option
val setPort : t -> string -> t
val protocol : t -> string option
val setProtocol : t -> string -> t
val setSearch : t -> string -> t
val searchParams : t -> SearchParams.t
val username : t -> string option
val setUsername : t -> string -> t
val toString : t -> string
diff --git a/local/server-reason-react/url_js/index.html b/local/server-reason-react/url_js/index.html new file mode 100644 index 000000000..b954259ae --- /dev/null +++ b/local/server-reason-react/url_js/index.html @@ -0,0 +1,2 @@ + +url_js (docs.local.server-reason-react.url_js)

Package server-reason-react.url_js

Library server-reason-react.url_js

The entry point of this library is the module: URL.

diff --git a/local/server-reason-react/url_native/URL/SearchParams/index.html b/local/server-reason-react/url_native/URL/SearchParams/index.html new file mode 100644 index 000000000..b9ada696b --- /dev/null +++ b/local/server-reason-react/url_native/URL/SearchParams/index.html @@ -0,0 +1,2 @@ + +SearchParams (docs.local.server-reason-react.url_native.URL.SearchParams)

Module URL.SearchParams

type t
val makeExn : string -> t
val make : string -> t option
val makeWithArray : (string * string) array -> t
val append : t -> string -> string -> t
val delete : t -> string -> t
val entries : t -> (string * string) array
val forEach : t -> (string -> string -> unit) -> unit
val get : t -> string -> string option
val getAll : t -> string -> string array
val has : t -> string -> bool
val keys : t -> string array
val set : t -> string -> string -> t
val sort : t -> t
val toString : t -> string
val values : t -> string array
diff --git a/local/server-reason-react/url_native/URL/index.html b/local/server-reason-react/url_native/URL/index.html new file mode 100644 index 000000000..bd11a95c4 --- /dev/null +++ b/local/server-reason-react/url_native/URL/index.html @@ -0,0 +1,16 @@ + +URL (docs.local.server-reason-react.url_native.URL)

Module URL

URL module is universal and has 2 implementations with the same API:

Setup with dune

Depending on you setup, you would need to add the following dependencies to your `dune` stanzas:

(library
+  (name ...)
+  (modes melange)
+  (libraries (server-reason-react.url_js))
+
+(library
+  (name ...)
+  (modes native)
+  (libraries (server-reason-react.url_native))

Usage

let url = URL.make("https://example.com:8080/path?query=1#hash");
+URL.protocol(url); (* => Some("https:") *)
+URL.hostname(url); (* => "example.com" *)
+URL.port(url); (* => Some("8080") *)
+URL.pathname(url); (* => "/path" *)
+URL.search(url); (* => Some("?query=1") *)
+URL.hash(url); (* => Some("#hash") *)

URL.SearchParams

module SearchParams : sig ... end

URL

type t
val makeExn : string -> t
val make : string -> t option
val makeWith : string -> base:string -> t
val hash : t -> string option
val setHash : t -> string -> t
val host : t -> string option
val setHost : t -> string -> t
val hostname : t -> string
val setHostname : t -> string -> t
val href : t -> string
val setHref : t -> string -> t
val origin : t -> string option
val password : t -> string option
val setPassword : t -> string -> t
val pathname : t -> string
val setPathname : t -> string -> t
val port : t -> string option
val setPort : t -> string -> t
val protocol : t -> string option
val setProtocol : t -> string -> t
val setSearch : t -> string -> t
val searchParams : t -> SearchParams.t
val username : t -> string option
val setUsername : t -> string -> t
val toString : t -> string
diff --git a/local/server-reason-react/url_native/index.html b/local/server-reason-react/url_native/index.html new file mode 100644 index 000000000..b9bef9a48 --- /dev/null +++ b/local/server-reason-react/url_native/index.html @@ -0,0 +1,2 @@ + +url_native (docs.local.server-reason-react.url_native)

Package server-reason-react.url_native

Library server-reason-react.url_native

The entry point of this library is the module: URL.

diff --git a/local/server-reason-react/webapi/Webapi/Base64/index.html b/local/server-reason-react/webapi/Webapi/Base64/index.html new file mode 100644 index 000000000..f6ff886b0 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Base64/index.html @@ -0,0 +1,2 @@ + +Base64 (docs.local.server-reason-react.webapi.Webapi.Base64)

Module Webapi.Base64

The Webapi library (stubbed)

val btoa : string -> string
val atob : string -> string
diff --git a/local/server-reason-react/webapi/Webapi/Blob/Impl/argument-1-T/index.html b/local/server-reason-react/webapi/Webapi/Blob/Impl/argument-1-T/index.html new file mode 100644 index 000000000..691d429e5 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Blob/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.webapi.Webapi.Blob.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/webapi/Webapi/Blob/Impl/index.html b/local/server-reason-react/webapi/Webapi/Blob/Impl/index.html new file mode 100644 index 000000000..04cd9c87f --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Blob/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.local.server-reason-react.webapi.Webapi.Blob.Impl)

Module Blob.Impl

Parameters

module T : sig ... end

Signature

val size : T.t -> float
val slice : ?start:int -> ?end_:int -> ?contentType:string -> T.t -> T.t
val stream : T.t -> Fetch.readableStream
val type_ : T.t -> string
val _type : T.t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Blob/index.html b/local/server-reason-react/webapi/Webapi/Blob/index.html new file mode 100644 index 000000000..cb4dedf6e --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Blob/index.html @@ -0,0 +1,2 @@ + +Blob (docs.local.server-reason-react.webapi.Webapi.Blob)

Module Webapi.Blob

module Impl (T : sig ... end) : sig ... end
type t = Fetch.blob
include sig ... end
val size : t -> float
val slice : ?start:int -> ?end_:int -> ?contentType:string -> t -> t
val stream : t -> Fetch.readableStream
val type_ : t -> string
val _type : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/Composite/index.html b/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/Composite/index.html new file mode 100644 index 000000000..aed71ed2d --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/Composite/index.html @@ -0,0 +1,2 @@ + +Composite (docs.local.server-reason-react.webapi.Webapi.Canvas.Canvas2d.Composite)

Module Canvas2d.Composite

type t = private string
val sourceOver : t
val sourceIn : t
val sourceOut : t
val sourceAtop : t
val destinationOver : t
val destinationIn : t
val destinationOut : t
val destinationAtop : t
val lighter : t
val copy : t
val xor : t
diff --git a/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/LineCap/index.html b/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/LineCap/index.html new file mode 100644 index 000000000..64befbaf2 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/LineCap/index.html @@ -0,0 +1,2 @@ + +LineCap (docs.local.server-reason-react.webapi.Webapi.Canvas.Canvas2d.LineCap)

Module Canvas2d.LineCap

type t = private string
val butt : t
val round : t
val square : t
diff --git a/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/LineJoin/index.html b/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/LineJoin/index.html new file mode 100644 index 000000000..dc4aa42cc --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/LineJoin/index.html @@ -0,0 +1,2 @@ + +LineJoin (docs.local.server-reason-react.webapi.Webapi.Canvas.Canvas2d.LineJoin)

Module Canvas2d.LineJoin

type t = private string
val round : t
val bevel : t
val miter : t
diff --git a/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/index.html b/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/index.html new file mode 100644 index 000000000..1479c02b1 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/index.html @@ -0,0 +1,92 @@ + +Canvas2d (docs.local.server-reason-react.webapi.Webapi.Canvas.Canvas2d)

Module Canvas.Canvas2d

type t
type gradient
type pattern
type measureText
module type CompositeType = sig ... end
module type LineCapType = sig ... end
module type LineJoinType = sig ... end
type 'a image =
  1. | Number : float image
  2. | ImageData : Webapi__Dom__Image.t image
type _ style =
  1. | String : string style
  2. | Gradient : gradient style
  3. | Pattern : pattern style
val save : unit -> t
val restore : unit -> t
val scale : x:float -> y:float -> t -> unit
val rotate : float -> t -> unit
val translate : x:float -> y:float -> t -> unit
val transform : + m11:float -> + m12:float -> + m21:float -> + m22:float -> + dx:float -> + dy:float -> + t -> + unit
val setTransform : + m11:float -> + m12:float -> + m21:float -> + m22:float -> + dx:float -> + dy:float -> + t -> + unit
val globalAlpha : t -> float -> unit
val globalCompositeOperation : t -> Composite.t -> unit
val lineWidth : t -> float -> unit
val lineCap : t -> LineCap.t -> unit
val lineJoin : t -> LineJoin.t -> unit
val miterLimit : t -> float -> unit
val setStrokeStyle : t -> 'a style -> 'a0 -> unit
val setFillStyle : t -> 'a style -> 'a0 -> unit
val reifyStyle : 'a -> 'b
val fillStyle : 'a -> 'b
val strokeStyle : 'a -> 'b
val shadowOffsetX : t -> float -> unit
val shadowOffsetY : t -> float -> unit
val shadowBlur : t -> float -> unit
val shadowColor : t -> string -> unit
val createLinearGradient : + x0:float -> + y0:float -> + x1:float -> + y1:float -> + t -> + gradient
val createRadialGradient : + x0:float -> + y0:float -> + x1:float -> + y1:float -> + r0:float -> + r1:float -> + t -> + gradient
val addColorStop : float -> string -> gradient -> unit
val createPattern : + t -> + Dom.element -> + [ `noRepeat | `repeat | `repeatX | `repeatY ] -> + pattern
val beginPath : unit -> t
val closePath : unit -> t
val fill : unit -> t
val stroke : unit -> t
val clip : unit -> t
val moveTo : x:float -> y:float -> t -> unit
val lineTo : x:float -> y:float -> t -> unit
val quadraticCurveTo : + cp1x:float -> + cp1y:float -> + x:float -> + y:float -> + t -> + unit
val bezierCurveTo : + cp1x:float -> + cp1y:float -> + cp2x:float -> + cp2y:float -> + x:float -> + y:float -> + t -> + unit
val arcTo : + x1:float -> + y1:float -> + x2:float -> + y2:float -> + r:float -> + t -> + unit
val arc : + x:float -> + y:float -> + r:float -> + startAngle:float -> + endAngle:float -> + anticw:bool -> + t -> + unit
val rect : x:float -> y:float -> w:float -> h:float -> t -> unit
val isPointInPath : x:float -> y:float -> t -> bool
val font : t -> string -> unit
val textAlign : t -> string -> unit
val textBaseline : t -> string -> unit
val fillText : string -> x:float -> y:float -> ?maxWidth:float -> t -> unit
val strokeText : string -> x:float -> y:float -> ?maxWidth:float -> t -> unit
val measureText : string -> t -> measureText
val width : measureText -> float
val fillRect : x:float -> y:float -> w:float -> h:float -> t -> unit
val strokeRect : x:float -> y:float -> w:float -> h:float -> t -> unit
val clearRect : x:float -> y:float -> w:float -> h:float -> t -> unit
val createImageDataCoords : + t -> + width:float -> + height:float -> + Webapi__Dom__Image.t
val createImageDataFromImage : + t -> + Webapi__Dom__Image.t -> + Webapi__Dom__Image.t
val getImageData : + t -> + sx:float -> + sy:float -> + sw:float -> + sh:float -> + Webapi__Dom__Image.t
val putImageData : + t -> + imageData:Webapi__Dom__Image.t -> + dx:float -> + dy:float -> + unit
val putImageDataWithDirtyRect : + t -> + imageData:Webapi__Dom__Image.t -> + dx:float -> + dy:float -> + dirtyX:float -> + dirtyY:float -> + dirtyWidth:float -> + dirtyHeight:float -> + unit
diff --git a/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/module-type-CompositeType/index.html b/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/module-type-CompositeType/index.html new file mode 100644 index 000000000..536bcc2da --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/module-type-CompositeType/index.html @@ -0,0 +1,2 @@ + +CompositeType (docs.local.server-reason-react.webapi.Webapi.Canvas.Canvas2d.CompositeType)

Module type Canvas2d.CompositeType

type t = private string
val sourceOver : t
val sourceIn : t
val sourceOut : t
val sourceAtop : t
val destinationOver : t
val destinationIn : t
val destinationOut : t
val destinationAtop : t
val lighter : t
val copy : t
val xor : t
diff --git a/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/module-type-LineCapType/index.html b/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/module-type-LineCapType/index.html new file mode 100644 index 000000000..2b19f8893 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/module-type-LineCapType/index.html @@ -0,0 +1,2 @@ + +LineCapType (docs.local.server-reason-react.webapi.Webapi.Canvas.Canvas2d.LineCapType)

Module type Canvas2d.LineCapType

type t = private string
val butt : t
val round : t
val square : t
diff --git a/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/module-type-LineJoinType/index.html b/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/module-type-LineJoinType/index.html new file mode 100644 index 000000000..b46bbbf48 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Canvas/Canvas2d/module-type-LineJoinType/index.html @@ -0,0 +1,2 @@ + +LineJoinType (docs.local.server-reason-react.webapi.Webapi.Canvas.Canvas2d.LineJoinType)

Module type Canvas2d.LineJoinType

type t = private string
val round : t
val bevel : t
val miter : t
diff --git a/local/server-reason-react/webapi/Webapi/Canvas/CanvasElement/index.html b/local/server-reason-react/webapi/Webapi/Canvas/CanvasElement/index.html new file mode 100644 index 000000000..2bc081cc4 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Canvas/CanvasElement/index.html @@ -0,0 +1,2 @@ + +CanvasElement (docs.local.server-reason-react.webapi.Webapi.Canvas.CanvasElement)

Module Canvas.CanvasElement

val getContext2d : Dom.element -> 'a -> Canvas2d.t
val getContextWebGl : Dom.element -> 'a -> WebGl.glT
val height : Dom.element -> int
val setHeight : Dom.element -> int -> unit
val width : Dom.element -> int
val setWidth : Dom.element -> int -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Canvas/WebGl/index.html b/local/server-reason-react/webapi/Webapi/Canvas/WebGl/index.html new file mode 100644 index 000000000..11c0acea0 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Canvas/WebGl/index.html @@ -0,0 +1,15 @@ + +WebGl (docs.local.server-reason-react.webapi.Webapi.Canvas.WebGl)

Module Canvas.WebGl

type glT
type programT
type shaderT
type bufferT
val _DEPTH_BUFFER_BIT : int
val _STENCIL_BUFFER_BIT : int
val _COLOR_BUFFER_BIT : int
val _POINTS : int
val _LINES : int
val _LINE_LOOP : int
val _LINE_STRIP : int
val _TRIANGLES : int
val _TRIANGLE_STRIP : int
val _TRIANGLE_FAN : int
val _CULL_FACE : int
val _BLEND : int
val _DITHER : int
val _STENCIL_TEST : int
val _DEPTH_TEST : int
val _SCISSOR_TEST : int
val _POLYGON_OFFSET_FILL : int
val _SAMPLE_ALPHA_TO_COVERAGE : int
val _SAMPLE_COVERAGE : int
val _ZERO : int
val _ONE : int
val _SRC_COLOR : int
val _ONE_MINUS_SRC_COLOR : int
val _SRC_ALPHA : int
val _ONE_MINUS_SRC_ALPHA : int
val _DST_ALPHA : int
val _ONE_MINUS_DST_ALPHA : int
val _BYTE : int
val _UNSIGNED_BYTE : int
val _SHORT : int
val _UNSIGNED_SHORT : int
val _INT : int
val _UNSIGNED_INT : int
val _FLOAT : int
val _FRONT : int
val _BACK : int
val _FRONT_AND_BACK : int
val _FRAGMENT_SHADER : int
val _VERTEX_SHADER : int
val _ARRAY_BUFFER : int
val _ELEMENT_ARRAY_BUFFER : int
val _ARRAY_BUFFER_BINDING : int
val _ELEMENT_ARRAY_BUFFER_BINDING : int
val _STREAM_DRAW : int
val _STATIC_DRAW : int
val _DYNAMIC_DRAW : int
val clear : glT -> int -> unit
val clearColor : glT -> float -> float -> float -> float -> unit
val enable : glT -> int -> unit
val disable : glT -> int -> unit
val blendFunc : glT -> int -> int -> unit
val cullFace : glT -> int -> unit
val createBuffer : glT -> bufferT
val deleteBuffer : glT -> bufferT -> unit
val bindBuffer : glT -> int -> bufferT -> unit
val bufferData : glT -> int -> Js.Typed_array.Uint16Array.t -> int -> unit
val bufferFloatData : + glT -> + int -> + Js.Typed_array.Float32Array.t -> + int -> + unit
val createProgram : glT -> programT
val linkProgram : glT -> programT -> unit
val useProgram : glT -> programT -> unit
val getProgramInfoLog : glT -> programT -> string
val bindAttribLocation : glT -> programT -> int -> string -> unit
val createShader : glT -> int -> shaderT
val shaderSource : glT -> shaderT -> string -> unit
val compileShader : glT -> shaderT -> unit
val attachShader : glT -> programT -> shaderT -> unit
val getShaderInfoLog : glT -> shaderT -> string
val drawElements : glT -> int -> int -> int -> int -> unit
val enableVertexAttribArray : glT -> int -> unit
val vertexAttribPointer : + glT -> + int -> + int -> + int -> + bool -> + int -> + int -> + unit
val getAttribLocation : glT -> programT -> string -> int
val drawArrays : glT -> int -> int -> int -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Canvas/index.html b/local/server-reason-react/webapi/Webapi/Canvas/index.html new file mode 100644 index 000000000..7e80ee0b3 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Canvas/index.html @@ -0,0 +1,2 @@ + +Canvas (docs.local.server-reason-react.webapi.Webapi.Canvas)

Module Webapi.Canvas

module Canvas2d : sig ... end
module WebGl : sig ... end
module CanvasElement : sig ... end
diff --git a/local/server-reason-react/webapi/Webapi/Dom/AnimationEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/AnimationEvent/index.html new file mode 100644 index 000000000..7ace7d1c8 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/AnimationEvent/index.html @@ -0,0 +1,2 @@ + +AnimationEvent (docs.local.server-reason-react.webapi.Webapi.Dom.AnimationEvent)

Module Dom.AnimationEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val animationName : t -> string
val elapsedTime : t -> float
val pseudoElement : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Attr/index.html b/local/server-reason-react/webapi/Webapi/Dom/Attr/index.html new file mode 100644 index 000000000..4460470c9 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Attr/index.html @@ -0,0 +1,508 @@ + +Attr (docs.local.server-reason-react.webapi.Webapi.Dom.Attr)

Module Dom.Attr

type t = Dom.attr
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val namespaceURI : t -> string
val prefix : t -> string
val localName : t -> string
val name : t -> string
val value : t -> string
val ownerElement : t -> Dom.element option
val specified : t -> bool
diff --git a/local/server-reason-react/webapi/Webapi/Dom/BeforeUnloadEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/BeforeUnloadEvent/index.html new file mode 100644 index 000000000..3c70b42d3 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/BeforeUnloadEvent/index.html @@ -0,0 +1,2 @@ + +BeforeUnloadEvent (docs.local.server-reason-react.webapi.Webapi.Dom.BeforeUnloadEvent)

Module Dom.BeforeUnloadEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val returnValue : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/CdataSection/index.html b/local/server-reason-react/webapi/Webapi/Dom/CdataSection/index.html new file mode 100644 index 000000000..561c88127 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/CdataSection/index.html @@ -0,0 +1,508 @@ + +CdataSection (docs.local.server-reason-react.webapi.Webapi.Dom.CdataSection)

Module Dom.CdataSection

include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val data : t -> string
val length : t -> int
val substringData : offset:int -> count:int -> t -> string
val appendData : string -> t -> unit
val insertData : offset:int -> string -> t -> unit
val deleteData : offset:int -> count:int -> t -> unit
val replaceData : offset:int -> count:int -> string -> t -> unit
include sig ... end
val previousElementSibling : t -> Dom.element option
val nextElementSibling : t -> Dom.element option
include sig ... end
val remove : unit -> t
include sig ... end
val assignedSlot : t -> Dom.htmlSlotElement option
diff --git a/local/server-reason-react/webapi/Webapi/Dom/CharacterData/Impl/argument-1-T/index.html b/local/server-reason-react/webapi/Webapi/Dom/CharacterData/Impl/argument-1-T/index.html new file mode 100644 index 000000000..6ade588fc --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/CharacterData/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.webapi.Webapi.Dom.CharacterData.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/CharacterData/Impl/index.html b/local/server-reason-react/webapi/Webapi/Dom/CharacterData/Impl/index.html new file mode 100644 index 000000000..ce05d93b8 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/CharacterData/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.local.server-reason-react.webapi.Webapi.Dom.CharacterData.Impl)

Module CharacterData.Impl

Parameters

module T : sig ... end

Signature

val data : T.t -> string
val length : T.t -> int
val substringData : offset:int -> count:int -> T.t -> string
val appendData : string -> T.t -> unit
val insertData : offset:int -> string -> T.t -> unit
val deleteData : offset:int -> count:int -> T.t -> unit
val replaceData : offset:int -> count:int -> string -> T.t -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Dom/CharacterData/index.html b/local/server-reason-react/webapi/Webapi/Dom/CharacterData/index.html new file mode 100644 index 000000000..ca6603fee --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/CharacterData/index.html @@ -0,0 +1,508 @@ + +CharacterData (docs.local.server-reason-react.webapi.Webapi.Dom.CharacterData)

Module Dom.CharacterData

module Impl (T : sig ... end) : sig ... end
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val previousElementSibling : t -> Dom.element option
val nextElementSibling : t -> Dom.element option
include sig ... end
val remove : unit -> t
include sig ... end
val data : t -> string
val length : t -> int
val substringData : offset:int -> count:int -> t -> string
val appendData : string -> t -> unit
val insertData : offset:int -> string -> t -> unit
val deleteData : offset:int -> count:int -> t -> unit
val replaceData : offset:int -> count:int -> string -> t -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Dom/ClipboardEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/ClipboardEvent/index.html new file mode 100644 index 000000000..744c805e0 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/ClipboardEvent/index.html @@ -0,0 +1,2 @@ + +ClipboardEvent (docs.local.server-reason-react.webapi.Webapi.Dom.ClipboardEvent)

Module Dom.ClipboardEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val clipboardData : t -> Dom.dataTransfer
diff --git a/local/server-reason-react/webapi/Webapi/Dom/CloseEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/CloseEvent/index.html new file mode 100644 index 000000000..859c00cb4 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/CloseEvent/index.html @@ -0,0 +1,2 @@ + +CloseEvent (docs.local.server-reason-react.webapi.Webapi.Dom.CloseEvent)

Module Dom.CloseEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val wasClean : t -> bool
val code : t -> int
val reason : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Comment/index.html b/local/server-reason-react/webapi/Webapi/Dom/Comment/index.html new file mode 100644 index 000000000..1edb74577 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Comment/index.html @@ -0,0 +1,508 @@ + +Comment (docs.local.server-reason-react.webapi.Webapi.Dom.Comment)

Module Dom.Comment

type t = Dom.comment
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val data : t -> string
val length : t -> int
val substringData : offset:int -> count:int -> t -> string
val appendData : string -> t -> unit
val insertData : offset:int -> string -> t -> unit
val deleteData : offset:int -> count:int -> t -> unit
val replaceData : offset:int -> count:int -> string -> t -> unit
include sig ... end
val previousElementSibling : t -> Dom.element option
val nextElementSibling : t -> Dom.element option
include sig ... end
val remove : unit -> t
include sig ... end
val assignedSlot : t -> Dom.htmlSlotElement option
diff --git a/local/server-reason-react/webapi/Webapi/Dom/CompositionEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/CompositionEvent/index.html new file mode 100644 index 000000000..a5a32d122 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/CompositionEvent/index.html @@ -0,0 +1,2 @@ + +CompositionEvent (docs.local.server-reason-react.webapi.Webapi.Dom.CompositionEvent)

Module Dom.CompositionEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
include sig ... end
val detail : t -> int
val view : t -> Dom.window
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val data : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/CssStyleDeclaration/index.html b/local/server-reason-react/webapi/Webapi/Dom/CssStyleDeclaration/index.html new file mode 100644 index 000000000..d8dfa3a8f --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/CssStyleDeclaration/index.html @@ -0,0 +1,2 @@ + +CssStyleDeclaration (docs.local.server-reason-react.webapi.Webapi.Dom.CssStyleDeclaration)

Module Dom.CssStyleDeclaration

type cssRule
val cssText : t -> string
val setCssText : t -> string -> unit
val length : t -> int
val parentRule : t -> cssRule
val getPropertyPriority : string -> t -> string
val getPropertyValue : string -> t -> string
val item : int -> t -> string
val removeProperty : string -> t -> string
val setProperty : string -> string -> string -> t -> unit
val azimuth : t -> string
val background : t -> string
val backgroundAttachment : t -> string
val backgroundColor : t -> string
val backgroundImage : t -> string
val backgroundPosition : t -> string
val backgroundRepeat : t -> string
val border : t -> string
val borderCollapse : t -> string
val borderColor : t -> string
val borderSpacing : t -> string
val borderStyle : t -> string
val borderTop : t -> string
val borderRight : t -> string
val borderBottom : t -> string
val borderLeft : t -> string
val borderTopColor : t -> string
val borderRightColor : t -> string
val borderBottomColor : t -> string
val borderLeftColor : t -> string
val borderTopStyle : t -> string
val borderRightStyle : t -> string
val borderBottomStyle : t -> string
val borderLeftStyle : t -> string
val borderTopWidth : t -> string
val borderRightWidth : t -> string
val borderBottomWidth : t -> string
val borderLeftWidth : t -> string
val borderWidth : t -> string
val bottom : t -> string
val captionSide : t -> string
val clear : t -> string
val clip : t -> string
val color : t -> string
val content : t -> string
val counterIncrement : t -> string
val counterReset : t -> string
val cue : t -> string
val cueAfter : t -> string
val cueBefore : t -> string
val cursor : t -> string
val direction : t -> string
val display : t -> string
val elevation : t -> string
val emptyCells : t -> string
val cssFloat : t -> string
val font : t -> string
val fontFamily : t -> string
val fontSize : t -> string
val fontSizeAdjust : t -> string
val fontStretch : t -> string
val fontStyle : t -> string
val fontVariant : t -> string
val fontWeight : t -> string
val height : t -> string
val left : t -> string
val letterSpacing : t -> string
val lineHeight : t -> string
val listStyle : t -> string
val listStyleImage : t -> string
val listStylePosition : t -> string
val listStyleType : t -> string
val margin : t -> string
val marginTop : t -> string
val marginRight : t -> string
val marginBottom : t -> string
val marginLeft : t -> string
val markerOffset : t -> string
val marks : t -> string
val maxHeight : t -> string
val maxWidth : t -> string
val minHeight : t -> string
val minWidth : t -> string
val orphans : t -> string
val outline : t -> string
val outlineColor : t -> string
val outlineStyle : t -> string
val outlineWidth : t -> string
val overflow : t -> string
val padding : t -> string
val paddingTop : t -> string
val paddingRight : t -> string
val paddingBottom : t -> string
val paddingLeft : t -> string
val page : t -> string
val pageBreakAfter : t -> string
val pageBreakBefore : t -> string
val pageBreakInside : t -> string
val pause : t -> string
val pauseAfter : t -> string
val pauseBefore : t -> string
val pitch : t -> string
val pitchRange : t -> string
val playDuring : t -> string
val position : t -> string
val quotes : t -> string
val richness : t -> string
val right : t -> string
val size : t -> string
val speak : t -> string
val speakHeader : t -> string
val speakNumeral : t -> string
val speakPunctuation : t -> string
val speechRate : t -> string
val stress : t -> string
val tableLayout : t -> string
val textAlign : t -> string
val textDecoration : t -> string
val textIndent : t -> string
val textShadow : t -> string
val textTransform : t -> string
val top : t -> string
val unicodeBidi : t -> string
val verticalAlign : t -> string
val visibility : t -> string
val voiceFamily : t -> string
val volume : t -> string
val whiteSpace : t -> string
val widows : t -> string
val width : t -> string
val wordSpacing : t -> string
val zIndex : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/CustomEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/CustomEvent/index.html new file mode 100644 index 000000000..5dbd80a79 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/CustomEvent/index.html @@ -0,0 +1,2 @@ + +CustomEvent (docs.local.server-reason-react.webapi.Webapi.Dom.CustomEvent)

Module Dom.CustomEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Document/Impl/argument-1-T/index.html b/local/server-reason-react/webapi/Webapi/Dom/Document/Impl/argument-1-T/index.html new file mode 100644 index 000000000..c2fa86c05 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Document/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.webapi.Webapi.Dom.Document.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Document/Impl/index.html b/local/server-reason-react/webapi/Webapi/Dom/Document/Impl/index.html new file mode 100644 index 000000000..b6d2f007b --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Document/Impl/index.html @@ -0,0 +1,30 @@ + +Impl (docs.local.server-reason-react.webapi.Webapi.Dom.Document.Impl)

Module Document.Impl

Parameters

module T : sig ... end

Signature

val asDocument : T.t -> Dom.document
val asHtmlDocument : T.t -> Dom.htmlDocument option
val unsafeAsHtmlDocument : T.t -> Dom.htmlDocument
val ofNode : Dom.node -> T.t option
val characterSet : T.t -> string
val compatMode : T.t -> Webapi__Dom__Types.compatMode
val doctype : T.t -> Dom.documentType
val documentElement : T.t -> Dom.element
val documentURI : T.t -> string
val hidden : T.t -> bool
val implementation : T.t -> Dom.domImplementation
val lastStyleSheetSet : T.t -> string
val pointerLockElement : T.t -> Dom.element option
val preferredStyleSheetSet : T.t -> string
val scrollingElement : T.t -> Dom.element option
val selectedStyleSheetSet : T.t -> string
val setSelectedStyleSheetSet : T.t -> string -> unit
val styleSheets : T.t -> Dom.cssStyleSheet array
val styleSheetSets : T.t -> string array
val visibilityState : T.t -> Webapi__Dom__Types.visibilityState
val adoptNode : 'a Dom.element_like -> T.t -> 'a Dom.element_like
val createAttribute : string -> T.t -> Dom.attr
val createAttributeNS : string -> string -> T.t -> Dom.attr
val createComment : string -> T.t -> Dom.comment
val createDocumentFragment : Dom.documentFragment -> T.t
val createElement : string -> T.t -> Dom.element
val createElementWithOptions : string -> < .. > Js.t -> T.t -> Dom.element
val createElementNS : string -> string -> T.t -> Dom.element
val createElementNSWithOptions : + string -> + string -> + < .. > Js.t -> + T.t -> + Dom.element
val createEvent : string -> T.t -> Dom.event
val createNodeIterator : 'a Dom.node_like -> T.t -> Dom.nodeIterator
val createNodeIteratorWithWhatToShow : + 'a Dom.node_like -> + Webapi__Dom__Types.WhatToShow.t -> + T.t -> + Dom.nodeIterator
val createNodeIteratorWithWhatToShowFilter : + 'a Dom.node_like -> + Webapi__Dom__Types.WhatToShow.t -> + Dom.nodeFilter -> + T.t -> + Dom.nodeIterator
val createRange : Dom.range -> T.t
val createTextNode : string -> T.t -> Dom.text
val createTreeWalker : 'a Dom.element_like -> T.t -> Dom.treeWalker
val createTreeWalkerWithWhatToShow : + 'a Dom.element_like -> + Webapi__Dom__Types.WhatToShow.t -> + T.t -> + Dom.treeWalker
val createTreeWalkerWithWhatToShowFilter : + 'a Dom.element_like -> + Webapi__Dom__Types.WhatToShow.t -> + Dom.nodeFilter -> + T.t -> + Dom.treeWalker
val elementFromPoint : int -> int -> T.t -> Dom.element
val elementsFromPoint : int -> int -> T.t -> Dom.element array
val enableStyleSheetsForSet : string -> T.t -> unit
val exitPointerLock : unit -> T.t
val getAnimations : Dom.animation array -> T.t
val getElementsByClassName : string -> T.t -> Dom.htmlCollection
val getElementsByTagName : string -> T.t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> T.t -> Dom.htmlCollection
val importNode : 'a Dom.element_like -> T.t -> 'a Dom.element_like
val importNodeDeep : 'a Dom.element_like -> 'b -> T.t -> 'a Dom.element_like
val registerElement : string -> unit -> T.t -> Dom.element
val registerElementWithOptions : + string -> + < .. > Js.t -> + unit -> + T.t -> + Dom.element

XPath stuff

diff --git a/local/server-reason-react/webapi/Webapi/Dom/Document/index.html b/local/server-reason-react/webapi/Webapi/Dom/Document/index.html new file mode 100644 index 000000000..40aa19b4e --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Document/index.html @@ -0,0 +1,536 @@ + +Document (docs.local.server-reason-react.webapi.Webapi.Dom.Document)

Module Dom.Document

module Impl (T : sig ... end) : sig ... end
type t = Dom.document
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val getElementById : string -> t -> Dom.element option
include sig ... end
include sig ... end
val children : t -> Dom.htmlCollection
val firstElementChild : t -> Dom.element option
val lastElementChild : t -> Dom.element option
val childElementCount : t -> int
val querySelector : string -> t -> Dom.element option
val querySelectorAll : string -> t -> Dom.nodeList
include sig ... end
val asDocument : t -> Dom.document
val asHtmlDocument : t -> Dom.htmlDocument option
val unsafeAsHtmlDocument : t -> Dom.htmlDocument
val ofNode : Dom.node -> t option
val characterSet : t -> string
val compatMode : t -> Webapi__Dom__Types.compatMode
val doctype : t -> Dom.documentType
val documentElement : t -> Dom.element
val documentURI : t -> string
val hidden : t -> bool
val implementation : t -> Dom.domImplementation
val lastStyleSheetSet : t -> string
val pointerLockElement : t -> Dom.element option
val preferredStyleSheetSet : t -> string
val scrollingElement : t -> Dom.element option
val selectedStyleSheetSet : t -> string
val setSelectedStyleSheetSet : t -> string -> unit
val styleSheets : t -> Dom.cssStyleSheet array
val styleSheetSets : t -> string array
val visibilityState : t -> Webapi__Dom__Types.visibilityState
val adoptNode : 'a Dom.element_like -> t -> 'a Dom.element_like
val createAttribute : string -> t -> Dom.attr
val createAttributeNS : string -> string -> t -> Dom.attr
val createComment : string -> t -> Dom.comment
val createDocumentFragment : Dom.documentFragment -> t
val createElement : string -> t -> Dom.element
val createElementWithOptions : string -> < .. > Js.t -> t -> Dom.element
val createElementNS : string -> string -> t -> Dom.element
val createElementNSWithOptions : + string -> + string -> + < .. > Js.t -> + t -> + Dom.element
val createEvent : string -> t -> Dom.event
val createNodeIterator : 'a Dom.node_like -> t -> Dom.nodeIterator
val createNodeIteratorWithWhatToShow : + 'a Dom.node_like -> + Webapi__Dom__Types.WhatToShow.t -> + t -> + Dom.nodeIterator
val createNodeIteratorWithWhatToShowFilter : + 'a Dom.node_like -> + Webapi__Dom__Types.WhatToShow.t -> + Dom.nodeFilter -> + t -> + Dom.nodeIterator
val createRange : Dom.range -> t
val createTextNode : string -> t -> Dom.text
val createTreeWalker : 'a Dom.element_like -> t -> Dom.treeWalker
val createTreeWalkerWithWhatToShow : + 'a Dom.element_like -> + Webapi__Dom__Types.WhatToShow.t -> + t -> + Dom.treeWalker
val createTreeWalkerWithWhatToShowFilter : + 'a Dom.element_like -> + Webapi__Dom__Types.WhatToShow.t -> + Dom.nodeFilter -> + t -> + Dom.treeWalker
val elementFromPoint : int -> int -> t -> Dom.element
val elementsFromPoint : int -> int -> t -> Dom.element array
val enableStyleSheetsForSet : string -> t -> unit
val exitPointerLock : unit -> t
val getAnimations : Dom.animation array -> t
val getElementsByClassName : string -> t -> Dom.htmlCollection
val getElementsByTagName : string -> t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> t -> Dom.htmlCollection
val importNode : 'a Dom.element_like -> t -> 'a Dom.element_like
val importNodeDeep : 'a Dom.element_like -> 'b -> t -> 'a Dom.element_like
val registerElement : string -> unit -> t -> Dom.element
val registerElementWithOptions : + string -> + < .. > Js.t -> + unit -> + t -> + Dom.element
diff --git a/local/server-reason-react/webapi/Webapi/Dom/DocumentFragment/index.html b/local/server-reason-react/webapi/Webapi/Dom/DocumentFragment/index.html new file mode 100644 index 000000000..e90e4130c --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/DocumentFragment/index.html @@ -0,0 +1,508 @@ + +DocumentFragment (docs.local.server-reason-react.webapi.Webapi.Dom.DocumentFragment)

Module Dom.DocumentFragment

include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val getElementById : string -> t -> Dom.element option
include sig ... end
val children : t -> Dom.htmlCollection
val firstElementChild : t -> Dom.element option
val lastElementChild : t -> Dom.element option
val childElementCount : t -> int
val querySelector : string -> t -> Dom.element option
val querySelectorAll : string -> t -> Dom.nodeList
diff --git a/local/server-reason-react/webapi/Webapi/Dom/DocumentType/index.html b/local/server-reason-react/webapi/Webapi/Dom/DocumentType/index.html new file mode 100644 index 000000000..8c706eebf --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/DocumentType/index.html @@ -0,0 +1,508 @@ + +DocumentType (docs.local.server-reason-react.webapi.Webapi.Dom.DocumentType)

Module Dom.DocumentType

include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val remove : unit -> t
val name : t -> string
val publicId : t -> string
val systemId : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/DomImplementation/index.html b/local/server-reason-react/webapi/Webapi/Dom/DomImplementation/index.html new file mode 100644 index 000000000..280a2269e --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/DomImplementation/index.html @@ -0,0 +1,12 @@ + +DomImplementation (docs.local.server-reason-react.webapi.Webapi.Dom.DomImplementation)

Module Dom.DomImplementation

val createDocumentType : + qualifiedName:string -> + publicId:string -> + systemId:string -> + t -> + Dom.documentType
val createDocument : + ?namespace:string -> + qualifiedName:string -> + ?docType:Dom.documentType -> + t -> + Dom.xmlDocument
val createHTMLDocument : Dom.htmlDocument -> t
val createHTMLDocumentWithTitle : string -> t -> Dom.htmlDocument
val hasFeature : bool -> t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/DomRect/index.html b/local/server-reason-react/webapi/Webapi/Dom/DomRect/index.html new file mode 100644 index 000000000..888760e07 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/DomRect/index.html @@ -0,0 +1,2 @@ + +DomRect (docs.local.server-reason-react.webapi.Webapi.Dom.DomRect)

Module Dom.DomRect

type t = Dom.domRect
val make : x:float -> y:float -> width:float -> height:float -> t
val top : t -> float
val bottom : t -> float
val left : t -> float
val right : t -> float
val height : t -> float
val width : t -> float
val x : t -> float
val y : t -> float
diff --git a/local/server-reason-react/webapi/Webapi/Dom/DomStringMap/index.html b/local/server-reason-react/webapi/Webapi/Dom/DomStringMap/index.html new file mode 100644 index 000000000..ca4e06107 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/DomStringMap/index.html @@ -0,0 +1,2 @@ + +DomStringMap (docs.local.server-reason-react.webapi.Webapi.Dom.DomStringMap)

Module Dom.DomStringMap

type key = string
val get : key -> t -> string option
val set : key -> string -> t -> unit
val unsafeDeleteKey : key -> t -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Dom/DomTokenList/index.html b/local/server-reason-react/webapi/Webapi/Dom/DomTokenList/index.html new file mode 100644 index 000000000..943d41700 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/DomTokenList/index.html @@ -0,0 +1,2 @@ + +DomTokenList (docs.local.server-reason-react.webapi.Webapi.Dom.DomTokenList)

Module Dom.DomTokenList

val length : t -> int
val item : int -> t -> string option
val add : string -> t -> unit
val addMany : string array -> t -> unit
val contains : string -> t -> bool
val forEach : (string -> int -> unit) -> t -> unit
val remove : string -> t -> unit
val removeMany : string array -> t -> unit
val replace : string -> string -> t -> unit
val supports : string -> t -> bool
val toggle : string -> t -> bool
val toggleForced : string -> 'a -> t -> bool
val toString : string -> t
val value : t -> string
val setValue : t -> string -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Dom/DragEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/DragEvent/index.html new file mode 100644 index 000000000..1a661da5f --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/DragEvent/index.html @@ -0,0 +1,2 @@ + +DragEvent (docs.local.server-reason-react.webapi.Webapi.Dom.DragEvent)

Module Dom.DragEvent

type t = Dom.dragEvent
include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
include sig ... end
val detail : t -> int
val view : t -> Dom.window
include sig ... end
val altKey : t -> bool
val button : t -> int
val buttons : t -> int
val clientX : t -> int
val clientY : t -> int
val ctrlKey : t -> bool
val metaKey : t -> bool
val movementX : t -> int
val movementY : t -> int
val offsetX : t -> int
val offsetY : t -> int
val pageX : t -> int
val pageY : t -> int
val region : t -> string option
val relatedTarget : t -> Dom.eventTarget option
val screenX : t -> int
val screenY : t -> int
val shiftKey : t -> bool
val x : t -> int
val y : t -> int
val getModifierState : Webapi__Dom__Types.modifierKey -> t -> bool
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val dataTransfer : t -> Dom.dataTransfer
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Element/Impl/argument-1-T/index.html b/local/server-reason-react/webapi/Webapi/Dom/Element/Impl/argument-1-T/index.html new file mode 100644 index 000000000..b33775a90 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Element/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.webapi.Webapi.Dom.Element.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Element/Impl/index.html b/local/server-reason-react/webapi/Webapi/Dom/Element/Impl/index.html new file mode 100644 index 000000000..5e6f4cea9 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Element/Impl/index.html @@ -0,0 +1,23 @@ + +Impl (docs.local.server-reason-react.webapi.Webapi.Dom.Element.Impl)

Module Element.Impl

Parameters

module T : sig ... end

Signature

val unsafeAsHtmlElement : T.t -> Dom.htmlElement
val ofNode : Dom.node -> T.t option
val attributes : T.t -> Dom.namedNodeMap
val classList : T.t -> Dom.domTokenList
val className : T.t -> string
val setClassName : T.t -> string -> unit
val clientHeight : T.t -> int
val clientLeft : T.t -> int
val clientTop : T.t -> int
val clientWidth : T.t -> int
val id : T.t -> string
val setId : T.t -> string -> unit
val innerHTML : T.t -> string
val setInnerHTML : T.t -> string -> unit
val localName : T.t -> string
val namespaceURI : T.t -> string option
val outerHTML : T.t -> string
val setOuterHTML : T.t -> string -> unit
val prefix : T.t -> string option
val scrollHeight : T.t -> int
val scrollLeft : T.t -> float
val setScrollLeft : T.t -> float -> unit
val scrollTop : T.t -> float
val setScrollTop : T.t -> float -> unit
val scrollWidth : T.t -> int
val shadowRoot : T.t -> Dom.element
val slot : T.t -> string
val setSlot : T.t -> string -> unit
val tagName : T.t -> string
val attachShadow : < mode : string > Js.t -> T.t -> Dom.shadowRoot
val attachShadowOpen : 'a -> T.t -> Dom.shadowRoot
val attachShadowClosed : 'a -> T.t -> Dom.shadowRoot
val animate : < .. > Js.t -> < .. > Js.t -> T.t -> Dom.animation
val closest : string -> T.t -> Dom.element option
val createShadowRoot : Dom.shadowRoot -> T.t
val getAttribute : string -> T.t -> string option
val getAttributeNS : string -> string -> T.t -> string option
val getBoundingClientRect : Dom.domRect -> T.t
val getClientRects : Dom.domRect array -> T.t
val getElementsByClassName : string -> T.t -> Dom.htmlCollection
val getElementsByTagName : string -> T.t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> T.t -> Dom.htmlCollection
val hasAttribute : string -> T.t -> bool
val hasAttributeNS : string -> string -> T.t -> bool
val hasAttributes : bool -> T.t
val insertAdjacentElement : + Webapi__Dom__Types.insertPosition -> + 'a Dom.element_like -> + T.t -> + unit
val insertAdjacentHTML : + Webapi__Dom__Types.insertPosition -> + string -> + T.t -> + unit
val insertAdjacentText : + Webapi__Dom__Types.insertPosition -> + string -> + T.t -> + unit
val matches : string -> T.t -> bool
val releasePointerCapture : Dom.eventPointerId -> T.t -> unit
val removeAttribute : string -> T.t -> unit
val removeAttributeNS : string -> string -> T.t -> unit
val requestFullscreen : unit -> T.t
val requestPointerLock : unit -> T.t
val scrollIntoView : unit -> T.t
val scrollIntoViewNoAlignToTop : 'a -> T.t -> unit
val scrollIntoViewWithOptions : + < behavior : string ; block : string > Js.t -> + T.t -> + unit
val scrollBy : float -> float -> T.t -> unit
val scrollByWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + T.t -> + unit
val scrollTo : float -> float -> T.t -> unit
val scrollToWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + T.t -> + unit
val setAttribute : string -> string -> T.t -> unit
val setAttributeNS : string -> string -> string -> T.t -> unit
val setPointerCapture : Dom.eventPointerId -> T.t -> unit
val setOnClick : T.t -> (Dom.mouseEvent -> unit) -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Element/index.html b/local/server-reason-react/webapi/Webapi/Dom/Element/index.html new file mode 100644 index 000000000..afcaf4d72 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Element/index.html @@ -0,0 +1,543 @@ + +Element (docs.local.server-reason-react.webapi.Webapi.Dom.Element)

Module Dom.Element

module Impl (T : sig ... end) : sig ... end
type t = Dom.element
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val addSelectionChangeEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addSelectionChangeEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectionChangeEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val removeSelectionChangeEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeSelectionChangeEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectionChangeEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
include sig ... end
val children : t -> Dom.htmlCollection
val firstElementChild : t -> Dom.element option
val lastElementChild : t -> Dom.element option
val childElementCount : t -> int
val querySelector : string -> t -> Dom.element option
val querySelectorAll : string -> t -> Dom.nodeList
include sig ... end
val previousElementSibling : t -> Dom.element option
val nextElementSibling : t -> Dom.element option
include sig ... end
val remove : unit -> t
include sig ... end
val assignedSlot : t -> Dom.htmlSlotElement option
include sig ... end
val unsafeAsHtmlElement : t -> Dom.htmlElement
val ofNode : Dom.node -> t option
val attributes : t -> Dom.namedNodeMap
val classList : t -> Dom.domTokenList
val className : t -> string
val setClassName : t -> string -> unit
val clientHeight : t -> int
val clientLeft : t -> int
val clientTop : t -> int
val clientWidth : t -> int
val id : t -> string
val setId : t -> string -> unit
val innerHTML : t -> string
val setInnerHTML : t -> string -> unit
val localName : t -> string
val namespaceURI : t -> string option
val outerHTML : t -> string
val setOuterHTML : t -> string -> unit
val prefix : t -> string option
val scrollHeight : t -> int
val scrollLeft : t -> float
val setScrollLeft : t -> float -> unit
val scrollTop : t -> float
val setScrollTop : t -> float -> unit
val scrollWidth : t -> int
val shadowRoot : t -> Dom.element
val slot : t -> string
val setSlot : t -> string -> unit
val tagName : t -> string
val attachShadow : < mode : string > Js.t -> t -> Dom.shadowRoot
val attachShadowOpen : 'a -> t -> Dom.shadowRoot
val attachShadowClosed : 'a -> t -> Dom.shadowRoot
val animate : < .. > Js.t -> < .. > Js.t -> t -> Dom.animation
val closest : string -> t -> Dom.element option
val createShadowRoot : Dom.shadowRoot -> t
val getAttribute : string -> t -> string option
val getAttributeNS : string -> string -> t -> string option
val getBoundingClientRect : Dom.domRect -> t
val getClientRects : Dom.domRect array -> t
val getElementsByClassName : string -> t -> Dom.htmlCollection
val getElementsByTagName : string -> t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> t -> Dom.htmlCollection
val hasAttribute : string -> t -> bool
val hasAttributeNS : string -> string -> t -> bool
val hasAttributes : bool -> t
val insertAdjacentElement : + Webapi__Dom__Types.insertPosition -> + 'a Dom.element_like -> + t -> + unit
val insertAdjacentHTML : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val insertAdjacentText : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val matches : string -> t -> bool
val releasePointerCapture : Dom.eventPointerId -> t -> unit
val removeAttribute : string -> t -> unit
val removeAttributeNS : string -> string -> t -> unit
val requestFullscreen : unit -> t
val requestPointerLock : unit -> t
val scrollIntoView : unit -> t
val scrollIntoViewNoAlignToTop : 'a -> t -> unit
val scrollIntoViewWithOptions : + < behavior : string ; block : string > Js.t -> + t -> + unit
val scrollBy : float -> float -> t -> unit
val scrollByWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val scrollTo : float -> float -> t -> unit
val scrollToWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val setAttribute : string -> string -> t -> unit
val setAttributeNS : string -> string -> string -> t -> unit
val setPointerCapture : Dom.eventPointerId -> t -> unit
val setOnClick : t -> (Dom.mouseEvent -> unit) -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Dom/ErrorEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/ErrorEvent/index.html new file mode 100644 index 000000000..646824e25 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/ErrorEvent/index.html @@ -0,0 +1,2 @@ + +ErrorEvent (docs.local.server-reason-react.webapi.Webapi.Dom.ErrorEvent)

Module Dom.ErrorEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val message : t -> string
val filename : t -> string
val lineno : t -> int
val colno : t -> int
val error : t -> < .. > Js.t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Event/Impl/argument-1-T/index.html b/local/server-reason-react/webapi/Webapi/Dom/Event/Impl/argument-1-T/index.html new file mode 100644 index 000000000..2738a755b --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Event/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.webapi.Webapi.Dom.Event.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Event/Impl/index.html b/local/server-reason-react/webapi/Webapi/Dom/Event/Impl/index.html new file mode 100644 index 000000000..885389793 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Event/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.local.server-reason-react.webapi.Webapi.Dom.Event.Impl)

Module Event.Impl

Parameters

module T : sig ... end

Signature

val bubbles : T.t -> bool
val cancelable : T.t -> bool
val composed : T.t -> bool
val currentTarget : T.t -> Dom.eventTarget
val defaultPrevented : T.t -> bool
val eventPhase : T.t -> Webapi__Dom__Types.EventPhase.t
val target : T.t -> Dom.eventTarget
val timeStamp : T.t -> float
val type_ : T.t -> string
val isTrusted : T.t -> bool
val preventDefault : unit -> T.t
val stopImmediatePropagation : unit -> T.t
val stopPropagation : unit -> T.t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Event/index.html b/local/server-reason-react/webapi/Webapi/Dom/Event/index.html new file mode 100644 index 000000000..ab531df78 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Event/index.html @@ -0,0 +1,2 @@ + +Event (docs.local.server-reason-react.webapi.Webapi.Dom.Event)

Module Dom.Event

module Impl (T : sig ... end) : sig ... end
type t = Dom.event
include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/EventPhase/index.html b/local/server-reason-react/webapi/Webapi/Dom/EventPhase/index.html new file mode 100644 index 000000000..cf40b014b --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/EventPhase/index.html @@ -0,0 +1,2 @@ + +EventPhase (docs.local.server-reason-react.webapi.Webapi.Dom.EventPhase)

Module Dom.EventPhase

type t =
  1. | None
  2. | CapturingPhase
  3. | AtTarget
  4. | BubblingPhase
  5. | Unknown
val decode : int -> t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/EventTarget/Impl/argument-1-T/index.html b/local/server-reason-react/webapi/Webapi/Dom/EventTarget/Impl/argument-1-T/index.html new file mode 100644 index 000000000..05666f101 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/EventTarget/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.webapi.Webapi.Dom.EventTarget.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/EventTarget/Impl/index.html b/local/server-reason-react/webapi/Webapi/Dom/EventTarget/Impl/index.html new file mode 100644 index 000000000..2695b5568 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/EventTarget/Impl/index.html @@ -0,0 +1,564 @@ + +Impl (docs.local.server-reason-react.webapi.Webapi.Dom.EventTarget.Impl)

Module EventTarget.Impl

Parameters

module T : sig ... end

Signature

val asEventTarget : T.t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> T.t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> T.t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> T.t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> T.t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> T.t -> unit

* non-standard event-specific functions

val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> T.t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> T.t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> T.t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val addAbortEventListener : (Dom.event -> unit) -> T.t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> T.t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val addErrorEventListener : (Dom.event -> unit) -> T.t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> T.t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val addSelectEventListener : (Dom.event -> unit) -> T.t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> T.t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> T.t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> T.t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> T.t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> T.t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> T.t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> T.t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> T.t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> T.t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeFocusEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + T.t -> + unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> T.t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> T.t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> T.t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + T.t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> T.t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + T.t -> + unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> T.t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + T.t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> T.t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + T.t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> T.t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> T.t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> T.t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeWheelEventListenerUseCapture : + (Dom.wheelEvent -> unit) -> + T.t -> + unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> T.t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + T.t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> T.t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + T.t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> T.t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> T.t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> T.t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + T.t -> + unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> T.t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + T.t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> T.t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + T.t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> T.t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + T.t -> + unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> T.t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + T.t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> T.t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + T.t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> T.t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + T.t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + T.t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> T.t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDragEndEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + T.t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> T.t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> T.t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> T.t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + T.t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> T.t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + T.t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> T.t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + T.t -> + unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> T.t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + T.t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> T.t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + T.t -> + unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> T.t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + T.t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> T.t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + T.t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> T.t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + T.t -> + unit
val addAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> T.t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val removeAnimationEndEventListener : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val addAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + T.t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + T.t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + T.t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + T.t -> + unit
diff --git a/local/server-reason-react/webapi/Webapi/Dom/EventTarget/index.html b/local/server-reason-react/webapi/Webapi/Dom/EventTarget/index.html new file mode 100644 index 000000000..a60e71227 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/EventTarget/index.html @@ -0,0 +1,813 @@ + +EventTarget (docs.local.server-reason-react.webapi.Webapi.Dom.EventTarget)

Module Dom.EventTarget

module Impl (T : sig ... end) : sig ... end
include sig ... end
val asEventTarget : Dom.eventTarget -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> Dom.eventTarget -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addEventListenerUseCapture : + string -> + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val removeEventListener : + string -> + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeEventListenerUseCapture : + 'a -> + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addLoadEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val removeLoadEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeLoadEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val addUnloadEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addUnloadEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val removeUnloadEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeUnloadEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val addAbortEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addAbortEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val removeAbortEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeAbortEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val addErrorEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addErrorEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val removeErrorEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeErrorEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val addSelectEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addSelectEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val removeSelectEventListener : (Dom.event -> unit) -> Dom.eventTarget -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeSelectEventListenerUseCapture : + (Dom.event -> unit) -> + Dom.eventTarget -> + unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> Dom.eventTarget -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addBlurEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val removeBlurEventListener : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeBlurEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> Dom.eventTarget -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addFocusEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val removeFocusEventListener : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeFocusEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val addFocusInEventListener : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val removeFocusInEventListener : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val addFocusOutEventListener : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val removeFocusOutEventListener : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + Dom.eventTarget -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> Dom.eventTarget -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeClickEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addDblClickEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDblClickEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseDownEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseDownEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseEnterEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseEnterEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseMoveEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseMoveEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseOutEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseOutEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseOverEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseOverEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseUpEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseUpEventListener : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + Dom.eventTarget -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> Dom.eventTarget -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addWheelEventListenerUseCapture : + (Dom.wheelEvent -> unit) -> + Dom.eventTarget -> + unit
val removeWheelEventListener : + (Dom.wheelEvent -> unit) -> + Dom.eventTarget -> + unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeWheelEventListenerUseCapture : + (Dom.wheelEvent -> unit) -> + Dom.eventTarget -> + unit
val addBeforeInputEventListener : + (Dom.inputEvent -> unit) -> + Dom.eventTarget -> + unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + Dom.eventTarget -> + unit
val removeBeforeInputEventListener : + (Dom.inputEvent -> unit) -> + Dom.eventTarget -> + unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + Dom.eventTarget -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> Dom.eventTarget -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + Dom.eventTarget -> + unit
val removeInputEventListener : + (Dom.inputEvent -> unit) -> + Dom.eventTarget -> + unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + Dom.eventTarget -> + unit
val addKeyDownEventListener : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val removeKeyDownEventListener : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val addKeyUpEventListener : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val removeKeyUpEventListener : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val addKeyPressEventListener : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val removeKeyPressEventListener : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + Dom.eventTarget -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> Dom.eventTarget -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDragEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDragEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragEndEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDragEndEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragEndEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDragEndEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragEnterEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragEnterEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragExitEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragExitEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragLeaveEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragLeaveEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragOverEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragOverEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragStartEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragStartEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> Dom.eventTarget -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addDropEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDropEventListener : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeDropEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + Dom.eventTarget -> + unit
val addTouchCancelEventListener : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val removeTouchCancelEventListener : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val addTouchEndEventListener : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val removeTouchEndEventListener : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val addTouchMoveEventListener : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val removeTouchMoveEventListener : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val addTouchStartEventListener : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val removeTouchStartEventListener : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + Dom.eventTarget -> + unit
val addAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val addAnimationEndEventListener : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val removeAnimationEndEventListener : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val addAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + Dom.eventTarget -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + Dom.eventTarget -> + unit
val unsafeAsDocument : Dom.eventTarget -> Dom.document
val unsafeAsElement : Dom.eventTarget -> Dom.element
val unsafeAsWindow : Dom.eventTarget -> Dom.window
diff --git a/local/server-reason-react/webapi/Webapi/Dom/FocusEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/FocusEvent/index.html new file mode 100644 index 000000000..f948fcb10 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/FocusEvent/index.html @@ -0,0 +1,2 @@ + +FocusEvent (docs.local.server-reason-react.webapi.Webapi.Dom.FocusEvent)

Module Dom.FocusEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
include sig ... end
val detail : t -> int
val view : t -> Dom.window
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val relatedTarget : t -> Dom.eventTarget option
diff --git a/local/server-reason-react/webapi/Webapi/Dom/History/index.html b/local/server-reason-react/webapi/Webapi/Dom/History/index.html new file mode 100644 index 000000000..8ad6d3d82 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/History/index.html @@ -0,0 +1,2 @@ + +History (docs.local.server-reason-react.webapi.Webapi.Dom.History)

Module Dom.History

type t = Dom.history
type state
val length : t -> int
val scrollRestoration : t -> bool
val setScrollRestoration : t -> bool -> unit
val state : t -> state
val back : unit -> t
val forward : unit -> t
val go : int -> t -> unit
val pushState : state -> string -> string -> t -> unit
val replaceState : state -> string -> string -> t -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlCollection/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlCollection/index.html new file mode 100644 index 000000000..f49e3254d --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlCollection/index.html @@ -0,0 +1,2 @@ + +HtmlCollection (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlCollection)

Module Dom.HtmlCollection

val toArray : t -> Dom.element array
val length : t -> int
val item : int -> t -> Dom.element option
val namedItem : string -> t -> Dom.element option
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlDocument/Impl/argument-1-T/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlDocument/Impl/argument-1-T/index.html new file mode 100644 index 000000000..5cb8229f7 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlDocument/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlDocument.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlDocument/Impl/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlDocument/Impl/index.html new file mode 100644 index 000000000..38b0484f5 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlDocument/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlDocument.Impl)

Module HtmlDocument.Impl

Parameters

module T : sig ... end

Signature

type t_htmlDocument = T.t
val activeElement : t_htmlDocument -> Dom.element option
val body : t_htmlDocument -> Dom.element option
val setBody : t_htmlDocument -> Dom.element -> unit
val setCookie : t_htmlDocument -> string -> unit
val defaultView : t_htmlDocument -> Dom.window option
val designMode : t_htmlDocument -> Webapi__Dom__Types.designMode
val setDesignMode : t_htmlDocument -> Webapi__Dom__Types.designMode -> unit
val dir : t_htmlDocument -> Webapi__Dom__Types.dir
val setDir : t_htmlDocument -> Webapi__Dom__Types.dir -> unit
val domain : t_htmlDocument -> string option
val setDomain : t_htmlDocument -> string -> unit
val lastModified : t_htmlDocument -> string
val location : t_htmlDocument -> Dom.location
val setLocation : t_htmlDocument -> string -> unit
val readyState : t_htmlDocument -> Webapi__Dom__Types.readyState
val referrer : t_htmlDocument -> string
val title : t_htmlDocument -> string
val setTitle : t_htmlDocument -> string -> unit
val url : t_htmlDocument -> string
val close : unit -> t_htmlDocument
val execCommand : string -> bool -> string option -> t_htmlDocument -> bool
val getElementsByName : string -> t_htmlDocument -> Dom.nodeList
val getSelection : Dom.selection -> t_htmlDocument
val hasFocus : bool -> t_htmlDocument
val open_ : unit -> t_htmlDocument
val queryCommandEnabled : string -> t_htmlDocument -> bool
val queryCommandIndeterm : string -> t_htmlDocument -> bool
val queryCommandSupported : string -> t_htmlDocument -> bool
val queryCommandValue : string -> t_htmlDocument -> string
val write : string -> t_htmlDocument -> unit
val writeln : string -> t_htmlDocument -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlDocument/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlDocument/index.html new file mode 100644 index 000000000..bf909b050 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlDocument/index.html @@ -0,0 +1,550 @@ + +HtmlDocument (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlDocument)

Module Dom.HtmlDocument

module Impl (T : sig ... end) : sig ... end
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val addSelectionChangeEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addSelectionChangeEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectionChangeEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val removeSelectionChangeEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeSelectionChangeEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectionChangeEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
include sig ... end
val asDocument : t -> Dom.document
val asHtmlDocument : t -> Dom.htmlDocument option
val unsafeAsHtmlDocument : t -> Dom.htmlDocument
val ofNode : Dom.node -> t option
val characterSet : t -> string
val compatMode : t -> Webapi__Dom__Types.compatMode
val doctype : t -> Dom.documentType
val documentElement : t -> Dom.element
val documentURI : t -> string
val hidden : t -> bool
val implementation : t -> Dom.domImplementation
val lastStyleSheetSet : t -> string
val pointerLockElement : t -> Dom.element option
val preferredStyleSheetSet : t -> string
val scrollingElement : t -> Dom.element option
val selectedStyleSheetSet : t -> string
val setSelectedStyleSheetSet : t -> string -> unit
val styleSheets : t -> Dom.cssStyleSheet array
val styleSheetSets : t -> string array
val visibilityState : t -> Webapi__Dom__Types.visibilityState
val adoptNode : 'a Dom.element_like -> t -> 'a Dom.element_like
val createAttribute : string -> t -> Dom.attr
val createAttributeNS : string -> string -> t -> Dom.attr
val createComment : string -> t -> Dom.comment
val createDocumentFragment : Dom.documentFragment -> t
val createElement : string -> t -> Dom.element
val createElementWithOptions : string -> < .. > Js.t -> t -> Dom.element
val createElementNS : string -> string -> t -> Dom.element
val createElementNSWithOptions : + string -> + string -> + < .. > Js.t -> + t -> + Dom.element
val createEvent : string -> t -> Dom.event
val createNodeIterator : 'a Dom.node_like -> t -> Dom.nodeIterator
val createNodeIteratorWithWhatToShow : + 'a Dom.node_like -> + Webapi__Dom__Types.WhatToShow.t -> + t -> + Dom.nodeIterator
val createNodeIteratorWithWhatToShowFilter : + 'a Dom.node_like -> + Webapi__Dom__Types.WhatToShow.t -> + Dom.nodeFilter -> + t -> + Dom.nodeIterator
val createRange : Dom.range -> t
val createTextNode : string -> t -> Dom.text
val createTreeWalker : 'a Dom.element_like -> t -> Dom.treeWalker
val createTreeWalkerWithWhatToShow : + 'a Dom.element_like -> + Webapi__Dom__Types.WhatToShow.t -> + t -> + Dom.treeWalker
val createTreeWalkerWithWhatToShowFilter : + 'a Dom.element_like -> + Webapi__Dom__Types.WhatToShow.t -> + Dom.nodeFilter -> + t -> + Dom.treeWalker
val elementFromPoint : int -> int -> t -> Dom.element
val elementsFromPoint : int -> int -> t -> Dom.element array
val enableStyleSheetsForSet : string -> t -> unit
val exitPointerLock : unit -> t
val getAnimations : Dom.animation array -> t
val getElementsByClassName : string -> t -> Dom.htmlCollection
val getElementsByTagName : string -> t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> t -> Dom.htmlCollection
val importNode : 'a Dom.element_like -> t -> 'a Dom.element_like
val importNodeDeep : 'a Dom.element_like -> 'b -> t -> 'a Dom.element_like
val registerElement : string -> unit -> t -> Dom.element
val registerElementWithOptions : + string -> + < .. > Js.t -> + unit -> + t -> + Dom.element
include sig ... end
type t_htmlDocument = t
val activeElement : t_htmlDocument -> Dom.element option
val body : t_htmlDocument -> Dom.element option
val setBody : t_htmlDocument -> Dom.element -> unit
val setCookie : t_htmlDocument -> string -> unit
val defaultView : t_htmlDocument -> Dom.window option
val designMode : t_htmlDocument -> Webapi__Dom__Types.designMode
val setDesignMode : t_htmlDocument -> Webapi__Dom__Types.designMode -> unit
val dir : t_htmlDocument -> Webapi__Dom__Types.dir
val setDir : t_htmlDocument -> Webapi__Dom__Types.dir -> unit
val domain : t_htmlDocument -> string option
val setDomain : t_htmlDocument -> string -> unit
val lastModified : t_htmlDocument -> string
val location : t_htmlDocument -> Dom.location
val setLocation : t_htmlDocument -> string -> unit
val readyState : t_htmlDocument -> Webapi__Dom__Types.readyState
val referrer : t_htmlDocument -> string
val title : t_htmlDocument -> string
val setTitle : t_htmlDocument -> string -> unit
val url : t_htmlDocument -> string
val close : unit -> t_htmlDocument
val execCommand : string -> bool -> string option -> t_htmlDocument -> bool
val getElementsByName : string -> t_htmlDocument -> Dom.nodeList
val getSelection : Dom.selection -> t_htmlDocument
val hasFocus : bool -> t_htmlDocument
val open_ : unit -> t_htmlDocument
val queryCommandEnabled : string -> t_htmlDocument -> bool
val queryCommandIndeterm : string -> t_htmlDocument -> bool
val queryCommandSupported : string -> t_htmlDocument -> bool
val queryCommandValue : string -> t_htmlDocument -> string
val write : string -> t_htmlDocument -> unit
val writeln : string -> t_htmlDocument -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlElement/Impl/argument-1-T/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlElement/Impl/argument-1-T/index.html new file mode 100644 index 000000000..c604c75db --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlElement/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlElement.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlElement/Impl/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlElement/Impl/index.html new file mode 100644 index 000000000..ab1c32e5c --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlElement/Impl/index.html @@ -0,0 +1,5 @@ + +Impl (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlElement.Impl)

Module HtmlElement.Impl

Parameters

module T : sig ... end

Signature

type t_htmlElement = T.t
val ofElement : 'a
val accessKey : t_htmlElement -> string
val setAccessKey : t_htmlElement -> string -> unit
val accessKeyLabel : t_htmlElement -> string
val contentEditable : t_htmlElement -> Webapi__Dom__Types.contentEditable
val setContentEditable : + t_htmlElement -> + Webapi__Dom__Types.contentEditable -> + unit
val isContentEditable : t_htmlElement -> bool
val contextMenu : t_htmlElement -> Dom.htmlElement
val setContextMenu : t_htmlElement -> Dom.htmlElement -> unit
val dir : t_htmlElement -> Webapi__Dom__Types.dir
val setDir : t_htmlElement -> Webapi__Dom__Types.dir -> unit
val draggable : t_htmlElement -> bool
val setDraggable : t_htmlElement -> bool -> unit
val hidden : t_htmlElement -> bool
val setHidden : t_htmlElement -> bool -> unit
val itemScope : t_htmlElement -> bool
val setItemScope : t_htmlElement -> bool -> unit
val itemId : t_htmlElement -> string
val setItemId : t_htmlElement -> string -> unit
val itemValue : t_htmlElement -> < .. > Js.t
val setItemValue : t_htmlElement -> < .. > Js.t -> unit
val lang : t_htmlElement -> string
val setLang : t_htmlElement -> string -> unit
val offsetHeight : t_htmlElement -> int
val offsetLeft : t_htmlElement -> int
val offsetParent : t_htmlElement -> Dom.element option
val offsetTop : t_htmlElement -> int
val offsetWidth : t_htmlElement -> int
val spellcheck : t_htmlElement -> bool
val setSpellcheck : t_htmlElement -> bool -> unit
val setStyle : t_htmlElement -> Dom.cssStyleDeclaration -> unit
val tabIndex : t_htmlElement -> int
val setTabIndex : t_htmlElement -> int -> unit
val title : t_htmlElement -> string
val setTitle : t_htmlElement -> string -> unit
val translate : t_htmlElement -> bool
val setTranslate : t_htmlElement -> bool -> unit
val blur : unit -> t_htmlElement
val click : unit -> t_htmlElement
val focus : unit -> t_htmlElement
val focusPreventScroll : 'a -> t_htmlElement -> unit
val forceSpellCheck : unit -> t_htmlElement
val value : t_htmlElement -> string
val checked : t_htmlElement -> bool
val type_ : t_htmlElement -> string
val setType : t_htmlElement -> string -> unit
val rel : t_htmlElement -> string
val setRel : t_htmlElement -> string -> unit
val href : t_htmlElement -> string
val setHref : t_htmlElement -> string -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlElement/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlElement/index.html new file mode 100644 index 000000000..8a408c5d3 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlElement/index.html @@ -0,0 +1,546 @@ + +HtmlElement (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlElement)

Module Dom.HtmlElement

module Impl (T : sig ... end) : sig ... end
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val addSelectionChangeEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addSelectionChangeEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectionChangeEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val removeSelectionChangeEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeSelectionChangeEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectionChangeEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
include sig ... end
val unsafeAsHtmlElement : t -> Dom.htmlElement
val ofNode : Dom.node -> t option
val attributes : t -> Dom.namedNodeMap
val classList : t -> Dom.domTokenList
val className : t -> string
val setClassName : t -> string -> unit
val clientHeight : t -> int
val clientLeft : t -> int
val clientTop : t -> int
val clientWidth : t -> int
val id : t -> string
val setId : t -> string -> unit
val innerHTML : t -> string
val setInnerHTML : t -> string -> unit
val localName : t -> string
val namespaceURI : t -> string option
val outerHTML : t -> string
val setOuterHTML : t -> string -> unit
val prefix : t -> string option
val scrollHeight : t -> int
val scrollLeft : t -> float
val setScrollLeft : t -> float -> unit
val scrollTop : t -> float
val setScrollTop : t -> float -> unit
val scrollWidth : t -> int
val shadowRoot : t -> Dom.element
val slot : t -> string
val setSlot : t -> string -> unit
val tagName : t -> string
val attachShadow : < mode : string > Js.t -> t -> Dom.shadowRoot
val attachShadowOpen : 'a -> t -> Dom.shadowRoot
val attachShadowClosed : 'a -> t -> Dom.shadowRoot
val animate : < .. > Js.t -> < .. > Js.t -> t -> Dom.animation
val closest : string -> t -> Dom.element option
val createShadowRoot : Dom.shadowRoot -> t
val getAttribute : string -> t -> string option
val getAttributeNS : string -> string -> t -> string option
val getBoundingClientRect : Dom.domRect -> t
val getClientRects : Dom.domRect array -> t
val getElementsByClassName : string -> t -> Dom.htmlCollection
val getElementsByTagName : string -> t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> t -> Dom.htmlCollection
val hasAttribute : string -> t -> bool
val hasAttributeNS : string -> string -> t -> bool
val hasAttributes : bool -> t
val insertAdjacentElement : + Webapi__Dom__Types.insertPosition -> + 'a Dom.element_like -> + t -> + unit
val insertAdjacentHTML : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val insertAdjacentText : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val matches : string -> t -> bool
val releasePointerCapture : Dom.eventPointerId -> t -> unit
val removeAttribute : string -> t -> unit
val removeAttributeNS : string -> string -> t -> unit
val requestFullscreen : unit -> t
val requestPointerLock : unit -> t
val scrollIntoView : unit -> t
val scrollIntoViewNoAlignToTop : 'a -> t -> unit
val scrollIntoViewWithOptions : + < behavior : string ; block : string > Js.t -> + t -> + unit
val scrollBy : float -> float -> t -> unit
val scrollByWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val scrollTo : float -> float -> t -> unit
val scrollToWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val setAttribute : string -> string -> t -> unit
val setAttributeNS : string -> string -> string -> t -> unit
val setPointerCapture : Dom.eventPointerId -> t -> unit
val setOnClick : t -> (Dom.mouseEvent -> unit) -> unit
include sig ... end
type t_htmlElement = t
val ofElement : 'a
  • alert browser_only This expression is marked to only run on the browser where JavaScript can run. You can only use it inside a let%browser_only function.
val accessKey : t_htmlElement -> string
val setAccessKey : t_htmlElement -> string -> unit
val accessKeyLabel : t_htmlElement -> string
val contentEditable : t_htmlElement -> Webapi__Dom__Types.contentEditable
val setContentEditable : + t_htmlElement -> + Webapi__Dom__Types.contentEditable -> + unit
val isContentEditable : t_htmlElement -> bool
val contextMenu : t_htmlElement -> Dom.htmlElement
val setContextMenu : t_htmlElement -> Dom.htmlElement -> unit
val dir : t_htmlElement -> Webapi__Dom__Types.dir
val setDir : t_htmlElement -> Webapi__Dom__Types.dir -> unit
val draggable : t_htmlElement -> bool
val setDraggable : t_htmlElement -> bool -> unit
val hidden : t_htmlElement -> bool
val setHidden : t_htmlElement -> bool -> unit
val itemScope : t_htmlElement -> bool
val setItemScope : t_htmlElement -> bool -> unit
val itemId : t_htmlElement -> string
val setItemId : t_htmlElement -> string -> unit
val itemValue : t_htmlElement -> < .. > Js.t
val setItemValue : t_htmlElement -> < .. > Js.t -> unit
val lang : t_htmlElement -> string
val setLang : t_htmlElement -> string -> unit
val offsetHeight : t_htmlElement -> int
val offsetLeft : t_htmlElement -> int
val offsetParent : t_htmlElement -> Dom.element option
val offsetTop : t_htmlElement -> int
val offsetWidth : t_htmlElement -> int
val spellcheck : t_htmlElement -> bool
val setSpellcheck : t_htmlElement -> bool -> unit
val setStyle : t_htmlElement -> Dom.cssStyleDeclaration -> unit
val tabIndex : t_htmlElement -> int
val setTabIndex : t_htmlElement -> int -> unit
val title : t_htmlElement -> string
val setTitle : t_htmlElement -> string -> unit
val translate : t_htmlElement -> bool
val setTranslate : t_htmlElement -> bool -> unit
val blur : unit -> t_htmlElement
val click : unit -> t_htmlElement
val focus : unit -> t_htmlElement
val focusPreventScroll : 'a -> t_htmlElement -> unit
val forceSpellCheck : unit -> t_htmlElement
val value : t_htmlElement -> string
val checked : t_htmlElement -> bool
val type_ : t_htmlElement -> string
val setType : t_htmlElement -> string -> unit
val rel : t_htmlElement -> string
val setRel : t_htmlElement -> string -> unit
val href : t_htmlElement -> string
val setHref : t_htmlElement -> string -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlFormElement/Impl/argument-1-T/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlFormElement/Impl/argument-1-T/index.html new file mode 100644 index 000000000..32be4d8ab --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlFormElement/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlFormElement.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlFormElement/Impl/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlFormElement/Impl/index.html new file mode 100644 index 000000000..ce5b11884 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlFormElement/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlFormElement.Impl)

Module HtmlFormElement.Impl

Parameters

module T : sig ... end

Signature

type t_htmlFormElement = T.t
val length : t_htmlFormElement -> int
val name : t_htmlFormElement -> string
val setName : t_htmlFormElement -> string -> unit
val method_ : t_htmlFormElement -> string
val setMethod : t_htmlFormElement -> string -> unit
val target : t_htmlFormElement -> string
val setTarget : t_htmlFormElement -> string -> unit
val action : t_htmlFormElement -> string
val setAction : t_htmlFormElement -> string -> unit
val acceptCharset : t_htmlFormElement -> string
val setAcceptCharset : t_htmlFormElement -> string -> unit
val autocomplete : t_htmlFormElement -> string
val setAutocomplete : t_htmlFormElement -> string -> unit
val noValidate : t_htmlFormElement -> bool
val setNoValidate : t_htmlFormElement -> bool -> unit
val enctype : t_htmlFormElement -> string
val setEnctype : t_htmlFormElement -> string -> unit
val encoding : t_htmlFormElement -> string
val setEncoding : t_htmlFormElement -> string -> unit
val submit : unit -> t_htmlFormElement
val reset : unit -> t_htmlFormElement
val checkValidity : bool -> t_htmlFormElement
val reportValidity : bool -> t_htmlFormElement
val data : T.t -> Fetch.FormData.t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlFormElement/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlFormElement/index.html new file mode 100644 index 000000000..d18430881 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlFormElement/index.html @@ -0,0 +1,532 @@ + +HtmlFormElement (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlFormElement)

Module Dom.HtmlFormElement

module Impl (T : sig ... end) : sig ... end
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
include sig ... end
val unsafeAsHtmlElement : t -> Dom.htmlElement
val ofNode : Dom.node -> t option
val attributes : t -> Dom.namedNodeMap
val classList : t -> Dom.domTokenList
val className : t -> string
val setClassName : t -> string -> unit
val clientHeight : t -> int
val clientLeft : t -> int
val clientTop : t -> int
val clientWidth : t -> int
val id : t -> string
val setId : t -> string -> unit
val innerHTML : t -> string
val setInnerHTML : t -> string -> unit
val localName : t -> string
val namespaceURI : t -> string option
val outerHTML : t -> string
val setOuterHTML : t -> string -> unit
val prefix : t -> string option
val scrollHeight : t -> int
val scrollLeft : t -> float
val setScrollLeft : t -> float -> unit
val scrollTop : t -> float
val setScrollTop : t -> float -> unit
val scrollWidth : t -> int
val shadowRoot : t -> Dom.element
val slot : t -> string
val setSlot : t -> string -> unit
val tagName : t -> string
val attachShadow : < mode : string > Js.t -> t -> Dom.shadowRoot
val attachShadowOpen : 'a -> t -> Dom.shadowRoot
val attachShadowClosed : 'a -> t -> Dom.shadowRoot
val animate : < .. > Js.t -> < .. > Js.t -> t -> Dom.animation
val closest : string -> t -> Dom.element option
val createShadowRoot : Dom.shadowRoot -> t
val getAttribute : string -> t -> string option
val getAttributeNS : string -> string -> t -> string option
val getBoundingClientRect : Dom.domRect -> t
val getClientRects : Dom.domRect array -> t
val getElementsByClassName : string -> t -> Dom.htmlCollection
val getElementsByTagName : string -> t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> t -> Dom.htmlCollection
val hasAttribute : string -> t -> bool
val hasAttributeNS : string -> string -> t -> bool
val hasAttributes : bool -> t
val insertAdjacentElement : + Webapi__Dom__Types.insertPosition -> + 'a Dom.element_like -> + t -> + unit
val insertAdjacentHTML : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val insertAdjacentText : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val matches : string -> t -> bool
val releasePointerCapture : Dom.eventPointerId -> t -> unit
val removeAttribute : string -> t -> unit
val removeAttributeNS : string -> string -> t -> unit
val requestFullscreen : unit -> t
val requestPointerLock : unit -> t
val scrollIntoView : unit -> t
val scrollIntoViewNoAlignToTop : 'a -> t -> unit
val scrollIntoViewWithOptions : + < behavior : string ; block : string > Js.t -> + t -> + unit
val scrollBy : float -> float -> t -> unit
val scrollByWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val scrollTo : float -> float -> t -> unit
val scrollToWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val setAttribute : string -> string -> t -> unit
val setAttributeNS : string -> string -> string -> t -> unit
val setPointerCapture : Dom.eventPointerId -> t -> unit
val setOnClick : t -> (Dom.mouseEvent -> unit) -> unit
include sig ... end
type t_htmlElement = t
val ofElement : 'a
  • alert browser_only This expression is marked to only run on the browser where JavaScript can run. You can only use it inside a let%browser_only function.
val accessKey : t_htmlElement -> string
val setAccessKey : t_htmlElement -> string -> unit
val accessKeyLabel : t_htmlElement -> string
val contentEditable : t_htmlElement -> Webapi__Dom__Types.contentEditable
val setContentEditable : + t_htmlElement -> + Webapi__Dom__Types.contentEditable -> + unit
val isContentEditable : t_htmlElement -> bool
val contextMenu : t_htmlElement -> Dom.htmlElement
val setContextMenu : t_htmlElement -> Dom.htmlElement -> unit
val dir : t_htmlElement -> Webapi__Dom__Types.dir
val setDir : t_htmlElement -> Webapi__Dom__Types.dir -> unit
val draggable : t_htmlElement -> bool
val setDraggable : t_htmlElement -> bool -> unit
val hidden : t_htmlElement -> bool
val setHidden : t_htmlElement -> bool -> unit
val itemScope : t_htmlElement -> bool
val setItemScope : t_htmlElement -> bool -> unit
val itemId : t_htmlElement -> string
val setItemId : t_htmlElement -> string -> unit
val itemValue : t_htmlElement -> < .. > Js.t
val setItemValue : t_htmlElement -> < .. > Js.t -> unit
val lang : t_htmlElement -> string
val setLang : t_htmlElement -> string -> unit
val offsetHeight : t_htmlElement -> int
val offsetLeft : t_htmlElement -> int
val offsetParent : t_htmlElement -> Dom.element option
val offsetTop : t_htmlElement -> int
val offsetWidth : t_htmlElement -> int
val spellcheck : t_htmlElement -> bool
val setSpellcheck : t_htmlElement -> bool -> unit
val setStyle : t_htmlElement -> Dom.cssStyleDeclaration -> unit
val tabIndex : t_htmlElement -> int
val setTabIndex : t_htmlElement -> int -> unit
val title : t_htmlElement -> string
val setTitle : t_htmlElement -> string -> unit
val translate : t_htmlElement -> bool
val setTranslate : t_htmlElement -> bool -> unit
val blur : unit -> t_htmlElement
val click : unit -> t_htmlElement
val focus : unit -> t_htmlElement
val focusPreventScroll : 'a -> t_htmlElement -> unit
val forceSpellCheck : unit -> t_htmlElement
val value : t_htmlElement -> string
val checked : t_htmlElement -> bool
val type_ : t_htmlElement -> string
val setType : t_htmlElement -> string -> unit
val rel : t_htmlElement -> string
val setRel : t_htmlElement -> string -> unit
val href : t_htmlElement -> string
val setHref : t_htmlElement -> string -> unit
include sig ... end
type t_htmlFormElement = t
val length : t_htmlFormElement -> int
val name : t_htmlFormElement -> string
val setName : t_htmlFormElement -> string -> unit
val method_ : t_htmlFormElement -> string
val setMethod : t_htmlFormElement -> string -> unit
val target : t_htmlFormElement -> string
val setTarget : t_htmlFormElement -> string -> unit
val action : t_htmlFormElement -> string
val setAction : t_htmlFormElement -> string -> unit
val acceptCharset : t_htmlFormElement -> string
val setAcceptCharset : t_htmlFormElement -> string -> unit
val autocomplete : t_htmlFormElement -> string
val setAutocomplete : t_htmlFormElement -> string -> unit
val noValidate : t_htmlFormElement -> bool
val setNoValidate : t_htmlFormElement -> bool -> unit
val enctype : t_htmlFormElement -> string
val setEnctype : t_htmlFormElement -> string -> unit
val encoding : t_htmlFormElement -> string
val setEncoding : t_htmlFormElement -> string -> unit
val submit : unit -> t_htmlFormElement
val reset : unit -> t_htmlFormElement
val checkValidity : bool -> t_htmlFormElement
val reportValidity : bool -> t_htmlFormElement
val data : t -> Fetch.FormData.t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlImageElement/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlImageElement/index.html new file mode 100644 index 000000000..7143270c6 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlImageElement/index.html @@ -0,0 +1,532 @@ + +HtmlImageElement (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlImageElement)

Module Dom.HtmlImageElement

type t
val make : unit -> t
val makeWithSize : int -> int -> t
val alt : t -> string
val setAlt : t -> string -> unit
val src : t -> string
val setSrc : t -> string -> unit
val srcset : t -> string
val setSrcset : t -> string -> unit
val sizes : t -> string
val setSizes : t -> string -> unit
val crossOrigin : t -> string option
val setCrossOrigin : t -> string Js.nullable -> unit
val useMap : t -> string
val setUseMap : t -> string -> unit
val isMap : t -> bool
val setIsMap : t -> bool -> unit
val height : t -> int
val setHeight : t -> int -> unit
val width : t -> int
val setWidth : t -> int -> unit
val naturalHeight : t -> int
val naturalWidth : t -> int
val complete : t -> bool
val currentSrc : t -> string
val referrerPolicy : t -> string
val setReferrerPolicy : t -> string -> unit
val decoding : t -> string
val setDecoding : t -> string -> unit
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val unsafeAsHtmlElement : t -> Dom.htmlElement
val ofNode : Dom.node -> t option
val attributes : t -> Dom.namedNodeMap
val classList : t -> Dom.domTokenList
val className : t -> string
val setClassName : t -> string -> unit
val clientHeight : t -> int
val clientLeft : t -> int
val clientTop : t -> int
val clientWidth : t -> int
val id : t -> string
val setId : t -> string -> unit
val innerHTML : t -> string
val setInnerHTML : t -> string -> unit
val localName : t -> string
val namespaceURI : t -> string option
val outerHTML : t -> string
val setOuterHTML : t -> string -> unit
val prefix : t -> string option
val scrollHeight : t -> int
val scrollLeft : t -> float
val setScrollLeft : t -> float -> unit
val scrollTop : t -> float
val setScrollTop : t -> float -> unit
val scrollWidth : t -> int
val shadowRoot : t -> Dom.element
val slot : t -> string
val setSlot : t -> string -> unit
val tagName : t -> string
val attachShadow : < mode : string > Js.t -> t -> Dom.shadowRoot
val attachShadowOpen : 'a -> t -> Dom.shadowRoot
val attachShadowClosed : 'a -> t -> Dom.shadowRoot
val animate : < .. > Js.t -> < .. > Js.t -> t -> Dom.animation
val closest : string -> t -> Dom.element option
val createShadowRoot : Dom.shadowRoot -> t
val getAttribute : string -> t -> string option
val getAttributeNS : string -> string -> t -> string option
val getBoundingClientRect : Dom.domRect -> t
val getClientRects : Dom.domRect array -> t
val getElementsByClassName : string -> t -> Dom.htmlCollection
val getElementsByTagName : string -> t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> t -> Dom.htmlCollection
val hasAttribute : string -> t -> bool
val hasAttributeNS : string -> string -> t -> bool
val hasAttributes : bool -> t
val insertAdjacentElement : + Webapi__Dom__Types.insertPosition -> + 'a Dom.element_like -> + t -> + unit
val insertAdjacentHTML : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val insertAdjacentText : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val matches : string -> t -> bool
val releasePointerCapture : Dom.eventPointerId -> t -> unit
val removeAttribute : string -> t -> unit
val removeAttributeNS : string -> string -> t -> unit
val requestFullscreen : unit -> t
val requestPointerLock : unit -> t
val scrollIntoView : unit -> t
val scrollIntoViewNoAlignToTop : 'a -> t -> unit
val scrollIntoViewWithOptions : + < behavior : string ; block : string > Js.t -> + t -> + unit
val scrollBy : float -> float -> t -> unit
val scrollByWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val scrollTo : float -> float -> t -> unit
val scrollToWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val setAttribute : string -> string -> t -> unit
val setAttributeNS : string -> string -> string -> t -> unit
val setPointerCapture : Dom.eventPointerId -> t -> unit
val setOnClick : t -> (Dom.mouseEvent -> unit) -> unit
include sig ... end
type t_htmlElement = t
val ofElement : 'a
  • alert browser_only This expression is marked to only run on the browser where JavaScript can run. You can only use it inside a let%browser_only function.
val accessKey : t_htmlElement -> string
val setAccessKey : t_htmlElement -> string -> unit
val accessKeyLabel : t_htmlElement -> string
val contentEditable : t_htmlElement -> Webapi__Dom__Types.contentEditable
val setContentEditable : + t_htmlElement -> + Webapi__Dom__Types.contentEditable -> + unit
val isContentEditable : t_htmlElement -> bool
val contextMenu : t_htmlElement -> Dom.htmlElement
val setContextMenu : t_htmlElement -> Dom.htmlElement -> unit
val dir : t_htmlElement -> Webapi__Dom__Types.dir
val setDir : t_htmlElement -> Webapi__Dom__Types.dir -> unit
val draggable : t_htmlElement -> bool
val setDraggable : t_htmlElement -> bool -> unit
val hidden : t_htmlElement -> bool
val setHidden : t_htmlElement -> bool -> unit
val itemScope : t_htmlElement -> bool
val setItemScope : t_htmlElement -> bool -> unit
val itemId : t_htmlElement -> string
val setItemId : t_htmlElement -> string -> unit
val itemValue : t_htmlElement -> < .. > Js.t
val setItemValue : t_htmlElement -> < .. > Js.t -> unit
val lang : t_htmlElement -> string
val setLang : t_htmlElement -> string -> unit
val offsetHeight : t_htmlElement -> int
val offsetLeft : t_htmlElement -> int
val offsetParent : t_htmlElement -> Dom.element option
val offsetTop : t_htmlElement -> int
val offsetWidth : t_htmlElement -> int
val spellcheck : t_htmlElement -> bool
val setSpellcheck : t_htmlElement -> bool -> unit
val setStyle : t_htmlElement -> Dom.cssStyleDeclaration -> unit
val tabIndex : t_htmlElement -> int
val setTabIndex : t_htmlElement -> int -> unit
val title : t_htmlElement -> string
val setTitle : t_htmlElement -> string -> unit
val translate : t_htmlElement -> bool
val setTranslate : t_htmlElement -> bool -> unit
val blur : unit -> t_htmlElement
val click : unit -> t_htmlElement
val focus : unit -> t_htmlElement
val focusPreventScroll : 'a -> t_htmlElement -> unit
val forceSpellCheck : unit -> t_htmlElement
val value : t_htmlElement -> string
val checked : t_htmlElement -> bool
val type_ : t_htmlElement -> string
val setType : t_htmlElement -> string -> unit
val rel : t_htmlElement -> string
val setRel : t_htmlElement -> string -> unit
val href : t_htmlElement -> string
val setHref : t_htmlElement -> string -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/Impl/SelectionDirection/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/Impl/SelectionDirection/index.html new file mode 100644 index 000000000..3c967b010 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/Impl/SelectionDirection/index.html @@ -0,0 +1,2 @@ + +SelectionDirection (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlInputElement.Impl.SelectionDirection)

Module Impl.SelectionDirection

type t =
  1. | Forward
  2. | Backward
  3. | None
val toString : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/Impl/SelectionMode/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/Impl/SelectionMode/index.html new file mode 100644 index 000000000..e09de5a51 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/Impl/SelectionMode/index.html @@ -0,0 +1,2 @@ + +SelectionMode (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlInputElement.Impl.SelectionMode)

Module Impl.SelectionMode

type t =
  1. | Select
  2. | Start
  3. | End
  4. | Preserve
val toString : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/Impl/argument-1-T/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/Impl/argument-1-T/index.html new file mode 100644 index 000000000..2574be504 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlInputElement.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/Impl/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/Impl/index.html new file mode 100644 index 000000000..d40c30255 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/Impl/index.html @@ -0,0 +1,29 @@ + +Impl (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlInputElement.Impl)

Module HtmlInputElement.Impl

Parameters

module T : sig ... end

Signature

type t_htmlInputElement = T.t
val formAction : t_htmlInputElement -> string
val setFormAction : t_htmlInputElement -> string -> unit
val formEncType : t_htmlInputElement -> string
val setFormEncType : t_htmlInputElement -> string -> unit
val formMethod : t_htmlInputElement -> string
val setFormMethod : t_htmlInputElement -> string -> unit
val formNoValidate : t_htmlInputElement -> bool
val setFormNoValidate : t_htmlInputElement -> bool -> unit
val formTarget : t_htmlInputElement -> string
val setFormTarget : t_htmlInputElement -> string -> unit
val name : t_htmlInputElement -> string
val setName : t_htmlInputElement -> string -> unit
val type_ : t_htmlInputElement -> string
val setType : t_htmlInputElement -> string -> unit
val disabled : t_htmlInputElement -> bool
val setDisabled : t_htmlInputElement -> bool -> unit
val autofocus : t_htmlInputElement -> bool
val setAutofocus : t_htmlInputElement -> bool -> unit
val required : t_htmlInputElement -> bool
val setRequired : t_htmlInputElement -> bool -> unit
val value : t_htmlInputElement -> string
val setValue : t_htmlInputElement -> string -> unit
val validity : t_htmlInputElement -> Webapi__Dom__ValidityState.t
val validationMessage : t_htmlInputElement -> string
val willValidate : t_htmlInputElement -> bool
val checked : t_htmlInputElement -> bool
val setChecked : t_htmlInputElement -> bool -> unit
val defaultChecked : t_htmlInputElement -> bool
val setDefaultChecked : t_htmlInputElement -> bool -> unit
val indeterminate : t_htmlInputElement -> bool
val setIndeterminate : t_htmlInputElement -> bool -> unit
val alt : t_htmlInputElement -> string
val setAlt : t_htmlInputElement -> string -> unit
val height : t_htmlInputElement -> string
val setHeight : t_htmlInputElement -> string -> unit
val src : t_htmlInputElement -> string
val setSrc : t_htmlInputElement -> string -> unit
val width : t_htmlInputElement -> string
val setWidth : t_htmlInputElement -> string -> unit
val accept : t_htmlInputElement -> string
val setAccept : t_htmlInputElement -> string -> unit
val autocomplete : t_htmlInputElement -> string
val setAutocomplete : t_htmlInputElement -> string -> unit
val maxLength : t_htmlInputElement -> int
val setMaxLength : t_htmlInputElement -> int -> unit
val minLength : t_htmlInputElement -> int
val setMinLength : t_htmlInputElement -> int -> unit
val size : t_htmlInputElement -> int
val setSize : t_htmlInputElement -> int -> unit
val pattern : t_htmlInputElement -> string
val setPattern : t_htmlInputElement -> string -> unit
val placeholder : t_htmlInputElement -> string
val setPlaceholder : t_htmlInputElement -> string -> unit
val readOnly : t_htmlInputElement -> bool
val setReadOnly : t_htmlInputElement -> bool -> unit
val min : t_htmlInputElement -> string
val setMin : t_htmlInputElement -> string -> unit
val max : t_htmlInputElement -> string
val setMax : t_htmlInputElement -> string -> unit
val selectionStart : t_htmlInputElement -> int
val setSelectionStart : t_htmlInputElement -> int -> unit
val selectionEnd : t_htmlInputElement -> int
val setSelectionEnd : t_htmlInputElement -> int -> unit
val selectionDirection : t_htmlInputElement -> string
val setSelectionDirection : t_htmlInputElement -> string -> unit
val defaultValue : t_htmlInputElement -> string
val setDefaultValue : t_htmlInputElement -> string -> unit
val dirName : t_htmlInputElement -> string
val setDirName : t_htmlInputElement -> string -> unit
val accessKey : t_htmlInputElement -> string
val setAccessKey : t_htmlInputElement -> string -> unit
val list : t_htmlInputElement -> Dom.htmlElement option
val multiple : t_htmlInputElement -> bool
val setMultiple : t_htmlInputElement -> bool -> unit
val labels : t_htmlInputElement -> Dom.nodeList array
val step : t_htmlInputElement -> string
val setStep : t_htmlInputElement -> string -> unit
val valueAsDate : t_htmlInputElement -> Js.Date.t option
val setValueAsDate : t_htmlInputElement -> Js.Date.t -> unit
val valueAsNumber : t_htmlInputElement -> float
val select : unit -> t_htmlInputElement
module SelectionDirection : sig ... end
val setSelectionRange : int -> int -> t_htmlInputElement -> unit
val setSelectionRangeWithDirection_ : + int -> + int -> + string -> + t_htmlInputElement -> + unit
val setSelectionRangeWithDirection : + int -> + int -> + SelectionDirection.t -> + t_htmlInputElement -> + unit
module SelectionMode : sig ... end
val setRangeTextWithinSelection : string -> t_htmlInputElement -> unit
val setRangeTextWithinInterval : + string -> + int -> + int -> + t_htmlInputElement -> + unit
val setRangeTextWithinIntervalWithSelectionMode_ : + string -> + int -> + int -> + string -> + t_htmlInputElement -> + unit
val setRangeTextWithinIntervalWithSelectionMode : + string -> + int -> + int -> + SelectionMode.t -> + t_htmlInputElement -> + unit
val setCustomValidity : string -> t_htmlInputElement -> unit
val checkValidity : bool -> t_htmlInputElement
val reportValidity : bool -> t_htmlInputElement
val stepDownBy : int -> t_htmlInputElement -> unit
val stepDownByOne : unit -> t_htmlInputElement
val stepUpBy : int -> t_htmlInputElement -> unit
val stepUpByOne : unit -> t_htmlInputElement
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/SelectionDirection/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/SelectionDirection/index.html new file mode 100644 index 000000000..e66f16408 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/SelectionDirection/index.html @@ -0,0 +1,2 @@ + +SelectionDirection (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlInputElement.SelectionDirection)

Module HtmlInputElement.SelectionDirection

type t =
  1. | Forward
  2. | Backward
  3. | None
val toString : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/SelectionMode/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/SelectionMode/index.html new file mode 100644 index 000000000..0a289a60b --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/SelectionMode/index.html @@ -0,0 +1,2 @@ + +SelectionMode (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlInputElement.SelectionMode)

Module HtmlInputElement.SelectionMode

type t =
  1. | Select
  2. | Start
  3. | End
  4. | Preserve
val toString : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/index.html b/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/index.html new file mode 100644 index 000000000..ed246affd --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/HtmlInputElement/index.html @@ -0,0 +1,559 @@ + +HtmlInputElement (docs.local.server-reason-react.webapi.Webapi.Dom.HtmlInputElement)

Module Dom.HtmlInputElement

module Impl (T : sig ... end) : sig ... end
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
include sig ... end
val unsafeAsHtmlElement : t -> Dom.htmlElement
val ofNode : Dom.node -> t option
val attributes : t -> Dom.namedNodeMap
val classList : t -> Dom.domTokenList
val className : t -> string
val setClassName : t -> string -> unit
val clientHeight : t -> int
val clientLeft : t -> int
val clientTop : t -> int
val clientWidth : t -> int
val id : t -> string
val setId : t -> string -> unit
val innerHTML : t -> string
val setInnerHTML : t -> string -> unit
val localName : t -> string
val namespaceURI : t -> string option
val outerHTML : t -> string
val setOuterHTML : t -> string -> unit
val prefix : t -> string option
val scrollHeight : t -> int
val scrollLeft : t -> float
val setScrollLeft : t -> float -> unit
val scrollTop : t -> float
val setScrollTop : t -> float -> unit
val scrollWidth : t -> int
val shadowRoot : t -> Dom.element
val slot : t -> string
val setSlot : t -> string -> unit
val tagName : t -> string
val attachShadow : < mode : string > Js.t -> t -> Dom.shadowRoot
val attachShadowOpen : 'a -> t -> Dom.shadowRoot
val attachShadowClosed : 'a -> t -> Dom.shadowRoot
val animate : < .. > Js.t -> < .. > Js.t -> t -> Dom.animation
val closest : string -> t -> Dom.element option
val createShadowRoot : Dom.shadowRoot -> t
val getAttribute : string -> t -> string option
val getAttributeNS : string -> string -> t -> string option
val getBoundingClientRect : Dom.domRect -> t
val getClientRects : Dom.domRect array -> t
val getElementsByClassName : string -> t -> Dom.htmlCollection
val getElementsByTagName : string -> t -> Dom.htmlCollection
val getElementsByTagNameNS : string -> string -> t -> Dom.htmlCollection
val hasAttribute : string -> t -> bool
val hasAttributeNS : string -> string -> t -> bool
val hasAttributes : bool -> t
val insertAdjacentElement : + Webapi__Dom__Types.insertPosition -> + 'a Dom.element_like -> + t -> + unit
val insertAdjacentHTML : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val insertAdjacentText : + Webapi__Dom__Types.insertPosition -> + string -> + t -> + unit
val matches : string -> t -> bool
val releasePointerCapture : Dom.eventPointerId -> t -> unit
val removeAttribute : string -> t -> unit
val removeAttributeNS : string -> string -> t -> unit
val requestFullscreen : unit -> t
val requestPointerLock : unit -> t
val scrollIntoView : unit -> t
val scrollIntoViewNoAlignToTop : 'a -> t -> unit
val scrollIntoViewWithOptions : + < behavior : string ; block : string > Js.t -> + t -> + unit
val scrollBy : float -> float -> t -> unit
val scrollByWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val scrollTo : float -> float -> t -> unit
val scrollToWithOptions : + < behavior : string ; left : float ; top : float > Js.t -> + t -> + unit
val setAttribute : string -> string -> t -> unit
val setAttributeNS : string -> string -> string -> t -> unit
val setPointerCapture : Dom.eventPointerId -> t -> unit
val setOnClick : t -> (Dom.mouseEvent -> unit) -> unit
include sig ... end
type t_htmlElement = t
val ofElement : 'a
  • alert browser_only This expression is marked to only run on the browser where JavaScript can run. You can only use it inside a let%browser_only function.
val accessKeyLabel : t_htmlElement -> string
val contentEditable : t_htmlElement -> Webapi__Dom__Types.contentEditable
val setContentEditable : + t_htmlElement -> + Webapi__Dom__Types.contentEditable -> + unit
val isContentEditable : t_htmlElement -> bool
val contextMenu : t_htmlElement -> Dom.htmlElement
val setContextMenu : t_htmlElement -> Dom.htmlElement -> unit
val dir : t_htmlElement -> Webapi__Dom__Types.dir
val setDir : t_htmlElement -> Webapi__Dom__Types.dir -> unit
val draggable : t_htmlElement -> bool
val setDraggable : t_htmlElement -> bool -> unit
val hidden : t_htmlElement -> bool
val setHidden : t_htmlElement -> bool -> unit
val itemScope : t_htmlElement -> bool
val setItemScope : t_htmlElement -> bool -> unit
val itemId : t_htmlElement -> string
val setItemId : t_htmlElement -> string -> unit
val itemValue : t_htmlElement -> < .. > Js.t
val setItemValue : t_htmlElement -> < .. > Js.t -> unit
val lang : t_htmlElement -> string
val setLang : t_htmlElement -> string -> unit
val offsetHeight : t_htmlElement -> int
val offsetLeft : t_htmlElement -> int
val offsetParent : t_htmlElement -> Dom.element option
val offsetTop : t_htmlElement -> int
val offsetWidth : t_htmlElement -> int
val spellcheck : t_htmlElement -> bool
val setSpellcheck : t_htmlElement -> bool -> unit
val setStyle : t_htmlElement -> Dom.cssStyleDeclaration -> unit
val tabIndex : t_htmlElement -> int
val setTabIndex : t_htmlElement -> int -> unit
val title : t_htmlElement -> string
val setTitle : t_htmlElement -> string -> unit
val translate : t_htmlElement -> bool
val setTranslate : t_htmlElement -> bool -> unit
val blur : unit -> t_htmlElement
val click : unit -> t_htmlElement
val focus : unit -> t_htmlElement
val focusPreventScroll : 'a -> t_htmlElement -> unit
val forceSpellCheck : unit -> t_htmlElement
val rel : t_htmlElement -> string
val setRel : t_htmlElement -> string -> unit
val href : t_htmlElement -> string
val setHref : t_htmlElement -> string -> unit
include sig ... end
type t_htmlInputElement = t
val formAction : t_htmlInputElement -> string
val setFormAction : t_htmlInputElement -> string -> unit
val formEncType : t_htmlInputElement -> string
val setFormEncType : t_htmlInputElement -> string -> unit
val formMethod : t_htmlInputElement -> string
val setFormMethod : t_htmlInputElement -> string -> unit
val formNoValidate : t_htmlInputElement -> bool
val setFormNoValidate : t_htmlInputElement -> bool -> unit
val formTarget : t_htmlInputElement -> string
val setFormTarget : t_htmlInputElement -> string -> unit
val name : t_htmlInputElement -> string
val setName : t_htmlInputElement -> string -> unit
val type_ : t_htmlInputElement -> string
val setType : t_htmlInputElement -> string -> unit
val disabled : t_htmlInputElement -> bool
val setDisabled : t_htmlInputElement -> bool -> unit
val autofocus : t_htmlInputElement -> bool
val setAutofocus : t_htmlInputElement -> bool -> unit
val required : t_htmlInputElement -> bool
val setRequired : t_htmlInputElement -> bool -> unit
val value : t_htmlInputElement -> string
val setValue : t_htmlInputElement -> string -> unit
val validity : t_htmlInputElement -> Webapi__Dom__ValidityState.t
val validationMessage : t_htmlInputElement -> string
val willValidate : t_htmlInputElement -> bool
val checked : t_htmlInputElement -> bool
val setChecked : t_htmlInputElement -> bool -> unit
val defaultChecked : t_htmlInputElement -> bool
val setDefaultChecked : t_htmlInputElement -> bool -> unit
val indeterminate : t_htmlInputElement -> bool
val setIndeterminate : t_htmlInputElement -> bool -> unit
val alt : t_htmlInputElement -> string
val setAlt : t_htmlInputElement -> string -> unit
val height : t_htmlInputElement -> string
val setHeight : t_htmlInputElement -> string -> unit
val src : t_htmlInputElement -> string
val setSrc : t_htmlInputElement -> string -> unit
val width : t_htmlInputElement -> string
val setWidth : t_htmlInputElement -> string -> unit
val accept : t_htmlInputElement -> string
val setAccept : t_htmlInputElement -> string -> unit
val autocomplete : t_htmlInputElement -> string
val setAutocomplete : t_htmlInputElement -> string -> unit
val maxLength : t_htmlInputElement -> int
val setMaxLength : t_htmlInputElement -> int -> unit
val minLength : t_htmlInputElement -> int
val setMinLength : t_htmlInputElement -> int -> unit
val size : t_htmlInputElement -> int
val setSize : t_htmlInputElement -> int -> unit
val pattern : t_htmlInputElement -> string
val setPattern : t_htmlInputElement -> string -> unit
val placeholder : t_htmlInputElement -> string
val setPlaceholder : t_htmlInputElement -> string -> unit
val readOnly : t_htmlInputElement -> bool
val setReadOnly : t_htmlInputElement -> bool -> unit
val min : t_htmlInputElement -> string
val setMin : t_htmlInputElement -> string -> unit
val max : t_htmlInputElement -> string
val setMax : t_htmlInputElement -> string -> unit
val selectionStart : t_htmlInputElement -> int
val setSelectionStart : t_htmlInputElement -> int -> unit
val selectionEnd : t_htmlInputElement -> int
val setSelectionEnd : t_htmlInputElement -> int -> unit
val selectionDirection : t_htmlInputElement -> string
val setSelectionDirection : t_htmlInputElement -> string -> unit
val defaultValue : t_htmlInputElement -> string
val setDefaultValue : t_htmlInputElement -> string -> unit
val dirName : t_htmlInputElement -> string
val setDirName : t_htmlInputElement -> string -> unit
val accessKey : t_htmlInputElement -> string
val setAccessKey : t_htmlInputElement -> string -> unit
val list : t_htmlInputElement -> Dom.htmlElement option
val multiple : t_htmlInputElement -> bool
val setMultiple : t_htmlInputElement -> bool -> unit
val labels : t_htmlInputElement -> Dom.nodeList array
val step : t_htmlInputElement -> string
val setStep : t_htmlInputElement -> string -> unit
val valueAsDate : t_htmlInputElement -> Js.Date.t option
val setValueAsDate : t_htmlInputElement -> Js.Date.t -> unit
val valueAsNumber : t_htmlInputElement -> float
val select : unit -> t_htmlInputElement
module SelectionDirection : sig ... end
val setSelectionRange : int -> int -> t_htmlInputElement -> unit
val setSelectionRangeWithDirection_ : + int -> + int -> + string -> + t_htmlInputElement -> + unit
val setSelectionRangeWithDirection : + int -> + int -> + SelectionDirection.t -> + t_htmlInputElement -> + unit
module SelectionMode : sig ... end
val setRangeTextWithinSelection : string -> t_htmlInputElement -> unit
val setRangeTextWithinInterval : + string -> + int -> + int -> + t_htmlInputElement -> + unit
val setRangeTextWithinIntervalWithSelectionMode_ : + string -> + int -> + int -> + string -> + t_htmlInputElement -> + unit
val setRangeTextWithinIntervalWithSelectionMode : + string -> + int -> + int -> + SelectionMode.t -> + t_htmlInputElement -> + unit
val setCustomValidity : string -> t_htmlInputElement -> unit
val checkValidity : bool -> t_htmlInputElement
val reportValidity : bool -> t_htmlInputElement
val stepDownBy : int -> t_htmlInputElement -> unit
val stepDownByOne : unit -> t_htmlInputElement
val stepUpBy : int -> t_htmlInputElement -> unit
val stepUpByOne : unit -> t_htmlInputElement
diff --git a/local/server-reason-react/webapi/Webapi/Dom/IdbVersionChangeEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/IdbVersionChangeEvent/index.html new file mode 100644 index 000000000..9c275af31 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/IdbVersionChangeEvent/index.html @@ -0,0 +1,2 @@ + +IdbVersionChangeEvent (docs.local.server-reason-react.webapi.Webapi.Dom.IdbVersionChangeEvent)

Module Dom.IdbVersionChangeEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val oldVersion : t -> int
val newVersion : t -> int
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Image/index.html b/local/server-reason-react/webapi/Webapi/Dom/Image/index.html new file mode 100644 index 000000000..2bf13e478 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Image/index.html @@ -0,0 +1,6 @@ + +Image (docs.local.server-reason-react.webapi.Webapi.Dom.Image)

Module Dom.Image

type t
val makeWithData : + array:Js.Typed_array.Uint8ClampedArray.t -> + width:float -> + height:float -> + t
val make : width:float -> height:float -> t
val height : t -> float
val width : t -> float
diff --git a/local/server-reason-react/webapi/Webapi/Dom/InputEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/InputEvent/index.html new file mode 100644 index 000000000..78eb8c782 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/InputEvent/index.html @@ -0,0 +1,2 @@ + +InputEvent (docs.local.server-reason-react.webapi.Webapi.Dom.InputEvent)

Module Dom.InputEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
include sig ... end
val detail : t -> int
val view : t -> Dom.window
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val data : t -> string
val isComposing : t -> bool
diff --git a/local/server-reason-react/webapi/Webapi/Dom/KeyboardEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/KeyboardEvent/index.html new file mode 100644 index 000000000..8611ef405 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/KeyboardEvent/index.html @@ -0,0 +1,2 @@ + +KeyboardEvent (docs.local.server-reason-react.webapi.Webapi.Dom.KeyboardEvent)

Module Dom.KeyboardEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
include sig ... end
val detail : t -> int
val view : t -> Dom.window
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val altKey : t -> bool
val code : t -> string
val ctrlKey : t -> bool
val isComposing : t -> bool
val key : t -> string
val locale : t -> string
val location : t -> int
val metaKey : t -> bool
val repeat : t -> bool
val shiftKey : t -> bool
val getModifierState : Webapi__Dom__Types.modifierKey -> t -> bool
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Location/index.html b/local/server-reason-react/webapi/Webapi/Dom/Location/index.html new file mode 100644 index 000000000..9011e1560 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Location/index.html @@ -0,0 +1,2 @@ + +Location (docs.local.server-reason-react.webapi.Webapi.Dom.Location)

Module Dom.Location

type t = Dom.location
val href : t -> string
val setHref : t -> string -> unit
val protocol : t -> string
val setProtocol : t -> string -> unit
val host : t -> string
val setHost : t -> string -> unit
val hostname : t -> string
val setHostname : t -> string -> unit
val port : t -> string
val setPort : t -> string -> unit
val pathname : t -> string
val setPathname : t -> string -> unit
val setSearch : t -> string -> unit
val hash : t -> string
val setHash : t -> string -> unit
val username : t -> string
val setUsername : t -> string -> unit
val password : t -> string
val setPassword : t -> string -> unit
val origin : t -> string
val assign : string -> t -> unit
val reload : unit -> t
val reloadWithForce : 'a -> t -> unit
val replace : string -> t -> unit
val toString : string -> t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/MouseEvent/Impl/argument-1-T/index.html b/local/server-reason-react/webapi/Webapi/Dom/MouseEvent/Impl/argument-1-T/index.html new file mode 100644 index 000000000..90b543141 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/MouseEvent/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.webapi.Webapi.Dom.MouseEvent.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/MouseEvent/Impl/index.html b/local/server-reason-react/webapi/Webapi/Dom/MouseEvent/Impl/index.html new file mode 100644 index 000000000..2ca8336d7 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/MouseEvent/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.local.server-reason-react.webapi.Webapi.Dom.MouseEvent.Impl)

Module MouseEvent.Impl

Parameters

module T : sig ... end

Signature

val altKey : T.t -> bool
val button : T.t -> int
val buttons : T.t -> int
val clientX : T.t -> int
val clientY : T.t -> int
val ctrlKey : T.t -> bool
val metaKey : T.t -> bool
val movementX : T.t -> int
val movementY : T.t -> int
val offsetX : T.t -> int
val offsetY : T.t -> int
val pageX : T.t -> int
val pageY : T.t -> int
val region : T.t -> string option
val relatedTarget : T.t -> Dom.eventTarget option
val screenX : T.t -> int
val screenY : T.t -> int
val shiftKey : T.t -> bool
val x : T.t -> int
val y : T.t -> int
val getModifierState : Webapi__Dom__Types.modifierKey -> T.t -> bool
diff --git a/local/server-reason-react/webapi/Webapi/Dom/MouseEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/MouseEvent/index.html new file mode 100644 index 000000000..81b904767 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/MouseEvent/index.html @@ -0,0 +1,2 @@ + +MouseEvent (docs.local.server-reason-react.webapi.Webapi.Dom.MouseEvent)

Module Dom.MouseEvent

module Impl (T : sig ... end) : sig ... end
include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
include sig ... end
val detail : t -> int
val view : t -> Dom.window
include sig ... end
val altKey : t -> bool
val button : t -> int
val buttons : t -> int
val clientX : t -> int
val clientY : t -> int
val ctrlKey : t -> bool
val metaKey : t -> bool
val movementX : t -> int
val movementY : t -> int
val offsetX : t -> int
val offsetY : t -> int
val pageX : t -> int
val pageY : t -> int
val region : t -> string option
val relatedTarget : t -> Dom.eventTarget option
val screenX : t -> int
val screenY : t -> int
val shiftKey : t -> bool
val x : t -> int
val y : t -> int
val getModifierState : Webapi__Dom__Types.modifierKey -> t -> bool
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/MutationObserver/index.html b/local/server-reason-react/webapi/Webapi/Dom/MutationObserver/index.html new file mode 100644 index 000000000..17c904ba0 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/MutationObserver/index.html @@ -0,0 +1,2 @@ + +MutationObserver (docs.local.server-reason-react.webapi.Webapi.Dom.MutationObserver)

Module Dom.MutationObserver

val make : (Dom.mutationRecord array -> t -> unit) -> t
val observe : 'a Dom.node_like -> < .. > Js.t -> t -> unit
val disconnect : unit -> t
val takeRecords : Dom.mutationRecord array -> t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/MutationRecord/index.html b/local/server-reason-react/webapi/Webapi/Dom/MutationRecord/index.html new file mode 100644 index 000000000..30225c62e --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/MutationRecord/index.html @@ -0,0 +1,2 @@ + +MutationRecord (docs.local.server-reason-react.webapi.Webapi.Dom.MutationRecord)

Module Dom.MutationRecord

val type_ : t -> string
val target : t -> Dom.node
val addedNodes : t -> Dom.nodeList
val removedNodes : t -> Dom.nodeList
val previousSibling : t -> Dom.node option
val nextSibling : t -> Dom.node option
val attributeName : t -> string
val attributeNamespace : t -> string
val oldValue : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/NamedNodeMap/index.html b/local/server-reason-react/webapi/Webapi/Dom/NamedNodeMap/index.html new file mode 100644 index 000000000..05a403023 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/NamedNodeMap/index.html @@ -0,0 +1,2 @@ + +NamedNodeMap (docs.local.server-reason-react.webapi.Webapi.Dom.NamedNodeMap)

Module Dom.NamedNodeMap

val length : t -> int
val item : int -> t -> Dom.attr option
val getNamedItem : string -> t -> Dom.attr option
val getNamedItemNS : string -> string -> t -> Dom.attr option
val setNamedItem : Dom.attr -> t -> unit
val setNamedItemNS : Dom.attr -> t -> unit
val removeNamedItem : string -> t -> Dom.attr
val removeNamedItemNS : string -> string -> t -> Dom.attr
val toArray : t -> Dom.attr array
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Node/Impl/argument-1-T/index.html b/local/server-reason-react/webapi/Webapi/Dom/Node/Impl/argument-1-T/index.html new file mode 100644 index 000000000..715d94322 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Node/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.webapi.Webapi.Dom.Node.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Node/Impl/index.html b/local/server-reason-react/webapi/Webapi/Dom/Node/Impl/index.html new file mode 100644 index 000000000..19e17188a --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Node/Impl/index.html @@ -0,0 +1,6 @@ + +Impl (docs.local.server-reason-react.webapi.Webapi.Dom.Node.Impl)

Module Node.Impl

Parameters

module T : sig ... end

Signature

val asNode : T.t -> Dom.node
val childNodes : T.t -> Dom.nodeList
val firstChild : T.t -> Dom.node option
val innerText : T.t -> string
val setInnerText : T.t -> string -> unit
val lastChild : T.t -> Dom.node option
val nextSibling : T.t -> Dom.node option
val nodeName : T.t -> string
val nodeType : T.t -> Webapi__Dom__Types.nodeType
val nodeValue : T.t -> string option
val setNodeValue : T.t -> string Js.null -> unit
val ownerDocument : T.t -> Dom.document
val parentElement : T.t -> Dom.element option
val parentNode : T.t -> Dom.node option
val previousSibling : T.t -> Dom.node option
val rootNode : T.t -> Dom.node
val textContent : T.t -> string
val setTextContent : T.t -> string -> unit
val appendChild : 'a Dom.node_like -> T.t -> unit
val cloneNode : T.t -> T.t
val cloneNodeDeep : 'a -> T.t -> T.t
val compareDocumentPosition : 'a Dom.node_like -> T.t -> int
val contains : Dom.node -> T.t -> bool
val getRootNode : Dom.node -> T.t
val getRootNodeComposed : 'a -> T.t -> Dom.node
val hasChildNodes : bool -> T.t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + T.t -> + 'a Dom.node_like
val isDefaultNamespace : string -> T.t -> bool
val isEqualNode : 'a Dom.node_like -> T.t -> bool
val isSameNode : 'a Dom.node_like -> T.t -> bool
val lookupNamespaceURI : string -> T.t -> string option
val lookupDefaultNamespaceURI : 'a -> T.t -> string option
val lookupPrefix : string -> T.t
val normalize : unit -> T.t
val removeChild : 'a Dom.node_like -> T.t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Node/index.html b/local/server-reason-react/webapi/Webapi/Dom/Node/index.html new file mode 100644 index 000000000..84140ef4c --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Node/index.html @@ -0,0 +1,508 @@ + +Node (docs.local.server-reason-react.webapi.Webapi.Dom.Node)

Module Dom.Node

module Impl (T : sig ... end) : sig ... end
type t = Dom.node
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
diff --git a/local/server-reason-react/webapi/Webapi/Dom/NodeFilter/index.html b/local/server-reason-react/webapi/Webapi/Dom/NodeFilter/index.html new file mode 100644 index 000000000..0a5b1fdaf --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/NodeFilter/index.html @@ -0,0 +1,2 @@ + +NodeFilter (docs.local.server-reason-react.webapi.Webapi.Dom.NodeFilter)

Module Dom.NodeFilter

val make : (Dom.element -> int) -> Dom.nodeFilter
diff --git a/local/server-reason-react/webapi/Webapi/Dom/NodeIterator/index.html b/local/server-reason-react/webapi/Webapi/Dom/NodeIterator/index.html new file mode 100644 index 000000000..e46e13127 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/NodeIterator/index.html @@ -0,0 +1,2 @@ + +NodeIterator (docs.local.server-reason-react.webapi.Webapi.Dom.NodeIterator)

Module Dom.NodeIterator

val root : t -> Dom.node
val referenceNode : t -> Dom.node
val pointerBeforeReferenceNode : t -> bool
val whatToShow : t -> Webapi__Dom__Types.WhatToShow.t
val filter : t -> Dom.nodeFilter option
val nextNode : Dom.node option -> t
val previousNode : Dom.node option -> t
val detach : unit -> t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/NodeList/index.html b/local/server-reason-react/webapi/Webapi/Dom/NodeList/index.html new file mode 100644 index 000000000..ebf8e4464 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/NodeList/index.html @@ -0,0 +1,2 @@ + +NodeList (docs.local.server-reason-react.webapi.Webapi.Dom.NodeList)

Module Dom.NodeList

type t = Dom.nodeList
val toArray : t -> Dom.node array
val forEach : (Dom.node -> int -> unit) -> t -> unit
val length : t -> int
val item : int -> t -> Dom.node option
diff --git a/local/server-reason-react/webapi/Webapi/Dom/PageTransitionEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/PageTransitionEvent/index.html new file mode 100644 index 000000000..7568af262 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/PageTransitionEvent/index.html @@ -0,0 +1,2 @@ + +PageTransitionEvent (docs.local.server-reason-react.webapi.Webapi.Dom.PageTransitionEvent)

Module Dom.PageTransitionEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val persisted : t -> bool
diff --git a/local/server-reason-react/webapi/Webapi/Dom/PointerEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/PointerEvent/index.html new file mode 100644 index 000000000..7d7cff4f6 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/PointerEvent/index.html @@ -0,0 +1,2 @@ + +PointerEvent (docs.local.server-reason-react.webapi.Webapi.Dom.PointerEvent)

Module Dom.PointerEvent

type pointerId = Dom.eventPointerId
include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
include sig ... end
val detail : t -> int
val view : t -> Dom.window
include sig ... end
val altKey : t -> bool
val button : t -> int
val buttons : t -> int
val clientX : t -> int
val clientY : t -> int
val ctrlKey : t -> bool
val metaKey : t -> bool
val movementX : t -> int
val movementY : t -> int
val offsetX : t -> int
val offsetY : t -> int
val pageX : t -> int
val pageY : t -> int
val region : t -> string option
val relatedTarget : t -> Dom.eventTarget option
val screenX : t -> int
val screenY : t -> int
val shiftKey : t -> bool
val x : t -> int
val y : t -> int
val getModifierState : Webapi__Dom__Types.modifierKey -> t -> bool
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val pointerId : t -> pointerId
val width : t -> int
val height : t -> int
val pressure : t -> float
val tiltX : t -> int
val tiltY : t -> int
val pointerType : t -> Webapi__Dom__Types.pointerType
val isPrimary : t -> bool
diff --git a/local/server-reason-react/webapi/Webapi/Dom/PopStateEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/PopStateEvent/index.html new file mode 100644 index 000000000..a5c82f5d5 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/PopStateEvent/index.html @@ -0,0 +1,2 @@ + +PopStateEvent (docs.local.server-reason-react.webapi.Webapi.Dom.PopStateEvent)

Module Dom.PopStateEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val state : t -> < .. > Js.t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/ProcessingInstruction/index.html b/local/server-reason-react/webapi/Webapi/Dom/ProcessingInstruction/index.html new file mode 100644 index 000000000..5dd7289a7 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/ProcessingInstruction/index.html @@ -0,0 +1,508 @@ + +ProcessingInstruction (docs.local.server-reason-react.webapi.Webapi.Dom.ProcessingInstruction)

Module Dom.ProcessingInstruction

include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val previousElementSibling : t -> Dom.element option
val nextElementSibling : t -> Dom.element option
include sig ... end
val remove : unit -> t
val target : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/ProgressEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/ProgressEvent/index.html new file mode 100644 index 000000000..262da846c --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/ProgressEvent/index.html @@ -0,0 +1,2 @@ + +ProgressEvent (docs.local.server-reason-react.webapi.Webapi.Dom.ProgressEvent)

Module Dom.ProgressEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val lengthComputable : t -> bool
val loaded : t -> int
val total : t -> int
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Range/index.html b/local/server-reason-react/webapi/Webapi/Dom/Range/index.html new file mode 100644 index 000000000..2bfac0025 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Range/index.html @@ -0,0 +1,10 @@ + +Range (docs.local.server-reason-react.webapi.Webapi.Dom.Range)

Module Dom.Range

type t = Dom.range
val make : unit -> t
val collapsed : t -> bool
val commonAncestorContainer : t -> Dom.node
val endContainer : t -> Dom.node
val endOffset : t -> int
val startContainer : t -> Dom.node
val startOffset : t -> int
val setStart : 'a Dom.node_like -> int -> t -> unit
val setEnd : 'a Dom.node_like -> int -> t -> unit
val setStartBefore : 'a Dom.node_like -> t -> unit
val setStartAfter : 'a Dom.node_like -> t -> unit
val setEndBefore : 'a Dom.node_like -> t -> unit
val setEndAfter : 'a Dom.node_like -> t -> unit
val selectNode : 'a Dom.node_like -> t -> unit
val selectNodeContents : 'a Dom.node_like -> t -> unit
val collapse : unit -> t
val collapseToStart : 'a -> t -> unit
val cloneContents : Dom.documentFragment -> t
val deleteContents : unit -> t
val extractContents : Dom.documentFragment -> t
val insertNode : 'a Dom.node_like -> t -> unit
val surroundContents : 'a Dom.node_like -> t -> unit
val compareBoundaryPoints : int -> t -> t -> int
val compareBoundaryPoint : + Webapi__Dom__Types.compareHow -> + t -> + t -> + Webapi__Dom__Types.compareResult
val cloneRange : t -> t
val detach : unit -> t
val toString : string -> t
val comparePoint : + 'a Dom.node_like -> + int -> + t -> + Webapi__Dom__Types.compareResult
val createContextualFragment : string -> t -> Dom.documentFragment
val getBoundingClientRect : Dom.domRect -> t
val getClientRects : Dom.domRect array -> t
val intersectsNode : 'a Dom.node_like -> t -> bool
val isPointInRange : 'a Dom.node_like -> int -> t -> bool
diff --git a/local/server-reason-react/webapi/Webapi/Dom/RelatedEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/RelatedEvent/index.html new file mode 100644 index 000000000..59259781d --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/RelatedEvent/index.html @@ -0,0 +1,2 @@ + +RelatedEvent (docs.local.server-reason-react.webapi.Webapi.Dom.RelatedEvent)

Module Dom.RelatedEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val relatedTarget : t -> Dom.eventTarget option
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Selection/index.html b/local/server-reason-react/webapi/Webapi/Dom/Selection/index.html new file mode 100644 index 000000000..ba92dd5a4 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Selection/index.html @@ -0,0 +1,8 @@ + +Selection (docs.local.server-reason-react.webapi.Webapi.Dom.Selection)

Module Dom.Selection

type t = Dom.selection
val anchorNode : t -> Dom.node option
val anchorOffset : t -> int
val focusNode : t -> Dom.node option
val focusOffset : t -> int
val isCollapsed : t -> bool
val rangeCount : t -> int
val getRangeAt : int -> t -> Dom.range
val collapse : 'a Dom.node_like -> int -> t -> unit
val extend : 'a Dom.node_like -> int -> t -> unit
val collapseToStart : unit -> t
val collapseToEnd : unit -> t
val selectAllChildren : 'a Dom.node_like -> t -> unit
val setBaseAndExtent : + 'a Dom.node_like -> + int -> + 'b Dom.node_like -> + int -> + t -> + unit
val addRange : Dom.range -> t -> unit
val removeRange : Dom.range -> t -> unit
val removeAllRanges : unit -> t
val deleteFromDocument : unit -> t
val toString : string -> t
val containsNode : 'a Dom.node_like -> 'b -> t -> bool
val containsNodePartly : 'a Dom.node_like -> 'b -> t -> bool
diff --git a/local/server-reason-react/webapi/Webapi/Dom/ShadowRoot/index.html b/local/server-reason-react/webapi/Webapi/Dom/ShadowRoot/index.html new file mode 100644 index 000000000..2ff65cfb7 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/ShadowRoot/index.html @@ -0,0 +1,508 @@ + +ShadowRoot (docs.local.server-reason-react.webapi.Webapi.Dom.ShadowRoot)

Module Dom.ShadowRoot

include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val getElementById : string -> t -> Dom.element option
include sig ... end
include sig ... end
val children : t -> Dom.htmlCollection
val firstElementChild : t -> Dom.element option
val lastElementChild : t -> Dom.element option
val childElementCount : t -> int
val querySelector : string -> t -> Dom.element option
val querySelectorAll : string -> t -> Dom.nodeList
val shadowRootMode : t -> Webapi__Dom__Types.shadowRootMode
val host : t -> Dom.element
diff --git a/local/server-reason-react/webapi/Webapi/Dom/StorageEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/StorageEvent/index.html new file mode 100644 index 000000000..12dc61b59 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/StorageEvent/index.html @@ -0,0 +1,2 @@ + +StorageEvent (docs.local.server-reason-react.webapi.Webapi.Dom.StorageEvent)

Module Dom.StorageEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val key : t -> string
val newValue : t -> string Js.Nullable.t
val oldValue : t -> string Js.Nullable.t
val storageArea : t -> Dom.Storage.t
val url : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/SvgZoomEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/SvgZoomEvent/index.html new file mode 100644 index 000000000..84a7b2701 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/SvgZoomEvent/index.html @@ -0,0 +1,2 @@ + +SvgZoomEvent (docs.local.server-reason-react.webapi.Webapi.Dom.SvgZoomEvent)

Module Dom.SvgZoomEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
include sig ... end
val detail : t -> int
val view : t -> Dom.window
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val zoomRectScreen : t -> Dom.svgRect
val previousScale : t -> float
val previousTranslate : t -> Dom.svgPoint
val newScale : t -> float
val newTranslate : t -> Dom.svgPoint
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Text/Impl/argument-1-T/index.html b/local/server-reason-react/webapi/Webapi/Dom/Text/Impl/argument-1-T/index.html new file mode 100644 index 000000000..65d67b4fc --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Text/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.webapi.Webapi.Dom.Text.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Text/Impl/index.html b/local/server-reason-react/webapi/Webapi/Dom/Text/Impl/index.html new file mode 100644 index 000000000..67f890bad --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Text/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.local.server-reason-react.webapi.Webapi.Dom.Text.Impl)

Module Text.Impl

Parameters

module T : sig ... end

Signature

val ofNode : Dom.node -> T.t option
val splitText : offset:int -> unit -> T.t -> Dom.text
val wholeText : T.t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Text/index.html b/local/server-reason-react/webapi/Webapi/Dom/Text/index.html new file mode 100644 index 000000000..72d326fa3 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Text/index.html @@ -0,0 +1,508 @@ + +Text (docs.local.server-reason-react.webapi.Webapi.Dom.Text)

Module Dom.Text

module Impl (T : sig ... end) : sig ... end
type t = Dom.text
include sig ... end
val asNode : t -> Dom.node
val childNodes : t -> Dom.nodeList
val firstChild : t -> Dom.node option
val innerText : t -> string
val setInnerText : t -> string -> unit
val lastChild : t -> Dom.node option
val nextSibling : t -> Dom.node option
val nodeName : t -> string
val nodeType : t -> Webapi__Dom__Types.nodeType
val nodeValue : t -> string option
val setNodeValue : t -> string Js.null -> unit
val ownerDocument : t -> Dom.document
val parentElement : t -> Dom.element option
val parentNode : t -> Dom.node option
val previousSibling : t -> Dom.node option
val rootNode : t -> Dom.node
val textContent : t -> string
val setTextContent : t -> string -> unit
val appendChild : 'a Dom.node_like -> t -> unit
val cloneNode : t -> t
val cloneNodeDeep : 'a -> t -> t
val compareDocumentPosition : 'a Dom.node_like -> t -> int
val contains : Dom.node -> t -> bool
val getRootNode : Dom.node -> t
val getRootNodeComposed : 'a -> t -> Dom.node
val hasChildNodes : bool -> t
val insertBefore : + 'a Dom.node_like -> + 'b Dom.node_like -> + t -> + 'a Dom.node_like
val isDefaultNamespace : string -> t -> bool
val isEqualNode : 'a Dom.node_like -> t -> bool
val isSameNode : 'a Dom.node_like -> t -> bool
val lookupNamespaceURI : string -> t -> string option
val lookupDefaultNamespaceURI : 'a -> t -> string option
val lookupPrefix : string -> t
val normalize : unit -> t
val removeChild : 'a Dom.node_like -> t -> 'a Dom.node_like
val replaceChild : 'a Dom.node_like -> 'b Dom.node_like -> 'b Dom.node_like
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val data : t -> string
val length : t -> int
val substringData : offset:int -> count:int -> t -> string
val appendData : string -> t -> unit
val insertData : offset:int -> string -> t -> unit
val deleteData : offset:int -> count:int -> t -> unit
val replaceData : offset:int -> count:int -> string -> t -> unit
include sig ... end
val previousElementSibling : t -> Dom.element option
val nextElementSibling : t -> Dom.element option
include sig ... end
val remove : unit -> t
include sig ... end
val assignedSlot : t -> Dom.htmlSlotElement option
include sig ... end
val ofNode : Dom.node -> t option
val splitText : offset:int -> unit -> t -> Dom.text
val wholeText : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/TimeEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/TimeEvent/index.html new file mode 100644 index 000000000..fd799a1b4 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/TimeEvent/index.html @@ -0,0 +1,2 @@ + +TimeEvent (docs.local.server-reason-react.webapi.Webapi.Dom.TimeEvent)

Module Dom.TimeEvent

type t = Dom.timeEvent
include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val detail : t -> int
val view : t -> Dom.window
diff --git a/local/server-reason-react/webapi/Webapi/Dom/TouchEvent/Impl/argument-1-T/index.html b/local/server-reason-react/webapi/Webapi/Dom/TouchEvent/Impl/argument-1-T/index.html new file mode 100644 index 000000000..ff204b990 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/TouchEvent/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.webapi.Webapi.Dom.TouchEvent.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/TouchEvent/Impl/index.html b/local/server-reason-react/webapi/Webapi/Dom/TouchEvent/Impl/index.html new file mode 100644 index 000000000..87ce465be --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/TouchEvent/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.local.server-reason-react.webapi.Webapi.Dom.TouchEvent.Impl)

Module TouchEvent.Impl

Parameters

module T : sig ... end

Signature

val altKey : T.t -> bool
val changedTouches : T.t -> touchList
val ctrlKey : T.t -> bool
val metaKey : T.t -> bool
val shiftKey : T.t -> bool
val targetTouches : T.t -> touchList
val touches : T.t -> touchList
diff --git a/local/server-reason-react/webapi/Webapi/Dom/TouchEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/TouchEvent/index.html new file mode 100644 index 000000000..f7302e0a2 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/TouchEvent/index.html @@ -0,0 +1,2 @@ + +TouchEvent (docs.local.server-reason-react.webapi.Webapi.Dom.TouchEvent)

Module Dom.TouchEvent

type touchList
module Impl (T : sig ... end) : sig ... end
include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
include sig ... end
val detail : t -> int
val view : t -> Dom.window
include sig ... end
val altKey : t -> bool
val changedTouches : t -> touchList
val ctrlKey : t -> bool
val metaKey : t -> bool
val shiftKey : t -> bool
val targetTouches : t -> touchList
val touches : t -> touchList
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/TrackEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/TrackEvent/index.html new file mode 100644 index 000000000..e2106190d --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/TrackEvent/index.html @@ -0,0 +1,2 @@ + +TrackEvent (docs.local.server-reason-react.webapi.Webapi.Dom.TrackEvent)

Module Dom.TrackEvent

type track
include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val track : t -> track
diff --git a/local/server-reason-react/webapi/Webapi/Dom/TransitionEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/TransitionEvent/index.html new file mode 100644 index 000000000..a523bd1cc --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/TransitionEvent/index.html @@ -0,0 +1,2 @@ + +TransitionEvent (docs.local.server-reason-react.webapi.Webapi.Dom.TransitionEvent)

Module Dom.TransitionEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val propertyName : t -> string
val elapsedTime : t -> float
val pseudoElement : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/TreeWalker/index.html b/local/server-reason-react/webapi/Webapi/Dom/TreeWalker/index.html new file mode 100644 index 000000000..df0a7e903 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/TreeWalker/index.html @@ -0,0 +1,2 @@ + +TreeWalker (docs.local.server-reason-react.webapi.Webapi.Dom.TreeWalker)

Module Dom.TreeWalker

val root : t -> Dom.node
val whatToShow : t -> Webapi__Dom__Types.WhatToShow.t
val filter : t -> Dom.nodeFilter option
val currentNode : t -> Dom.node
val setCurrentNode : t -> Dom.node -> unit
val parentNode : Dom.node option -> t
val firstChild : Dom.node option -> t
val lastChild : Dom.node option -> t
val previousSibling : Dom.node option -> t
val nextSibling : Dom.node option -> t
val previousNode : Dom.node option -> t
val nextNode : Dom.node option -> t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/UiEvent/Impl/argument-1-T/index.html b/local/server-reason-react/webapi/Webapi/Dom/UiEvent/Impl/argument-1-T/index.html new file mode 100644 index 000000000..6d935b7be --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/UiEvent/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.webapi.Webapi.Dom.UiEvent.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/UiEvent/Impl/index.html b/local/server-reason-react/webapi/Webapi/Dom/UiEvent/Impl/index.html new file mode 100644 index 000000000..f9cf271f5 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/UiEvent/Impl/index.html @@ -0,0 +1,2 @@ + +Impl (docs.local.server-reason-react.webapi.Webapi.Dom.UiEvent.Impl)

Module UiEvent.Impl

Parameters

module T : sig ... end

Signature

val detail : T.t -> int
val view : T.t -> Dom.window
diff --git a/local/server-reason-react/webapi/Webapi/Dom/UiEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/UiEvent/index.html new file mode 100644 index 000000000..46be98d3c --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/UiEvent/index.html @@ -0,0 +1,2 @@ + +UiEvent (docs.local.server-reason-react.webapi.Webapi.Dom.UiEvent)

Module Dom.UiEvent

module Impl (T : sig ... end) : sig ... end
type t = Dom.uiEvent
include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
include sig ... end
val detail : t -> int
val view : t -> Dom.window
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/ValidityState/index.html b/local/server-reason-react/webapi/Webapi/Dom/ValidityState/index.html new file mode 100644 index 000000000..eb0e77f46 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/ValidityState/index.html @@ -0,0 +1,2 @@ + +ValidityState (docs.local.server-reason-react.webapi.Webapi.Dom.ValidityState)

Module Dom.ValidityState

type t
val valueMissing : t -> bool
val typeMismatch : t -> bool
val patternMismatch : t -> bool
val tooLong : t -> bool
val tooShort : t -> bool
val rangeUnderflow : t -> bool
val rangeOverflow : t -> bool
val stepMismatch : t -> bool
val badInput : t -> bool
val customError : t -> bool
val valid : t -> bool
diff --git a/local/server-reason-react/webapi/Webapi/Dom/WebGlContextEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/WebGlContextEvent/index.html new file mode 100644 index 000000000..d9374d100 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/WebGlContextEvent/index.html @@ -0,0 +1,2 @@ + +WebGlContextEvent (docs.local.server-reason-react.webapi.Webapi.Dom.WebGlContextEvent)

Module Dom.WebGlContextEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val statusMessage : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Dom/WhatToShow/index.html b/local/server-reason-react/webapi/Webapi/Dom/WhatToShow/index.html new file mode 100644 index 000000000..c7c58556b --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/WhatToShow/index.html @@ -0,0 +1,2 @@ + +WhatToShow (docs.local.server-reason-react.webapi.Webapi.Dom.WhatToShow)

Module Dom.WhatToShow

type t
val _All : t
val _Element : t
val _Attribute : t
val _Text : t
val _CDATASection : t
val _EntityReference : t
val _Entity : t
val _ProcessingInstruction : t
val _Comment : t
val _Document : t
val _DocumentType : t
val _DocumentFragment : t
val _Notation : t
val many : t list -> t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/WheelEvent/index.html b/local/server-reason-react/webapi/Webapi/Dom/WheelEvent/index.html new file mode 100644 index 000000000..820353f72 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/WheelEvent/index.html @@ -0,0 +1,2 @@ + +WheelEvent (docs.local.server-reason-react.webapi.Webapi.Dom.WheelEvent)

Module Dom.WheelEvent

include sig ... end
val bubbles : t -> bool
val cancelable : t -> bool
val composed : t -> bool
val currentTarget : t -> Dom.eventTarget
val defaultPrevented : t -> bool
val eventPhase : t -> Webapi__Dom__Types.EventPhase.t
val target : t -> Dom.eventTarget
val timeStamp : t -> float
val type_ : t -> string
val isTrusted : t -> bool
val preventDefault : unit -> t
val stopImmediatePropagation : unit -> t
val stopPropagation : unit -> t
include sig ... end
val detail : t -> int
val view : t -> Dom.window
include sig ... end
val altKey : t -> bool
val button : t -> int
val buttons : t -> int
val clientX : t -> int
val clientY : t -> int
val ctrlKey : t -> bool
val metaKey : t -> bool
val movementX : t -> int
val movementY : t -> int
val offsetX : t -> int
val offsetY : t -> int
val pageX : t -> int
val pageY : t -> int
val region : t -> string option
val relatedTarget : t -> Dom.eventTarget option
val screenX : t -> int
val screenY : t -> int
val shiftKey : t -> bool
val x : t -> int
val y : t -> int
val getModifierState : Webapi__Dom__Types.modifierKey -> t -> bool
val make : string -> t
val makeWithOptions : string -> < .. > Js.t -> t
val deltaX : t -> float
val deltaY : t -> float
val deltaZ : t -> float
val deltaMode : t -> Webapi__Dom__Types.deltaMode
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Window/Impl/argument-1-T/index.html b/local/server-reason-react/webapi/Webapi/Dom/Window/Impl/argument-1-T/index.html new file mode 100644 index 000000000..fbc774693 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Window/Impl/argument-1-T/index.html @@ -0,0 +1,2 @@ + +T (docs.local.server-reason-react.webapi.Webapi.Dom.Window.Impl.T)

Parameter Impl.T

type t
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Window/Impl/index.html b/local/server-reason-react/webapi/Webapi/Dom/Window/Impl/index.html new file mode 100644 index 000000000..cf99b5f97 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Window/Impl/index.html @@ -0,0 +1,28 @@ + +Impl (docs.local.server-reason-react.webapi.Webapi.Dom.Window.Impl)

Module Window.Impl

Parameters

module T : sig ... end

Signature

type t_window = T.t
val console : t_window -> console
val crypto : t_window -> crypto
val document : t_window -> Dom.document
val frameElement : t_window -> Dom.element option
val frames : t_window -> frameList
val fullScreen : t_window -> bool
val history : t_window -> Dom.history
val innerWidth : t_window -> int
val innerHeight : t_window -> int
val isSecureContext : t_window -> bool
val length : t_window -> int
val location : t_window -> Dom.location
val setLocation : t_window -> string -> unit
val locationbar : t_window -> locationbar
val menubar : t_window -> menubar
val name : t_window -> string
val setName : t_window -> string -> unit
val navigator : t_window -> navigator
val opener : t_window -> Dom.window option
val outerWidth : t_window -> int
val outerHeight : t_window -> int
val pageXOffset : t_window -> float
val pageYOffset : t_window -> float
val parent : t_window -> Dom.window
val performance : t_window -> Webapi__Performance.t
val personalbar : t_window -> personalbar
val screen : t_window -> screen
val screenX : t_window -> int
val screenY : t_window -> int
val scrollbars : t_window -> scrollbars
val scrollX : t_window -> float
val scrollY : t_window -> float
val self : t_window -> Dom.window
val speechSynthesis : t_window -> speechSynthesis
val status : t_window -> string
val setStatus : t_window -> string -> unit
val statusbar : t_window -> statusbar
val toolbar : t_window -> toolbar
val top : t_window -> Dom.window
val window : t_window -> t_window
val alert : string -> t_window -> unit
val blur : unit -> t_window
val cancelIdleCallback : idleCallbackId -> t_window -> unit
val close : unit -> t_window
val confirm : string -> t_window -> bool
val focus : unit -> t_window
val getComputedStyle : Dom.element -> t_window -> Dom.cssStyleDeclaration
val getComputedStyleWithPseudoElement : + Dom.element -> + string -> + t_window -> + Dom.cssStyleDeclaration
val getSelection : Dom.selection -> t_window
val matchMedia : string -> t_window -> mediaQueryList
val moveBy : int -> int -> t_window -> unit
val moveTo : int -> int -> t_window -> unit
val open_ : + url:string -> + name:string -> + ?features:string -> + t_window -> + Dom.window option
val postMessage : 'a -> t_window -> string -> unit
val postMessageWithTransfers : + 'a -> + t_window -> + string -> + transferable array -> + unit
val print : unit -> t_window
val prompt : string -> t_window -> string
val promptWithDefault : string -> string -> t_window -> string
val requestIdleCallback : (idleDeadline -> unit) -> t_window -> idleCallbackId
val requestIdleCallbackWithOptions : + (idleDeadline -> unit) -> + t_window -> + < timeout : int > Js.t -> + idleCallbackId
val resizeBy : int -> int -> t_window -> unit
val resizeTo : int -> int -> t_window -> unit
val scroll : float -> float -> t_window -> unit
val scrollBy : float -> float -> t_window -> unit
val scrollTo : float -> float -> t_window -> unit
val stop : unit -> t_window
val addPopStateEventListener : + 'a -> + t_window -> + (Dom.popStateEvent -> unit) -> + unit
val removePopStateEventListener : + 'a -> + t_window -> + (Dom.popStateEvent -> unit) -> + unit
val setOnLoad : t_window -> (unit -> unit) -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Dom/Window/index.html b/local/server-reason-react/webapi/Webapi/Dom/Window/index.html new file mode 100644 index 000000000..390568a7f --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/Window/index.html @@ -0,0 +1,544 @@ + +Window (docs.local.server-reason-react.webapi.Webapi.Dom.Window)

Module Dom.Window

type console
type crypto
type frameList
type idleDeadline
type locationbar
type menubar
type navigator
type personalbar
type screen
type scrollbars
type speechSynthesis
type statusbar
type toolbar
type mediaQueryList
type transferable
type idleCallbackId
module Impl (T : sig ... end) : sig ... end
type t = Dom.window
include sig ... end
val asEventTarget : t -> Dom.eventTarget
val addEventListener : string -> (Dom.event -> unit) -> t -> unit
val addEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addEventListenerUseCapture : string -> (Dom.event -> unit) -> t -> unit
val removeEventListener : string -> (Dom.event -> unit) -> t -> unit
val removeEventListenerWithOptions : + string -> + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeEventListenerUseCapture : 'a -> (Dom.event -> unit) -> t -> unit
val dispatchEvent : 'a Dom.event_like -> bool
val addLoadEventListener : (Dom.event -> unit) -> t -> unit
val addLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeLoadEventListener : (Dom.event -> unit) -> t -> unit
val removeLoadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeLoadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addUnloadEventListener : (Dom.event -> unit) -> t -> unit
val addUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListener : (Dom.event -> unit) -> t -> unit
val removeUnloadEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeUnloadEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addAbortEventListener : (Dom.event -> unit) -> t -> unit
val addAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeAbortEventListener : (Dom.event -> unit) -> t -> unit
val removeAbortEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAbortEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addErrorEventListener : (Dom.event -> unit) -> t -> unit
val addErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeErrorEventListener : (Dom.event -> unit) -> t -> unit
val removeErrorEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeErrorEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addSelectEventListener : (Dom.event -> unit) -> t -> unit
val addSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val removeSelectEventListener : (Dom.event -> unit) -> t -> unit
val removeSelectEventListenerWithOptions : + (Dom.event -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectEventListenerUseCapture : (Dom.event -> unit) -> t -> unit
val addBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeBlurEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBlurEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusInEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusInEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusInEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addFocusOutEventListenerUseCapture : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeFocusOutEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeFocusOutEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val addClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDblClickEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeDblClickEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDblClickEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseDownEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseDownEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseDownEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val removeMouseEnterEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseEnterEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseEnterEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseMoveEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseMoveEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseMoveEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOutEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOutEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOutEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseOverEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseOverEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseOverEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val addMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addMouseUpEventListenerUseCapture : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListener : (Dom.mouseEvent -> unit) -> t -> unit
val removeMouseUpEventListenerWithOptions : + (Dom.mouseEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeMouseUpEventListenerUseCapture : + (Dom.mouseEvent -> unit) -> + t -> + unit
val addWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val addWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListener : (Dom.wheelEvent -> unit) -> t -> unit
val removeWheelEventListenerWithOptions : + (Dom.wheelEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeWheelEventListenerUseCapture : (Dom.wheelEvent -> unit) -> t -> unit
val addBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val removeBeforeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeBeforeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeBeforeInputEventListenerUseCapture : + (Dom.inputEvent -> unit) -> + t -> + unit
val addInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val addInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListener : (Dom.inputEvent -> unit) -> t -> unit
val removeInputEventListenerWithOptions : + (Dom.inputEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeInputEventListenerUseCapture : (Dom.inputEvent -> unit) -> t -> unit
val addKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyDownEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyDownEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyDownEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyUpEventListenerUseCapture : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyUpEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyUpEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val addKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val removeKeyPressEventListener : (Dom.keyboardEvent -> unit) -> t -> unit
val removeKeyPressEventListenerWithOptions : + (Dom.keyboardEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeKeyPressEventListenerUseCapture : + (Dom.keyboardEvent -> unit) -> + t -> + unit
val addCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionStartEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionStartEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionUpdateEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionUpdateEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListener : + (Dom.compositionEvent -> unit) -> + t -> + unit
val removeCompositionEndEventListenerWithOptions : + (Dom.compositionEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeCompositionEndEventListenerUseCapture : + (Dom.compositionEvent -> unit) -> + t -> + unit
val addDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEndEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEndEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragEnterEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragEnterEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragEnterEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragExitEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragExitEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragExitEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragLeaveEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragLeaveEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragLeaveEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragOverEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragOverEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragOverEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDragStartEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDragStartEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDragStartEventListenerUseCapture : + (Dom.dragEvent -> unit) -> + t -> + unit
val addDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val addDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListener : (Dom.dragEvent -> unit) -> t -> unit
val removeDropEventListenerWithOptions : + (Dom.dragEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeDropEventListenerUseCapture : (Dom.dragEvent -> unit) -> t -> unit
val addTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchCancelEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchCancelEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchCancelEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchEndEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchEndEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchEndEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchMoveEventListenerUseCapture : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchMoveEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchMoveEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val addTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val removeTouchStartEventListener : (Dom.touchEvent -> unit) -> t -> unit
val removeTouchStartEventListenerWithOptions : + (Dom.touchEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeTouchStartEventListenerUseCapture : + (Dom.touchEvent -> unit) -> + t -> + unit
val addAnimationCancelEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationCancelEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationCancelEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationEndEventListener : (Dom.animationEvent -> unit) -> t -> unit
val removeAnimationEndEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationEndEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationIterationEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationIterationEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val addAnimationStartEventListener : (Dom.animationEvent -> unit) -> t -> unit
val addAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListener : + (Dom.animationEvent -> unit) -> + t -> + unit
val removeAnimationStartEventListenerWithOptions : + (Dom.animationEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeAnimationStartEventListenerUseCapture : + (Dom.animationEvent -> unit) -> + t -> + unit
include sig ... end
val addSelectionChangeEventListener : (Dom.focusEvent -> unit) -> t -> unit
val addSelectionChangeEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; once : bool ; passive : bool > Js.t -> + t -> + unit
val addSelectionChangeEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
val removeSelectionChangeEventListener : (Dom.focusEvent -> unit) -> t -> unit
val removeSelectionChangeEventListenerWithOptions : + (Dom.focusEvent -> unit) -> + < capture : bool ; passive : bool > Js.t -> + t -> + unit
val removeSelectionChangeEventListenerUseCapture : + (Dom.focusEvent -> unit) -> + t -> + unit
include sig ... end
type t_window = t
val console : t_window -> console
val crypto : t_window -> crypto
val document : t_window -> Dom.document
val frameElement : t_window -> Dom.element option
val frames : t_window -> frameList
val fullScreen : t_window -> bool
val history : t_window -> Dom.history
val innerWidth : t_window -> int
val innerHeight : t_window -> int
val isSecureContext : t_window -> bool
val length : t_window -> int
val location : t_window -> Dom.location
val setLocation : t_window -> string -> unit
val locationbar : t_window -> locationbar
val menubar : t_window -> menubar
val name : t_window -> string
val setName : t_window -> string -> unit
val navigator : t_window -> navigator
val opener : t_window -> Dom.window option
val outerWidth : t_window -> int
val outerHeight : t_window -> int
val pageXOffset : t_window -> float
val pageYOffset : t_window -> float
val parent : t_window -> Dom.window
val performance : t_window -> Webapi__Performance.t
val personalbar : t_window -> personalbar
val screen : t_window -> screen
val screenX : t_window -> int
val screenY : t_window -> int
val scrollbars : t_window -> scrollbars
val scrollX : t_window -> float
val scrollY : t_window -> float
val self : t_window -> Dom.window
val speechSynthesis : t_window -> speechSynthesis
val status : t_window -> string
val setStatus : t_window -> string -> unit
val statusbar : t_window -> statusbar
val toolbar : t_window -> toolbar
val top : t_window -> Dom.window
val window : t_window -> t_window
val alert : string -> t_window -> unit
val blur : unit -> t_window
val cancelIdleCallback : idleCallbackId -> t_window -> unit
val close : unit -> t_window
val confirm : string -> t_window -> bool
val focus : unit -> t_window
val getComputedStyle : Dom.element -> t_window -> Dom.cssStyleDeclaration
val getComputedStyleWithPseudoElement : + Dom.element -> + string -> + t_window -> + Dom.cssStyleDeclaration
val getSelection : Dom.selection -> t_window
val matchMedia : string -> t_window -> mediaQueryList
val moveBy : int -> int -> t_window -> unit
val moveTo : int -> int -> t_window -> unit
val open_ : + url:string -> + name:string -> + ?features:string -> + t_window -> + Dom.window option
val postMessage : 'a -> t_window -> string -> unit
val postMessageWithTransfers : + 'a -> + t_window -> + string -> + transferable array -> + unit
val print : unit -> t_window
val prompt : string -> t_window -> string
val promptWithDefault : string -> string -> t_window -> string
val requestIdleCallback : (idleDeadline -> unit) -> t_window -> idleCallbackId
val requestIdleCallbackWithOptions : + (idleDeadline -> unit) -> + t_window -> + < timeout : int > Js.t -> + idleCallbackId
val resizeBy : int -> int -> t_window -> unit
val resizeTo : int -> int -> t_window -> unit
val scroll : float -> float -> t_window -> unit
val scrollBy : float -> float -> t_window -> unit
val scrollTo : float -> float -> t_window -> unit
val stop : unit -> t_window
val addPopStateEventListener : + 'a -> + t_window -> + (Dom.popStateEvent -> unit) -> + unit
val removePopStateEventListener : + 'a -> + t_window -> + (Dom.popStateEvent -> unit) -> + unit
val setOnLoad : t_window -> (unit -> unit) -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Dom/index.html b/local/server-reason-react/webapi/Webapi/Dom/index.html new file mode 100644 index 000000000..98a3abc13 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/index.html @@ -0,0 +1,2 @@ + +Dom (docs.local.server-reason-react.webapi.Webapi.Dom)

Module Webapi.Dom

module AnimationEvent : sig ... end
module Attr : sig ... end
module BeforeUnloadEvent : sig ... end
module CdataSection : sig ... end
module CharacterData : sig ... end
module Comment : sig ... end
module CssStyleDeclaration : sig ... end
module ClipboardEvent : sig ... end
module CloseEvent : sig ... end
module CompositionEvent : sig ... end
module CustomEvent : sig ... end
module Document : sig ... end
module DocumentFragment : sig ... end
module DocumentType : sig ... end
module DomImplementation : sig ... end
module DomRect : sig ... end
module DomStringMap : sig ... end
module DomTokenList : sig ... end
module DragEvent : sig ... end
module Element : sig ... end
module ErrorEvent : sig ... end
module Event : sig ... end
module EventTarget : sig ... end
module FocusEvent : sig ... end
module History : sig ... end
module HtmlCollection : sig ... end
module HtmlDocument : sig ... end
module HtmlElement : sig ... end
module HtmlFormElement : sig ... end
module HtmlImageElement : sig ... end
module HtmlInputElement : sig ... end
module IdbVersionChangeEvent : sig ... end
module Image : sig ... end
module InputEvent : sig ... end
module KeyboardEvent : sig ... end
module Location : sig ... end
module MouseEvent : sig ... end
module MutationObserver : sig ... end
module MutationRecord : sig ... end
module NamedNodeMap : sig ... end
module Node : sig ... end
module NodeFilter : sig ... end
module NodeIterator : sig ... end
module NodeList : sig ... end
module PageTransitionEvent : sig ... end
module PointerEvent : sig ... end
module PopStateEvent : sig ... end
module ProcessingInstruction : sig ... end
module ProgressEvent : sig ... end
module Range : sig ... end
module RelatedEvent : sig ... end
module Selection : sig ... end
module ShadowRoot : sig ... end
module StorageEvent : sig ... end
module SvgZoomEvent : sig ... end
module Text : sig ... end
module TimeEvent : sig ... end
module TouchEvent : sig ... end
module TrackEvent : sig ... end
module TransitionEvent : sig ... end
module TreeWalker : sig ... end
module UiEvent : sig ... end
module ValidityState : sig ... end
module WebGlContextEvent : sig ... end
module WheelEvent : sig ... end
module Window : sig ... end
type compareHow =
  1. | StartToStart
  2. | StartToEnd
  3. | EndToEnd
  4. | EndToStart
val encodeCompareHow : compareHow -> int
type compareResult =
  1. | Before
  2. | Equal
  3. | After
  4. | Unknown
val decodeCompareResult : int -> compareResult
type compatMode =
  1. | BackCompat
  2. | CSS1Compat
  3. | Unknown
val decodeCompatMode : string -> compatMode
type contentEditable =
  1. | True
  2. | False
  3. | Inherit
  4. | Unknown
val encodeContentEditable : contentEditable -> string
val decodeContentEditable : string -> contentEditable
type deltaMode =
  1. | Pixel
  2. | Line
  3. | Page
val decodeDeltaMode : int -> deltaMode
type designMode =
  1. | On
  2. | Off
  3. | Unknown
val encodeDesignMode : designMode -> string
val decodeDesignMode : string -> designMode
type dir =
  1. | Ltr
  2. | Rtl
  3. | Unknown
val encodeDir : dir -> string
val decodeDir : string -> dir
module EventPhase : sig ... end
type eventPhase = EventPhase.t =
  1. | None
  2. | CapturingPhase
  3. | AtTarget
  4. | BubblingPhase
  5. | Unknown
  • deprecated Use EventPhase.t
type filterAction =
  1. | Accept
  2. | Reject
  3. | Skip
val encodeFilterAction : filterAction -> int
type insertPosition =
  1. | BeforeBegin
  2. | AfterBegin
  3. | BeforeEnd
  4. | AfterEnd
val encodeInsertPosition : insertPosition -> string
type modifierKey =
  1. | Alt
  2. | AltGraph
  3. | CapsLock
  4. | Control
  5. | Fn
  6. | FnLock
  7. | Hyper
  8. | Meta
  9. | NumLock
  10. | ScrollLock
  11. | Shift
  12. | Super
  13. | Symbol
  14. | SymbolLock
val encodeModifierKey : modifierKey -> string
type nodeType =
  1. | Element
  2. | Attribute
  3. | Text
  4. | CDATASection
  5. | EntityReference
  6. | Entity
  7. | ProcessingInstruction
  8. | Comment
  9. | Document
  10. | DocumentType
  11. | DocumentFragment
  12. | Notation
  13. | Unknown
val decodeNodeType : int -> nodeType
type pointerType =
  1. | Mouse
  2. | Pen
  3. | Touch
  4. | Unknown
val decodePointerType : string -> pointerType
type readyState =
  1. | Loading
  2. | Interactive
  3. | Complete
  4. | Unknown
val decodeReadyState : string -> readyState
type shadowRootMode =
  1. | Open
  2. | Closed
val decodeShadowRootMode : string -> shadowRootMode
type visibilityState =
  1. | Visible
  2. | Hidden
  3. | Prerender
  4. | Unloaded
  5. | Unknown
val decodeVisibilityState : string -> visibilityState
type image
module type WhatToShowT = sig ... end
diff --git a/local/server-reason-react/webapi/Webapi/Dom/module-type-WhatToShowT/index.html b/local/server-reason-react/webapi/Webapi/Dom/module-type-WhatToShowT/index.html new file mode 100644 index 000000000..b9142031c --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Dom/module-type-WhatToShowT/index.html @@ -0,0 +1,2 @@ + +WhatToShowT (docs.local.server-reason-react.webapi.Webapi.Dom.WhatToShowT)

Module type Dom.WhatToShowT

type t
val _All : t
val _Element : t
val _Attribute : t
val _Text : t
val _CDATASection : t
val _EntityReference : t
val _Entity : t
val _ProcessingInstruction : t
val _Comment : t
val _Document : t
val _DocumentType : t
val _DocumentFragment : t
val _Notation : t
val many : t list -> t
diff --git a/local/server-reason-react/webapi/Webapi/File/index.html b/local/server-reason-react/webapi/Webapi/File/index.html new file mode 100644 index 000000000..0533890dc --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/File/index.html @@ -0,0 +1,2 @@ + +File (docs.local.server-reason-react.webapi.Webapi.File)

Module Webapi.File

type t = Fetch.file

Blob superclass

include sig ... end
val size : t -> float
val slice : ?start:int -> ?end_:int -> ?contentType:string -> t -> t
val stream : t -> Fetch.readableStream
val type_ : t -> string
val _type : t -> string

File class

val lastModified : t -> float
val name : t -> string
val preview : t -> string
diff --git a/local/server-reason-react/webapi/Webapi/Performance/index.html b/local/server-reason-react/webapi/Webapi/Performance/index.html new file mode 100644 index 000000000..2c1a1229e --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Performance/index.html @@ -0,0 +1,2 @@ + +Performance (docs.local.server-reason-react.webapi.Webapi.Performance)

Module Webapi.Performance

type t
val now : t -> float
diff --git a/local/server-reason-react/webapi/Webapi/ReadableStream/BYOBReader/index.html b/local/server-reason-react/webapi/Webapi/ReadableStream/BYOBReader/index.html new file mode 100644 index 000000000..1b45a4a25 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/ReadableStream/BYOBReader/index.html @@ -0,0 +1,2 @@ + +BYOBReader (docs.local.server-reason-react.webapi.Webapi.ReadableStream.BYOBReader)

Module ReadableStream.BYOBReader

include Reader
type t
type closed
val releaseLock : t -> unit
diff --git a/local/server-reason-react/webapi/Webapi/ReadableStream/DefaultReader/index.html b/local/server-reason-react/webapi/Webapi/ReadableStream/DefaultReader/index.html new file mode 100644 index 000000000..3af0f97e3 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/ReadableStream/DefaultReader/index.html @@ -0,0 +1,2 @@ + +DefaultReader (docs.local.server-reason-react.webapi.Webapi.ReadableStream.DefaultReader)

Module ReadableStream.DefaultReader

include Reader
type t
type closed
val releaseLock : t -> unit
diff --git a/local/server-reason-react/webapi/Webapi/ReadableStream/index.html b/local/server-reason-react/webapi/Webapi/ReadableStream/index.html new file mode 100644 index 000000000..be68fe392 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/ReadableStream/index.html @@ -0,0 +1,2 @@ + +ReadableStream (docs.local.server-reason-react.webapi.Webapi.ReadableStream)

Module Webapi.ReadableStream

module type Reader = sig ... end
module DefaultReader : sig ... end
module BYOBReader : sig ... end
val locked : t -> bool
val getReader : t -> DefaultReader.t
val getReaderBYOB : t -> 'a -> BYOBReader.t
val tee : t -> t * t
diff --git a/local/server-reason-react/webapi/Webapi/ReadableStream/module-type-Reader/index.html b/local/server-reason-react/webapi/Webapi/ReadableStream/module-type-Reader/index.html new file mode 100644 index 000000000..3e93289e8 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/ReadableStream/module-type-Reader/index.html @@ -0,0 +1,2 @@ + +Reader (docs.local.server-reason-react.webapi.Webapi.ReadableStream.Reader)

Module type ReadableStream.Reader

type t
type closed
val releaseLock : t -> unit
diff --git a/local/server-reason-react/webapi/Webapi/ResizeObserver/ResizeObserverEntry/index.html b/local/server-reason-react/webapi/Webapi/ResizeObserver/ResizeObserverEntry/index.html new file mode 100644 index 000000000..4114418f1 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/ResizeObserver/ResizeObserverEntry/index.html @@ -0,0 +1,2 @@ + +ResizeObserverEntry (docs.local.server-reason-react.webapi.Webapi.ResizeObserver.ResizeObserverEntry)

Module ResizeObserver.ResizeObserverEntry

type t
val contentRect : t -> Dom.domRect
val target : t -> Dom.element
diff --git a/local/server-reason-react/webapi/Webapi/ResizeObserver/index.html b/local/server-reason-react/webapi/Webapi/ResizeObserver/index.html new file mode 100644 index 000000000..b8ab415f0 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/ResizeObserver/index.html @@ -0,0 +1,2 @@ + +ResizeObserver (docs.local.server-reason-react.webapi.Webapi.ResizeObserver)

Module Webapi.ResizeObserver

module ResizeObserverEntry : sig ... end
type t
val make : (ResizeObserverEntry.t array -> unit) -> t
val makeWithObserver : (ResizeObserverEntry.t array -> t -> unit) -> t
val disconnect : t -> unit
val observe : t -> Dom.element -> unit
val unobserve : t -> Dom.element -> unit
diff --git a/local/server-reason-react/webapi/Webapi/Url/URLSearchParams/index.html b/local/server-reason-react/webapi/Webapi/Url/URLSearchParams/index.html new file mode 100644 index 000000000..5edd43825 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Url/URLSearchParams/index.html @@ -0,0 +1,2 @@ + +URLSearchParams (docs.local.server-reason-react.webapi.Webapi.Url.URLSearchParams)

Module Url.URLSearchParams

type t
val make : string -> t
val makeWithDict : string Js.Dict.t -> t
val makeWithArray : (string * string) array -> t
val append : string -> string -> t -> unit
val delete : string -> t -> unit
val entries : (string * string) Js.Array.array_like -> t
val forEach : (string -> string -> unit) -> t -> unit
val get : string -> string option
val getAll : string -> t -> string array
val has : string -> t -> bool
val keys : string Js.Array.array_like -> t
val set : string -> string -> t -> unit
val sort : unit -> t
val toString : string -> t
val values : string Js.Array.array_like -> t
diff --git a/local/server-reason-react/webapi/Webapi/Url/index.html b/local/server-reason-react/webapi/Webapi/Url/index.html new file mode 100644 index 000000000..32941b21f --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/Url/index.html @@ -0,0 +1,2 @@ + +Url (docs.local.server-reason-react.webapi.Webapi.Url)

Module Webapi.Url

module URLSearchParams : sig ... end
type t
val make : string -> t
val makeWithBase : string -> string -> t
val makeWith : string -> base:string -> t
val hash : t -> string
val setHash : t -> string -> unit
val host : t -> string
val setHost : t -> string -> unit
val hostname : t -> string
val setHostname : t -> string -> unit
val href : t -> string
val setHref : t -> string -> unit
val origin : t -> string
val password : t -> string
val setPassword : t -> string -> unit
val pathname : t -> string
val setPathname : t -> string -> unit
val port : t -> string
val setPort : t -> string -> unit
val protocol : t -> string
val setProtocol : t -> string -> unit
val setSearch : t -> string -> unit
val searchParams : t -> URLSearchParams.t
val username : t -> string
val setUsername : t -> string -> unit
val toJson : t -> string
val createObjectURL : Fetch.file -> string
val revokeObjectURL : string -> unit
diff --git a/local/server-reason-react/webapi/Webapi/index.html b/local/server-reason-react/webapi/Webapi/index.html new file mode 100644 index 000000000..cc2e05ec1 --- /dev/null +++ b/local/server-reason-react/webapi/Webapi/index.html @@ -0,0 +1,2 @@ + +Webapi (docs.local.server-reason-react.webapi.Webapi)

Module Webapi

module Base64 : sig ... end

The Webapi library (stubbed)

module Blob : sig ... end
module Canvas : sig ... end
module Dom : sig ... end
module File : sig ... end
module FormData = Fetch.FormData

Re-export from bs-fetch for convenience. To use, you will also need to add the bs-fetch package as a dependency.

module Iterator = FormData.Iterator

Re-export from bs-fetch for convenience. See also FormData.

module Performance : sig ... end
module ReadableStream : sig ... end
module ResizeObserver : sig ... end
module Url : sig ... end
type rafId
val requestAnimationFrame : (float -> unit) -> unit
val requestCancellableAnimationFrame : (float -> unit) -> rafId
val cancelAnimationFrame : rafId -> unit
diff --git a/local/server-reason-react/webapi/index.html b/local/server-reason-react/webapi/index.html new file mode 100644 index 000000000..636534773 --- /dev/null +++ b/local/server-reason-react/webapi/index.html @@ -0,0 +1,2 @@ + +webapi (docs.local.server-reason-react.webapi)

Package server-reason-react.webapi

Library server-reason-react.webapi

The entry point of this library is the module: Webapi.

diff --git a/local/server-reason-react/xxhash/XXH64/index.html b/local/server-reason-react/xxhash/XXH64/index.html new file mode 100644 index 000000000..28ca986df --- /dev/null +++ b/local/server-reason-react/xxhash/XXH64/index.html @@ -0,0 +1,2 @@ + +XXH64 (docs.local.server-reason-react.xxhash.XXH64)

Module XXH64

module UInt64 = Unsigned.UInt64
val (+=) : int ref -> int -> unit
val (-=) : int ref -> int -> unit
val (<<<) : UInt64.t -> int -> UInt64.t
val (>>) : UInt64.t -> int -> UInt64.t
val (+) : UInt64.t -> UInt64.t -> UInt64.t
val (*) : UInt64.t -> UInt64.t -> UInt64.t
val (-) : UInt64.t -> UInt64.t -> UInt64.t
val logxor : UInt64.t -> UInt64.t -> UInt64.t
val prime64_1 : UInt64.t
val prime64_2 : UInt64.t
val prime64_3 : UInt64.t
val prime64_4 : UInt64.t
val prime64_5 : UInt64.t
val round : UInt64.t -> UInt64.t -> UInt64.t
val get_int64_le : string -> int -> UInt64.t
val merge : UInt64.t ref -> UInt64.t -> UInt64.t
val hash : ?seed:int64 -> string -> int64
val to_hex : int64 -> string
diff --git a/local/server-reason-react/xxhash/index.html b/local/server-reason-react/xxhash/index.html new file mode 100644 index 000000000..769a3a96e --- /dev/null +++ b/local/server-reason-react/xxhash/index.html @@ -0,0 +1,2 @@ + +xxhash (docs.local.server-reason-react.xxhash)

Package server-reason-react.xxhash

Library server-reason-react.xxhash

The entry point of this library is the module: XXH64.

diff --git a/odoc.support/fonts/KaTeX_AMS-Regular.woff2 b/odoc.support/fonts/KaTeX_AMS-Regular.woff2 new file mode 100644 index 000000000..0acaaff03 Binary files /dev/null and b/odoc.support/fonts/KaTeX_AMS-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Caligraphic-Bold.woff2 b/odoc.support/fonts/KaTeX_Caligraphic-Bold.woff2 new file mode 100644 index 000000000..f390922ec Binary files /dev/null and b/odoc.support/fonts/KaTeX_Caligraphic-Bold.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Caligraphic-Regular.woff2 b/odoc.support/fonts/KaTeX_Caligraphic-Regular.woff2 new file mode 100644 index 000000000..75344a1f9 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Caligraphic-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Fraktur-Bold.woff2 b/odoc.support/fonts/KaTeX_Fraktur-Bold.woff2 new file mode 100644 index 000000000..395f28bea Binary files /dev/null and b/odoc.support/fonts/KaTeX_Fraktur-Bold.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Fraktur-Regular.woff2 b/odoc.support/fonts/KaTeX_Fraktur-Regular.woff2 new file mode 100644 index 000000000..735f6948d Binary files /dev/null and b/odoc.support/fonts/KaTeX_Fraktur-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Main-Bold.woff2 b/odoc.support/fonts/KaTeX_Main-Bold.woff2 new file mode 100644 index 000000000..ab2ad21da Binary files /dev/null and b/odoc.support/fonts/KaTeX_Main-Bold.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Main-BoldItalic.woff2 b/odoc.support/fonts/KaTeX_Main-BoldItalic.woff2 new file mode 100644 index 000000000..5931794de Binary files /dev/null and b/odoc.support/fonts/KaTeX_Main-BoldItalic.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Main-Italic.woff2 b/odoc.support/fonts/KaTeX_Main-Italic.woff2 new file mode 100644 index 000000000..b50920e13 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Main-Italic.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Main-Regular.woff2 b/odoc.support/fonts/KaTeX_Main-Regular.woff2 new file mode 100644 index 000000000..eb24a7ba2 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Main-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Math-BoldItalic.woff2 b/odoc.support/fonts/KaTeX_Math-BoldItalic.woff2 new file mode 100644 index 000000000..29657023a Binary files /dev/null and b/odoc.support/fonts/KaTeX_Math-BoldItalic.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Math-Italic.woff2 b/odoc.support/fonts/KaTeX_Math-Italic.woff2 new file mode 100644 index 000000000..215c143fd Binary files /dev/null and b/odoc.support/fonts/KaTeX_Math-Italic.woff2 differ diff --git a/odoc.support/fonts/KaTeX_SansSerif-Bold.woff2 b/odoc.support/fonts/KaTeX_SansSerif-Bold.woff2 new file mode 100644 index 000000000..cfaa3bda5 Binary files /dev/null and b/odoc.support/fonts/KaTeX_SansSerif-Bold.woff2 differ diff --git a/odoc.support/fonts/KaTeX_SansSerif-Italic.woff2 b/odoc.support/fonts/KaTeX_SansSerif-Italic.woff2 new file mode 100644 index 000000000..349c06dc6 Binary files /dev/null and b/odoc.support/fonts/KaTeX_SansSerif-Italic.woff2 differ diff --git a/odoc.support/fonts/KaTeX_SansSerif-Regular.woff2 b/odoc.support/fonts/KaTeX_SansSerif-Regular.woff2 new file mode 100644 index 000000000..a90eea85f Binary files /dev/null and b/odoc.support/fonts/KaTeX_SansSerif-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Script-Regular.woff2 b/odoc.support/fonts/KaTeX_Script-Regular.woff2 new file mode 100644 index 000000000..b3048fc11 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Script-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Size1-Regular.woff2 b/odoc.support/fonts/KaTeX_Size1-Regular.woff2 new file mode 100644 index 000000000..c5a8462fb Binary files /dev/null and b/odoc.support/fonts/KaTeX_Size1-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Size2-Regular.woff2 b/odoc.support/fonts/KaTeX_Size2-Regular.woff2 new file mode 100644 index 000000000..e1bccfe24 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Size2-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Size3-Regular.woff2 b/odoc.support/fonts/KaTeX_Size3-Regular.woff2 new file mode 100644 index 000000000..249a28662 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Size3-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Size4-Regular.woff2 b/odoc.support/fonts/KaTeX_Size4-Regular.woff2 new file mode 100644 index 000000000..680c13085 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Size4-Regular.woff2 differ diff --git a/odoc.support/fonts/KaTeX_Typewriter-Regular.woff2 b/odoc.support/fonts/KaTeX_Typewriter-Regular.woff2 new file mode 100644 index 000000000..771f1af70 Binary files /dev/null and b/odoc.support/fonts/KaTeX_Typewriter-Regular.woff2 differ diff --git a/odoc.support/fonts/fira-mono-v14-latin-500.woff2 b/odoc.support/fonts/fira-mono-v14-latin-500.woff2 new file mode 100644 index 000000000..9d07a635a Binary files /dev/null and b/odoc.support/fonts/fira-mono-v14-latin-500.woff2 differ diff --git a/odoc.support/fonts/fira-mono-v14-latin-regular.woff2 b/odoc.support/fonts/fira-mono-v14-latin-regular.woff2 new file mode 100644 index 000000000..edc71a868 Binary files /dev/null and b/odoc.support/fonts/fira-mono-v14-latin-regular.woff2 differ diff --git a/odoc.support/fonts/fira-sans-v17-latin-500.woff2 b/odoc.support/fonts/fira-sans-v17-latin-500.woff2 new file mode 100644 index 000000000..24bb8f45f Binary files /dev/null and b/odoc.support/fonts/fira-sans-v17-latin-500.woff2 differ diff --git a/odoc.support/fonts/fira-sans-v17-latin-500italic.woff2 b/odoc.support/fonts/fira-sans-v17-latin-500italic.woff2 new file mode 100644 index 000000000..1a8b72dcd Binary files /dev/null and b/odoc.support/fonts/fira-sans-v17-latin-500italic.woff2 differ diff --git a/odoc.support/fonts/fira-sans-v17-latin-700.woff2 b/odoc.support/fonts/fira-sans-v17-latin-700.woff2 new file mode 100644 index 000000000..40b8a1cfd Binary files /dev/null and b/odoc.support/fonts/fira-sans-v17-latin-700.woff2 differ diff --git a/odoc.support/fonts/fira-sans-v17-latin-700italic.woff2 b/odoc.support/fonts/fira-sans-v17-latin-700italic.woff2 new file mode 100644 index 000000000..bdf8f5f98 Binary files /dev/null and b/odoc.support/fonts/fira-sans-v17-latin-700italic.woff2 differ diff --git a/odoc.support/fonts/fira-sans-v17-latin-italic.woff2 b/odoc.support/fonts/fira-sans-v17-latin-italic.woff2 new file mode 100644 index 000000000..b9619dd5d Binary files /dev/null and b/odoc.support/fonts/fira-sans-v17-latin-italic.woff2 differ diff --git a/odoc.support/fonts/fira-sans-v17-latin-regular.woff2 b/odoc.support/fonts/fira-sans-v17-latin-regular.woff2 new file mode 100644 index 000000000..d31eba84e Binary files /dev/null and b/odoc.support/fonts/fira-sans-v17-latin-regular.woff2 differ diff --git a/odoc.support/fonts/noticia-text-v15-latin-700.woff2 b/odoc.support/fonts/noticia-text-v15-latin-700.woff2 new file mode 100644 index 000000000..536fbe1d0 Binary files /dev/null and b/odoc.support/fonts/noticia-text-v15-latin-700.woff2 differ diff --git a/odoc.support/fonts/noticia-text-v15-latin-italic.woff2 b/odoc.support/fonts/noticia-text-v15-latin-italic.woff2 new file mode 100644 index 000000000..9b83b0712 Binary files /dev/null and b/odoc.support/fonts/noticia-text-v15-latin-italic.woff2 differ diff --git a/odoc.support/fonts/noticia-text-v15-latin-regular.woff2 b/odoc.support/fonts/noticia-text-v15-latin-regular.woff2 new file mode 100644 index 000000000..efff29f9d Binary files /dev/null and b/odoc.support/fonts/noticia-text-v15-latin-regular.woff2 differ diff --git a/odoc.support/highlight.pack.js b/odoc.support/highlight.pack.js new file mode 100644 index 000000000..7d1bcd04e --- /dev/null +++ b/odoc.support/highlight.pack.js @@ -0,0 +1,634 @@ +/*! + Highlight.js v11.7.0 (git: 82688fad18) + (c) 2006-2022 undefined and other contributors + License: BSD-3-Clause + */ +var hljs=function(){"use strict";var e={exports:{}};function t(e){ +return e instanceof Map?e.clear=e.delete=e.set=()=>{ +throw Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=()=>{ +throw Error("set is read-only") +}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((n=>{var i=e[n] +;"object"!=typeof i||Object.isFrozen(i)||t(i)})),e} +e.exports=t,e.exports.default=t;class n{constructor(e){ +void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1} +ignoreMatch(){this.isMatchIgnored=!0}}function i(e){ +return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'") +}function r(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t] +;return t.forEach((e=>{for(const t in e)n[t]=e[t]})),n} +const s=e=>!!e.scope||e.sublanguage&&e.language;class o{constructor(e,t){ +this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){ +this.buffer+=i(e)}openNode(e){if(!s(e))return;let t="" +;t=e.sublanguage?"language-"+e.language:((e,{prefix:t})=>{if(e.includes(".")){ +const n=e.split(".") +;return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ") +}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)} +closeNode(e){s(e)&&(this.buffer+="")}value(){return this.buffer}span(e){ +this.buffer+=``}}const a=(e={})=>{const t={children:[]} +;return Object.assign(t,e),t};class c{constructor(){ +this.rootNode=a(),this.stack=[this.rootNode]}get top(){ +return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){ +this.top.children.push(e)}openNode(e){const t=a({scope:e}) +;this.add(t),this.stack.push(t)}closeNode(){ +if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){ +for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)} +walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){ +return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t), +t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){ +"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{ +c._collapse(e)})))}}class l extends c{constructor(e){super(),this.options=e} +addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())} +addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root +;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){ +return new o(this,this.options).value()}finalize(){return!0}}function g(e){ +return e?"string"==typeof e?e:e.source:null}function d(e){return p("(?=",e,")")} +function u(e){return p("(?:",e,")*")}function h(e){return p("(?:",e,")?")} +function p(...e){return e.map((e=>g(e))).join("")}function f(...e){const t=(e=>{ +const t=e[e.length-1] +;return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{} +})(e);return"("+(t.capture?"":"?:")+e.map((e=>g(e))).join("|")+")"} +function b(e){return RegExp(e.toString()+"|").exec("").length-1} +const m=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./ +;function E(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n +;let i=g(e),r="";for(;i.length>0;){const e=m.exec(i);if(!e){r+=i;break} +r+=i.substring(0,e.index), +i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+(Number(e[1])+t):(r+=e[0], +"("===e[0]&&n++)}return r})).map((e=>`(${e})`)).join(t)} +const x="[a-zA-Z]\\w*",w="[a-zA-Z_]\\w*",y="\\b\\d+(\\.\\d+)?",_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",O="\\b(0b[01]+)",v={ +begin:"\\\\[\\s\\S]",relevance:0},N={scope:"string",begin:"'",end:"'", +illegal:"\\n",contains:[v]},k={scope:"string",begin:'"',end:'"',illegal:"\\n", +contains:[v]},M=(e,t,n={})=>{const i=r({scope:"comment",begin:e,end:t, +contains:[]},n);i.contains.push({scope:"doctag", +begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)", +end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0}) +;const s=f("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/) +;return i.contains.push({begin:p(/[ ]+/,"(",s,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i +},S=M("//","$"),R=M("/\\*","\\*/"),j=M("#","$");var A=Object.freeze({ +__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:x,UNDERSCORE_IDENT_RE:w, +NUMBER_RE:y,C_NUMBER_RE:_,BINARY_NUMBER_RE:O, +RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", +SHEBANG:(e={})=>{const t=/^#![ ]*\// +;return e.binary&&(e.begin=p(t,/.*\b/,e.binary,/\b.*/)),r({scope:"meta",begin:t, +end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)}, +BACKSLASH_ESCAPE:v,APOS_STRING_MODE:N,QUOTE_STRING_MODE:k,PHRASAL_WORDS_MODE:{ +begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ +},COMMENT:M,C_LINE_COMMENT_MODE:S,C_BLOCK_COMMENT_MODE:R,HASH_COMMENT_MODE:j, +NUMBER_MODE:{scope:"number",begin:y,relevance:0},C_NUMBER_MODE:{scope:"number", +begin:_,relevance:0},BINARY_NUMBER_MODE:{scope:"number",begin:O,relevance:0}, +REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//, +end:/\/[gimuy]*/,illegal:/\n/,contains:[v,{begin:/\[/,end:/\]/,relevance:0, +contains:[v]}]}]},TITLE_MODE:{scope:"title",begin:x,relevance:0}, +UNDERSCORE_TITLE_MODE:{scope:"title",begin:w,relevance:0},METHOD_GUARD:{ +begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:e=>Object.assign(e,{ +"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{ +t.data._beginMatch!==e[1]&&t.ignoreMatch()}})});function I(e,t){ +"."===e.input[e.index-1]&&t.ignoreMatch()}function T(e,t){ +void 0!==e.className&&(e.scope=e.className,delete e.className)}function L(e,t){ +t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)", +e.__beforeBegin=I,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords, +void 0===e.relevance&&(e.relevance=0))}function B(e,t){ +Array.isArray(e.illegal)&&(e.illegal=f(...e.illegal))}function D(e,t){ +if(e.match){ +if(e.begin||e.end)throw Error("begin & end are not supported with match") +;e.begin=e.match,delete e.match}}function H(e,t){ +void 0===e.relevance&&(e.relevance=1)}const P=(e,t)=>{if(!e.beforeMatch)return +;if(e.starts)throw Error("beforeMatch cannot be used with starts") +;const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t] +})),e.keywords=n.keywords,e.begin=p(n.beforeMatch,d(n.begin)),e.starts={ +relevance:0,contains:[Object.assign(n,{endsParent:!0})] +},e.relevance=0,delete n.beforeMatch +},C=["of","and","for","in","not","or","if","then","parent","list","value"] +;function $(e,t,n="keyword"){const i=Object.create(null) +;return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach((n=>{ +Object.assign(i,$(e[n],t,n))})),i;function r(e,n){ +t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((t=>{const n=t.split("|") +;i[n[0]]=[e,U(n[0],n[1])]}))}}function U(e,t){ +return t?Number(t):(e=>C.includes(e.toLowerCase()))(e)?0:1}const z={},K=e=>{ +console.error(e)},W=(e,...t)=>{console.log("WARN: "+e,...t)},X=(e,t)=>{ +z[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),z[`${e}/${t}`]=!0) +},G=Error();function Z(e,t,{key:n}){let i=0;const r=e[n],s={},o={} +;for(let e=1;e<=t.length;e++)o[e+i]=r[e],s[e+i]=!0,i+=b(t[e-1]) +;e[n]=o,e[n]._emit=s,e[n]._multi=!0}function F(e){(e=>{ +e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope, +delete e.scope)})(e),"string"==typeof e.beginScope&&(e.beginScope={ +_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope +}),(e=>{if(Array.isArray(e.begin)){ +if(e.skip||e.excludeBegin||e.returnBegin)throw K("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), +G +;if("object"!=typeof e.beginScope||null===e.beginScope)throw K("beginScope must be object"), +G;Z(e,e.begin,{key:"beginScope"}),e.begin=E(e.begin,{joinWith:""})}})(e),(e=>{ +if(Array.isArray(e.end)){ +if(e.skip||e.excludeEnd||e.returnEnd)throw K("skip, excludeEnd, returnEnd not compatible with endScope: {}"), +G +;if("object"!=typeof e.endScope||null===e.endScope)throw K("endScope must be object"), +G;Z(e,e.end,{key:"endScope"}),e.end=E(e.end,{joinWith:""})}})(e)}function V(e){ +function t(t,n){ +return RegExp(g(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":"")) +}class n{constructor(){ +this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0} +addRule(e,t){ +t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]), +this.matchAt+=b(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null) +;const e=this.regexes.map((e=>e[1]));this.matcherRe=t(E(e,{joinWith:"|" +}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex +;const t=this.matcherRe.exec(e);if(!t)return null +;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),i=this.matchIndexes[n] +;return t.splice(0,n),Object.assign(t,i)}}class i{constructor(){ +this.rules=[],this.multiRegexes=[], +this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){ +if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n +;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))), +t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){ +return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){ +this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){ +const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex +;let n=t.exec(e) +;if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{ +const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)} +return n&&(this.regexIndex+=n.position+1, +this.regexIndex===this.count&&this.considerAll()),n}} +if(e.compilerExtensions||(e.compilerExtensions=[]), +e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.") +;return e.classNameAliases=r(e.classNameAliases||{}),function n(s,o){const a=s +;if(s.isCompiled)return a +;[T,D,F,P].forEach((e=>e(s,o))),e.compilerExtensions.forEach((e=>e(s,o))), +s.__beforeBegin=null,[L,B,H].forEach((e=>e(s,o))),s.isCompiled=!0;let c=null +;return"object"==typeof s.keywords&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords), +c=s.keywords.$pattern, +delete s.keywords.$pattern),c=c||/\w+/,s.keywords&&(s.keywords=$(s.keywords,e.case_insensitive)), +a.keywordPatternRe=t(c,!0), +o&&(s.begin||(s.begin=/\B|\b/),a.beginRe=t(a.begin),s.end||s.endsWithParent||(s.end=/\B|\b/), +s.end&&(a.endRe=t(a.end)), +a.terminatorEnd=g(a.end)||"",s.endsWithParent&&o.terminatorEnd&&(a.terminatorEnd+=(s.end?"|":"")+o.terminatorEnd)), +s.illegal&&(a.illegalRe=t(s.illegal)), +s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((t=>r(e,{ +variants:null},t)))),e.cachedVariants?e.cachedVariants:q(e)?r(e,{ +starts:e.starts?r(e.starts):null +}):Object.isFrozen(e)?r(e):e))("self"===e?s:e)))),s.contains.forEach((e=>{n(e,a) +})),s.starts&&n(s.starts,o),a.matcher=(e=>{const t=new i +;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin" +}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end" +}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t})(a),a}(e)}function q(e){ +return!!e&&(e.endsWithParent||q(e.starts))}class J extends Error{ +constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}} +const Y=i,Q=r,ee=Symbol("nomatch");var te=(t=>{ +const i=Object.create(null),r=Object.create(null),s=[];let o=!0 +;const a="Could not find the language '{}', did you forget to load/include a language module?",c={ +disableAutodetect:!0,name:"Plain text",contains:[]};let g={ +ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i, +languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-", +cssSelector:"pre code",languages:null,__emitter:l};function b(e){ +return g.noHighlightRe.test(e)}function m(e,t,n){let i="",r="" +;"object"==typeof t?(i=e, +n=t.ignoreIllegals,r=t.language):(X("10.7.0","highlight(lang, code, ...args) has been deprecated."), +X("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), +r=e,i=t),void 0===n&&(n=!0);const s={code:i,language:r};k("before:highlight",s) +;const o=s.result?s.result:E(s.language,s.code,n) +;return o.code=s.code,k("after:highlight",o),o}function E(e,t,r,s){ +const c=Object.create(null);function l(){if(!N.keywords)return void M.addText(S) +;let e=0;N.keywordPatternRe.lastIndex=0;let t=N.keywordPatternRe.exec(S),n="" +;for(;t;){n+=S.substring(e,t.index) +;const r=y.case_insensitive?t[0].toLowerCase():t[0],s=(i=r,N.keywords[i]);if(s){ +const[e,i]=s +;if(M.addText(n),n="",c[r]=(c[r]||0)+1,c[r]<=7&&(R+=i),e.startsWith("_"))n+=t[0];else{ +const n=y.classNameAliases[e]||e;M.addKeyword(t[0],n)}}else n+=t[0] +;e=N.keywordPatternRe.lastIndex,t=N.keywordPatternRe.exec(S)}var i +;n+=S.substring(e),M.addText(n)}function d(){null!=N.subLanguage?(()=>{ +if(""===S)return;let e=null;if("string"==typeof N.subLanguage){ +if(!i[N.subLanguage])return void M.addText(S) +;e=E(N.subLanguage,S,!0,k[N.subLanguage]),k[N.subLanguage]=e._top +}else e=x(S,N.subLanguage.length?N.subLanguage:null) +;N.relevance>0&&(R+=e.relevance),M.addSublanguage(e._emitter,e.language) +})():l(),S=""}function u(e,t){let n=1;const i=t.length-1;for(;n<=i;){ +if(!e._emit[n]){n++;continue}const i=y.classNameAliases[e[n]]||e[n],r=t[n] +;i?M.addKeyword(r,i):(S=r,l(),S=""),n++}}function h(e,t){ +return e.scope&&"string"==typeof e.scope&&M.openNode(y.classNameAliases[e.scope]||e.scope), +e.beginScope&&(e.beginScope._wrap?(M.addKeyword(S,y.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap), +S=""):e.beginScope._multi&&(u(e.beginScope,t),S="")),N=Object.create(e,{parent:{ +value:N}}),N}function p(e,t,i){let r=((e,t)=>{const n=e&&e.exec(t) +;return n&&0===n.index})(e.endRe,i);if(r){if(e["on:end"]){const i=new n(e) +;e["on:end"](t,i),i.isMatchIgnored&&(r=!1)}if(r){ +for(;e.endsParent&&e.parent;)e=e.parent;return e}} +if(e.endsWithParent)return p(e.parent,t,i)}function f(e){ +return 0===N.matcher.regexIndex?(S+=e[0],1):(I=!0,0)}function b(e){ +const n=e[0],i=t.substring(e.index),r=p(N,e,i);if(!r)return ee;const s=N +;N.endScope&&N.endScope._wrap?(d(), +M.addKeyword(n,N.endScope._wrap)):N.endScope&&N.endScope._multi?(d(), +u(N.endScope,e)):s.skip?S+=n:(s.returnEnd||s.excludeEnd||(S+=n), +d(),s.excludeEnd&&(S=n));do{ +N.scope&&M.closeNode(),N.skip||N.subLanguage||(R+=N.relevance),N=N.parent +}while(N!==r.parent);return r.starts&&h(r.starts,e),s.returnEnd?0:n.length} +let m={};function w(i,s){const a=s&&s[0];if(S+=i,null==a)return d(),0 +;if("begin"===m.type&&"end"===s.type&&m.index===s.index&&""===a){ +if(S+=t.slice(s.index,s.index+1),!o){const t=Error(`0 width match regex (${e})`) +;throw t.languageName=e,t.badRule=m.rule,t}return 1} +if(m=s,"begin"===s.type)return(e=>{ +const t=e[0],i=e.rule,r=new n(i),s=[i.__beforeBegin,i["on:begin"]] +;for(const n of s)if(n&&(n(e,r),r.isMatchIgnored))return f(t) +;return i.skip?S+=t:(i.excludeBegin&&(S+=t), +d(),i.returnBegin||i.excludeBegin||(S=t)),h(i,e),i.returnBegin?0:t.length})(s) +;if("illegal"===s.type&&!r){ +const e=Error('Illegal lexeme "'+a+'" for mode "'+(N.scope||"")+'"') +;throw e.mode=N,e}if("end"===s.type){const e=b(s);if(e!==ee)return e} +if("illegal"===s.type&&""===a)return 1 +;if(A>1e5&&A>3*s.index)throw Error("potential infinite loop, way more iterations than matches") +;return S+=a,a.length}const y=O(e) +;if(!y)throw K(a.replace("{}",e)),Error('Unknown language: "'+e+'"') +;const _=V(y);let v="",N=s||_;const k={},M=new g.__emitter(g);(()=>{const e=[] +;for(let t=N;t!==y;t=t.parent)t.scope&&e.unshift(t.scope) +;e.forEach((e=>M.openNode(e)))})();let S="",R=0,j=0,A=0,I=!1;try{ +for(N.matcher.considerAll();;){ +A++,I?I=!1:N.matcher.considerAll(),N.matcher.lastIndex=j +;const e=N.matcher.exec(t);if(!e)break;const n=w(t.substring(j,e.index),e) +;j=e.index+n} +return w(t.substring(j)),M.closeAllNodes(),M.finalize(),v=M.toHTML(),{ +language:e,value:v,relevance:R,illegal:!1,_emitter:M,_top:N}}catch(n){ +if(n.message&&n.message.includes("Illegal"))return{language:e,value:Y(t), +illegal:!0,relevance:0,_illegalBy:{message:n.message,index:j, +context:t.slice(j-100,j+100),mode:n.mode,resultSoFar:v},_emitter:M};if(o)return{ +language:e,value:Y(t),illegal:!1,relevance:0,errorRaised:n,_emitter:M,_top:N} +;throw n}}function x(e,t){t=t||g.languages||Object.keys(i);const n=(e=>{ +const t={value:Y(e),illegal:!1,relevance:0,_top:c,_emitter:new g.__emitter(g)} +;return t._emitter.addText(e),t})(e),r=t.filter(O).filter(N).map((t=>E(t,e,!1))) +;r.unshift(n);const s=r.sort(((e,t)=>{ +if(e.relevance!==t.relevance)return t.relevance-e.relevance +;if(e.language&&t.language){if(O(e.language).supersetOf===t.language)return 1 +;if(O(t.language).supersetOf===e.language)return-1}return 0})),[o,a]=s,l=o +;return l.secondBest=a,l}function w(e){let t=null;const n=(e=>{ +let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"" +;const n=g.languageDetectRe.exec(t);if(n){const t=O(n[1]) +;return t||(W(a.replace("{}",n[1])), +W("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"} +return t.split(/\s+/).find((e=>b(e)||O(e)))})(e);if(b(n))return +;if(k("before:highlightElement",{el:e,language:n +}),e.children.length>0&&(g.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), +console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), +console.warn("The element with unescaped HTML:"), +console.warn(e)),g.throwUnescapedHTML))throw new J("One of your code blocks includes unescaped HTML.",e.innerHTML) +;t=e;const i=t.textContent,s=n?m(i,{language:n,ignoreIllegals:!0}):x(i) +;e.innerHTML=s.value,((e,t,n)=>{const i=t&&r[t]||n +;e.classList.add("hljs"),e.classList.add("language-"+i) +})(e,n,s.language),e.result={language:s.language,re:s.relevance, +relevance:s.relevance},s.secondBest&&(e.secondBest={ +language:s.secondBest.language,relevance:s.secondBest.relevance +}),k("after:highlightElement",{el:e,result:s,text:i})}let y=!1;function _(){ +"loading"!==document.readyState?document.querySelectorAll(g.cssSelector).forEach(w):y=!0 +}function O(e){return e=(e||"").toLowerCase(),i[e]||i[r[e]]} +function v(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{ +r[e.toLowerCase()]=t}))}function N(e){const t=O(e) +;return t&&!t.disableAutodetect}function k(e,t){const n=e;s.forEach((e=>{ +e[n]&&e[n](t)}))} +"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(()=>{ +y&&_()}),!1),Object.assign(t,{highlight:m,highlightAuto:x,highlightAll:_, +highlightElement:w, +highlightBlock:e=>(X("10.7.0","highlightBlock will be removed entirely in v12.0"), +X("10.7.0","Please use highlightElement now."),w(e)),configure:e=>{g=Q(g,e)}, +initHighlighting:()=>{ +_(),X("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")}, +initHighlightingOnLoad:()=>{ +_(),X("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.") +},registerLanguage:(e,n)=>{let r=null;try{r=n(t)}catch(t){ +if(K("Language definition for '{}' could not be registered.".replace("{}",e)), +!o)throw t;K(t),r=c} +r.name||(r.name=e),i[e]=r,r.rawDefinition=n.bind(null,t),r.aliases&&v(r.aliases,{ +languageName:e})},unregisterLanguage:e=>{delete i[e] +;for(const t of Object.keys(r))r[t]===e&&delete r[t]}, +listLanguages:()=>Object.keys(i),getLanguage:O,registerAliases:v, +autoDetection:N,inherit:Q,addPlugin:e=>{(e=>{ +e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{ +e["before:highlightBlock"](Object.assign({block:t.el},t)) +}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{ +e["after:highlightBlock"](Object.assign({block:t.el},t))})})(e),s.push(e)} +}),t.debugMode=()=>{o=!1},t.safeMode=()=>{o=!0 +},t.versionString="11.7.0",t.regex={concat:p,lookahead:d,either:f,optional:h, +anyNumberOfTimes:u};for(const t in A)"object"==typeof A[t]&&e.exports(A[t]) +;return Object.assign(t,A),t})({});return te}() +;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);/*! `reasonml` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{ +const n="~?[a-z$_][0-9a-zA-Z$_]*",a="`?[A-Z$_][0-9a-zA-Z$_]*",s="("+["||","++","**","+.","*","/","*.","/.","..."].map((e=>e.split("").map((e=>"\\"+e)).join(""))).join("|")+"|\\|>|&&|==|===)",i="\\s+"+s+"\\s+",r={ +keyword:"and as asr assert begin class constraint do done downto else end exception external for fun function functor if in include inherit initializer land lazy let lor lsl lsr lxor match method mod module mutable new nonrec object of open or private rec sig struct then to try type val virtual when while with", +built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 ref string unit ", +literal:"true false" +},l="\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",t={ +className:"number",relevance:0,variants:[{begin:l},{begin:"\\(-"+l+"\\)"}]},c={ +className:"operator",relevance:0,begin:s},o=[{className:"identifier", +relevance:0,begin:n},c,t],g=[e.QUOTE_STRING_MODE,c,{className:"module", +begin:"\\b"+a,returnBegin:!0,relevance:0,end:".",contains:[{ +className:"identifier",begin:a,relevance:0}]}],b=[{className:"module", +begin:"\\b"+a,returnBegin:!0,end:".",relevance:0,contains:[{ +className:"identifier",begin:a,relevance:0}]}],m={className:"function", +relevance:0,keywords:r,variants:[{begin:"\\s(\\(\\.?.*?\\)|"+n+")\\s*=>", +end:"\\s*=>",returnBegin:!0,relevance:0,contains:[{className:"params", +variants:[{begin:n},{ +begin:"~?[a-z$_][0-9a-zA-Z$_]*(\\s*:\\s*[a-z$_][0-9a-z$_]*(\\(\\s*('?[a-z$_][0-9a-z$_]*\\s*(,'?[a-z$_][0-9a-z$_]*\\s*)*)?\\))?){0,2}" +},{begin:/\(\s*\)/}]}]},{begin:"\\s\\(\\.?[^;\\|]*\\)\\s*=>",end:"\\s=>", +returnBegin:!0,relevance:0,contains:[{className:"params",relevance:0,variants:[{ +begin:n,end:"(,|\\n|\\))",relevance:0,contains:[c,{className:"typing",begin:":", +end:"(,|\\n)",returnBegin:!0,relevance:0,contains:b}]}]}]},{ +begin:"\\(\\.\\s"+n+"\\)\\s*=>"}]};g.push(m);const d={className:"constructor", +begin:a+"\\(",end:"\\)",illegal:"\\n",keywords:r, +contains:[e.QUOTE_STRING_MODE,c,{className:"params",begin:"\\b"+n}]},u={ +className:"pattern-match",begin:"\\|",returnBegin:!0,keywords:r,end:"=>", +relevance:0,contains:[d,c,{relevance:0,className:"constructor",begin:a}]},v={ +className:"module-access",keywords:r,returnBegin:!0,variants:[{ +begin:"\\b("+a+"\\.)+"+n},{begin:"\\b("+a+"\\.)+\\(",end:"\\)",returnBegin:!0, +contains:[m,{begin:"\\(",end:"\\)",relevance:0,skip:!0}].concat(g)},{ +begin:"\\b("+a+"\\.)+\\{",end:/\}/}],contains:g};return b.push(v),{ +name:"ReasonML",aliases:["re"],keywords:r,illegal:"(:-|:=|\\$\\{|\\+=)", +contains:[e.COMMENT("/\\*","\\*/",{illegal:"^(#,\\/\\/)"}),{ +className:"character",begin:"'(\\\\[^']+|[^'])'",illegal:"\\n",relevance:0 +},e.QUOTE_STRING_MODE,{className:"literal",begin:"\\(\\)",relevance:0},{ +className:"literal",begin:"\\[\\|",end:"\\|\\]",relevance:0,contains:o},{ +className:"literal",begin:"\\[",end:"\\]",relevance:0,contains:o},d,{ +className:"operator",begin:i,illegal:"--\x3e",relevance:0 +},t,e.C_LINE_COMMENT_MODE,u,m,{className:"module-def", +begin:"\\bmodule\\s+"+n+"\\s+"+a+"\\s+=\\s+\\{",end:/\}/,returnBegin:!0, +keywords:r,relevance:0,contains:[{className:"module",relevance:0,begin:a},{ +begin:/\{/,end:/\}/,relevance:0,skip:!0}].concat(g)},v]}}})() +;hljs.registerLanguage("reasonml",e)})();/*! `javascript` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict" +;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],t=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],r=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","module","global"],i=[].concat(r,t,s) +;return o=>{const l=o.regex,b=e,d={begin:/<[A-Za-z0-9\\._:-]+/, +end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{ +const a=e[0].length+e.index,t=e.input[a] +;if("<"===t||","===t)return void n.ignoreMatch();let s +;">"===t&&(((e,{after:n})=>{const a="",M={ +match:[/const|var|let/,/\s+/,b,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(C)], +keywords:"async",className:{1:"keyword",3:"title.function"},contains:[S]} +;return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:g,exports:{ +PARAMS_CONTAINS:p,CLASS_REFERENCE:R},illegal:/#(?![$_A-z])/, +contains:[o.SHEBANG({label:"shebang",binary:"node",relevance:5}),{ +label:"use_strict",className:"meta",relevance:10, +begin:/^\s*['"]use (strict|asm)['"]/ +},o.APOS_STRING_MODE,o.QUOTE_STRING_MODE,y,N,_,h,{match:/\$\d+/},E,R,{ +className:"attr",begin:b+l.lookahead(":"),relevance:0},M,{ +begin:"("+o.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*", +keywords:"return throw case",relevance:0,contains:[h,o.REGEXP_MODE,{ +className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{ +className:"params",variants:[{begin:o.UNDERSCORE_IDENT_RE,relevance:0},{ +className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0, +excludeEnd:!0,keywords:g,contains:p}]}]},{begin:/,/,relevance:0},{match:/\s+/, +relevance:0},{variants:[{begin:"<>",end:""},{ +match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:d.begin, +"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{ +begin:d.begin,end:d.end,skip:!0,contains:["self"]}]}]},O,{ +beginKeywords:"while if switch catch for"},{ +begin:"\\b(?!function)"+o.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", +returnBegin:!0,label:"func.def",contains:[S,o.inherit(o.TITLE_MODE,{begin:b, +className:"title.function"})]},{match:/\.\.\./,relevance:0},x,{match:"\\$"+b, +relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"}, +contains:[S]},k,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/, +className:"variable.constant"},w,T,{match:/\$[(.]/}]}}})() +;hljs.registerLanguage("javascript",e)})();/*! `sql` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{ +const r=e.regex,t=e.COMMENT("--","$"),n=["true","false","unknown"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],i=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],s=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],o=i,c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!i.includes(e))),l={ +begin:r.concat(/\b/,r.either(...o),/\s*\(/),relevance:0,keywords:{built_in:o}} +;return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{ +$pattern:/\b[\w\.]+/,keyword:((e,{exceptions:r,when:t}={})=>{const n=t +;return r=r||[],e.map((e=>e.match(/\|\d+$/)||r.includes(e)?e:n(e)?e+"|0":e)) +})(c,{when:e=>e.length<3}),literal:n,type:a, +built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"] +},contains:[{begin:r.either(...s),relevance:0,keywords:{$pattern:/[\w\.]+/, +keyword:c.concat(s),literal:n,type:a}},{className:"type", +begin:r.either("double precision","large object","with timezone","without timezone") +},l,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{ +begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{ +begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,{className:"operator", +begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}}})() +;hljs.registerLanguage("sql",e)})();/*! `bash` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const s=e.regex,t={},n={begin:/\$\{/, +end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]};Object.assign(t,{ +className:"variable",variants:[{ +begin:s.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},n]});const a={ +className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i={ +begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/, +end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/, +contains:[e.BACKSLASH_ESCAPE,t,a]};a.contains.push(c);const o={begin:/\$?\(\(/, +end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,t] +},r=e.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10 +}),l={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0, +contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{ +name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/, +keyword:["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"], +literal:["true","false"], +built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"] +},contains:[r,e.SHEBANG(),l,o,e.HASH_COMMENT_MODE,i,{match:/(\/[a-z._-]+)+/},c,{ +className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},t]}}})() +;hljs.registerLanguage("bash",e)})();/*! `shell` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var s=(()=>{"use strict";return s=>({name:"Shell Session", +aliases:["console","shellsession"],contains:[{className:"meta.prompt", +begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/, +subLanguage:"bash"}}]})})();hljs.registerLanguage("shell",s)})();/*! `plaintext` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var t=(()=>{"use strict";return t=>({name:"Plain text", +aliases:["text","txt"],disableAutodetect:!0})})() +;hljs.registerLanguage("plaintext",t)})();/*! `graphql` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const a=e.regex;return{name:"GraphQL", +aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{ +keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"], +literal:["true","false","null"]}, +contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{ +scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation", +begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/, +end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{ +scope:"symbol",begin:a.concat(/[_A-Za-z][_0-9A-Za-z]*/,a.lookahead(/\s*:/)), +relevance:0}],illegal:[/[;<']/,/BEGIN/]}}})();hljs.registerLanguage("graphql",e) +})();/*! `ocaml` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>({name:"OCaml",aliases:["ml"], +keywords:{$pattern:"[a-z_]\\w*!?", +keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value", +built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref", +literal:"true false"},illegal:/\/\/|>>/,contains:[{className:"literal", +begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},e.COMMENT("\\(\\*","\\*\\)",{ +contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{ +className:"type",begin:"`[A-Z][\\w']*"},{className:"type", +begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0 +},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0 +}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number", +begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)", +relevance:0},{begin:/->/}]})})();hljs.registerLanguage("ocaml",e)})();/*! `json` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const a=["true","false","null"],n={ +scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",keywords:{ +literal:a},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/, +relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0 +},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE], +illegal:"\\S"}}})();hljs.registerLanguage("json",e)})();/*! `python` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{ +const n=e.regex,a=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],s={ +$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i, +built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"], +literal:["__debug__","Ellipsis","False","None","NotImplemented","True"], +type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"] +},t={className:"meta",begin:/^(>>>|\.\.\.) /},r={className:"subst",begin:/\{/, +end:/\}/,keywords:s,illegal:/#/},l={begin:/\{\{/,relevance:0},b={ +className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{ +begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/, +contains:[e.BACKSLASH_ESCAPE,t],relevance:10},{ +begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/, +contains:[e.BACKSLASH_ESCAPE,t],relevance:10},{ +begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/, +contains:[e.BACKSLASH_ESCAPE,t,l,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/, +end:/"""/,contains:[e.BACKSLASH_ESCAPE,t,l,r]},{begin:/([uU]|[rR])'/,end:/'/, +relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{ +begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/, +end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/, +contains:[e.BACKSLASH_ESCAPE,l,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/, +contains:[e.BACKSLASH_ESCAPE,l,r]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] +},o="[0-9](_?[0-9])*",c=`(\\b(${o}))?\\.(${o})|\\b(${o})\\.`,d="\\b|"+i.join("|"),g={ +className:"number",relevance:0,variants:[{ +begin:`(\\b(${o})|(${c}))[eE][+-]?(${o})[jJ]?(?=${d})`},{begin:`(${c})[jJ]?`},{ +begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{ +begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})` +},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${o})[jJ](?=${d})` +}]},p={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:s, +contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={ +className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/, +end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s, +contains:["self",t,g,b,e.HASH_COMMENT_MODE]}]};return r.contains=[b,g,t],{ +name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:s, +illegal:/(<\/|->|\?)|=>/,contains:[t,g,{begin:/\bself\b/},{beginKeywords:"if", +relevance:0},b,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,a],scope:{ +1:"keyword",3:"title.function"},contains:[m]},{variants:[{ +match:[/\bclass/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/\bclass/,/\s+/,a]}], +scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{ +className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,m,b]}]}}})() +;hljs.registerLanguage("python",e)})();/*! `xml` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{ +const a=e.regex,n=a.concat(/[\p{L}_]/u,a.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s={ +className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},t={begin:/\s/, +contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}] +},i=e.inherit(t,{begin:/\(/,end:/\)/}),c=e.inherit(e.APOS_STRING_MODE,{ +className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),r={ +endsWithParent:!0,illegal:/`]+/}]}]}]};return{ +name:"HTML, XML", +aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"], +case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[t,l,c,i,{begin:/\[/,end:/\]/,contains:[{ +className:"meta",begin://,contains:[t,i,l,c]}]}] +},e.COMMENT(//,{relevance:10}),{begin://, +relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/, +relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag", +begin:/)/,end:/>/,keywords:{name:"style"},contains:[r],starts:{ +end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag", +begin:/)/,end:/>/,keywords:{name:"script"},contains:[r],starts:{ +end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{ +className:"tag",begin:/<>|<\/>/},{className:"tag", +begin:a.concat(//,/>/,/\s/)))), +end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:r}]},{ +className:"tag",begin:a.concat(/<\//,a.lookahead(a.concat(n,/>/))),contains:[{ +className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}} +})();hljs.registerLanguage("xml",e)})();/*! `markdown` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const n={begin:/<\/?[A-Za-z_]/, +end:">",subLanguage:"xml",relevance:0},a={variants:[{begin:/\[.+?\]\[.*?\]/, +relevance:0},{ +begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/, +relevance:2},{ +begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/), +relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{ +begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/ +},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0, +returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)", +excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[", +end:"\\]",excludeBegin:!0,excludeEnd:!0}]},i={className:"strong",contains:[], +variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}] +},s={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{ +begin:/_(?![_\s])/,end:/_/,relevance:0}]},c=e.inherit(i,{contains:[] +}),t=e.inherit(s,{contains:[]});i.contains.push(t),s.contains.push(c) +;let g=[n,a];return[i,s,c,t].forEach((e=>{e.contains=e.contains.concat(g) +})),g=g.concat(i,s),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{ +className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:g},{ +begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n", +contains:g}]}]},n,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)", +end:"\\s+",excludeEnd:!0},i,s,{className:"quote",begin:"^>\\s+",contains:g, +end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{ +begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{ +begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))", +contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{ +begin:"^[-\\*]{3,}",end:"$"},a,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{ +className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{ +className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}})() +;hljs.registerLanguage("markdown",e)})();/*! `c` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const n=e.regex,t=e.COMMENT("//","$",{ +contains:[{begin:/\\\n/}] +}),s="[a-zA-Z_]\\w*::",a="(decltype\\(auto\\)|"+n.optional(s)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",r={ +className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{ +match:/\batomic_[a-z]{3,6}\b/}]},i={className:"string",variants:[{ +begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{ +begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", +end:"'",illegal:"."},e.END_SAME_AS_BEGIN({ +begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={ +className:"number",variants:[{begin:"\\b(0b[01']+)"},{ +begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" +},{ +begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" +}],relevance:0},o={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ +keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" +},contains:[{begin:/\\\n/,relevance:0},e.inherit(i,{className:"string"}),{ +className:"string",begin:/<.*?>/},t,e.C_BLOCK_COMMENT_MODE]},c={ +className:"title",begin:n.optional(s)+e.IDENT_RE,relevance:0 +},d=n.optional(s)+e.IDENT_RE+"\\s*\\(",u={ +keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"], +type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"], +literal:"true false NULL", +built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr" +},g=[o,r,t,e.C_BLOCK_COMMENT_MODE,l,i],m={variants:[{begin:/=/,end:/;/},{ +begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}], +keywords:u,contains:g.concat([{begin:/\(/,end:/\)/,keywords:u, +contains:g.concat(["self"]),relevance:0}]),relevance:0},p={ +begin:"("+a+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0, +keywords:u,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)", +keywords:u,relevance:0},{begin:d,returnBegin:!0,contains:[e.inherit(c,{ +className:"title.function"})],relevance:0},{relevance:0,match:/,/},{ +className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0, +contains:[t,e.C_BLOCK_COMMENT_MODE,i,l,r,{begin:/\(/,end:/\)/,keywords:u, +relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,i,l,r]}] +},r,t,e.C_BLOCK_COMMENT_MODE,o]};return{name:"C",aliases:["h"],keywords:u, +disableAutodetect:!0,illegal:"=]/,contains:[{ +beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:o, +strings:i,keywords:u}}}})();hljs.registerLanguage("c",e)})(); diff --git a/odoc.support/katex.min.css b/odoc.support/katex.min.css new file mode 100644 index 000000000..5f1f85765 --- /dev/null +++ b/odoc.support/katex.min.css @@ -0,0 +1 @@ +@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2")}.katex{text-rendering:auto;font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.15.2"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo} diff --git a/odoc.support/katex.min.js b/odoc.support/katex.min.js new file mode 100644 index 000000000..e4d78f243 --- /dev/null +++ b/odoc.support/katex.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return Zn}});var r=function e(t,r){this.position=void 0;var n,a="KaTeX parse error: "+t,i=r&&r.loc;if(i&&i.start<=i.end){var o=i.lexer.input;n=i.start;var s=i.end;n===o.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var l=o.slice(n,s).replace(/[^]/g,"$&\u0332");a+=(n>15?"\u2026"+o.slice(n-15,n):o.slice(0,n))+l+(s+15":">","<":"<",'"':""","'":"'"},o=/[&><"']/g;var s=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},l={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(o,(function(e){return i[e]}))},hyphenate:function(e){return e.replace(a,"-$1").toLowerCase()},getBaseElem:s,isCharacterBox:function(e){var t=s(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return null!=t?t[1]:"_relative"}},h={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:function(e){return"#"+e}},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:function(e,t){return t.push(e),t}},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:function(e){return Math.max(0,e)},cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:function(e){return Math.max(0,e)},cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:function(e){return Math.max(0,e)},cli:"-e, --max-expand ",cliProcessor:function(e){return"Infinity"===e?1/0:parseInt(e)}},globalGroup:{type:"boolean",cli:!1}};function m(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var c=function(){function e(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},h)if(h.hasOwnProperty(t)){var r=h[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:m(r)}}var t=e.prototype;return t.reportNonstrict=function(e,t,r){var a=this.strict;if("function"==typeof a&&(a=a(e,t,r)),a&&"ignore"!==a){if(!0===a||"error"===a)throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===a?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]")}},t.useStrictBehavior=function(e,t,r){var n=this.strict;if("function"==typeof n)try{n=n(e,t,r)}catch(e){n="error"}return!(!n||"ignore"===n)&&(!0===n||"error"===n||("warn"===n?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),!1)))},t.isTrusted=function(e){e.url&&!e.protocol&&(e.protocol=l.protocolFromUrl(e.url));var t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)},e}(),u=function(){function e(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}var t=e.prototype;return t.sup=function(){return p[d[this.id]]},t.sub=function(){return p[f[this.id]]},t.fracNum=function(){return p[g[this.id]]},t.fracDen=function(){return p[v[this.id]]},t.cramp=function(){return p[b[this.id]]},t.text=function(){return p[y[this.id]]},t.isTight=function(){return this.size>=2},e}(),p=[new u(0,0,!1),new u(1,0,!0),new u(2,1,!1),new u(3,1,!0),new u(4,2,!1),new u(5,2,!0),new u(6,3,!1),new u(7,3,!0)],d=[4,5,4,5,6,7,6,7],f=[5,5,5,5,7,7,7,7],g=[2,3,4,5,6,7,6,7],v=[3,3,5,5,7,7,7,7],b=[1,1,3,3,5,5,7,7],y=[0,1,2,3,2,3,2,3],x={DISPLAY:p[0],TEXT:p[2],SCRIPT:p[4],SCRIPTSCRIPT:p[6]},w=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var k=[];function S(e){for(var t=0;t=k[t]&&e<=k[t+1])return!0;return!1}w.forEach((function(e){return e.blocks.forEach((function(e){return k.push.apply(k,e)}))}));var M=80,z={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"},A=function(){function e(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){for(var e=document.createDocumentFragment(),t=0;t=5?0:e>=3?1:2]){var r=N[t]={cssEmPerMu:B.quad[t]/18};for(var n in B)B.hasOwnProperty(n)&&(r[n]=B[n][t])}return N[t]}(this.size)),this._fontMetrics},t.getColor=function(){return this.phantom?"transparent":this.color},e}();H.BASESIZE=6;var E=H,L={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},D={ex:!0,em:!0,mu:!0},P=function(e){return"string"!=typeof e&&(e=e.unit),e in L||e in D||"ex"===e},F=function(e,t){var r;if(e.unit in L)r=L[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var a;if(a=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=a.fontMetrics().xHeight;else{if("em"!==e.unit)throw new n("Invalid unit: '"+e.unit+"'");r=a.fontMetrics().quad}a!==t&&(r*=a.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},V=function(e){return+e.toFixed(4)+"em"},G=function(e){return e.filter((function(e){return e})).join(" ")},U=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},Y=function(e){var t=document.createElement(e);for(var r in t.className=G(this.classes),this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var a=0;a"},W=function(){function e(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,U.call(this,e,r,n),this.children=t||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){return Y.call(this,"span")},t.toMarkup=function(){return X.call(this,"span")},e}(),_=function(){function e(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,U.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){return Y.call(this,"a")},t.toMarkup=function(){return X.call(this,"a")},e}(),j=function(){function e(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e},t.toMarkup=function(){var e=""+this.alt+"=a[0]&&e<=a[1])return r.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=$[this.text])}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){var e=document.createTextNode(this.text),t=null;for(var r in this.italic>0&&((t=document.createElement("span")).style.marginRight=V(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=G(this.classes)),this.style)this.style.hasOwnProperty(r)&&((t=t||document.createElement("span")).style[r]=this.style[r]);return t?(t.appendChild(e),t):e},t.toMarkup=function(){var e=!1,t="0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(n)&&(r+=l.hyphenate(n)+":"+this.style[n]+";");r&&(e=!0,t+=' style="'+l.escape(r)+'"');var a=l.escape(this.text);return e?(t+=">",t+=a,t+=""):a},e}(),K=function(){function e(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r":""},e}(),Q=function(){function e(e){this.attributes=void 0,this.attributes=e||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e},t.toMarkup=function(){var e="","\\gt",!0),ie(oe,le,be,"\u2208","\\in",!0),ie(oe,le,be,"\ue020","\\@not"),ie(oe,le,be,"\u2282","\\subset",!0),ie(oe,le,be,"\u2283","\\supset",!0),ie(oe,le,be,"\u2286","\\subseteq",!0),ie(oe,le,be,"\u2287","\\supseteq",!0),ie(oe,he,be,"\u2288","\\nsubseteq",!0),ie(oe,he,be,"\u2289","\\nsupseteq",!0),ie(oe,le,be,"\u22a8","\\models"),ie(oe,le,be,"\u2190","\\leftarrow",!0),ie(oe,le,be,"\u2264","\\le"),ie(oe,le,be,"\u2264","\\leq",!0),ie(oe,le,be,"<","\\lt",!0),ie(oe,le,be,"\u2192","\\rightarrow",!0),ie(oe,le,be,"\u2192","\\to"),ie(oe,he,be,"\u2271","\\ngeq",!0),ie(oe,he,be,"\u2270","\\nleq",!0),ie(oe,le,ye,"\xa0","\\ "),ie(oe,le,ye,"\xa0","\\space"),ie(oe,le,ye,"\xa0","\\nobreakspace"),ie(se,le,ye,"\xa0","\\ "),ie(se,le,ye,"\xa0"," "),ie(se,le,ye,"\xa0","\\space"),ie(se,le,ye,"\xa0","\\nobreakspace"),ie(oe,le,ye,null,"\\nobreak"),ie(oe,le,ye,null,"\\allowbreak"),ie(oe,le,ve,",",","),ie(oe,le,ve,";",";"),ie(oe,he,ce,"\u22bc","\\barwedge",!0),ie(oe,he,ce,"\u22bb","\\veebar",!0),ie(oe,le,ce,"\u2299","\\odot",!0),ie(oe,le,ce,"\u2295","\\oplus",!0),ie(oe,le,ce,"\u2297","\\otimes",!0),ie(oe,le,xe,"\u2202","\\partial",!0),ie(oe,le,ce,"\u2298","\\oslash",!0),ie(oe,he,ce,"\u229a","\\circledcirc",!0),ie(oe,he,ce,"\u22a1","\\boxdot",!0),ie(oe,le,ce,"\u25b3","\\bigtriangleup"),ie(oe,le,ce,"\u25bd","\\bigtriangledown"),ie(oe,le,ce,"\u2020","\\dagger"),ie(oe,le,ce,"\u22c4","\\diamond"),ie(oe,le,ce,"\u22c6","\\star"),ie(oe,le,ce,"\u25c3","\\triangleleft"),ie(oe,le,ce,"\u25b9","\\triangleright"),ie(oe,le,ge,"{","\\{"),ie(se,le,xe,"{","\\{"),ie(se,le,xe,"{","\\textbraceleft"),ie(oe,le,ue,"}","\\}"),ie(se,le,xe,"}","\\}"),ie(se,le,xe,"}","\\textbraceright"),ie(oe,le,ge,"{","\\lbrace"),ie(oe,le,ue,"}","\\rbrace"),ie(oe,le,ge,"[","\\lbrack",!0),ie(se,le,xe,"[","\\lbrack",!0),ie(oe,le,ue,"]","\\rbrack",!0),ie(se,le,xe,"]","\\rbrack",!0),ie(oe,le,ge,"(","\\lparen",!0),ie(oe,le,ue,")","\\rparen",!0),ie(se,le,xe,"<","\\textless",!0),ie(se,le,xe,">","\\textgreater",!0),ie(oe,le,ge,"\u230a","\\lfloor",!0),ie(oe,le,ue,"\u230b","\\rfloor",!0),ie(oe,le,ge,"\u2308","\\lceil",!0),ie(oe,le,ue,"\u2309","\\rceil",!0),ie(oe,le,xe,"\\","\\backslash"),ie(oe,le,xe,"\u2223","|"),ie(oe,le,xe,"\u2223","\\vert"),ie(se,le,xe,"|","\\textbar",!0),ie(oe,le,xe,"\u2225","\\|"),ie(oe,le,xe,"\u2225","\\Vert"),ie(se,le,xe,"\u2225","\\textbardbl"),ie(se,le,xe,"~","\\textasciitilde"),ie(se,le,xe,"\\","\\textbackslash"),ie(se,le,xe,"^","\\textasciicircum"),ie(oe,le,be,"\u2191","\\uparrow",!0),ie(oe,le,be,"\u21d1","\\Uparrow",!0),ie(oe,le,be,"\u2193","\\downarrow",!0),ie(oe,le,be,"\u21d3","\\Downarrow",!0),ie(oe,le,be,"\u2195","\\updownarrow",!0),ie(oe,le,be,"\u21d5","\\Updownarrow",!0),ie(oe,le,fe,"\u2210","\\coprod"),ie(oe,le,fe,"\u22c1","\\bigvee"),ie(oe,le,fe,"\u22c0","\\bigwedge"),ie(oe,le,fe,"\u2a04","\\biguplus"),ie(oe,le,fe,"\u22c2","\\bigcap"),ie(oe,le,fe,"\u22c3","\\bigcup"),ie(oe,le,fe,"\u222b","\\int"),ie(oe,le,fe,"\u222b","\\intop"),ie(oe,le,fe,"\u222c","\\iint"),ie(oe,le,fe,"\u222d","\\iiint"),ie(oe,le,fe,"\u220f","\\prod"),ie(oe,le,fe,"\u2211","\\sum"),ie(oe,le,fe,"\u2a02","\\bigotimes"),ie(oe,le,fe,"\u2a01","\\bigoplus"),ie(oe,le,fe,"\u2a00","\\bigodot"),ie(oe,le,fe,"\u222e","\\oint"),ie(oe,le,fe,"\u222f","\\oiint"),ie(oe,le,fe,"\u2230","\\oiiint"),ie(oe,le,fe,"\u2a06","\\bigsqcup"),ie(oe,le,fe,"\u222b","\\smallint"),ie(se,le,pe,"\u2026","\\textellipsis"),ie(oe,le,pe,"\u2026","\\mathellipsis"),ie(se,le,pe,"\u2026","\\ldots",!0),ie(oe,le,pe,"\u2026","\\ldots",!0),ie(oe,le,pe,"\u22ef","\\@cdots",!0),ie(oe,le,pe,"\u22f1","\\ddots",!0),ie(oe,le,xe,"\u22ee","\\varvdots"),ie(oe,le,me,"\u02ca","\\acute"),ie(oe,le,me,"\u02cb","\\grave"),ie(oe,le,me,"\xa8","\\ddot"),ie(oe,le,me,"~","\\tilde"),ie(oe,le,me,"\u02c9","\\bar"),ie(oe,le,me,"\u02d8","\\breve"),ie(oe,le,me,"\u02c7","\\check"),ie(oe,le,me,"^","\\hat"),ie(oe,le,me,"\u20d7","\\vec"),ie(oe,le,me,"\u02d9","\\dot"),ie(oe,le,me,"\u02da","\\mathring"),ie(oe,le,de,"\ue131","\\@imath"),ie(oe,le,de,"\ue237","\\@jmath"),ie(oe,le,xe,"\u0131","\u0131"),ie(oe,le,xe,"\u0237","\u0237"),ie(se,le,xe,"\u0131","\\i",!0),ie(se,le,xe,"\u0237","\\j",!0),ie(se,le,xe,"\xdf","\\ss",!0),ie(se,le,xe,"\xe6","\\ae",!0),ie(se,le,xe,"\u0153","\\oe",!0),ie(se,le,xe,"\xf8","\\o",!0),ie(se,le,xe,"\xc6","\\AE",!0),ie(se,le,xe,"\u0152","\\OE",!0),ie(se,le,xe,"\xd8","\\O",!0),ie(se,le,me,"\u02ca","\\'"),ie(se,le,me,"\u02cb","\\`"),ie(se,le,me,"\u02c6","\\^"),ie(se,le,me,"\u02dc","\\~"),ie(se,le,me,"\u02c9","\\="),ie(se,le,me,"\u02d8","\\u"),ie(se,le,me,"\u02d9","\\."),ie(se,le,me,"\xb8","\\c"),ie(se,le,me,"\u02da","\\r"),ie(se,le,me,"\u02c7","\\v"),ie(se,le,me,"\xa8",'\\"'),ie(se,le,me,"\u02dd","\\H"),ie(se,le,me,"\u25ef","\\textcircled");var we={"--":!0,"---":!0,"``":!0,"''":!0};ie(se,le,xe,"\u2013","--",!0),ie(se,le,xe,"\u2013","\\textendash"),ie(se,le,xe,"\u2014","---",!0),ie(se,le,xe,"\u2014","\\textemdash"),ie(se,le,xe,"\u2018","`",!0),ie(se,le,xe,"\u2018","\\textquoteleft"),ie(se,le,xe,"\u2019","'",!0),ie(se,le,xe,"\u2019","\\textquoteright"),ie(se,le,xe,"\u201c","``",!0),ie(se,le,xe,"\u201c","\\textquotedblleft"),ie(se,le,xe,"\u201d","''",!0),ie(se,le,xe,"\u201d","\\textquotedblright"),ie(oe,le,xe,"\xb0","\\degree",!0),ie(se,le,xe,"\xb0","\\degree"),ie(se,le,xe,"\xb0","\\textdegree",!0),ie(oe,le,xe,"\xa3","\\pounds"),ie(oe,le,xe,"\xa3","\\mathsterling",!0),ie(se,le,xe,"\xa3","\\pounds"),ie(se,le,xe,"\xa3","\\textsterling",!0),ie(oe,he,xe,"\u2720","\\maltese"),ie(se,he,xe,"\u2720","\\maltese");for(var ke='0123456789/@."',Se=0;Set&&(t=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>n&&(n=i.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=n},Xe=function(e,t,r,n){var a=new W(e,t,r,n);return Ye(a),a},We=function(e,t,r,n){return new W(e,t,r,n)},_e=function(e){var t=new A(e);return Ye(t),t},je=function(e,t,r){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},$e={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ze={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Ke={fontMap:$e,makeSymbol:Ge,mathsym:function(e,t,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&Ve(e,"Main-Bold",t).metrics?Ge(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===ae[t][e].font?Ge(e,"Main-Regular",t,r,n):Ge(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},makeSpan:Xe,makeSvgSpan:We,makeLineSpan:function(e,t,r){var n=Xe([e],[],t);return n.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=V(n.height),n.maxFontSize=1,n},makeAnchor:function(e,t,r,n){var a=new _(e,t,r,n);return Ye(a),a},makeFragment:_e,wrapFragment:function(e,t){return e instanceof A?Xe([],[e],t):e},makeVList:function(e,t){for(var r=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth,a=n,i=1;i0&&(o.push(kt(s,t)),s=[]),o.push(a[l]));s.length>0&&o.push(kt(s,t)),r?((i=kt(ft(r,t,!0))).classes=["tag"],o.push(i)):n&&o.push(n);var m=mt(["katex-html"],o);if(m.setAttribute("aria-hidden","true"),i){var c=i.children[0];c.style.height=V(m.height+m.depth),m.depth&&(c.style.verticalAlign=V(-m.depth))}return m}function Mt(e){return new A(e)}var zt=function(){function e(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.getAttribute=function(e){return this.attributes[e]},t.toNode=function(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=G(this.classes));for(var r=0;r0&&(e+=' class ="'+l.escape(G(this.classes))+'"'),e+=">";for(var r=0;r"},t.toText=function(){return this.children.map((function(e){return e.toText()})).join("")},e}(),At=function(){function e(e){this.text=void 0,this.text=e}var t=e.prototype;return t.toNode=function(){return document.createTextNode(this.text)},t.toMarkup=function(){return l.escape(this.toText())},t.toText=function(){return this.text},e}(),Tt={MathNode:zt,TextNode:At,SpaceNode:function(){function e(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"\u200a":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200a":e>=-.05556&&e<=-.05555?"\u200a\u2063":e>=-.1667&&e<=-.1666?"\u2009\u2063":e>=-.2223&&e<=-.2222?"\u205f\u2063":e>=-.2778&&e<=-.2777?"\u2005\u2063":null}var t=e.prototype;return t.toNode=function(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",V(this.width)),e},t.toMarkup=function(){return this.character?""+this.character+"":''},t.toText=function(){return this.character?this.character:" "},e}(),newDocumentFragment:Mt},Bt=function(e,t,r){return!ae[t][e]||!ae[t][e].replace||55349===e.charCodeAt(0)||we.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.substr(4,2)||r.font&&"tt"===r.font.substr(4,2))||(e=ae[t][e].replace),new Tt.TextNode(e)},Ct=function(e){return 1===e.length?e[0]:new Tt.MathNode("mrow",e)},qt=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var r=t.font;if(!r||"mathnormal"===r)return null;var n=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";var a=e.text;return l.contains(["\\imath","\\jmath"],a)?null:(ae[n][a]&&ae[n][a].replace&&(a=ae[n][a].replace),q(a,Ke.fontMap[r].fontName,n)?Ke.fontMap[r].variant:null)},Nt=function(e,t,r){if(1===e.length){var n=Rt(e[0],t);return r&&n instanceof zt&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var a,i=[],o=0;o0&&(p.text=p.text.slice(0,1)+"\u0338"+p.text.slice(1),i.pop())}}}i.push(s),a=s}return i},It=function(e,t,r){return Ct(Nt(e,t,r))},Rt=function(e,t){if(!e)return new Tt.MathNode("mrow");if(it[e.type])return it[e.type](e,t);throw new n("Got group of unknown type: '"+e.type+"'")};function Ot(e,t,r,n,a){var i,o=Nt(e,r);i=1===o.length&&o[0]instanceof zt&&l.contains(["mrow","mtable"],o[0].type)?o[0]:new Tt.MathNode("mrow",o);var s=new Tt.MathNode("annotation",[new Tt.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var h=new Tt.MathNode("semantics",[i,s]),m=new Tt.MathNode("math",[h]);m.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&m.setAttribute("display","block");var c=a?"katex":"katex-mathml";return Ke.makeSpan([c],[m])}var Ht=function(e){return new E({style:e.displayMode?x.DISPLAY:x.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Et=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Ke.makeSpan(r,[e])}return e},Lt=function(e,t,r){var n,a=Ht(r);if("mathml"===r.output)return Ot(e,t,a,r.displayMode,!0);if("html"===r.output){var i=St(e,a);n=Ke.makeSpan(["katex"],[i])}else{var o=Ot(e,t,a,r.displayMode,!1),s=St(e,a);n=Ke.makeSpan(["katex"],[o,s])}return Et(n,r)},Dt={widehat:"^",widecheck:"\u02c7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",overgroup:"\u23e0",undergroup:"\u23e1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xrightleftharpoons:"\u21cc",xleftrightharpoons:"\u21cb",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xtofrom:"\u21c4",xrightleftarrows:"\u21c4",xrightequilibrium:"\u21cc",xleftequilibrium:"\u21cb","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Pt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Ft=function(e,t,r,n,a){var i,o=e.height+e.depth+r+n;if(/fbox|color|angl/.test(t)){if(i=Ke.makeSpan(["stretchy",t],[],a),"fbox"===t){var s=a.color&&a.getColor();s&&(i.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new Q({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new Q({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new K(l,{width:"100%",height:V(o)});i=Ke.makeSvgSpan([],[h],a)}return i.height=o,i.style.height=V(o),i},Vt=function(e){var t=new Tt.MathNode("mo",[new Tt.TextNode(Dt[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Gt=function(e,t){var r=function(){var r=4e5,n=e.label.substr(1);if(l.contains(["widehat","widecheck","widetilde","utilde"],n)){var a,i,o,s="ordgroup"===(d=e.base).type?d.body.length:1;if(s>5)"widehat"===n||"widecheck"===n?(a=420,r=2364,o=.42,i=n+"4"):(a=312,r=2340,o=.34,i="tilde4");else{var h=[1,1,2,2,3,3][s];"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][h],a=[0,239,300,360,420][h],o=[0,.24,.3,.3,.36,.42][h],i=n+h):(r=[0,600,1033,2339,2340][h],a=[0,260,286,306,312][h],o=[0,.26,.286,.3,.306,.34][h],i="tilde"+h)}var m=new J(i),c=new K([m],{width:"100%",height:V(o),viewBox:"0 0 "+r+" "+a,preserveAspectRatio:"none"});return{span:Ke.makeSvgSpan([],[c],t),minWidth:0,height:o}}var u,p,d,f=[],g=Pt[n],v=g[0],b=g[1],y=g[2],x=y/1e3,w=v.length;if(1===w)u=["hide-tail"],p=[g[3]];else if(2===w)u=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==w)throw new Error("Correct katexImagesData or update code here to support\n "+w+" children.");u=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var k=0;k0&&(n.style.minWidth=V(a)),n};function Ut(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Yt(e){var t=Xt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Xt(e){return e&&("atom"===e.type||re.hasOwnProperty(e.type))?e:null}var Wt=function(e,t){var r,n,a;e&&"supsub"===e.type?(r=(n=Ut(e.base,"accent")).base,e.base=r,a=function(e){if(e instanceof W)return e;throw new Error("Expected span but got "+String(e)+".")}(wt(e,t)),e.base=n):r=(n=Ut(e,"accent")).base;var i=wt(r,t.havingCrampedStyle()),o=0;if(n.isShifty&&l.isCharacterBox(r)){var s=l.getBaseElem(r);o=ee(wt(s,t.havingCrampedStyle())).skew}var h,m="\\c"===n.label,c=m?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight);if(n.isStretchy)h=Gt(n,t),h=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+V(2*o)+")",marginLeft:V(2*o)}:void 0}]},t);else{var u,p;"\\vec"===n.label?(u=Ke.staticSvg("vec",t),p=Ke.svgData.vec[1]):((u=ee(u=Ke.makeOrd({mode:n.mode,text:n.label},t,"textord"))).italic=0,p=u.width,m&&(c+=u.depth)),h=Ke.makeSpan(["accent-body"],[u]);var d="\\textcircled"===n.label;d&&(h.classes.push("accent-full"),c=i.height);var f=o;d||(f-=p/2),h.style.left=V(f),"\\textcircled"===n.label&&(h.style.top=".2em"),h=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-c},{type:"elem",elem:h}]},t)}var g=Ke.makeSpan(["mord","accent"],[h],t);return a?(a.children[0]=g,a.height=Math.max(g.height,a.height),a.classes[0]="mord",a):g},_t=function(e,t){var r=e.isStretchy?Vt(e.label):new Tt.MathNode("mo",[Bt(e.label,e.mode)]),n=new Tt.MathNode("mover",[Rt(e.base,t),r]);return n.setAttribute("accent","true"),n},jt=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((function(e){return"\\"+e})).join("|"));ot({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(e,t){var r=lt(t[0]),n=!jt.test(e.funcName),a=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:a,base:r}},htmlBuilder:Wt,mathmlBuilder:_t}),ot({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:function(e,t){var r=t[0],n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:Wt,mathmlBuilder:_t}),ot({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:a}},htmlBuilder:function(e,t){var r=wt(e.base,t),n=Gt(e,t),a="\\utilde"===e.label?.12:0,i=Ke.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:function(e,t){var r=Vt(e.label),n=new Tt.MathNode("munder",[Rt(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var $t=function(e){var t=new Tt.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};ot({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,r){var n=e.parser,a=e.funcName;return{type:"xArrow",mode:n.mode,label:a,body:t[0],below:r[0]}},htmlBuilder:function(e,t){var r,n=t.style,a=t.havingStyle(n.sup()),i=Ke.wrapFragment(wt(e.body,a,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(o+"-arrow-pad"),e.below&&(a=t.havingStyle(n.sub()),(r=Ke.wrapFragment(wt(e.below,a,t),t)).classes.push(o+"-arrow-pad"));var s,l=Gt(e,t),h=-t.fontMetrics().axisHeight+.5*l.height,m=-t.fontMetrics().axisHeight-.5*l.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(m-=i.depth),r){var c=-t.fontMetrics().axisHeight+r.height+.5*l.height+.111;s=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h},{type:"elem",elem:r,shift:c}]},t)}else s=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),Ke.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder:function(e,t){var r,n=Vt(e.label);if(n.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var a=$t(Rt(e.body,t));if(e.below){var i=$t(Rt(e.below,t));r=new Tt.MathNode("munderover",[n,i,a])}else r=new Tt.MathNode("mover",[n,a])}else if(e.below){var o=$t(Rt(e.below,t));r=new Tt.MathNode("munder",[n,o])}else r=$t(),r=new Tt.MathNode("mover",[n,r]);return r}});var Zt={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Kt=function(e){return"textord"===e.type&&"@"===e.text};function Jt(e,t,r){var n=Zt[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var a={type:"atom",text:n,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[a],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}ot({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder:function(e,t){var r=t.havingStyle(t.style.sup()),n=Ke.wrapFragment(wt(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=V(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mrow",[Rt(e.label,t)]);return(r=new Tt.MathNode("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new Tt.MathNode("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),ot({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler:function(e,t){return{type:"cdlabelparent",mode:e.parser.mode,fragment:t[0]}},htmlBuilder:function(e,t){var r=Ke.wrapFragment(wt(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:function(e,t){return new Tt.MathNode("mrow",[Rt(e.fragment,t)])}}),ot({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){for(var r=e.parser,a=Ut(t[0],"ordgroup").body,i="",o=0;o=1114111)throw new n("\\@char with invalid code point "+i);return l<=65535?s=String.fromCharCode(l):(l-=65536,s=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:s}}});var Qt=function(e,t){var r=ft(e.body,t.withColor(e.color),!1);return Ke.makeFragment(r)},er=function(e,t){var r=Nt(e.body,t.withColor(e.color)),n=new Tt.MathNode("mstyle",r);return n.setAttribute("mathcolor",e.color),n};ot({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler:function(e,t){var r=e.parser,n=Ut(t[0],"color-token").color,a=t[1];return{type:"color",mode:r.mode,color:n,body:ht(a)}},htmlBuilder:Qt,mathmlBuilder:er}),ot({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler:function(e,t){var r=e.parser,n=e.breakOnTokenText,a=Ut(t[0],"color-token").color;r.gullet.macros.set("\\current@color",a);var i=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:a,body:i}},htmlBuilder:Qt,mathmlBuilder:er}),ot({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(e,t,r){var n=e.parser,a=r[0],i=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:i,size:a&&Ut(a,"size").value}},htmlBuilder:function(e,t){var r=Ke.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=V(F(e.size,t)))),r},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",V(F(e.size,t)))),r}});var tr={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},rr=function(e){var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new n("Expected a control sequence",e);return t},nr=function(e,t,r,n){var a=e.gullet.macros.get(r.text);null==a&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,a,n)};ot({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler:function(e){var t=e.parser,r=e.funcName;t.consumeSpaces();var a=t.fetch();if(tr[a.text])return"\\global"!==r&&"\\\\globallong"!==r||(a.text=tr[a.text]),Ut(t.parseFunction(),"internal");throw new n("Invalid token after macro prefix",a)}}),ot({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,r=e.funcName,a=t.gullet.popToken(),i=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new n("Expected a control sequence",a);for(var o,s=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(a=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[s].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new n('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new n('Argument number "'+a.text+'" out of order');s++,l.push([])}else{if("EOF"===a.text)throw new n("Expected a macro definition");l[s].push(a.text)}var h=t.gullet.consumeArg().tokens;return o&&h.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(h=t.gullet.expandTokens(h)).reverse(),t.gullet.macros.set(i,{tokens:h,numArgs:s,delimiters:l},r===tr[r]),{type:"internal",mode:t.mode}}}),ot({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,r=e.funcName,n=rr(t.gullet.popToken());t.gullet.consumeSpaces();var a=function(e){var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t}(t);return nr(t,n,a,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),ot({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,r=e.funcName,n=rr(t.gullet.popToken()),a=t.gullet.popToken(),i=t.gullet.popToken();return nr(t,n,i,"\\\\globalfuture"===r),t.gullet.pushToken(i),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var ar=function(e,t,r){var n=q(ae.math[e]&&ae.math[e].replace||e,t,r);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},ir=function(e,t,r,n){var a=r.havingBaseStyle(t),i=Ke.makeSpan(n.concat(a.sizingClasses(r)),[e],r),o=a.sizeMultiplier/r.sizeMultiplier;return i.height*=o,i.depth*=o,i.maxFontSize=a.sizeMultiplier,i},or=function(e,t,r){var n=t.havingBaseStyle(r),a=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=V(a),e.height-=a,e.depth+=a},sr=function(e,t,r,n,a,i){var o=function(e,t,r,n){return Ke.makeSymbol(e,"Size"+t+"-Regular",r,n)}(e,t,a,n),s=ir(Ke.makeSpan(["delimsizing","size"+t],[o],n),x.TEXT,n,i);return r&&or(s,n,x.TEXT),s},lr=function(e,t,r){var n;return n="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:Ke.makeSpan(["delimsizinginner",n],[Ke.makeSpan([],[Ke.makeSymbol(e,t,r)])])}},hr=function(e,t,r){var n=T["Size4-Regular"][e.charCodeAt(0)]?T["Size4-Regular"][e.charCodeAt(0)][4]:T["Size1-Regular"][e.charCodeAt(0)][4],a=new J("inner",function(e,t){switch(e){case"\u239c":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"\u239f":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23a2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23a5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23aa":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23d0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),i=new K([a],{width:V(n),height:V(t),style:"width:"+V(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Ke.makeSvgSpan([],[i],r);return o.height=t,o.style.height=V(t),o.style.width=V(n),{type:"elem",elem:o}},mr={type:"kern",size:-.008},cr=["|","\\lvert","\\rvert","\\vert"],ur=["\\|","\\lVert","\\rVert","\\Vert"],pr=function(e,t,r,n,a,i){var o,s,h,m;o=h=m=e,s=null;var c="Size1-Regular";"\\uparrow"===e?h=m="\u23d0":"\\Uparrow"===e?h=m="\u2016":"\\downarrow"===e?o=h="\u23d0":"\\Downarrow"===e?o=h="\u2016":"\\updownarrow"===e?(o="\\uparrow",h="\u23d0",m="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",h="\u2016",m="\\Downarrow"):l.contains(cr,e)?h="\u2223":l.contains(ur,e)?h="\u2225":"["===e||"\\lbrack"===e?(o="\u23a1",h="\u23a2",m="\u23a3",c="Size4-Regular"):"]"===e||"\\rbrack"===e?(o="\u23a4",h="\u23a5",m="\u23a6",c="Size4-Regular"):"\\lfloor"===e||"\u230a"===e?(h=o="\u23a2",m="\u23a3",c="Size4-Regular"):"\\lceil"===e||"\u2308"===e?(o="\u23a1",h=m="\u23a2",c="Size4-Regular"):"\\rfloor"===e||"\u230b"===e?(h=o="\u23a5",m="\u23a6",c="Size4-Regular"):"\\rceil"===e||"\u2309"===e?(o="\u23a4",h=m="\u23a5",c="Size4-Regular"):"("===e||"\\lparen"===e?(o="\u239b",h="\u239c",m="\u239d",c="Size4-Regular"):")"===e||"\\rparen"===e?(o="\u239e",h="\u239f",m="\u23a0",c="Size4-Regular"):"\\{"===e||"\\lbrace"===e?(o="\u23a7",s="\u23a8",m="\u23a9",h="\u23aa",c="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="\u23ab",s="\u23ac",m="\u23ad",h="\u23aa",c="Size4-Regular"):"\\lgroup"===e||"\u27ee"===e?(o="\u23a7",m="\u23a9",h="\u23aa",c="Size4-Regular"):"\\rgroup"===e||"\u27ef"===e?(o="\u23ab",m="\u23ad",h="\u23aa",c="Size4-Regular"):"\\lmoustache"===e||"\u23b0"===e?(o="\u23a7",m="\u23ad",h="\u23aa",c="Size4-Regular"):"\\rmoustache"!==e&&"\u23b1"!==e||(o="\u23ab",m="\u23a9",h="\u23aa",c="Size4-Regular");var u=ar(o,c,a),p=u.height+u.depth,d=ar(h,c,a),f=d.height+d.depth,g=ar(m,c,a),v=g.height+g.depth,b=0,y=1;if(null!==s){var w=ar(s,c,a);b=w.height+w.depth,y=2}var k=p+v+b,S=k+Math.max(0,Math.ceil((t-k)/(y*f)))*y*f,M=n.fontMetrics().axisHeight;r&&(M*=n.sizeMultiplier);var z=S/2-M,A=[];if(A.push(lr(m,c,a)),A.push(mr),null===s){var T=S-p-v+.016;A.push(hr(h,T,n))}else{var B=(S-p-v-b)/2+.016;A.push(hr(h,B,n)),A.push(mr),A.push(lr(s,c,a)),A.push(mr),A.push(hr(h,B,n))}A.push(mr),A.push(lr(o,c,a));var C=n.havingBaseStyle(x.TEXT),q=Ke.makeVList({positionType:"bottom",positionData:z,children:A},C);return ir(Ke.makeSpan(["delimsizing","mult"],[q],C),x.TEXT,n,i)},dr=.08,fr=function(e,t,r,n,a){var i=function(e,t,r){t*=1e3;var n="";switch(e){case"sqrtMain":n=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize1":n=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize2":n=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize3":n=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize4":n=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,M);break;case"sqrtTall":n=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,M,r)}return n}(e,n,r),o=new J(e,i),s=new K([o],{width:"400em",height:V(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Ke.makeSvgSpan(["hide-tail"],[s],a)},gr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","\\surd"],vr=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1"],br=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],yr=[0,1.2,1.8,2.4,3],xr=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],wr=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"stack"}],kr=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Sr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Mr=function(e,t,r,n){for(var a=Math.min(2,3-n.style.size);at)return r[a]}return r[r.length-1]},zr=function(e,t,r,n,a,i){var o;"<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),o=l.contains(br,e)?xr:l.contains(gr,e)?kr:wr;var s=Mr(e,t,o,n);return"small"===s.type?function(e,t,r,n,a,i){var o=Ke.makeSymbol(e,"Main-Regular",a,n),s=ir(o,t,n,i);return r&&or(s,n,t),s}(e,s.style,r,n,a,i):"large"===s.type?sr(e,s.size,r,n,a,i):pr(e,t,r,n,a,i)},Ar={sqrtImage:function(e,t){var r,n,a=t.havingBaseSizing(),i=Mr("\\surd",e*a.sizeMultiplier,kr,a),o=a.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,h=0,m=0;return"small"===i.type?(e<1?o=1:e<1.4&&(o=.7),h=(1+s)/o,(r=fr("sqrtMain",l=(1+s+dr)/o,m=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",n=.833/o):"large"===i.type?(m=1080*yr[i.size],h=(yr[i.size]+s)/o,l=(yr[i.size]+s+dr)/o,(r=fr("sqrtSize"+i.size,l,m,s,t)).style.minWidth="1.02em",n=1/o):(l=e+s+dr,h=e+s,m=Math.floor(1e3*e+s)+80,(r=fr("sqrtTall",l,m,s,t)).style.minWidth="0.742em",n=1.056),r.height=h,r.style.height=V(l),{span:r,advanceWidth:n,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},sizedDelim:function(e,t,r,a,i){if("<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),l.contains(gr,e)||l.contains(br,e))return sr(e,t,!1,r,a,i);if(l.contains(vr,e))return pr(e,yr[t],!1,r,a,i);throw new n("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:yr,customSizedDelim:zr,leftRightDelim:function(e,t,r,n,a,i){var o=n.fontMetrics().axisHeight*n.sizeMultiplier,s=5/n.fontMetrics().ptPerEm,l=Math.max(t-o,r+o),h=Math.max(l/500*901,2*l-s);return zr(e,h,!0,n,a,i)}},Tr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Br=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Cr(e,t){var r=Xt(e);if(r&&l.contains(Br,r.text))return r;throw new n(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function qr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ot({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:function(e,t){var r=Cr(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Tr[e.funcName].size,mclass:Tr[e.funcName].mclass,delim:r.text}},htmlBuilder:function(e,t){return"."===e.delim?Ke.makeSpan([e.mclass]):Ar.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:function(e){var t=[];"."!==e.delim&&t.push(Bt(e.delim,e.mode));var r=new Tt.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=V(Ar.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}}),ot({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new n("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Cr(t[0],e).text,color:r}}}),ot({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=Cr(t[0],e),n=e.parser;++n.leftrightDepth;var a=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var i=Ut(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:a,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:function(e,t){qr(e);for(var r,n,a=ft(e.body,t,!0,["mopen","mclose"]),i=0,o=0,s=!1,l=0;l-1?"mpadded":"menclose",[Rt(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var a=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+a+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};ot({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler:function(e,t,r){var n=e.parser,a=e.funcName,i=Ut(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:n.mode,label:a,backgroundColor:i,body:o}},htmlBuilder:Nr,mathmlBuilder:Ir}),ot({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler:function(e,t,r){var n=e.parser,a=e.funcName,i=Ut(t[0],"color-token").color,o=Ut(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:n.mode,label:a,backgroundColor:o,borderColor:i,body:s}},htmlBuilder:Nr,mathmlBuilder:Ir}),ot({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\fbox",body:t[0]}}}),ot({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:Nr,mathmlBuilder:Ir}),ot({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\angl",body:t[0]}}});var Rr={};function Or(e){for(var t=e.type,r=e.names,n=e.props,a=e.handler,i=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},l=0;l1||!c)&&g.pop(),b.length0&&(y+=.25),m.push({pos:y,isDashed:e[t]})}for(w(o[0]),r=0;r0&&(M<(B+=b)&&(M=B),B=0),e.addJot&&(M+=f),z.height=S,z.depth=M,y+=S,z.pos=y,y+=M+B,h[r]=z,w(o[r+1])}var C,q,N=y/2+t.fontMetrics().axisHeight,I=e.cols||[],R=[],O=[];if(e.tags&&e.tags.some((function(e){return e})))for(r=0;r=s)){var W=void 0;(a>0||e.hskipBeforeAndAfter)&&0!==(W=l.deflt(P.pregap,p))&&((C=Ke.makeSpan(["arraycolsep"],[])).style.width=V(W),R.push(C));var _=[];for(r=0;r0){for(var K=Ke.makeLineSpan("hline",t,c),J=Ke.makeLineSpan("hdashline",t,c),Q=[{type:"elem",elem:h,shift:0}];m.length>0;){var ee=m.pop(),te=ee.pos-N;ee.isDashed?Q.push({type:"elem",elem:J,shift:te}):Q.push({type:"elem",elem:K,shift:te})}h=Ke.makeVList({positionType:"individualShift",children:Q},t)}if(0===O.length)return Ke.makeSpan(["mord"],[h],t);var re=Ke.makeVList({positionType:"individualShift",children:O},t);return re=Ke.makeSpan(["tag"],[re],t),Ke.makeFragment([h,re])},Xr={c:"center ",l:"left ",r:"right "},Wr=function(e,t){for(var r=[],n=new Tt.MathNode("mtd",[],["mtr-glue"]),a=new Tt.MathNode("mtd",[],["mml-eqn-num"]),i=0;i0){var p=e.cols,d="",f=!1,g=0,v=p.length;"separator"===p[0].type&&(c+="top ",g=1),"separator"===p[p.length-1].type&&(c+="bottom ",v-=1);for(var b=g;b0?"left ":"",c+=S[S.length-1].length>0?"right ":"";for(var M=1;M-1?"alignat":"align",o="split"===e.envName,s=Gr(e.parser,{cols:a,addJot:!0,autoTag:o?void 0:Vr(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),l=0,h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var m="",c=0;c0&&u&&(f=1),a[p]={type:"align",align:d,pregap:f,postgap:0}}return s.colSeparationType=u?"align":"alignat",s};Or({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(e,t){var r=(Xt(t[0])?[t[0]]:Ut(t[0],"ordgroup").body).map((function(e){var t=Yt(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new n("Unknown column alignment: "+t,e)})),a={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return Gr(e.parser,a,Ur(e.envName))},htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler:function(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var i=e.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,-1==="lcr".indexOf(r))throw new n("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),a.cols=[{type:"align",align:r}]}}var o=Gr(e.parser,a,Ur(e.envName)),s=Math.max.apply(Math,[0].concat(o.body.map((function(e){return e.length}))));return o.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(e){var t=Gr(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["subarray"],props:{numArgs:1},handler:function(e,t){var r=(Xt(t[0])?[t[0]]:Ut(t[0],"ordgroup").body).map((function(e){var t=Yt(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new n("Unknown column alignment: "+t,e)}));if(r.length>1)throw new n("{subarray} can contain only one column");var a={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if((a=Gr(e.parser,a,"script")).body.length>0&&a.body[0].length>1)throw new n("{subarray} can contain only one column");return a},htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler:function(e){var t=Gr(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Ur(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:_r,htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler:function(e){l.contains(["gather","gather*"],e.envName)&&Fr(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Vr(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Gr(e.parser,t,"display")},htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:_r,htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["equation","equation*"],props:{numArgs:0},handler:function(e){Fr(e);var t={autoTag:Vr(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Gr(e.parser,t,"display")},htmlBuilder:Yr,mathmlBuilder:Wr}),Or({type:"array",names:["CD"],props:{numArgs:0},handler:function(e){return Fr(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new n("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var a,i,o=[],s=[o],l=0;l-1);else{if(!("<>AV".indexOf(u)>-1))throw new n('Expected one of "<>AV=|." after @',h[c]);for(var d=0;d<2;d++){for(var f=!0,g=c+1;g=x.SCRIPT.id?r.text():x.DISPLAY:"text"===e&&r.size===x.DISPLAY.size?r=x.TEXT:"script"===e?r=x.SCRIPT:"scriptscript"===e&&(r=x.SCRIPTSCRIPT),r},nn=function(e,t){var r,n=rn(e.size,t.style),a=n.fracNum(),i=n.fracDen();r=t.havingStyle(a);var o=wt(e.numer,r,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*c:7*c,d=t.fontMetrics().denom1):(m>0?(u=t.fontMetrics().num2,p=c):(u=t.fontMetrics().num3,p=3*c),d=t.fontMetrics().denom2),h){var w=t.fontMetrics().axisHeight;u-o.depth-(w+.5*m)0&&(t="."===(t=e)?null:t),t};ot({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var r,n=e.parser,a=t[4],i=t[5],o=lt(t[0]),s="atom"===o.type&&"open"===o.family?sn(o.text):null,l=lt(t[1]),h="atom"===l.type&&"close"===l.family?sn(l.text):null,m=Ut(t[2],"size"),c=null;r=!!m.isBlank||(c=m.value).number>0;var u="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var d=Ut(p.body[0],"textord");u=on[Number(d.text)]}}else p=Ut(p,"textord"),u=on[Number(p.text)];return{type:"genfrac",mode:n.mode,numer:a,denom:i,continued:!1,hasBarLine:r,barSize:c,leftDelim:s,rightDelim:h,size:u}},htmlBuilder:nn,mathmlBuilder:an}),ot({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var r=e.parser,n=(e.funcName,e.token);return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Ut(t[0],"size").value,token:n}}}),ot({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var r=e.parser,n=(e.funcName,t[0]),a=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Ut(t[1],"infix").size),i=t[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:nn,mathmlBuilder:an});var ln=function(e,t){var r,n,a=t.style;"supsub"===e.type?(r=e.sup?wt(e.sup,t.havingStyle(a.sup()),t):wt(e.sub,t.havingStyle(a.sub()),t),n=Ut(e.base,"horizBrace")):n=Ut(e,"horizBrace");var i,o=wt(n.base,t.havingBaseStyle(x.DISPLAY)),s=Gt(n,t);if(n.isOver?(i=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=Ke.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),r){var l=Ke.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t);i=n.isOver?Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):Ke.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Ke.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t)};ot({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:ln,mathmlBuilder:function(e,t){var r=Vt(e.label);return new Tt.MathNode(e.isOver?"mover":"munder",[Rt(e.base,t),r])}}),ot({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[1],a=Ut(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:ht(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var r=ft(e.body,t,!1);return Ke.makeAnchor(e.href,[],r,t)},mathmlBuilder:function(e,t){var r=It(e.body,t);return r instanceof zt||(r=new zt("mrow",[r])),r.setAttribute("href",e.href),r}}),ot({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=Ut(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],i=0;i0&&(n=F(e.totalheight,t)-r);var a=0;e.width.number>0&&(a=F(e.width,t));var i={height:V(r+n)};a>0&&(i.width=V(a)),n>0&&(i.verticalAlign=V(-n));var o=new j(e.src,e.alt,i);return o.height=r,o.depth=n,o},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var n=F(e.height,t),a=0;if(e.totalheight.number>0&&(a=F(e.totalheight,t)-n,r.setAttribute("valign",V(-a))),r.setAttribute("height",V(n+a)),e.width.number>0){var i=F(e.width,t);r.setAttribute("width",V(i))}return r.setAttribute("src",e.src),r}}),ot({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=Ut(t[0],"size");if(r.settings.strict){var i="m"===n[1],o="mu"===a.value.unit;i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+a.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:a.value}},htmlBuilder:function(e,t){return Ke.makeGlue(e.dimension,t)},mathmlBuilder:function(e,t){var r=F(e.dimension,t);return new Tt.SpaceNode(r)}}),ot({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:a}},htmlBuilder:function(e,t){var r;"clap"===e.alignment?(r=Ke.makeSpan([],[wt(e.body,t)]),r=Ke.makeSpan(["inner"],[r],t)):r=Ke.makeSpan(["inner"],[wt(e.body,t)]);var n=Ke.makeSpan(["fix"],[]),a=Ke.makeSpan([e.alignment],[r,n],t),i=Ke.makeSpan(["strut"]);return i.style.height=V(a.height+a.depth),a.depth&&(i.style.verticalAlign=V(-a.depth)),a.children.unshift(i),a=Ke.makeSpan(["thinbox"],[a],t),Ke.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mpadded",[Rt(e.body,t)]);if("rlap"!==e.alignment){var n="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}}),ot({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){var r=e.funcName,n=e.parser,a=n.mode;n.switchMode("math");var i="\\("===r?"\\)":"$",o=n.parseExpression(!1,i);return n.expect(i),n.switchMode(a),{type:"styling",mode:n.mode,style:"text",body:o}}}),ot({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){throw new n("Mismatched "+e.funcName)}});var mn=function(e,t){switch(t.style.size){case x.DISPLAY.size:return e.display;case x.TEXT.size:return e.text;case x.SCRIPT.size:return e.script;case x.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ot({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:function(e,t){return{type:"mathchoice",mode:e.parser.mode,display:ht(t[0]),text:ht(t[1]),script:ht(t[2]),scriptscript:ht(t[3])}},htmlBuilder:function(e,t){var r=mn(e,t),n=ft(r,t,!1);return Ke.makeFragment(n)},mathmlBuilder:function(e,t){var r=mn(e,t);return It(r,t)}});var cn=function(e,t,r,n,a,i,o){e=Ke.makeSpan([],[e]);var s,h,m,c=r&&l.isCharacterBox(r);if(t){var u=wt(t,n.havingStyle(a.sup()),n);h={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var p=wt(r,n.havingStyle(a.sub()),n);s={elem:p,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-p.height)}}if(h&&s){var d=n.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;m=Ke.makeVList({positionType:"bottom",positionData:d,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:V(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:V(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(s){var f=e.height-o;m=Ke.makeVList({positionType:"top",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:V(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},n)}else{if(!h)return e;var g=e.depth+o;m=Ke.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:V(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}var v=[m];if(s&&0!==i&&!c){var b=Ke.makeSpan(["mspace"],[],n);b.style.marginRight=V(i),v.unshift(b)}return Ke.makeSpan(["mop","op-limits"],v,n)},un=["\\smallint"],pn=function(e,t){var r,n,a,i=!1;"supsub"===e.type?(r=e.sup,n=e.sub,a=Ut(e.base,"op"),i=!0):a=Ut(e,"op");var o,s=t.style,h=!1;if(s.size===x.DISPLAY.size&&a.symbol&&!l.contains(un,a.name)&&(h=!0),a.symbol){var m=h?"Size2-Regular":"Size1-Regular",c="";if("\\oiint"!==a.name&&"\\oiiint"!==a.name||(c=a.name.substr(1),a.name="oiint"===c?"\\iint":"\\iiint"),o=Ke.makeSymbol(a.name,m,"math",t,["mop","op-symbol",h?"large-op":"small-op"]),c.length>0){var u=o.italic,p=Ke.staticSvg(c+"Size"+(h?"2":"1"),t);o=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:p,shift:h?.08:0}]},t),a.name="\\"+c,o.classes.unshift("mop"),o.italic=u}}else if(a.body){var d=ft(a.body,t,!0);1===d.length&&d[0]instanceof Z?(o=d[0]).classes[0]="mop":o=Ke.makeSpan(["mop"],d,t)}else{for(var f=[],g=1;g0){for(var s=a.body.map((function(e){var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=ft(s,t.withFont("mathrm"),!0),h=0;h=0?s.setAttribute("height",V(a)):(s.setAttribute("height",V(a)),s.setAttribute("depth",V(-a))),s.setAttribute("voffset",V(a)),s}});var yn=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];ot({type:"sizing",names:yn,props:{numArgs:0,allowedInText:!0},handler:function(e,t){var r=e.breakOnTokenText,n=e.funcName,a=e.parser,i=a.parseExpression(!1,r);return{type:"sizing",mode:a.mode,size:yn.indexOf(n)+1,body:i}},htmlBuilder:function(e,t){var r=t.havingSize(e.size);return bn(e.body,r,t)},mathmlBuilder:function(e,t){var r=t.havingSize(e.size),n=Nt(e.body,r),a=new Tt.MathNode("mstyle",n);return a.setAttribute("mathsize",V(r.sizeMultiplier)),a}}),ot({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(e,t,r){var n=e.parser,a=!1,i=!1,o=r[0]&&Ut(r[0],"ordgroup");if(o)for(var s="",l=0;lr.height+r.depth+i&&(i=(i+c-r.height-r.depth)/2);var u=l.height-r.height-i-h;r.style.paddingLeft=V(m);var p=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+u)},{type:"elem",elem:l},{type:"kern",size:h}]},t);if(e.index){var d=t.havingStyle(x.SCRIPTSCRIPT),f=wt(e.index,d,t),g=.6*(p.height-p.depth),v=Ke.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:f}]},t),b=Ke.makeSpan(["root"],[v]);return Ke.makeSpan(["mord","sqrt"],[b,p],t)}return Ke.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder:function(e,t){var r=e.body,n=e.index;return n?new Tt.MathNode("mroot",[Rt(r,t),Rt(n,t)]):new Tt.MathNode("msqrt",[Rt(r,t)])}});var xn={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT};ot({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e,t){var r=e.breakOnTokenText,n=e.funcName,a=e.parser,i=a.parseExpression(!0,r),o=n.slice(1,n.length-5);return{type:"styling",mode:a.mode,style:o,body:i}},htmlBuilder:function(e,t){var r=xn[e.style],n=t.havingStyle(r).withFont("");return bn(e.body,n,t)},mathmlBuilder:function(e,t){var r=xn[e.style],n=t.havingStyle(r),a=Nt(e.body,n),i=new Tt.MathNode("mstyle",a),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var wn=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===x.DISPLAY.size||r.alwaysHandleSupSub)?pn:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===x.DISPLAY.size||r.limits)?vn:null:"accent"===r.type?l.isCharacterBox(r.base)?Wt:null:"horizBrace"===r.type&&!e.sub===r.isOver?ln:null:null};st({type:"supsub",htmlBuilder:function(e,t){var r=wn(e,t);if(r)return r(e,t);var n,a,i,o=e.base,s=e.sup,h=e.sub,m=wt(o,t),c=t.fontMetrics(),u=0,p=0,d=o&&l.isCharacterBox(o);if(s){var f=t.havingStyle(t.style.sup());n=wt(s,f,t),d||(u=m.height-f.fontMetrics().supDrop*f.sizeMultiplier/t.sizeMultiplier)}if(h){var g=t.havingStyle(t.style.sub());a=wt(h,g,t),d||(p=m.depth+g.fontMetrics().subDrop*g.sizeMultiplier/t.sizeMultiplier)}i=t.style===x.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;var v,b=t.sizeMultiplier,y=V(.5/c.ptPerEm/b),w=null;if(a){var k=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(m instanceof Z||k)&&(w=V(-m.italic))}if(n&&a){u=Math.max(u,i,n.depth+.25*c.xHeight),p=Math.max(p,c.sub2);var S=4*c.defaultRuleThickness;if(u-n.depth-(a.height-p)0&&(u+=M,p-=M)}var z=[{type:"elem",elem:a,shift:p,marginRight:y,marginLeft:w},{type:"elem",elem:n,shift:-u,marginRight:y}];v=Ke.makeVList({positionType:"individualShift",children:z},t)}else if(a){p=Math.max(p,c.sub1,a.height-.8*c.xHeight);var A=[{type:"elem",elem:a,marginLeft:w,marginRight:y}];v=Ke.makeVList({positionType:"shift",positionData:p,children:A},t)}else{if(!n)throw new Error("supsub must have either sup or sub.");u=Math.max(u,i,n.depth+.25*c.xHeight),v=Ke.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:n,marginRight:y}]},t)}var T=yt(m,"right")||"mord";return Ke.makeSpan([T],[m,Ke.makeSpan(["msupsub"],[v])],t)},mathmlBuilder:function(e,t){var r,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,i=[Rt(e.base,t)];if(e.sub&&i.push(Rt(e.sub,t)),e.sup&&i.push(Rt(e.sup,t)),n)a=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;a=o&&"op"===o.type&&o.limits&&t.style===x.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===x.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;a=s&&"op"===s.type&&s.limits&&(t.style===x.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===x.DISPLAY)?"munder":"msub"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===x.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===x.DISPLAY)?"mover":"msup"}return new Tt.MathNode(a,i)}}),st({type:"atom",htmlBuilder:function(e,t){return Ke.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[Bt(e.text,e.mode)]);if("bin"===e.family){var n=qt(e,t);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var kn={mi:"italic",mn:"normal",mtext:"normal"};st({type:"mathord",htmlBuilder:function(e,t){return Ke.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mi",[Bt(e.text,e.mode,t)]),n=qt(e,t)||"italic";return n!==kn[r.type]&&r.setAttribute("mathvariant",n),r}}),st({type:"textord",htmlBuilder:function(e,t){return Ke.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var r,n=Bt(e.text,e.mode,t),a=qt(e,t)||"normal";return r="text"===e.mode?new Tt.MathNode("mtext",[n]):/[0-9]/.test(e.text)?new Tt.MathNode("mn",[n]):"\\prime"===e.text?new Tt.MathNode("mo",[n]):new Tt.MathNode("mi",[n]),a!==kn[r.type]&&r.setAttribute("mathvariant",a),r}});var Sn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Mn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};st({type:"spacing",htmlBuilder:function(e,t){if(Mn.hasOwnProperty(e.text)){var r=Mn[e.text].className||"";if("text"===e.mode){var a=Ke.makeOrd(e,t,"textord");return a.classes.push(r),a}return Ke.makeSpan(["mspace",r],[Ke.mathsym(e.text,e.mode,t)],t)}if(Sn.hasOwnProperty(e.text))return Ke.makeSpan(["mspace",Sn[e.text]],[],t);throw new n('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e,t){if(!Mn.hasOwnProperty(e.text)){if(Sn.hasOwnProperty(e.text))return new Tt.MathNode("mspace");throw new n('Unknown type of space "'+e.text+'"')}return new Tt.MathNode("mtext",[new Tt.TextNode("\xa0")])}});var zn=function(){var e=new Tt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};st({type:"tag",mathmlBuilder:function(e,t){var r=new Tt.MathNode("mtable",[new Tt.MathNode("mtr",[zn(),new Tt.MathNode("mtd",[It(e.body,t)]),zn(),new Tt.MathNode("mtd",[It(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var An={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Tn={"\\textbf":"textbf","\\textmd":"textmd"},Bn={"\\textit":"textit","\\textup":"textup"},Cn=function(e,t){var r=e.font;return r?An[r]?t.withTextFontFamily(An[r]):Tn[r]?t.withTextFontWeight(Tn[r]):t.withTextFontShape(Bn[r]):t};ot({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"text",mode:r.mode,body:ht(a),font:n}},htmlBuilder:function(e,t){var r=Cn(e,t),n=ft(e.body,r,!0);return Ke.makeSpan(["mord","text"],n,r)},mathmlBuilder:function(e,t){var r=Cn(e,t);return It(e.body,r)}}),ot({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"underline",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=Ke.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ke.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord","underline"],[i],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[new Tt.TextNode("\u203e")]);r.setAttribute("stretchy","true");var n=new Tt.MathNode("munder",[Rt(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),ot({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(e,t){return{type:"vcenter",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=t.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return Ke.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:function(e,t){return new Tt.MathNode("mpadded",[Rt(e.body,t)],["vcenter"])}}),ot({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(e,t,r){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var r=qn(e),n=[],a=t.havingStyle(t.style.text()),i=0;i0;)this.endGroup()},t.has=function(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)},t.get=function(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]},t.set=function(e,t,r){if(void 0===r&&(r=!1),r){for(var n=0;n0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t},e}(),Hn=Hr;Er("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Er("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Er("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Er("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Er("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Er("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Er("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var En={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Er("\\char",(function(e){var t,r=e.popToken(),a="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])a=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new n("\\char` missing argument");a=r.text.charCodeAt(0)}else t=10;if(t){if(null==(a=En[r.text])||a>=t)throw new n("Invalid base-"+t+" digit "+r.text);for(var i;null!=(i=En[e.future().text])&&i":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Er("\\dots",(function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Dn?t=Dn[r]:("\\not"===r.substr(0,4)||r in ae.math&&l.contains(["bin","rel"],ae.math[r].group))&&(t="\\dotsb"),t}));var Pn={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Er("\\dotso",(function(e){return e.future().text in Pn?"\\ldots\\,":"\\ldots"})),Er("\\dotsc",(function(e){var t=e.future().text;return t in Pn&&","!==t?"\\ldots\\,":"\\ldots"})),Er("\\cdots",(function(e){return e.future().text in Pn?"\\@cdots\\,":"\\@cdots"})),Er("\\dotsb","\\cdots"),Er("\\dotsm","\\cdots"),Er("\\dotsi","\\!\\cdots"),Er("\\dotsx","\\ldots\\,"),Er("\\DOTSI","\\relax"),Er("\\DOTSB","\\relax"),Er("\\DOTSX","\\relax"),Er("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Er("\\,","\\tmspace+{3mu}{.1667em}"),Er("\\thinspace","\\,"),Er("\\>","\\mskip{4mu}"),Er("\\:","\\tmspace+{4mu}{.2222em}"),Er("\\medspace","\\:"),Er("\\;","\\tmspace+{5mu}{.2777em}"),Er("\\thickspace","\\;"),Er("\\!","\\tmspace-{3mu}{.1667em}"),Er("\\negthinspace","\\!"),Er("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Er("\\negthickspace","\\tmspace-{5mu}{.277em}"),Er("\\enspace","\\kern.5em "),Er("\\enskip","\\hskip.5em\\relax"),Er("\\quad","\\hskip1em\\relax"),Er("\\qquad","\\hskip2em\\relax"),Er("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Er("\\tag@paren","\\tag@literal{({#1})}"),Er("\\tag@literal",(function(e){if(e.macros.get("\\df@tag"))throw new n("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Er("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Er("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Er("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Er("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Er("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Er("\\newline","\\\\\\relax"),Er("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Fn=V(T["Main-Regular"]["T".charCodeAt(0)][1]-.7*T["Main-Regular"]["A".charCodeAt(0)][1]);Er("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Fn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Er("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Fn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Er("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Er("\\@hspace","\\hskip #1\\relax"),Er("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Er("\\ordinarycolon",":"),Er("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Er("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Er("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Er("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Er("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Er("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Er("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Er("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Er("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Er("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Er("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Er("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Er("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Er("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Er("\u2237","\\dblcolon"),Er("\u2239","\\eqcolon"),Er("\u2254","\\coloneqq"),Er("\u2255","\\eqqcolon"),Er("\u2a74","\\Coloneqq"),Er("\\ratio","\\vcentcolon"),Er("\\coloncolon","\\dblcolon"),Er("\\colonequals","\\coloneqq"),Er("\\coloncolonequals","\\Coloneqq"),Er("\\equalscolon","\\eqqcolon"),Er("\\equalscoloncolon","\\Eqqcolon"),Er("\\colonminus","\\coloneq"),Er("\\coloncolonminus","\\Coloneq"),Er("\\minuscolon","\\eqcolon"),Er("\\minuscoloncolon","\\Eqcolon"),Er("\\coloncolonapprox","\\Colonapprox"),Er("\\coloncolonsim","\\Colonsim"),Er("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Er("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Er("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Er("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Er("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),Er("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Er("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Er("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Er("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Er("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Er("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Er("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Er("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Er("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Er("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Er("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Er("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Er("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Er("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Er("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Er("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Er("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Er("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Er("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),Er("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),Er("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),Er("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),Er("\\imath","\\html@mathml{\\@imath}{\u0131}"),Er("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),Er("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),Er("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),Er("\u27e6","\\llbracket"),Er("\u27e7","\\rrbracket"),Er("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Er("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Er("\u2983","\\lBrace"),Er("\u2984","\\rBrace"),Er("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),Er("\u29b5","\\minuso"),Er("\\darr","\\downarrow"),Er("\\dArr","\\Downarrow"),Er("\\Darr","\\Downarrow"),Er("\\lang","\\langle"),Er("\\rang","\\rangle"),Er("\\uarr","\\uparrow"),Er("\\uArr","\\Uparrow"),Er("\\Uarr","\\Uparrow"),Er("\\N","\\mathbb{N}"),Er("\\R","\\mathbb{R}"),Er("\\Z","\\mathbb{Z}"),Er("\\alef","\\aleph"),Er("\\alefsym","\\aleph"),Er("\\Alpha","\\mathrm{A}"),Er("\\Beta","\\mathrm{B}"),Er("\\bull","\\bullet"),Er("\\Chi","\\mathrm{X}"),Er("\\clubs","\\clubsuit"),Er("\\cnums","\\mathbb{C}"),Er("\\Complex","\\mathbb{C}"),Er("\\Dagger","\\ddagger"),Er("\\diamonds","\\diamondsuit"),Er("\\empty","\\emptyset"),Er("\\Epsilon","\\mathrm{E}"),Er("\\Eta","\\mathrm{H}"),Er("\\exist","\\exists"),Er("\\harr","\\leftrightarrow"),Er("\\hArr","\\Leftrightarrow"),Er("\\Harr","\\Leftrightarrow"),Er("\\hearts","\\heartsuit"),Er("\\image","\\Im"),Er("\\infin","\\infty"),Er("\\Iota","\\mathrm{I}"),Er("\\isin","\\in"),Er("\\Kappa","\\mathrm{K}"),Er("\\larr","\\leftarrow"),Er("\\lArr","\\Leftarrow"),Er("\\Larr","\\Leftarrow"),Er("\\lrarr","\\leftrightarrow"),Er("\\lrArr","\\Leftrightarrow"),Er("\\Lrarr","\\Leftrightarrow"),Er("\\Mu","\\mathrm{M}"),Er("\\natnums","\\mathbb{N}"),Er("\\Nu","\\mathrm{N}"),Er("\\Omicron","\\mathrm{O}"),Er("\\plusmn","\\pm"),Er("\\rarr","\\rightarrow"),Er("\\rArr","\\Rightarrow"),Er("\\Rarr","\\Rightarrow"),Er("\\real","\\Re"),Er("\\reals","\\mathbb{R}"),Er("\\Reals","\\mathbb{R}"),Er("\\Rho","\\mathrm{P}"),Er("\\sdot","\\cdot"),Er("\\sect","\\S"),Er("\\spades","\\spadesuit"),Er("\\sub","\\subset"),Er("\\sube","\\subseteq"),Er("\\supe","\\supseteq"),Er("\\Tau","\\mathrm{T}"),Er("\\thetasym","\\vartheta"),Er("\\weierp","\\wp"),Er("\\Zeta","\\mathrm{Z}"),Er("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Er("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Er("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Er("\\bra","\\mathinner{\\langle{#1}|}"),Er("\\ket","\\mathinner{|{#1}\\rangle}"),Er("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Er("\\Bra","\\left\\langle#1\\right|"),Er("\\Ket","\\left|#1\\right\\rangle"),Er("\\angln","{\\angl n}"),Er("\\blue","\\textcolor{##6495ed}{#1}"),Er("\\orange","\\textcolor{##ffa500}{#1}"),Er("\\pink","\\textcolor{##ff00af}{#1}"),Er("\\red","\\textcolor{##df0030}{#1}"),Er("\\green","\\textcolor{##28ae7b}{#1}"),Er("\\gray","\\textcolor{gray}{#1}"),Er("\\purple","\\textcolor{##9d38bd}{#1}"),Er("\\blueA","\\textcolor{##ccfaff}{#1}"),Er("\\blueB","\\textcolor{##80f6ff}{#1}"),Er("\\blueC","\\textcolor{##63d9ea}{#1}"),Er("\\blueD","\\textcolor{##11accd}{#1}"),Er("\\blueE","\\textcolor{##0c7f99}{#1}"),Er("\\tealA","\\textcolor{##94fff5}{#1}"),Er("\\tealB","\\textcolor{##26edd5}{#1}"),Er("\\tealC","\\textcolor{##01d1c1}{#1}"),Er("\\tealD","\\textcolor{##01a995}{#1}"),Er("\\tealE","\\textcolor{##208170}{#1}"),Er("\\greenA","\\textcolor{##b6ffb0}{#1}"),Er("\\greenB","\\textcolor{##8af281}{#1}"),Er("\\greenC","\\textcolor{##74cf70}{#1}"),Er("\\greenD","\\textcolor{##1fab54}{#1}"),Er("\\greenE","\\textcolor{##0d923f}{#1}"),Er("\\goldA","\\textcolor{##ffd0a9}{#1}"),Er("\\goldB","\\textcolor{##ffbb71}{#1}"),Er("\\goldC","\\textcolor{##ff9c39}{#1}"),Er("\\goldD","\\textcolor{##e07d10}{#1}"),Er("\\goldE","\\textcolor{##a75a05}{#1}"),Er("\\redA","\\textcolor{##fca9a9}{#1}"),Er("\\redB","\\textcolor{##ff8482}{#1}"),Er("\\redC","\\textcolor{##f9685d}{#1}"),Er("\\redD","\\textcolor{##e84d39}{#1}"),Er("\\redE","\\textcolor{##bc2612}{#1}"),Er("\\maroonA","\\textcolor{##ffbde0}{#1}"),Er("\\maroonB","\\textcolor{##ff92c6}{#1}"),Er("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Er("\\maroonD","\\textcolor{##ca337c}{#1}"),Er("\\maroonE","\\textcolor{##9e034e}{#1}"),Er("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Er("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Er("\\purpleC","\\textcolor{##aa87ff}{#1}"),Er("\\purpleD","\\textcolor{##7854ab}{#1}"),Er("\\purpleE","\\textcolor{##543b78}{#1}"),Er("\\mintA","\\textcolor{##f5f9e8}{#1}"),Er("\\mintB","\\textcolor{##edf2df}{#1}"),Er("\\mintC","\\textcolor{##e0e5cc}{#1}"),Er("\\grayA","\\textcolor{##f6f7f7}{#1}"),Er("\\grayB","\\textcolor{##f0f1f2}{#1}"),Er("\\grayC","\\textcolor{##e3e5e6}{#1}"),Er("\\grayD","\\textcolor{##d6d8da}{#1}"),Er("\\grayE","\\textcolor{##babec2}{#1}"),Er("\\grayF","\\textcolor{##888d93}{#1}"),Er("\\grayG","\\textcolor{##626569}{#1}"),Er("\\grayH","\\textcolor{##3b3e40}{#1}"),Er("\\grayI","\\textcolor{##21242c}{#1}"),Er("\\kaBlue","\\textcolor{##314453}{#1}"),Er("\\kaGreen","\\textcolor{##71B307}{#1}");var Vn={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Gn=function(){function e(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new On(Hn,t.macros),this.mode=r,this.stack=[]}var t=e.prototype;return t.feed=function(e){this.lexer=new Rn(e,this.settings)},t.switchMode=function(e){this.mode=e},t.beginGroup=function(){this.macros.beginGroup()},t.endGroup=function(){this.macros.endGroup()},t.endGroups=function(){this.macros.endGroups()},t.future=function(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},t.popToken=function(){return this.future(),this.stack.pop()},t.pushToken=function(e){this.stack.push(e)},t.pushTokens=function(e){var t;(t=this.stack).push.apply(t,e)},t.scanArgument=function(e){var t,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken();var a=this.consumeArg(["]"]);n=a.tokens,r=a.end}else{var i=this.consumeArg();n=i.tokens,t=i.start,r=i.end}return this.pushToken(new Dr("EOF",r.loc)),this.pushTokens(n),t.range(r,"")},t.consumeSpaces=function(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}},t.consumeArg=function(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var a,i=this.future(),o=0,s=0;do{if(a=this.popToken(),t.push(a),"{"===a.text)++o;else if("}"===a.text){if(-1===--o)throw new n("Extra }",a)}else if("EOF"===a.text)throw new n("Unexpected end of input in a macro argument, expected '"+(e&&r?e[s]:"}")+"'",a);if(e&&r)if((0===o||1===o&&"{"===e[s])&&a.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==o||r);return"{"===i.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:a}},t.consumeArgs=function(e,t){if(t){if(t.length!==e+1)throw new n("The length of delimiters doesn't match the number of args!");for(var r=t[0],a=0;athis.settings.maxExpand)throw new n("Too many expansions: infinite loop or need to increase maxExpand setting");var i=a.tokens,o=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs)for(var s=(i=i.slice()).length-1;s>=0;--s){var l=i[s];if("#"===l.text){if(0===s)throw new n("Incomplete placeholder at end of macro body",l);if("#"===(l=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new n("Not a valid argument number",l);var h;(h=i).splice.apply(h,[s,2].concat(o[+l.text-1]))}}}return this.pushTokens(i),i},t.expandAfterFuture=function(){return this.expandOnce(),this.future()},t.expandNextToken=function(){for(;;){var e=this.expandOnce();if(e instanceof Dr)return e.treatAsRelax&&(e.text="\\relax"),this.stack.pop()}throw new Error},t.expandMacro=function(e){return this.macros.has(e)?this.expandTokens([new Dr(e)]):void 0},t.expandTokens=function(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;){var n=this.expandOnce(!0);n instanceof Dr&&(n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(this.stack.pop()))}return t},t.expandMacroAsText=function(e){var t=this.expandMacro(e);return t?t.map((function(e){return e.text})).join(""):t},t._getExpansion=function(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var n="function"==typeof t?t(this):t;if("string"==typeof n){var a=0;if(-1!==n.indexOf("#"))for(var i=n.replace(/##/g,"");-1!==i.indexOf("#"+(a+1));)++a;for(var o=new Rn(n,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:a}}return n},t.isDefined=function(e){return this.macros.has(e)||Nn.hasOwnProperty(e)||ae.math.hasOwnProperty(e)||ae.text.hasOwnProperty(e)||Vn.hasOwnProperty(e)},t.isExpandable=function(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Nn.hasOwnProperty(e)&&!Nn[e].primitive},e}(),Un={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},Yn={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"},Xn=function(){function e(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Gn(e,t,this.mode),this.settings=t,this.leftrightDepth=0}var t=e.prototype;return t.expect=function(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new n("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()},t.consume=function(){this.nextToken=null},t.fetch=function(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},t.switchMode=function(e){this.mode=e,this.gullet.switchMode(e)},t.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}},t.subparse=function(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Dr("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r},t.parseExpression=function(t,r){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(-1!==e.endOfExpression.indexOf(a.text))break;if(r&&a.text===r)break;if(t&&Nn[a.text]&&Nn[a.text].infix)break;var i=this.parseAtom(r);if(!i)break;"internal"!==i.type&&n.push(i)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)},t.handleInfixNodes=function(e){for(var t,r=-1,a=0;a=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var s,l=ae[this.mode][t].group,h=Lr.range(e);if(te.hasOwnProperty(l)){var m=l;s={type:"atom",mode:this.mode,family:m,loc:h,text:t}}else s={type:l,mode:this.mode,loc:h,text:t};i=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(S(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),i={type:"textord",mode:"text",loc:Lr.range(e),text:t}}if(this.consume(),o)for(var c=0;c *:first-child { + /* This make the first thing in the preamble align with the sidebar */ + padding-top: 0; + margin-top: 0; +} + +header { + margin-bottom: 30px; +} + +header.odoc-preamble { + grid-column: 2; + grid-row: 3; +} + +nav { + font-family: "Fira Sans", sans-serif; +} + +nav.odoc-nav { + grid-column: 2; + grid-row: 2; +} + +/* Basic markup elements */ + +b, strong { + font-weight: bold; +} + +i { + font-style: italic; +} + +em, i em.odd{ + font-style: italic; +} + +em.odd, i em { + font-style: normal; +} + +sup { + vertical-align: super; +} + +sub { + vertical-align: sub; +} + +sup, sub { + font-size: 12px; + line-height: 0; + margin-left: 0.2ex; +} + +ul, ol { + list-style-position: outside +} + +ul>li { + margin-left: 22px; +} + +ol>li { + margin-left: 27.2px; +} + +li>*:first-child { + margin-top: 0 +} + +/* Text alignements, this should be forbidden. */ + +.left { + text-align: left; +} + +.right { + text-align: right; +} + +.center { + text-align: center; +} + +/* Links and anchors */ + +a { + text-decoration: none; + color: var(--link-color); +} + +.odoc-src pre a { + color: inherit; +} + +a:hover { + box-shadow: 0 1px 0 0 var(--link-color); +} + +/* Linked highlight */ +*:target { + background-color: var(--target-background) !important; + box-shadow: 0 0px 0 1px var(--target-shadow) !important; + border-radius: 1px; +} + +*:hover > a.anchor { + visibility: visible; +} + +a.anchor:before { + content: "#"; +} + +a.anchor:hover { + box-shadow: none; + text-decoration: none; + color: var(--anchor-hover); +} + +a.anchor { + visibility: hidden; + position: absolute; + /* top: 0px; */ + /* margin-left: -3ex; */ + margin-left: -1.3em; + font-weight: normal; + font-style: normal; + padding-right: 0.4em; + padding-left: 0.4em; + /* To remain selectable */ + color: var(--anchor-color); +} + +.spec > a.anchor { + margin-left: -2.3em; + padding-right: 0.9em; +} + +.xref-unresolved { + color: #2C94BD; +} +.xref-unresolved:hover { + box-shadow: 0 1px 0 0 var(--xref-shadow); +} + +/* Source links float inside preformated text or headings. */ +a.source_link { + float: right; + color: var(--source-color); + font-family: "Fira Sans", sans-serif; + font-size: initial; +} + +/* Section and document divisions. + Until at least 4.03 many of the modules of the stdlib start at .h7, + we restart the sequence there like h2 */ + +h1, h2, h3, h4, h5, h6, .h7, .h8, .h9, .h10 { + font-family: "Fira Sans", sans-serif; + font-weight: 400; + padding-top: 0.1em; + line-height: 1.2; + overflow-wrap: break-word; +} + +.odoc-preamble h1 { + margin-top: 10px; +} + +h1 { + font-weight: 500; + font-size: 2.441em; +} + +h1 { + font-weight: 500; + font-size: 1.953em; + box-shadow: 0 1px 0 0 var(--header-shadow); +} + +h2 { + font-size: 1.563em; +} + +h3 { + font-size: 1.25em; +} + +small, .font_small { + font-size: 0.8em; +} + +h1 code, h1 tt { + font-size: inherit; + font-weight: inherit; +} + +h2 code, h2 tt { + font-size: inherit; + font-weight: inherit; +} + +h3 code, h3 tt { + font-size: inherit; + font-weight: inherit; +} + +h3 code, h3 tt { + font-size: inherit; + font-weight: inherit; +} + +h4 { + font-size: 1.12em; +} + +/* Comment delimiters, hidden but accessible to screen readers and + selected for copy/pasting */ + +/* Taken from bootstrap */ +/* See also https://stackoverflow.com/a/27769435/4220738 */ +.comment-delim { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +/* Preformatted and code */ + +tt, code, pre { + font-family: "Fira Mono", monospace; + font-weight: 400; +} + +.odoc pre { + padding: 0.1em; + border: 1px solid var(--pre-border-color); + border-radius: 5px; + overflow-x: auto; +} + +.odoc p code, +.odoc li code { + background-color: var(--li-code-background); + color: var(--li-code-color); + border-radius: 3px; + padding: 0 0.3ex; +} + +p a > code, li a > code { + color: var(--link-color); +} + +.odoc code { + white-space: pre-wrap; +} + +/* Code blocks (e.g. Examples) */ + +.odoc pre code { + font-size: 0.893rem; +} + +/* Code lexemes */ + +.keyword { + font-weight: 500; +} + +.arrow { white-space: nowrap } + +/* Module member specification */ + +.spec { + background-color: var(--spec-summary-background); + border-radius: 3px; + border-left: 4px solid var(--spec-summary-border-color); + border-right: 5px solid transparent; + padding: 0.35em 0.5em; +} + +.spec .label, .spec .optlabel { + color: var(--spec-label-color); +} + +li:not(:last-child) > .def-doc { + margin-bottom: 15px; +} + +/* Spacing between items */ +div.odoc-spec,.odoc-include { + margin-bottom: 2em; +} + +.spec.type .variant p, .spec.type .record p { + margin: 5px; +} + +.spec.type .variant, .spec.type .record { + margin-left: 2ch; +} + +.spec.type li.variant, .spec.type li.record { + list-style: none; +} + +.spec.type .record > code, .spec.type .variant > code { + min-width: 40%; +} + +.spec.type > ol { + margin-top: 0; + margin-bottom: 0; +} + +.spec.type .record > .def-doc, .spec.type .variant > .def-doc { + min-width:50%; + padding: 0.25em 0.5em; + margin-left: 10%; + border-radius: 3px; + background: var(--main-background); + box-shadow: 1px 1px 2px lightgrey; +} + +div.def { + margin-top: 0; + text-indent: -2ex; + padding-left: 2ex; +} + +div.def-doc>*:first-child { + margin-top: 0; +} + +/* Collapsible inlined include and module */ + +.odoc-include details { + position: relative; +} + +.odoc-include.shadowed-include { + display: none; +} + +.odoc-include details:after { + z-index: -100; + display: block; + content: " "; + position: absolute; + border-radius: 0 1ex 1ex 0; + right: -20px; + top: 1px; + bottom: 1px; + width: 15px; + background: var(--spec-details-after-background, rgba(0, 4, 15, 0.05)); + box-shadow: 0 0px 0 1px var(--spec-details-after-shadow, rgba(204, 204, 204, 0.53)); +} + +.odoc-include summary { + position: relative; + margin-bottom: 1em; + cursor: pointer; + outline: none; +} + +.odoc-include summary:hover { + background-color: var(--spec-summary-hover-background); +} + +/* FIXME: Does not work in Firefox. */ +.odoc-include summary::-webkit-details-marker { + color: #888; + transform: scaleX(-1); + position: absolute; + top: calc(50% - 5px); + height: 11px; + right: -29px; +} + +/* Records and variants FIXME */ + +div.def table { + text-indent: 0em; + padding: 0; + margin-left: -2ex; +} + +td.def { + padding-left: 2ex; +} + +td.def-doc *:first-child { + margin-top: 0em; +} + +/* Lists of @tags */ + +.at-tags { list-style-type: none; margin-left: -3ex; } +.at-tags li { padding-left: 3ex; text-indent: -3ex; } +.at-tags .at-tag { text-transform: capitalize } + +/* Alert emoji */ + +.alert::before, .deprecated::before { + content: '⚠️ '; +} + +/* Lists of modules */ + +.modules { list-style-type: none; margin-left: -3ex; } +.modules li { padding-left: 3ex; text-indent: -3ex; margin-top: 5px } +.modules .synopsis { padding-left: 1ch; } + +/* Odig package index */ + +.packages { list-style-type: none; margin-left: -3ex; } +.packages li { padding-left: 3ex; text-indent: -3ex } +.packages li a.anchor { padding-right: 0.5ch; padding-left: 3ch; } +.packages .version { font-size: 10px; color: var(--by-name-version-color); } +.packages .synopsis { padding-left: 1ch } + +.by-name nav a { + text-transform: uppercase; + font-size: 18px; + margin-right: 1ex; + color: var(--by-name-nav-link-color,); + display: inline-block; +} + +.by-tag nav a { + margin-right: 1ex; + color: var(--by-name-nav-link-color); + display: inline-block; +} + +.by-tag ol { list-style-type: none; } +.by-tag ol.tags li { margin-left: 1ch; display: inline-block } +.by-tag td:first-child { text-transform: uppercase; } + +/* Odig package page */ + +.package nav { + display: inline; + font-size: 14px; + font-weight: normal; +} + +.package .version { + font-size: 14px; +} + +.package.info { + margin: 0; +} + +.package.info td:first-child { + font-style: italic; + padding-right: 2ex; +} + +.package.info ul { + list-style-type: none; + display: inline; + margin: 0; +} + +.package.info li { + display: inline-block; + margin: 0; + margin-right: 1ex; +} + +#info-authors li, #info-maintainers li { + display: block; +} + +/* Sidebar and TOC */ + +.odoc-toc:before { + display: block; + content: "Contents"; + text-transform: uppercase; + font-size: 1em; + margin: 1.414em 0 0.5em; + font-weight: 500; + color: var(--toc-before-color); + line-height: 1.2; +} + +/* When a search bar is present, we need the sticky sidebar to be a bit lower, + so `top` is higher */ + +.odoc-search + * + .odoc-toc { + --toc-top: calc(var(--search-bar-height) + var(--search-padding-top) + 20px); + max-height: calc(100vh - 2 * var(--toc-top)); + top: var(--toc-top) +} + +.odoc-toc { + --toc-top: 20px; + width: 28ex; + background: var(--toc-background); + overflow: auto; + color: var(--toc-color); + padding-left: 2ex; + padding-right: 2ex; + grid-row-start: 3; + grid-row-end: 5; + grid-column: 1; + height: fit-content; + border: solid 1px var(--border); + border-radius: 5px; + position:sticky; + max-height: calc(100vh - 2 * var(--toc-top)); + top: var(--toc-top) +} + +.odoc-toc ul li a { + font-family: "Fira Sans", sans-serif; + font-size: 0.95em; + color: var(--color); + font-weight: 400; + line-height: 1.2em; + display: block; +} + +.odoc-sidebar ul li a:hover { + box-shadow: none; + text-decoration: underline; +} + +:root { + --search-bar-height: 25px; + --search-padding-top: 1rem; +} + +.odoc-search { + position: sticky; + top: 0; + background: var(--main-background); + /* This amounts to fit-content when the search is not active, but when you + have the search results displayed, you do not want the height of the search + container to change. */ + height: calc(var(--search-bar-height) + var(--search-padding-top)); + width: 100%; + padding-top: var(--search-padding-top); + z-index: 1; + grid-row: 1; + grid-column-start: 1; + grid-column-end: 3; +} + + +.odoc-search .search-inner { + width: 100%; + position: relative; + left: 0; + display: grid; + /* The second column is for the search snake, which has 0 width */ + grid-template-columns: 1fr 0fr; + grid-row-gap: 1rem; + /* The second row is for the search results. It has a width, but only */ + grid-template-rows: min-content 0px; + background: transparent; +} + +.odoc-search .search-bar { + position: relative; + z-index: 2; + font-size: 1em; + transition: font-size 0.3s; + box-shadow: 0px 0px 0.2rem 0.3em var(--main-background); + height: var(--search-bar-height); +} + +.odoc-search:focus-within .search-bar { + font-size: 1.1em; +} + +.odoc-search:not(:focus-within) .search-result { + display: none; +} + +.odoc-search .search-result:empty { + display: none; +} + +.odoc-search .search-result { + grid-row: 2; + background: var(--toc-background); + position: absolute; + left: 0; + right: 0; + border: solid; + border-color: var(--search-results-border); + border-width: 1px; + border-radius: 6px; + box-shadow: 0 3px 10px 2px var(--search-results-shadow), 0 0 3px 4px var(--main-background), 0px -1rem 0px 0px var(--main-background); + /* Works better on smallish screens with this */ + max-height: calc(min(40rem, 50vh)); + overflow-y: auto; +} + +.search-bar { + /* inputs are of fixed size by default, even if you display:block them */ + width: 100%; +} + + +.odoc-search .search-no-result { + color: var(--color); + border-bottom: var(--search-results-border) solid 1px; + background-color: inherit; + outline: 0; + padding: 10px; + padding-right: 0.5rem; +} + +.search-bar-container { + display: flex; + align-items: stretch; + border-bottom: 1rem solid var(--main-background); +} + +.search-snake { + grid-row: 1; + grid-column: 2; + display: flex; + align-items: center; + width: 0; + z-index: 2; + position: relative; + left: 0; + margin-top: 4px; + margin-bottom: 4px; + /* Otherwise the search snake flickers for very fast searches. */ + transition: opacity 0.2s; + opacity: 0; +} + +.search-snake.search-busy { + opacity: 1; +} + +.search-snake:before { + content: " "; + display: block; + aspect-ratio: 1 / 1; + height: 100%; + margin-right: 4px; + border-radius: 50%; + border: 3px solid #aaa; + border-color: var(--search-snake) transparent var(--search-snake) transparent; + animation: search-snake 1.2s linear infinite; + position: absolute; + right: 0; +} + +@keyframes search-snake { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} + +:root { + --kind-font-size-factor: 0.8; +} + +.odoc-search .search-entry { + color: var(--color); + display: grid; + /* Possible kinds are the following : + "doc" "type" "mod" "exn" "class" "meth" "cons" "sig" "cons" "field" "val" + and "ext". + As the longest is 5 characters (and the font monospace), we give 5 + character size to the column. However the font used for kind is a little + smaller, so we adjust by this factor. + */ + grid-template-columns: [kinds] calc(var(--kind-font-size-factor) * 5ch) [titles] 1fr; + column-gap: 0.5rem; + border-bottom: var(--search-results-border) solid 1px; + background-color: inherit; + outline: 0; + padding: 0.4rem 0.4rem 0.7rem 0.7rem; +} +.odoc-search .search-entry p { + margin: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.odoc-search .search-entry:focus-visible { + box-shadow: none; + background-color: var(--target-background); +} + +.odoc-search .search-entry:hover { + box-shadow: none; + background-color: var(--toc-background-emph); +} + +.odoc-search .search-entry .entry-kind { + grid-row: 1/2; + grid-column: 1/2; + line-height: 1.4rem; + font-size: calc(var(--kind-font-size-factor) * 1em); + font-weight: bold; + text-align: right; + position: relative; + bottom: 0; +} + +.odoc-search .search-entry pre { + border: none; + margin: 0; +} + +.odoc-search .search-entry pre code { + font-size: 1em; + background-color: var(--li-code-background); + color: var(--li-code-color); + border-radius: 3px; + padding: 0 0.3ex; +} + +.odoc-search .search-entry .entry-title { + width: 100%; + display: block; + grid-column: 2/2; + grid-row: 1/2; + align-self: end; + line-height: 1.4rem; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.odoc-search .entry-name { + font-weight: bold; +} + +.odoc-search .prefix-name { + font-weight: bold; +} + +.odoc-search .search-entry .prefix-name { + opacity: 0.7; +} + +.odoc-search .entry-rhs { + white-space: nowrap; +} + +.odoc-search .search-entry .entry-content { + flex-grow: 1; + flex-shrink: 1; + min-width: 0; +} + +.odoc-search .search-entry .entry-comment { + max-height: 1.5em; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: 0.95em; + grid-row: 2/2; + grid-column: 2/2; +} + +.odoc-search .search-entry .entry-comment ul { + white-space: nowrap; + display: inline; +} + +.odoc-search .search-entry .entry-comment li { + display: inline; + white-space: nowrap; +} + +.odoc-search .search-entry .entry-comment ul>li::before { + content: '•'; +} + +.odoc-search .search-entry .entry-comment div { + display: inline; + white-space: nowrap; +} + +.odoc-search .search-entry .entry-comment p { + display: inline; + white-space: nowrap; +} + +.odoc-search .search-entry .entry-comment code { + display: inline; + white-space: nowrap; +} + +/* First level titles */ + +.odoc-toc>ul>li>a { + font-weight: 500; +} + +.odoc-toc li ul { + margin: 0px; + padding-top: 0.25em; +} + +.odoc-toc ul { + list-style-type: none; +} + +.odoc-toc ul li { + padding: 0.25em 0; +} + +.odoc-toc>ul>li { + margin-bottom: 0.3em; +} + +.odoc-toc ul li li { + border-left: 1px solid var(--toc-list-border); + margin-left: 5px; + padding-left: 12px; +} + +/* Tables */ + +.odoc-table { + margin: 1em; +} + +.odoc-table td, +.odoc-table th { + padding-left: 0.5em; + padding-right: 0.5em; + border: 1px solid black; +} + +.odoc-table th { + font-weight: bold; +} + +/* Mobile adjustements. */ + +@media only screen and (max-width: 110ex) { + body { + margin: 2em; + padding: 0; + } + + body.odoc { + display: block; + } + + .odoc-toc { + position: static; + width: auto; + min-width: unset; + max-width: unset; + border: none; + padding: 0.2em 1em; + border-radius: 5px; + margin-bottom: 2em; + } +} + +/* Print adjustements. */ + +@media print { + body { + color: black; + background: white; + } + + body nav:first-child { + visibility: hidden; + } +} + +/* Source code. */ + +.source_container { + display: flex; +} + +.source_line_column { + padding-right: 0.5em; + text-align: right; + background: #eee8d5; +} + +.source_line { + padding: 0 1em; +} + +.source_code { + flex-grow: 1; + background: #fdf6e3; + padding: 0 0.3em; + color: #657b83; +} + +/* Source directories */ + +.odoc-directory::before { + content: "📁"; + margin: 0.3em; + font-size: 1.3em; +} + +.odoc-file::before { + content: "📄"; + margin: 0.3em; + font-size: 1.3em; +} + +.odoc-folder-list { + list-style: none; +} + +/* Syntax highlighting (based on github-gist) */ + +.hljs { + display: block; + background: var(--code-background); + padding: 0.5em; + color: var(--color); + overflow-x: auto; +} + +.hljs-comment, +.hljs-meta { + color: #969896; +} + +.hljs-string, +.hljs-variable, +.hljs-template-variable, +.hljs-strong, +.hljs-emphasis, +.hljs-quote { + color: #df5000; +} + +.hljs-keyword, +.hljs-selector-tag { + color: #a71d5d; +} + +.hljs-type, +.hljs-class .hljs-title { + color: #458; + font-weight: 500; +} + +.hljs-literal, +.hljs-symbol, +.hljs-bullet, +.hljs-attribute { + color: #0086b3; +} + +.hljs-section, +.hljs-name { + color: #63a35c; +} + +.hljs-tag { + color: #333333; +} + +.hljs-attr, +.hljs-selector-id, +.hljs-selector-class, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #795da3; +} + +.hljs-addition { + color: #55a532; + background-color: #eaffea; +} + +.hljs-deletion { + color: #bd2c00; + background-color: #ffecec; +} + +.hljs-link { + text-decoration: underline; +} + +.VAL, +.TYPE, +.LET, +.REC, +.IN, +.OPEN, +.NONREC, +.MODULE, +.METHOD, +.LETOP, +.INHERIT, +.INCLUDE, +.FUNCTOR, +.EXTERNAL, +.CONSTRAINT, +.ASSERT, +.AND, +.END, +.CLASS, +.STRUCT, +.SIG { + color: #859900; + ; +} + +.WITH, +.WHILE, +.WHEN, +.VIRTUAL, +.TRY, +.TO, +.THEN, +.PRIVATE, +.OF, +.NEW, +.MUTABLE, +.MATCH, +.LAZY, +.IF, +.FUNCTION, +.FUN, +.FOR, +.EXCEPTION, +.ELSE, +.TO, +.DOWNTO, +.DO, +.DONE, +.BEGIN, +.AS { + color: #cb4b16; +} + +.TRUE, +.FALSE { + color: #b58900; +} + +.failwith, +.INT, +.SEMISEMI, +.LIDENT { + color: #2aa198; +} + +.STRING, +.CHAR, +.UIDENT { + color: #b58900; +} + +.DOCSTRING { + color: #268bd2; +} + +.COMMENT { + color: #93a1a1; +} + +/*--------------------------------------------------------------------------- + Copyright (c) 2016 The odoc contributors + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + ---------------------------------------------------------------------------*/ \ No newline at end of file diff --git a/odoc.support/odoc_search.js b/odoc.support/odoc_search.js new file mode 100644 index 000000000..0dc659d27 --- /dev/null +++ b/odoc.support/odoc_search.js @@ -0,0 +1,66 @@ +/* The browsers interpretation of the CORS origin policy prevents to run + webworkers from javascript files fetched from the file:// protocol. This hack + is to workaround this restriction. */ +function createWebWorker() { + var searchs = search_urls.map((search_url) => { + let parts = document.location.href.split("/"); + parts[parts.length - 1] = search_url; + return '"' + parts.join("/") + '"'; + }); + blobContents = ["importScripts(" + searchs.join(",") + ");"]; + var blob = new Blob(blobContents, { type: "application/javascript" }); + var blobUrl = URL.createObjectURL(blob); + + var worker = new Worker(blobUrl); + URL.revokeObjectURL(blobUrl); + + return worker; +} + +var worker; +var waiting = 0; + +function wait() { + waiting = waiting + 1; + document.querySelector(".search-snake").classList.add("search-busy"); +} + +function stop_waiting() { + if (waiting > 0) waiting = waiting - 1; + else waiting = 0; + if (waiting == 0) { + document.querySelector(".search-snake").classList.remove("search-busy"); + } +} + +document.querySelector(".search-bar").addEventListener("focus", (ev) => { + if (typeof worker == "undefined") { + worker = createWebWorker(); + worker.onmessage = (e) => { + stop_waiting(); + let results = e.data; + let search_results = document.querySelector(".search-result"); + search_results.innerHTML = ""; + let f = (entry) => { + let search_result = document.createElement("a"); + search_result.classList.add("search-entry"); + search_result.href = base_url + entry.url; + search_result.innerHTML = entry.html; + search_results.appendChild(search_result); + }; + results.forEach(f); + let search_request = document.querySelector(".search-bar").value; + if (results.length == 0 && search_request != "") { + let no_result = document.createElement("div"); + no_result.classList.add("search-no-result"); + no_result.innerText = "No result..."; + search_results.appendChild(no_result); + } + }; + } +}); + +document.querySelector(".search-bar").addEventListener("input", (ev) => { + wait(); + worker.postMessage(ev.target.value); +}); diff --git a/stdlib/CamlinternalFormat/index.html b/stdlib/CamlinternalFormat/index.html new file mode 100644 index 000000000..819e280d5 --- /dev/null +++ b/stdlib/CamlinternalFormat/index.html @@ -0,0 +1,53 @@ + +CamlinternalFormat (docs.stdlib.CamlinternalFormat)

Module CamlinternalFormat

val is_in_char_set : CamlinternalFormatBasics.char_set -> char -> bool
type mutable_char_set = bytes
val create_char_set : unit -> mutable_char_set
val add_in_char_set : mutable_char_set -> char -> unit
type ('a, 'b, 'c, 'd, 'e, 'f) param_format_ebb =
  1. | Param_format_EBB : ('x -> 'a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.fmt -> + ('a, 'b, 'c, 'd, 'e, 'f) + param_format_ebb
val param_format_of_ignored_format : + ('a, 'b, 'c, 'd, 'y, 'x) CamlinternalFormatBasics.ignored -> + ('x, 'b, 'c, 'y, 'e, 'f) CamlinternalFormatBasics.fmt -> + ('a, 'b, 'c, 'd, 'e, 'f) param_format_ebb
type ('b, 'c) acc_formatting_gen =
  1. | Acc_open_tag of ('b, 'c) acc
  2. | Acc_open_box of ('b, 'c) acc
and ('b, 'c) acc =
  1. | Acc_formatting_lit of ('b, 'c) acc * CamlinternalFormatBasics.formatting_lit
  2. | Acc_formatting_gen of ('b, 'c) acc * ('b, 'c) acc_formatting_gen
  3. | Acc_string_literal of ('b, 'c) acc * string
  4. | Acc_char_literal of ('b, 'c) acc * char
  5. | Acc_data_string of ('b, 'c) acc * string
  6. | Acc_data_char of ('b, 'c) acc * char
  7. | Acc_delay of ('b, 'c) acc * 'b -> 'c
  8. | Acc_flush of ('b, 'c) acc
  9. | Acc_invalid_arg of ('b, 'c) acc * string
  10. | End_of_acc
type ('a, 'b) heter_list =
  1. | Cons : 'c * ('a, 'b) heter_list -> ('c -> 'a, 'b) heter_list
  2. | Nil : ('b, 'b) heter_list
type ('b, 'c, 'e, 'f) fmt_ebb =
  1. | Fmt_EBB : ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.fmt -> ('b, + 'c, + 'e, + 'f) + fmt_ebb
val make_printf : + (('b, 'c) acc -> 'd) -> + ('b, 'c) acc -> + ('a, 'b, 'c, 'c, 'c, 'd) CamlinternalFormatBasics.fmt -> + 'a
val make_iprintf : + ('s -> 'f) -> + 's -> + ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.fmt -> + 'a
val output_acc : out_channel -> (out_channel, unit) acc -> unit
val bufput_acc : Buffer.t -> (Buffer.t, unit) acc -> unit
val strput_acc : Buffer.t -> (unit, string) acc -> unit
val type_format : + ('x, 'b, 'c, 't, 'u, 'v) CamlinternalFormatBasics.fmt -> + ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.fmtty -> + ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.fmt
val fmt_ebb_of_string : + ?legacy_behavior:bool -> + string -> + ('b, 'c, 'e, 'f) fmt_ebb
val format_of_string_fmtty : + string -> + ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.fmtty -> + ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.format6
val format_of_string_format : + string -> + ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.format6 -> + ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.format6
val char_of_iconv : CamlinternalFormatBasics.int_conv -> char
val string_of_formatting_lit : + CamlinternalFormatBasics.formatting_lit -> + string
val string_of_fmtty : + ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.fmtty -> + string
val string_of_fmt : + ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.fmt -> + string
val open_box_of_string : string -> int * CamlinternalFormatBasics.block_type
val symm : + ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) + CamlinternalFormatBasics.fmtty_rel -> + ('a2, 'b2, 'c2, 'd2, 'e2, 'f2, 'a1, 'b1, 'c1, 'd1, 'e1, 'f1) + CamlinternalFormatBasics.fmtty_rel
val trans : + ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) + CamlinternalFormatBasics.fmtty_rel -> + ('a2, 'b2, 'c2, 'd2, 'e2, 'f2, 'a3, 'b3, 'c3, 'd3, 'e3, 'f3) + CamlinternalFormatBasics.fmtty_rel -> + ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a3, 'b3, 'c3, 'd3, 'e3, 'f3) + CamlinternalFormatBasics.fmtty_rel
val recast : + ('a1, 'b1, 'c1, 'd1, 'e1, 'f1) CamlinternalFormatBasics.fmt -> + ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) + CamlinternalFormatBasics.fmtty_rel -> + ('a2, 'b2, 'c2, 'd2, 'e2, 'f2) CamlinternalFormatBasics.fmt
diff --git a/stdlib/CamlinternalFormatBasics/index.html b/stdlib/CamlinternalFormatBasics/index.html new file mode 100644 index 000000000..5d134d65f --- /dev/null +++ b/stdlib/CamlinternalFormatBasics/index.html @@ -0,0 +1,308 @@ + +CamlinternalFormatBasics (docs.stdlib.CamlinternalFormatBasics)

Module CamlinternalFormatBasics

type padty =
  1. | Left
  2. | Right
  3. | Zeros
type int_conv =
  1. | Int_d
  2. | Int_pd
  3. | Int_sd
  4. | Int_i
  5. | Int_pi
  6. | Int_si
  7. | Int_x
  8. | Int_Cx
  9. | Int_X
  10. | Int_CX
  11. | Int_o
  12. | Int_Co
  13. | Int_u
  14. | Int_Cd
  15. | Int_Ci
  16. | Int_Cu
type float_flag_conv =
  1. | Float_flag_
  2. | Float_flag_p
  3. | Float_flag_s
type float_kind_conv =
  1. | Float_f
  2. | Float_e
  3. | Float_E
  4. | Float_g
  5. | Float_G
  6. | Float_F
  7. | Float_h
  8. | Float_H
  9. | Float_CF
type float_conv = float_flag_conv * float_kind_conv
type char_set = string
type counter =
  1. | Line_counter
  2. | Char_counter
  3. | Token_counter
type ('a, 'b) padding =
  1. | No_padding : ('a, 'a) padding
  2. | Lit_padding : padty * int -> ('a, 'a) padding
  3. | Arg_padding : padty -> (int -> 'a, 'a) padding
type pad_option = int option
type ('a, 'b) precision =
  1. | No_precision : ('a, 'a) precision
  2. | Lit_precision : int -> ('a, 'a) precision
  3. | Arg_precision : (int -> 'a, 'a) precision
type prec_option = int option
type ('a, 'b, 'c) custom_arity =
  1. | Custom_zero : ('a, string, 'a) custom_arity
  2. | Custom_succ : ('a, 'b, 'c) custom_arity -> ('a, 'x -> 'b, 'x -> 'c) + custom_arity
type block_type =
  1. | Pp_hbox
  2. | Pp_vbox
  3. | Pp_hvbox
  4. | Pp_hovbox
  5. | Pp_box
  6. | Pp_fits
type formatting_lit =
  1. | Close_box
  2. | Close_tag
  3. | Break of string * int * int
  4. | FFlush
  5. | Force_newline
  6. | Flush_newline
  7. | Magic_size of string * int
  8. | Escaped_at
  9. | Escaped_percent
  10. | Scan_indic of char
type ('a, 'b, 'c, 'd, 'e, 'f) formatting_gen =
  1. | Open_tag : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c, 'd, 'e, 'f) + formatting_gen
  2. | Open_box : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c, 'd, 'e, 'f) + formatting_gen
and ('a, 'b, 'c, 'd, 'e, 'f) fmtty = + ('a, 'b, 'c, 'd, 'e, 'f, 'a, 'b, 'c, 'd, 'e, 'f) fmtty_rel
and ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel =
  1. | Char_ty : ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) + fmtty_rel -> (char -> + 'a1, + 'b1, + 'c1, + 'd1, + 'e1, + 'f1, + char -> + 'a2, + 'b2, + 'c2, + 'd2, + 'e2, + 'f2) + fmtty_rel
  2. | String_ty : ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) + fmtty_rel -> (string -> + 'a1, + 'b1, + 'c1, + 'd1, + 'e1, + 'f1, + string -> + 'a2, + 'b2, + 'c2, + 'd2, + 'e2, + 'f2) + fmtty_rel
  3. | Int_ty : ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel -> + (int -> 'a1, 'b1, 'c1, 'd1, 'e1, 'f1, int -> 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) + fmtty_rel
  4. | Int32_ty : ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) + fmtty_rel -> (int32 -> + 'a1, + 'b1, + 'c1, + 'd1, + 'e1, + 'f1, + int32 -> + 'a2, + 'b2, + 'c2, + 'd2, + 'e2, + 'f2) + fmtty_rel
  5. | Nativeint_ty : ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) + fmtty_rel -> (nativeint -> + 'a1, + 'b1, + 'c1, + 'd1, + 'e1, + 'f1, + nativeint -> + 'a2, + 'b2, + 'c2, + 'd2, + 'e2, + 'f2) + fmtty_rel
  6. | Int64_ty : ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) + fmtty_rel -> (int64 -> + 'a1, + 'b1, + 'c1, + 'd1, + 'e1, + 'f1, + int64 -> + 'a2, + 'b2, + 'c2, + 'd2, + 'e2, + 'f2) + fmtty_rel
  7. | Float_ty : ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) + fmtty_rel -> (float -> + 'a1, + 'b1, + 'c1, + 'd1, + 'e1, + 'f1, + float -> + 'a2, + 'b2, + 'c2, + 'd2, + 'e2, + 'f2) + fmtty_rel
  8. | Bool_ty : ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) + fmtty_rel -> (bool -> + 'a1, + 'b1, + 'c1, + 'd1, + 'e1, + 'f1, + bool -> + 'a2, + 'b2, + 'c2, + 'd2, + 'e2, + 'f2) + fmtty_rel
  9. | Format_arg_ty : ('g, 'h, 'i, 'j, 'k, 'l) fmtty + * ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel -> + (('g, 'h, 'i, 'j, 'k, 'l) format6 -> + 'a1, + 'b1, + 'c1, + 'd1, + 'e1, + 'f1, + ('g, 'h, 'i, 'j, 'k, 'l) format6 -> + 'a2, + 'b2, + 'c2, + 'd2, + 'e2, + 'f2) + fmtty_rel
  10. | Format_subst_ty : ('g, 'h, 'i, 'j, 'k, 'l, 'g1, 'b1, 'c1, 'j1, 'd1, 'a1) + fmtty_rel + * ('g, 'h, 'i, 'j, 'k, 'l, 'g2, 'b2, 'c2, 'j2, 'd2, 'a2) fmtty_rel + * ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel -> + (('g, 'h, 'i, 'j, 'k, 'l) format6 -> + 'g1, + 'b1, + 'c1, + 'j1, + 'e1, + 'f1, + ('g, 'h, 'i, 'j, 'k, 'l) format6 -> + 'g2, + 'b2, + 'c2, + 'j2, + 'e2, + 'f2) + fmtty_rel
  11. | Alpha_ty : ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) + fmtty_rel -> (('b1 -> 'x -> 'c1) -> + 'x -> + 'a1, + 'b1, + 'c1, + 'd1, + 'e1, + 'f1, + ('b2 -> 'x -> 'c2) -> + 'x -> + 'a2, + 'b2, + 'c2, + 'd2, + 'e2, + 'f2) + fmtty_rel
  12. | Theta_ty : ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) + fmtty_rel -> (('b1 -> 'c1) -> + 'a1, + 'b1, + 'c1, + 'd1, + 'e1, + 'f1, + ('b2 -> 'c2) -> + 'a2, + 'b2, + 'c2, + 'd2, + 'e2, + 'f2) + fmtty_rel
  13. | Any_ty : ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel -> + ('x -> 'a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'x -> 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) + fmtty_rel
  14. | Reader_ty : ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) + fmtty_rel -> ('x -> + 'a1, + 'b1, + 'c1, + ('b1 -> 'x) -> + 'd1, + 'e1, + 'f1, + 'x -> + 'a2, + 'b2, + 'c2, + ('b2 -> 'x) -> + 'd2, + 'e2, + 'f2) + fmtty_rel
  15. | Ignored_reader_ty : ('a1, + 'b1, + 'c1, + 'd1, + 'e1, + 'f1, + 'a2, + 'b2, + 'c2, + 'd2, + 'e2, + 'f2) + fmtty_rel -> ('a1, + 'b1, + 'c1, + ('b1 -> 'x) -> + 'd1, + 'e1, + 'f1, + 'a2, + 'b2, + 'c2, + ('b2 -> 'x) -> + 'd2, + 'e2, + 'f2) + fmtty_rel
  16. | End_of_fmtty : ('f1, 'b1, 'c1, 'd1, 'd1, 'f1, 'f2, 'b2, 'c2, 'd2, 'd2, 'f2) + fmtty_rel
and ('a, 'b, 'c, 'd, 'e, 'f) fmt =
  1. | Char : ('a, 'b, 'c, 'd, 'e, 'f) fmt -> (char -> 'a, 'b, 'c, 'd, 'e, 'f) fmt
  2. | Caml_char : ('a, 'b, 'c, 'd, 'e, 'f) fmt -> (char -> 'a, 'b, 'c, 'd, 'e, 'f) + fmt
  3. | String : ('x, string -> 'a) padding + * ('a, 'b, 'c, 'd, 'e, 'f) fmt -> ('x, 'b, 'c, 'd, 'e, 'f) fmt
  4. | Caml_string : ('x, string -> 'a) padding + * ('a, 'b, 'c, 'd, 'e, 'f) fmt -> ('x, 'b, 'c, 'd, 'e, 'f) fmt
  5. | Int : int_conv + * ('x, 'y) padding + * ('y, int -> 'a) precision + * ('a, 'b, 'c, 'd, 'e, 'f) fmt -> ('x, 'b, 'c, 'd, 'e, 'f) fmt
  6. | Int32 : int_conv + * ('x, 'y) padding + * ('y, int32 -> 'a) precision + * ('a, 'b, 'c, 'd, 'e, 'f) fmt -> ('x, 'b, 'c, 'd, 'e, 'f) fmt
  7. | Nativeint : int_conv + * ('x, 'y) padding + * ('y, nativeint -> 'a) precision + * ('a, 'b, 'c, 'd, 'e, 'f) fmt -> ('x, 'b, 'c, 'd, 'e, 'f) fmt
  8. | Int64 : int_conv + * ('x, 'y) padding + * ('y, int64 -> 'a) precision + * ('a, 'b, 'c, 'd, 'e, 'f) fmt -> ('x, 'b, 'c, 'd, 'e, 'f) fmt
  9. | Float : float_conv + * ('x, 'y) padding + * ('y, float -> 'a) precision + * ('a, 'b, 'c, 'd, 'e, 'f) fmt -> ('x, 'b, 'c, 'd, 'e, 'f) fmt
  10. | Bool : ('x, bool -> 'a) padding + * ('a, 'b, 'c, 'd, 'e, 'f) fmt -> ('x, 'b, 'c, 'd, 'e, 'f) fmt
  11. | Flush : ('a, 'b, 'c, 'd, 'e, 'f) fmt -> ('a, 'b, 'c, 'd, 'e, 'f) fmt
  12. | String_literal : string + * ('a, 'b, 'c, 'd, 'e, 'f) fmt -> ('a, 'b, 'c, 'd, 'e, 'f) fmt
  13. | Char_literal : char + * ('a, 'b, 'c, 'd, 'e, 'f) fmt -> ('a, 'b, 'c, 'd, 'e, 'f) fmt
  14. | Format_arg : pad_option + * ('g, 'h, 'i, 'j, 'k, 'l) fmtty + * ('a, 'b, 'c, 'd, 'e, 'f) fmt -> (('g, 'h, 'i, 'j, 'k, 'l) format6 -> + 'a, + 'b, + 'c, + 'd, + 'e, + 'f) + fmt
  15. | Format_subst : pad_option + * ('g, 'h, 'i, 'j, 'k, 'l, 'g2, 'b, 'c, 'j2, 'd, 'a) fmtty_rel + * ('a, 'b, 'c, 'd, 'e, 'f) fmt -> (('g, 'h, 'i, 'j, 'k, 'l) format6 -> + 'g2, + 'b, + 'c, + 'j2, + 'e, + 'f) + fmt
  16. | Alpha : ('a, 'b, 'c, 'd, 'e, 'f) fmt -> (('b -> 'x -> 'c) -> + 'x -> + 'a, + 'b, + 'c, + 'd, + 'e, + 'f) + fmt
  17. | Theta : ('a, 'b, 'c, 'd, 'e, 'f) fmt -> (('b -> 'c) -> 'a, 'b, 'c, 'd, 'e, 'f) + fmt
  18. | Formatting_lit : formatting_lit + * ('a, 'b, 'c, 'd, 'e, 'f) fmt -> ('a, 'b, 'c, 'd, 'e, 'f) fmt
  19. | Formatting_gen : ('a1, 'b, 'c, 'd1, 'e1, 'f1) formatting_gen + * ('f1, 'b, 'c, 'e1, 'e2, 'f2) fmt -> ('a1, 'b, 'c, 'd1, 'e2, 'f2) fmt
  20. | Reader : ('a, 'b, 'c, 'd, 'e, 'f) fmt -> ('x -> + 'a, + 'b, + 'c, + ('b -> 'x) -> + 'd, + 'e, + 'f) + fmt
  21. | Scan_char_set : pad_option + * char_set + * ('a, 'b, 'c, 'd, 'e, 'f) fmt -> (string -> 'a, 'b, 'c, 'd, 'e, 'f) fmt
  22. | Scan_get_counter : counter + * ('a, 'b, 'c, 'd, 'e, 'f) fmt -> (int -> 'a, 'b, 'c, 'd, 'e, 'f) fmt
  23. | Scan_next_char : ('a, 'b, 'c, 'd, 'e, 'f) fmt -> (char -> + 'a, + 'b, + 'c, + 'd, + 'e, + 'f) + fmt
  24. | Ignored_param : ('a, 'b, 'c, 'd, 'y, 'x) ignored + * ('x, 'b, 'c, 'y, 'e, 'f) fmt -> ('a, 'b, 'c, 'd, 'e, 'f) fmt
  25. | Custom : ('a, 'x, 'y) custom_arity + * (unit -> + 'x) + * ('a, 'b, 'c, 'd, 'e, 'f) fmt -> ('y, 'b, 'c, 'd, 'e, 'f) fmt
  26. | End_of_format : ('f, 'b, 'c, 'e, 'e, 'f) fmt

List of format elements.

and ('a, 'b, 'c, 'd, 'e, 'f) ignored =
  1. | Ignored_char : ('a, 'b, 'c, 'd, 'd, 'a) ignored
  2. | Ignored_caml_char : ('a, 'b, 'c, 'd, 'd, 'a) ignored
  3. | Ignored_string : pad_option -> ('a, 'b, 'c, 'd, 'd, 'a) ignored
  4. | Ignored_caml_string : pad_option -> ('a, 'b, 'c, 'd, 'd, 'a) ignored
  5. | Ignored_int : int_conv * pad_option -> ('a, 'b, 'c, 'd, 'd, 'a) ignored
  6. | Ignored_int32 : int_conv * pad_option -> ('a, 'b, 'c, 'd, 'd, 'a) ignored
  7. | Ignored_nativeint : int_conv * pad_option -> ('a, 'b, 'c, 'd, 'd, 'a) ignored
  8. | Ignored_int64 : int_conv * pad_option -> ('a, 'b, 'c, 'd, 'd, 'a) ignored
  9. | Ignored_float : pad_option * prec_option -> ('a, 'b, 'c, 'd, 'd, 'a) ignored
  10. | Ignored_bool : pad_option -> ('a, 'b, 'c, 'd, 'd, 'a) ignored
  11. | Ignored_format_arg : pad_option + * ('g, 'h, 'i, 'j, 'k, 'l) fmtty -> ('a, 'b, 'c, 'd, 'd, 'a) ignored
  12. | Ignored_format_subst : pad_option + * ('a, 'b, 'c, 'd, 'e, 'f) fmtty -> ('a, 'b, 'c, 'd, 'e, 'f) ignored
  13. | Ignored_reader : ('a, 'b, 'c, ('b -> 'x) -> 'd, 'd, 'a) ignored
  14. | Ignored_scan_char_set : pad_option + * char_set -> ('a, 'b, 'c, 'd, 'd, 'a) ignored
  15. | Ignored_scan_get_counter : counter -> ('a, 'b, 'c, 'd, 'd, 'a) ignored
  16. | Ignored_scan_next_char : ('a, 'b, 'c, 'd, 'd, 'a) ignored
and ('a, 'b, 'c, 'd, 'e, 'f) format6 =
  1. | Format of ('a, 'b, 'c, 'd, 'e, 'f) fmt * string
val concat_fmtty : + ('g1, 'b1, 'c1, 'j1, 'd1, 'a1, 'g2, 'b2, 'c2, 'j2, 'd2, 'a2) fmtty_rel -> + ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmtty_rel -> + ('g1, 'b1, 'c1, 'j1, 'e1, 'f1, 'g2, 'b2, 'c2, 'j2, 'e2, 'f2) fmtty_rel
val erase_rel : + ('a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l) fmtty_rel -> + ('a, 'b, 'c, 'd, 'e, 'f) fmtty
val concat_fmt : + ('a, 'b, 'c, 'd, 'e, 'f) fmt -> + ('f, 'b, 'c, 'e, 'g, 'h) fmt -> + ('a, 'b, 'c, 'd, 'g, 'h) fmt
diff --git a/stdlib/CamlinternalLazy/index.html b/stdlib/CamlinternalLazy/index.html new file mode 100644 index 000000000..48cf69cf8 --- /dev/null +++ b/stdlib/CamlinternalLazy/index.html @@ -0,0 +1,2 @@ + +CamlinternalLazy (docs.stdlib.CamlinternalLazy)

Module CamlinternalLazy

Run-time support for lazy values. All functions in this module are for system use only, not for the casual user.

type 'a t = 'a lazy_t
exception Undefined
val force_lazy_block : 'a lazy_t -> 'a
val force_gen : only_val:bool -> 'a lazy_t -> 'a
diff --git a/stdlib/CamlinternalMod/index.html b/stdlib/CamlinternalMod/index.html new file mode 100644 index 000000000..8c420068b --- /dev/null +++ b/stdlib/CamlinternalMod/index.html @@ -0,0 +1,2 @@ + +CamlinternalMod (docs.stdlib.CamlinternalMod)

Module CamlinternalMod

Run-time support for recursive modules. All functions in this module are for system use only, not for the casual user.

type shape =
  1. | Function
  2. | Lazy
  3. | Class
  4. | Module of shape array
  5. | Value of Obj.t
val init_mod : (string * int * int) -> shape -> Obj.t
val update_mod : shape -> Obj.t -> Obj.t -> unit
diff --git a/stdlib/CamlinternalOO/index.html b/stdlib/CamlinternalOO/index.html new file mode 100644 index 000000000..c6fe9daf3 --- /dev/null +++ b/stdlib/CamlinternalOO/index.html @@ -0,0 +1,18 @@ + +CamlinternalOO (docs.stdlib.CamlinternalOO)

Module CamlinternalOO

Run-time support for objects and classes. All functions in this module are for system use only, not for the casual user.

Classes

type tag
type label
type table
type meth
type t
type obj
type closure
val public_method_label : string -> tag
val new_method : table -> label
val new_variable : table -> string -> int
val new_methods_variables : + table -> + string array -> + string array -> + label array
val get_variable : table -> string -> int
val get_variables : table -> string array -> int array
val get_method_label : table -> string -> label
val get_method_labels : table -> string array -> label array
val get_method : table -> label -> meth
val set_method : table -> label -> meth -> unit
val set_methods : table -> label array -> unit
val narrow : table -> string array -> string array -> string array -> unit
val widen : table -> unit
val add_initializer : table -> (obj -> unit) -> unit
val dummy_table : table
val create_table : string array -> table
val init_class : table -> unit
val inherits : + table -> + string array -> + string array -> + string array -> + (t * (table -> obj -> Obj.t) * t * obj) -> + bool -> + Obj.t array
val make_class : + string array -> + (table -> Obj.t -> t) -> + t * (table -> Obj.t -> t) * (Obj.t -> t) * Obj.t
type init_table
val make_class_store : string array -> (table -> t) -> init_table -> unit
val dummy_class : + (string * int * int) -> + t * (table -> Obj.t -> t) * (Obj.t -> t) * Obj.t

Objects

val copy : < .. > as 'a -> 'a
val create_object : table -> obj
val create_object_opt : obj -> table -> obj
val run_initializers : obj -> table -> unit
val run_initializers_opt : obj -> obj -> table -> obj
val create_object_and_run_initializers : obj -> table -> obj
val send : obj -> tag -> t
val sendcache : obj -> tag -> t -> int -> t
val sendself : obj -> label -> t
val get_public_method : obj -> tag -> closure

Table cache

type tables
val lookup_tables : tables -> closure array -> tables

Builtins to reduce code size

type impl =
  1. | GetConst
  2. | GetVar
  3. | GetEnv
  4. | GetMeth
  5. | SetVar
  6. | AppConst
  7. | AppVar
  8. | AppEnv
  9. | AppMeth
  10. | AppConstConst
  11. | AppConstVar
  12. | AppConstEnv
  13. | AppConstMeth
  14. | AppVarConst
  15. | AppEnvConst
  16. | AppMethConst
  17. | MethAppConst
  18. | MethAppVar
  19. | MethAppEnv
  20. | MethAppMeth
  21. | SendConst
  22. | SendVar
  23. | SendEnv
  24. | SendMeth
  25. | Closure of closure

Parameters

type params = {
  1. mutable compact_table : bool;
  2. mutable copy_parent : bool;
  3. mutable clean_when_copying : bool;
  4. mutable retry_count : int;
  5. mutable bucket_small_size : int;
}
val params : params

Statistics

type stats = {
  1. classes : int;
  2. methods : int;
  3. inst_vars : int;
}
val stats : unit -> stats
diff --git a/stdlib/Std_exit/index.html b/stdlib/Std_exit/index.html new file mode 100644 index 000000000..6180cdc7a --- /dev/null +++ b/stdlib/Std_exit/index.html @@ -0,0 +1,2 @@ + +Std_exit (docs.stdlib.Std_exit)

Module Std_exit

diff --git a/stdlib/Stdlib/Arg/index.html b/stdlib/Stdlib/Arg/index.html new file mode 100644 index 000000000..ccfa92b83 --- /dev/null +++ b/stdlib/Stdlib/Arg/index.html @@ -0,0 +1,38 @@ + +Arg (docs.stdlib.Stdlib.Arg)

Module Stdlib.Arg

Parsing of command line arguments.

This module provides a general mechanism for extracting options and arguments from the command line to the program. For example:

let usage_msg = "append [-verbose] <file1> [<file2>] ... -o <output>"
+let verbose = ref false
+let input_files = ref []
+let output_file = ref ""
+
+let anon_fun filename =
+  input_files := filename::!input_files
+
+let speclist =
+  [("-verbose", Arg.Set verbose, "Output debug information");
+   ("-o", Arg.Set_string output_file, "Set output file name")]
+
+let () =
+  Arg.parse speclist anon_fun usage_msg;
+  (* Main functionality here *)

Syntax of command lines: A keyword is a character string starting with a -. An option is a keyword alone or followed by an argument. The types of keywords are: Unit, Bool, Set, Clear, String, Set_string, Int, Set_int, Float, Set_float, Tuple, Symbol, Rest, Rest_all and Expand.

Unit, Set and Clear keywords take no argument.

A Rest or Rest_all keyword takes the remainder of the command line as arguments. (More explanations below.)

Every other keyword takes the following word on the command line as argument. For compatibility with GNU getopt_long, keyword=arg is also allowed. Arguments not preceded by a keyword are called anonymous arguments.

Examples (cmd is assumed to be the command name):

  • cmd -flag (a unit option)
  • cmd -int 1 (an int option with argument 1)
  • cmd -string foobar (a string option with argument "foobar")
  • cmd -float 12.34 (a float option with argument 12.34)
  • cmd a b c (three anonymous arguments: "a", "b", and "c")
  • cmd a b -- c d (two anonymous arguments and a rest option with two arguments)

Rest takes a function that is called repeatedly for each remaining command line argument. Rest_all takes a function that is called once, with the list of all remaining arguments.

Note that if no arguments follow a Rest keyword then the function is not called at all whereas the function for a Rest_all keyword is called with an empty list.

  • alert unsynchronized_access The Arg module relies on a mutable global state, parsing functions should only be called from a single domain.
type spec =
  1. | Unit of unit -> unit
    (*

    Call the function with unit argument

    *)
  2. | Bool of bool -> unit
    (*

    Call the function with a bool argument

    *)
  3. | Set of bool ref
    (*

    Set the reference to true

    *)
  4. | Clear of bool ref
    (*

    Set the reference to false

    *)
  5. | String of string -> unit
    (*

    Call the function with a string argument

    *)
  6. | Set_string of string ref
    (*

    Set the reference to the string argument

    *)
  7. | Int of int -> unit
    (*

    Call the function with an int argument

    *)
  8. | Set_int of int ref
    (*

    Set the reference to the int argument

    *)
  9. | Float of float -> unit
    (*

    Call the function with a float argument

    *)
  10. | Set_float of float ref
    (*

    Set the reference to the float argument

    *)
  11. | Tuple of spec list
    (*

    Take several arguments according to the spec list

    *)
  12. | Symbol of string list * string -> unit
    (*

    Take one of the symbols as argument and call the function with the symbol

    *)
  13. | Rest of string -> unit
    (*

    Stop interpreting keywords and call the function with each remaining argument

    *)
  14. | Rest_all of string list -> unit
    (*

    Stop interpreting keywords and call the function with all remaining arguments

    *)
  15. | Expand of string -> string array
    (*

    If the remaining arguments to process are of the form ["-foo"; "arg"] @ rest where "foo" is registered as Expand f, then the arguments f "arg" @ rest are processed. Only allowed in parse_and_expand_argv_dynamic.

    *)

The concrete type describing the behavior associated with a keyword.

type key = string
type doc = string
type usage_msg = string
type anon_fun = string -> unit
val parse : (key * spec * doc) list -> anon_fun -> usage_msg -> unit

Arg.parse speclist anon_fun usage_msg parses the command line. speclist is a list of triples (key, spec, doc). key is the option keyword, it must start with a '-' character. spec gives the option type and the function to call when this option is found on the command line. doc is a one-line description of this option. anon_fun is called on anonymous arguments. The functions in spec and anon_fun are called in the same order as their arguments appear on the command line.

If an error occurs, Arg.parse exits the program, after printing to standard error an error message as follows:

  • The reason for the error: unknown option, invalid or missing argument, etc.
  • usage_msg
  • The list of options, each followed by the corresponding doc string. Beware: options that have an empty doc string will not be included in the list.

For the user to be able to specify anonymous arguments starting with a -, include for example ("-", String anon_fun, doc) in speclist.

By default, parse recognizes two unit options, -help and --help, which will print to standard output usage_msg and the list of options, and exit the program. You can override this behaviour by specifying your own -help and --help options in speclist.

val parse_dynamic : + (key * spec * doc) list ref -> + anon_fun -> + usage_msg -> + unit

Same as Arg.parse, except that the speclist argument is a reference and may be updated during the parsing. A typical use for this feature is to parse command lines of the form:

  • command subcommand options where the list of options depends on the value of the subcommand argument.
  • since 4.01
val parse_argv : + ?current:int ref -> + string array -> + (key * spec * doc) list -> + anon_fun -> + usage_msg -> + unit

Arg.parse_argv ~current args speclist anon_fun usage_msg parses the array args as if it were the command line. It uses and updates the value of ~current (if given), or Arg.current. You must set it before calling parse_argv. The initial value of current is the index of the program name (argument 0) in the array. If an error occurs, Arg.parse_argv raises Arg.Bad with the error message as argument. If option -help or --help is given, Arg.parse_argv raises Arg.Help with the help message as argument.

val parse_argv_dynamic : + ?current:int ref -> + string array -> + (key * spec * doc) list ref -> + anon_fun -> + string -> + unit

Same as Arg.parse_argv, except that the speclist argument is a reference and may be updated during the parsing. See Arg.parse_dynamic.

  • since 4.01
val parse_and_expand_argv_dynamic : + int ref -> + string array ref -> + (key * spec * doc) list ref -> + anon_fun -> + string -> + unit

Same as Arg.parse_argv_dynamic, except that the argv argument is a reference and may be updated during the parsing of Expand arguments. See Arg.parse_argv_dynamic.

  • since 4.05
val parse_expand : (key * spec * doc) list -> anon_fun -> usage_msg -> unit

Same as Arg.parse, except that the Expand arguments are allowed and the current reference is not updated.

  • since 4.05
exception Help of string

Raised by Arg.parse_argv when the user asks for help.

exception Bad of string

Functions in spec or anon_fun can raise Arg.Bad with an error message to reject invalid arguments. Arg.Bad is also raised by Arg.parse_argv in case of an error.

val usage : (key * spec * doc) list -> usage_msg -> unit

Arg.usage speclist usage_msg prints to standard error an error message that includes the list of valid options. This is the same message that Arg.parse prints in case of error. speclist and usage_msg are the same as for Arg.parse.

val usage_string : (key * spec * doc) list -> usage_msg -> string

Returns the message that would have been printed by Arg.usage, if provided with the same parameters.

val align : ?limit:int -> (key * spec * doc) list -> (key * spec * doc) list

Align the documentation strings by inserting spaces at the first alignment separator (tab or, if tab is not found, space), according to the length of the keyword. Use a alignment separator as the first character in a doc string if you want to align the whole string. The doc strings corresponding to Symbol arguments are aligned on the next line.

  • parameter limit

    options with keyword and message longer than limit will not be used to compute the alignment.

val current : int ref

Position (in Sys.argv) of the argument being processed. You can change this value, e.g. to force Arg.parse to skip some arguments. Arg.parse uses the initial value of Arg.current as the index of argument 0 (the program name) and starts parsing arguments at the next element.

val read_arg : string -> string array

Arg.read_arg file reads newline-terminated command line arguments from file file.

  • since 4.05
val read_arg0 : string -> string array

Identical to Arg.read_arg but assumes null character terminated command line arguments.

  • since 4.05
val write_arg : string -> string array -> unit

Arg.write_arg file args writes the arguments args newline-terminated into the file file. If any of the arguments in args contains a newline, use Arg.write_arg0 instead.

  • since 4.05
val write_arg0 : string -> string array -> unit

Identical to Arg.write_arg but uses the null character for terminator instead of newline.

  • since 4.05
diff --git a/stdlib/Stdlib/Array/index.html b/stdlib/Stdlib/Array/index.html new file mode 100644 index 000000000..98f916a2f --- /dev/null +++ b/stdlib/Stdlib/Array/index.html @@ -0,0 +1,19 @@ + +Array (docs.stdlib.Stdlib.Array)

Module Stdlib.Array

Array operations.

The labeled version of this module can be used as described in the StdLabels module.

type 'a t = 'a array

An alias for the type of arrays.

val length : 'a array -> int

Return the length (number of elements) of the given array.

val get : 'a array -> int -> 'a

get a n returns the element number n of array a. The first element has number 0. The last element has number length a - 1. You can also write a.(n) instead of get a n.

val set : 'a array -> int -> 'a -> unit

set a n x modifies array a in place, replacing element number n with x. You can also write a.(n) <- x instead of set a n x.

val make : int -> 'a -> 'a array

make n x returns a fresh array of length n, initialized with x. All the elements of this new array are initially physically equal to x (in the sense of the == predicate). Consequently, if x is mutable, it is shared among all elements of the array, and modifying x through one of the array entries will modify all other entries at the same time.

  • raises Invalid_argument

    if n < 0 or n > Sys.max_array_length. If the value of x is a floating-point number, then the maximum size is only Sys.max_array_length / 2.

val create_float : int -> float array

create_float n returns a fresh float array of length n, with uninitialized data.

  • since 4.03
val init : int -> (int -> 'a) -> 'a array

init n f returns a fresh array of length n, with element number i initialized to the result of f i. In other terms, init n f tabulates the results of f applied in order to the integers 0 to n-1.

  • raises Invalid_argument

    if n < 0 or n > Sys.max_array_length. If the return type of f is float, then the maximum size is only Sys.max_array_length / 2.

val make_matrix : int -> int -> 'a -> 'a array array

make_matrix dimx dimy e returns a two-dimensional array (an array of arrays) with first dimension dimx and second dimension dimy. All the elements of this new matrix are initially physically equal to e. The element (x,y) of a matrix m is accessed with the notation m.(x).(y).

  • raises Invalid_argument

    if dimx or dimy is negative or greater than Sys.max_array_length. If the value of e is a floating-point number, then the maximum size is only Sys.max_array_length / 2.

val append : 'a array -> 'a array -> 'a array

append v1 v2 returns a fresh array containing the concatenation of the arrays v1 and v2.

val concat : 'a array list -> 'a array

Same as append, but concatenates a list of arrays.

val sub : 'a array -> int -> int -> 'a array

sub a pos len returns a fresh array of length len, containing the elements number pos to pos + len - 1 of array a.

  • raises Invalid_argument

    if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

val copy : 'a array -> 'a array

copy a returns a copy of a, that is, a fresh array containing the same elements as a.

val fill : 'a array -> int -> int -> 'a -> unit

fill a pos len x modifies the array a in place, storing x in elements number pos to pos + len - 1.

val blit : 'a array -> int -> 'a array -> int -> int -> unit

blit src src_pos dst dst_pos len copies len elements from array src, starting at element number src_pos, to array dst, starting at element number dst_pos. It works correctly even if src and dst are the same array, and the source and destination chunks overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

val to_list : 'a array -> 'a list

to_list a returns the list of all the elements of a.

val of_list : 'a list -> 'a array

of_list l returns a fresh array containing the elements of l.

  • raises Invalid_argument

    if the length of l is greater than Sys.max_array_length.

Iterators

val iter : ('a -> unit) -> 'a array -> unit

iter f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

val iteri : (int -> 'a -> unit) -> 'a array -> unit

Same as iter, but the function is applied to the index of the element as first argument, and the element itself as second argument.

val map : ('a -> 'b) -> 'a array -> 'b array

map f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

val map_inplace : ('a -> 'a) -> 'a array -> unit

map_inplace f a applies function f to all elements of a, and updates their values in place.

  • since 5.1
val mapi : (int -> 'a -> 'b) -> 'a array -> 'b array

Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

val mapi_inplace : (int -> 'a -> 'a) -> 'a array -> unit

Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

  • since 5.1
val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a array -> 'acc

fold_left f init a computes f (... (f (f init a.(0)) a.(1)) ...) a.(n-1), where n is the length of the array a.

val fold_left_map : + ('acc -> 'a -> 'acc * 'b) -> + 'acc -> + 'a array -> + 'acc * 'b array

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.13
val fold_right : ('a -> 'acc -> 'acc) -> 'a array -> 'acc -> 'acc

fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the array a.

Iterators on two arrays

val iter2 : ('a -> 'b -> unit) -> 'a array -> 'b array -> unit

iter2 f a b applies function f to all the elements of a and b.

  • since 4.03 (4.05 in ArrayLabels)
val map2 : ('a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array

map2 f a b applies function f to all the elements of a and b, and builds an array with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

  • since 4.03 (4.05 in ArrayLabels)

Array scanning

val for_all : ('a -> bool) -> 'a array -> bool

for_all f [|a1; ...; an|] checks if all elements of the array satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

  • since 4.03
val exists : ('a -> bool) -> 'a array -> bool

exists f [|a1; ...; an|] checks if at least one element of the array satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

  • since 4.03
val for_all2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool

Same as for_all, but for a two-argument predicate.

  • since 4.11
val exists2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool

Same as exists, but for a two-argument predicate.

  • since 4.11
val mem : 'a -> 'a array -> bool

mem a set is true if and only if a is structurally equal to an element of l (i.e. there is an x in l such that compare a x = 0).

  • since 4.03
val memq : 'a -> 'a array -> bool

Same as mem, but uses physical equality instead of structural equality to compare list elements.

  • since 4.03
val find_opt : ('a -> bool) -> 'a array -> 'a option

find_opt f a returns the first element of the array a that satisfies the predicate f, or None if there is no value that satisfies f in the array a.

  • since 4.13
val find_index : ('a -> bool) -> 'a array -> int option

find_index f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_map : ('a -> 'b option) -> 'a array -> 'b option

find_map f a applies f to the elements of a in order, and returns the first result of the form Some v, or None if none exist.

  • since 4.13
val find_mapi : (int -> 'a -> 'b option) -> 'a array -> 'b option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1

Arrays of pairs

val split : ('a * 'b) array -> 'a array * 'b array

split [|(a1,b1); ...; (an,bn)|] is ([|a1; ...; an|], [|b1; ...; bn|]).

  • since 4.13
val combine : 'a array -> 'b array -> ('a * 'b) array

combine [|a1; ...; an|] [|b1; ...; bn|] is [|(a1,b1); ...; (an,bn)|]. Raise Invalid_argument if the two arrays have different lengths.

  • since 4.13

Sorting

val sort : ('a -> 'a -> int) -> 'a array -> unit

Sort an array in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

The current implementation uses Heap Sort. It runs in constant stack space.

Specification of the comparison function: Let a be the array and cmp the comparison function. The following must be true for all x, y, z in a :

  • cmp x y > 0 if and only if cmp y x < 0
  • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

  • cmp a.(i) a.(j) >= 0 if and only if i >= j
val stable_sort : ('a -> 'a -> int) -> 'a array -> unit

Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

The current implementation uses Merge Sort. It uses a temporary array of length n/2, where n is the length of the array. It is usually faster than the current implementation of sort.

val fast_sort : ('a -> 'a -> int) -> 'a array -> unit

Same as sort or stable_sort, whichever is faster on typical input.

Arrays and Sequences

val to_seq : 'a array -> 'a Seq.t

Iterate on the array, in increasing order. Modifications of the array during iteration will be reflected in the sequence.

  • since 4.07
val to_seqi : 'a array -> (int * 'a) Seq.t

Iterate on the array, in increasing order, yielding indices along elements. Modifications of the array during iteration will be reflected in the sequence.

  • since 4.07
val of_seq : 'a Seq.t -> 'a array

Create an array from the generator

  • since 4.07

Arrays and concurrency safety

Care must be taken when concurrently accessing arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

For example, consider the following program:

let size = 100_000_000
+let a = Array.make size 1
+let d1 = Domain.spawn (fun () ->
+   Array.iteri (fun i x -> a.(i) <- x + 1) a
+)
+let d2 = Domain.spawn (fun () ->
+  Array.iteri (fun i x -> a.(i) <- 2 * x + 1) a
+)
+let () = Domain.join d1; Domain.join d2

After executing this code, each field of the array a is either 2, 3, 4 or 5. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

Data races

If two domains only access disjoint parts of the array, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

A data race is said to occur when two domains access the same array element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the array elements.

Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location (with a few exceptions for float arrays).

Float arrays

Float arrays have two supplementary caveats in the presence of data races.

First, the blit operation might copy an array byte-by-byte. Data races between such a blit operation and another operation might produce surprising values due to tearing: partial writes interleaved with other operations can create float values that would not exist with a sequential execution.

For instance, at the end of

let zeros = Array.make size 0.
+let max_floats = Array.make size Float.max_float
+let res = Array.copy zeros
+let d1 = Domain.spawn (fun () -> Array.blit zeros 0 res 0 size)
+let d2 = Domain.spawn (fun () -> Array.blit max_floats 0 res 0 size)
+let () = Domain.join d1; Domain.join d2

the res array might contain values that are neither 0. nor max_float.

Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation.

diff --git a/stdlib/Stdlib/ArrayLabels/index.html b/stdlib/Stdlib/ArrayLabels/index.html new file mode 100644 index 000000000..34ad48d0d --- /dev/null +++ b/stdlib/Stdlib/ArrayLabels/index.html @@ -0,0 +1,25 @@ + +ArrayLabels (docs.stdlib.Stdlib.ArrayLabels)

Module Stdlib.ArrayLabels

Array operations.

The labeled version of this module can be used as described in the StdLabels module.

type 'a t = 'a array

An alias for the type of arrays.

val length : 'a array -> int

Return the length (number of elements) of the given array.

val get : 'a array -> int -> 'a

get a n returns the element number n of array a. The first element has number 0. The last element has number length a - 1. You can also write a.(n) instead of get a n.

val set : 'a array -> int -> 'a -> unit

set a n x modifies array a in place, replacing element number n with x. You can also write a.(n) <- x instead of set a n x.

val make : int -> 'a -> 'a array

make n x returns a fresh array of length n, initialized with x. All the elements of this new array are initially physically equal to x (in the sense of the == predicate). Consequently, if x is mutable, it is shared among all elements of the array, and modifying x through one of the array entries will modify all other entries at the same time.

  • raises Invalid_argument

    if n < 0 or n > Sys.max_array_length. If the value of x is a floating-point number, then the maximum size is only Sys.max_array_length / 2.

val create_float : int -> float array

create_float n returns a fresh float array of length n, with uninitialized data.

  • since 4.03
val init : int -> f:(int -> 'a) -> 'a array

init n ~f returns a fresh array of length n, with element number i initialized to the result of f i. In other terms, init n ~f tabulates the results of f applied in order to the integers 0 to n-1.

  • raises Invalid_argument

    if n < 0 or n > Sys.max_array_length. If the return type of f is float, then the maximum size is only Sys.max_array_length / 2.

val make_matrix : dimx:int -> dimy:int -> 'a -> 'a array array

make_matrix ~dimx ~dimy e returns a two-dimensional array (an array of arrays) with first dimension dimx and second dimension dimy. All the elements of this new matrix are initially physically equal to e. The element (x,y) of a matrix m is accessed with the notation m.(x).(y).

  • raises Invalid_argument

    if dimx or dimy is negative or greater than Sys.max_array_length. If the value of e is a floating-point number, then the maximum size is only Sys.max_array_length / 2.

val append : 'a array -> 'a array -> 'a array

append v1 v2 returns a fresh array containing the concatenation of the arrays v1 and v2.

val concat : 'a array list -> 'a array

Same as append, but concatenates a list of arrays.

val sub : 'a array -> pos:int -> len:int -> 'a array

sub a ~pos ~len returns a fresh array of length len, containing the elements number pos to pos + len - 1 of array a.

  • raises Invalid_argument

    if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

val copy : 'a array -> 'a array

copy a returns a copy of a, that is, a fresh array containing the same elements as a.

val fill : 'a array -> pos:int -> len:int -> 'a -> unit

fill a ~pos ~len x modifies the array a in place, storing x in elements number pos to pos + len - 1.

val blit : + src:'a array -> + src_pos:int -> + dst:'a array -> + dst_pos:int -> + len:int -> + unit

blit ~src ~src_pos ~dst ~dst_pos ~len copies len elements from array src, starting at element number src_pos, to array dst, starting at element number dst_pos. It works correctly even if src and dst are the same array, and the source and destination chunks overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

val to_list : 'a array -> 'a list

to_list a returns the list of all the elements of a.

val of_list : 'a list -> 'a array

of_list l returns a fresh array containing the elements of l.

  • raises Invalid_argument

    if the length of l is greater than Sys.max_array_length.

Iterators

val iter : f:('a -> unit) -> 'a array -> unit

iter ~f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

val iteri : f:(int -> 'a -> unit) -> 'a array -> unit

Same as iter, but the function is applied to the index of the element as first argument, and the element itself as second argument.

val map : f:('a -> 'b) -> 'a array -> 'b array

map ~f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

val map_inplace : f:('a -> 'a) -> 'a array -> unit

map_inplace ~f a applies function f to all elements of a, and updates their values in place.

  • since 5.1
val mapi : f:(int -> 'a -> 'b) -> 'a array -> 'b array

Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

val mapi_inplace : f:(int -> 'a -> 'a) -> 'a array -> unit

Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

  • since 5.1
val fold_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a array -> 'acc

fold_left ~f ~init a computes f (... (f (f init a.(0)) a.(1)) ...) a.(n-1), where n is the length of the array a.

val fold_left_map : + f:('acc -> 'a -> 'acc * 'b) -> + init:'acc -> + 'a array -> + 'acc * 'b array

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.13
val fold_right : f:('a -> 'acc -> 'acc) -> 'a array -> init:'acc -> 'acc

fold_right ~f a ~init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the array a.

Iterators on two arrays

val iter2 : f:('a -> 'b -> unit) -> 'a array -> 'b array -> unit

iter2 ~f a b applies function f to all the elements of a and b.

  • since 4.05
val map2 : f:('a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array

map2 ~f a b applies function f to all the elements of a and b, and builds an array with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

  • since 4.05

Array scanning

val for_all : f:('a -> bool) -> 'a array -> bool

for_all ~f [|a1; ...; an|] checks if all elements of the array satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

  • since 4.03
val exists : f:('a -> bool) -> 'a array -> bool

exists ~f [|a1; ...; an|] checks if at least one element of the array satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

  • since 4.03
val for_all2 : f:('a -> 'b -> bool) -> 'a array -> 'b array -> bool

Same as for_all, but for a two-argument predicate.

  • since 4.11
val exists2 : f:('a -> 'b -> bool) -> 'a array -> 'b array -> bool

Same as exists, but for a two-argument predicate.

  • since 4.11
val mem : 'a -> set:'a array -> bool

mem a ~set is true if and only if a is structurally equal to an element of l (i.e. there is an x in l such that compare a x = 0).

  • since 4.03
val memq : 'a -> set:'a array -> bool

Same as mem, but uses physical equality instead of structural equality to compare list elements.

  • since 4.03
val find_opt : f:('a -> bool) -> 'a array -> 'a option

find_opt ~f a returns the first element of the array a that satisfies the predicate f, or None if there is no value that satisfies f in the array a.

  • since 4.13
val find_index : f:('a -> bool) -> 'a array -> int option

find_index ~f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_map : f:('a -> 'b option) -> 'a array -> 'b option

find_map ~f a applies f to the elements of a in order, and returns the first result of the form Some v, or None if none exist.

  • since 4.13
val find_mapi : f:(int -> 'a -> 'b option) -> 'a array -> 'b option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1

Arrays of pairs

val split : ('a * 'b) array -> 'a array * 'b array

split [|(a1,b1); ...; (an,bn)|] is ([|a1; ...; an|], [|b1; ...; bn|]).

  • since 4.13
val combine : 'a array -> 'b array -> ('a * 'b) array

combine [|a1; ...; an|] [|b1; ...; bn|] is [|(a1,b1); ...; (an,bn)|]. Raise Invalid_argument if the two arrays have different lengths.

  • since 4.13

Sorting

val sort : cmp:('a -> 'a -> int) -> 'a array -> unit

Sort an array in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

The current implementation uses Heap Sort. It runs in constant stack space.

Specification of the comparison function: Let a be the array and cmp the comparison function. The following must be true for all x, y, z in a :

  • cmp x y > 0 if and only if cmp y x < 0
  • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

  • cmp a.(i) a.(j) >= 0 if and only if i >= j
val stable_sort : cmp:('a -> 'a -> int) -> 'a array -> unit

Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

The current implementation uses Merge Sort. It uses a temporary array of length n/2, where n is the length of the array. It is usually faster than the current implementation of sort.

val fast_sort : cmp:('a -> 'a -> int) -> 'a array -> unit

Same as sort or stable_sort, whichever is faster on typical input.

Arrays and Sequences

val to_seq : 'a array -> 'a Seq.t

Iterate on the array, in increasing order. Modifications of the array during iteration will be reflected in the sequence.

  • since 4.07
val to_seqi : 'a array -> (int * 'a) Seq.t

Iterate on the array, in increasing order, yielding indices along elements. Modifications of the array during iteration will be reflected in the sequence.

  • since 4.07
val of_seq : 'a Seq.t -> 'a array

Create an array from the generator

  • since 4.07

Arrays and concurrency safety

Care must be taken when concurrently accessing arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

For example, consider the following program:

let size = 100_000_000
+let a = ArrayLabels.make size 1
+let d1 = Domain.spawn (fun () ->
+   ArrayLabels.iteri ~f:(fun i x -> a.(i) <- x + 1) a
+)
+let d2 = Domain.spawn (fun () ->
+  ArrayLabels.iteri ~f:(fun i x -> a.(i) <- 2 * x + 1) a
+)
+let () = Domain.join d1; Domain.join d2

After executing this code, each field of the array a is either 2, 3, 4 or 5. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

Data races

If two domains only access disjoint parts of the array, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

A data race is said to occur when two domains access the same array element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the array elements.

Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location (with a few exceptions for float arrays).

Float arrays

Float arrays have two supplementary caveats in the presence of data races.

First, the blit operation might copy an array byte-by-byte. Data races between such a blit operation and another operation might produce surprising values due to tearing: partial writes interleaved with other operations can create float values that would not exist with a sequential execution.

For instance, at the end of

let zeros = Array.make size 0.
+let max_floats = Array.make size Float.max_float
+let res = Array.copy zeros
+let d1 = Domain.spawn (fun () -> Array.blit zeros 0 res 0 size)
+let d2 = Domain.spawn (fun () -> Array.blit max_floats 0 res 0 size)
+let () = Domain.join d1; Domain.join d2

the res array might contain values that are neither 0. nor max_float.

Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation.

diff --git a/stdlib/Stdlib/Atomic/index.html b/stdlib/Stdlib/Atomic/index.html new file mode 100644 index 000000000..c2c5e6595 --- /dev/null +++ b/stdlib/Stdlib/Atomic/index.html @@ -0,0 +1,64 @@ + +Atomic (docs.stdlib.Stdlib.Atomic)

Module Stdlib.Atomic

Atomic references.

See the examples below. See 'Memory model: The hard bits' chapter in the manual.

  • since 4.12
type !'a t

An atomic (mutable) reference to a value of type 'a.

val make : 'a -> 'a t

Create an atomic reference.

val get : 'a t -> 'a

Get the current value of the atomic reference.

val set : 'a t -> 'a -> unit

Set a new value for the atomic reference.

val exchange : 'a t -> 'a -> 'a

Set a new value for the atomic reference, and return the current value.

val compare_and_set : 'a t -> 'a -> 'a -> bool

compare_and_set r seen v sets the new value of r to v only if its current value is physically equal to seen -- the comparison and the set occur atomically. Returns true if the comparison succeeded (so the set happened) and false otherwise.

val fetch_and_add : int t -> int -> int

fetch_and_add r n atomically increments the value of r by n, and returns the current value (before the increment).

val incr : int t -> unit

incr r atomically increments the value of r by 1.

val decr : int t -> unit

decr r atomically decrements the value of r by 1.

Examples

Basic Thread Coordination

A basic use case is to have global counters that are updated in a thread-safe way, for example to keep some sorts of metrics over IOs performed by the program. Another basic use case is to coordinate the termination of threads in a given program, for example when one thread finds an answer, or when the program is shut down by the user.

Here, for example, we're going to try to find a number whose hash satisfies a basic property. To do that, we'll run multiple threads which will try random numbers until they find one that works.

Of course the output below is a sample run and will change every time the program is run.

(* use for termination *)
+let stop_all_threads = Atomic.make false
+
+(* total number of individual attempts to find a number *)
+let num_attempts = Atomic.make 0
+
+(* find a number that satisfies [p], by... trying random numbers
+   until one fits. *)
+let find_number_where (p:int -> bool) =
+  let rand = Random.State.make_self_init() in
+  while not (Atomic.get stop_all_threads) do
+
+    let n = Random.State.full_int rand max_int in
+    ignore (Atomic.fetch_and_add num_attempts 1 : int);
+
+    if p (Hashtbl.hash n) then (
+      Printf.printf "found %d (hash=%d)\n%!" n (Hashtbl.hash n);
+      Atomic.set stop_all_threads true; (* signal all threads to stop *)
+    )
+  done;;
+
+
+(* run multiple domains to search for a [n] where [hash n <= 100] *)
+let () =
+  let criterion n = n <= 100 in
+  let threads =
+    Array.init 8
+      (fun _ -> Domain.spawn (fun () -> find_number_where criterion))
+  in
+  Array.iter Domain.join threads;
+  Printf.printf "total number of attempts: %d\n%!"
+    (Atomic.get num_attempts) ;;
+
+- : unit = ()
+found 1651745641680046833 (hash=33)
+total number of attempts: 30230350

Treiber Stack

Another example is a basic Treiber stack (a thread-safe stack) that can be safely shared between threads.

Note how both push and pop are recursive, because they attempt to swap the new stack (with one more, or one fewer, element) with the old stack. This is optimistic concurrency: each iteration of, say, push stack x gets the old stack l, and hopes that by the time it tries to replace l with x::l, nobody else has had time to modify the list. If the compare_and_set fails it means we were too optimistic, and must try again.

type 'a stack = 'a list Atomic.t
+
+let rec push (stack: _ stack) elt : unit =
+  let cur = Atomic.get stack in
+  let success = Atomic.compare_and_set stack cur (elt :: cur) in
+  if not success then
+    push stack elt
+
+let rec pop (stack: _ stack) : _ option =
+  let cur = Atomic.get stack in
+  match cur with
+  | [] -> None
+  | x :: tail ->
+    let success = Atomic.compare_and_set stack cur tail in
+    if success then Some x
+    else pop stack
+
+# let st = Atomic.make []
+# push st 1
+- : unit = ()
+# push st 2
+- : unit = ()
+# pop st
+- : int option = Some 2
+# pop st
+- : int option = Some 1
+# pop st
+- : int option = None
diff --git a/stdlib/Stdlib/Bigarray/Array0/index.html b/stdlib/Stdlib/Bigarray/Array0/index.html new file mode 100644 index 000000000..103c1ce63 --- /dev/null +++ b/stdlib/Stdlib/Bigarray/Array0/index.html @@ -0,0 +1,2 @@ + +Array0 (docs.stdlib.Stdlib.Bigarray.Array0)

Module Bigarray.Array0

Zero-dimensional arrays. The Array0 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of zero-dimensional arrays that only contain a single scalar value. Statically knowing the number of dimensions of the array allows faster operations, and more precise static type-checking.

  • since 4.05
type (!'a, !'b, !'c) t

The type of zero-dimensional Bigarrays whose elements have OCaml type 'a, representation kind 'b, and memory layout 'c.

val create : ('a, 'b) kind -> 'c layout -> ('a, 'b, 'c) t

Array0.create kind layout returns a new Bigarray of zero dimension. kind and layout determine the array element kind and the array layout as described for Genarray.create.

val init : ('a, 'b) kind -> 'c layout -> 'a -> ('a, 'b, 'c) t

Array0.init kind layout v behaves like Array0.create kind layout except that the element is additionally initialized to the value v.

  • since 4.12
val kind : ('a, 'b, 'c) t -> ('a, 'b) kind

Return the kind of the given Bigarray.

val layout : ('a, 'b, 'c) t -> 'c layout

Return the layout of the given Bigarray.

val change_layout : ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t

Array0.change_layout a layout returns a Bigarray with the specified layout, sharing the data with a. No copying of elements is involved: the new array and the original array share the same storage space.

  • since 4.06
val size_in_bytes : ('a, 'b, 'c) t -> int

size_in_bytes a is a's kind_size_in_bytes.

val get : ('a, 'b, 'c) t -> 'a

Array0.get a returns the only element in a.

val set : ('a, 'b, 'c) t -> 'a -> unit

Array0.set a x v stores the value v in a.

val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit

Copy the first Bigarray to the second Bigarray. See Genarray.blit for more details.

val fill : ('a, 'b, 'c) t -> 'a -> unit

Fill the given Bigarray with the given value. See Genarray.fill for more details.

val of_value : ('a, 'b) kind -> 'c layout -> 'a -> ('a, 'b, 'c) t

Build a zero-dimensional Bigarray initialized from the given value.

diff --git a/stdlib/Stdlib/Bigarray/Array1/index.html b/stdlib/Stdlib/Bigarray/Array1/index.html new file mode 100644 index 000000000..3ac651fcf --- /dev/null +++ b/stdlib/Stdlib/Bigarray/Array1/index.html @@ -0,0 +1,2 @@ + +Array1 (docs.stdlib.Stdlib.Bigarray.Array1)

Module Bigarray.Array1

One-dimensional arrays. The Array1 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of one-dimensional arrays. (The Array2 and Array3 structures below provide operations specialized for two- and three-dimensional arrays.) Statically knowing the number of dimensions of the array allows faster operations, and more precise static type-checking.

type (!'a, !'b, !'c) t

The type of one-dimensional Bigarrays whose elements have OCaml type 'a, representation kind 'b, and memory layout 'c.

val create : ('a, 'b) kind -> 'c layout -> int -> ('a, 'b, 'c) t

Array1.create kind layout dim returns a new Bigarray of one dimension, whose size is dim. kind and layout determine the array element kind and the array layout as described for Genarray.create.

val init : ('a, 'b) kind -> 'c layout -> int -> (int -> 'a) -> ('a, 'b, 'c) t

Array1.init kind layout dim f returns a new Bigarray b of one dimension, whose size is dim. kind and layout determine the array element kind and the array layout as described for Genarray.create.

Each element Array1.get b i of the array is initialized to the result of f i.

In other words, Array1.init kind layout dimensions f tabulates the results of f applied to the indices of a new Bigarray whose layout is described by kind, layout and dim.

  • since 4.12
val dim : ('a, 'b, 'c) t -> int

Return the size (dimension) of the given one-dimensional Bigarray.

val kind : ('a, 'b, 'c) t -> ('a, 'b) kind

Return the kind of the given Bigarray.

val layout : ('a, 'b, 'c) t -> 'c layout

Return the layout of the given Bigarray.

val change_layout : ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t

Array1.change_layout a layout returns a Bigarray with the specified layout, sharing the data with a (and hence having the same dimension as a). No copying of elements is involved: the new array and the original array share the same storage space.

  • since 4.06
val size_in_bytes : ('a, 'b, 'c) t -> int

size_in_bytes a is the number of elements in a multiplied by a's kind_size_in_bytes.

  • since 4.03
val get : ('a, 'b, 'c) t -> int -> 'a

Array1.get a x, or alternatively a.{x}, returns the element of a at index x. x must be greater or equal than 0 and strictly less than Array1.dim a if a has C layout. If a has Fortran layout, x must be greater or equal than 1 and less or equal than Array1.dim a. Otherwise, Invalid_argument is raised.

val set : ('a, 'b, 'c) t -> int -> 'a -> unit

Array1.set a x v, also written a.{x} <- v, stores the value v at index x in a. x must be inside the bounds of a as described in Bigarray.Array1.get; otherwise, Invalid_argument is raised.

val sub : ('a, 'b, 'c) t -> int -> int -> ('a, 'b, 'c) t

Extract a sub-array of the given one-dimensional Bigarray. See Genarray.sub_left for more details.

val slice : ('a, 'b, 'c) t -> int -> ('a, 'b, 'c) Array0.t

Extract a scalar (zero-dimensional slice) of the given one-dimensional Bigarray. The integer parameter is the index of the scalar to extract. See Bigarray.Genarray.slice_left and Bigarray.Genarray.slice_right for more details.

  • since 4.05
val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit

Copy the first Bigarray to the second Bigarray. See Genarray.blit for more details.

val fill : ('a, 'b, 'c) t -> 'a -> unit

Fill the given Bigarray with the given value. See Genarray.fill for more details.

val of_array : ('a, 'b) kind -> 'c layout -> 'a array -> ('a, 'b, 'c) t

Build a one-dimensional Bigarray initialized from the given array.

val unsafe_get : ('a, 'b, 'c) t -> int -> 'a

Like Bigarray.Array1.get, but bounds checking is not always performed. Use with caution and only when the program logic guarantees that the access is within bounds.

val unsafe_set : ('a, 'b, 'c) t -> int -> 'a -> unit

Like Bigarray.Array1.set, but bounds checking is not always performed. Use with caution and only when the program logic guarantees that the access is within bounds.

diff --git a/stdlib/Stdlib/Bigarray/Array2/index.html b/stdlib/Stdlib/Bigarray/Array2/index.html new file mode 100644 index 000000000..c44c92b3c --- /dev/null +++ b/stdlib/Stdlib/Bigarray/Array2/index.html @@ -0,0 +1,15 @@ + +Array2 (docs.stdlib.Stdlib.Bigarray.Array2)

Module Bigarray.Array2

Two-dimensional arrays. The Array2 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of two-dimensional arrays.

type (!'a, !'b, !'c) t

The type of two-dimensional Bigarrays whose elements have OCaml type 'a, representation kind 'b, and memory layout 'c.

val create : ('a, 'b) kind -> 'c layout -> int -> int -> ('a, 'b, 'c) t

Array2.create kind layout dim1 dim2 returns a new Bigarray of two dimensions, whose size is dim1 in the first dimension and dim2 in the second dimension. kind and layout determine the array element kind and the array layout as described for Bigarray.Genarray.create.

val init : + ('a, 'b) kind -> + 'c layout -> + int -> + int -> + (int -> int -> 'a) -> + ('a, 'b, 'c) t

Array2.init kind layout dim1 dim2 f returns a new Bigarray b of two dimensions, whose size is dim2 in the first dimension and dim2 in the second dimension. kind and layout determine the array element kind and the array layout as described for Bigarray.Genarray.create.

Each element Array2.get b i j of the array is initialized to the result of f i j.

In other words, Array2.init kind layout dim1 dim2 f tabulates the results of f applied to the indices of a new Bigarray whose layout is described by kind, layout, dim1 and dim2.

  • since 4.12
val dim1 : ('a, 'b, 'c) t -> int

Return the first dimension of the given two-dimensional Bigarray.

val dim2 : ('a, 'b, 'c) t -> int

Return the second dimension of the given two-dimensional Bigarray.

val kind : ('a, 'b, 'c) t -> ('a, 'b) kind

Return the kind of the given Bigarray.

val layout : ('a, 'b, 'c) t -> 'c layout

Return the layout of the given Bigarray.

val change_layout : ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t

Array2.change_layout a layout returns a Bigarray with the specified layout, sharing the data with a (and hence having the same dimensions as a). No copying of elements is involved: the new array and the original array share the same storage space. The dimensions are reversed, such that get v [| a; b |] in C layout becomes get v [| b+1; a+1 |] in Fortran layout.

  • since 4.06
val size_in_bytes : ('a, 'b, 'c) t -> int

size_in_bytes a is the number of elements in a multiplied by a's kind_size_in_bytes.

  • since 4.03
val get : ('a, 'b, 'c) t -> int -> int -> 'a

Array2.get a x y, also written a.{x,y}, returns the element of a at coordinates (x, y). x and y must be within the bounds of a, as described for Bigarray.Genarray.get; otherwise, Invalid_argument is raised.

val set : ('a, 'b, 'c) t -> int -> int -> 'a -> unit

Array2.set a x y v, or alternatively a.{x,y} <- v, stores the value v at coordinates (x, y) in a. x and y must be within the bounds of a, as described for Bigarray.Genarray.set; otherwise, Invalid_argument is raised.

val sub_left : ('a, 'b, c_layout) t -> int -> int -> ('a, 'b, c_layout) t

Extract a two-dimensional sub-array of the given two-dimensional Bigarray by restricting the first dimension. See Bigarray.Genarray.sub_left for more details. Array2.sub_left applies only to arrays with C layout.

val sub_right : + ('a, 'b, fortran_layout) t -> + int -> + int -> + ('a, 'b, fortran_layout) t

Extract a two-dimensional sub-array of the given two-dimensional Bigarray by restricting the second dimension. See Bigarray.Genarray.sub_right for more details. Array2.sub_right applies only to arrays with Fortran layout.

val slice_left : ('a, 'b, c_layout) t -> int -> ('a, 'b, c_layout) Array1.t

Extract a row (one-dimensional slice) of the given two-dimensional Bigarray. The integer parameter is the index of the row to extract. See Bigarray.Genarray.slice_left for more details. Array2.slice_left applies only to arrays with C layout.

val slice_right : + ('a, 'b, fortran_layout) t -> + int -> + ('a, 'b, fortran_layout) Array1.t

Extract a column (one-dimensional slice) of the given two-dimensional Bigarray. The integer parameter is the index of the column to extract. See Bigarray.Genarray.slice_right for more details. Array2.slice_right applies only to arrays with Fortran layout.

val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit

Copy the first Bigarray to the second Bigarray. See Bigarray.Genarray.blit for more details.

val fill : ('a, 'b, 'c) t -> 'a -> unit

Fill the given Bigarray with the given value. See Bigarray.Genarray.fill for more details.

val of_array : ('a, 'b) kind -> 'c layout -> 'a array array -> ('a, 'b, 'c) t

Build a two-dimensional Bigarray initialized from the given array of arrays.

val unsafe_get : ('a, 'b, 'c) t -> int -> int -> 'a

Like Bigarray.Array2.get, but bounds checking is not always performed.

val unsafe_set : ('a, 'b, 'c) t -> int -> int -> 'a -> unit

Like Bigarray.Array2.set, but bounds checking is not always performed.

diff --git a/stdlib/Stdlib/Bigarray/Array3/index.html b/stdlib/Stdlib/Bigarray/Array3/index.html new file mode 100644 index 000000000..1adea30c8 --- /dev/null +++ b/stdlib/Stdlib/Bigarray/Array3/index.html @@ -0,0 +1,28 @@ + +Array3 (docs.stdlib.Stdlib.Bigarray.Array3)

Module Bigarray.Array3

Three-dimensional arrays. The Array3 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of three-dimensional arrays.

type (!'a, !'b, !'c) t

The type of three-dimensional Bigarrays whose elements have OCaml type 'a, representation kind 'b, and memory layout 'c.

val create : ('a, 'b) kind -> 'c layout -> int -> int -> int -> ('a, 'b, 'c) t

Array3.create kind layout dim1 dim2 dim3 returns a new Bigarray of three dimensions, whose size is dim1 in the first dimension, dim2 in the second dimension, and dim3 in the third. kind and layout determine the array element kind and the array layout as described for Bigarray.Genarray.create.

val init : + ('a, 'b) kind -> + 'c layout -> + int -> + int -> + int -> + (int -> int -> int -> 'a) -> + ('a, 'b, 'c) t

Array3.init kind layout dim1 dim2 dim3 f returns a new Bigarray b of three dimensions, whose size is dim1 in the first dimension, dim2 in the second dimension, and dim3 in the third. kind and layout determine the array element kind and the array layout as described for Bigarray.Genarray.create.

Each element Array3.get b i j k of the array is initialized to the result of f i j k.

In other words, Array3.init kind layout dim1 dim2 dim3 f tabulates the results of f applied to the indices of a new Bigarray whose layout is described by kind, layout, dim1, dim2 and dim3.

  • since 4.12
val dim1 : ('a, 'b, 'c) t -> int

Return the first dimension of the given three-dimensional Bigarray.

val dim2 : ('a, 'b, 'c) t -> int

Return the second dimension of the given three-dimensional Bigarray.

val dim3 : ('a, 'b, 'c) t -> int

Return the third dimension of the given three-dimensional Bigarray.

val kind : ('a, 'b, 'c) t -> ('a, 'b) kind

Return the kind of the given Bigarray.

val layout : ('a, 'b, 'c) t -> 'c layout

Return the layout of the given Bigarray.

val change_layout : ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t

Array3.change_layout a layout returns a Bigarray with the specified layout, sharing the data with a (and hence having the same dimensions as a). No copying of elements is involved: the new array and the original array share the same storage space. The dimensions are reversed, such that get v [| a; b; c |] in C layout becomes get v [| c+1; b+1; a+1 |] in Fortran layout.

  • since 4.06
val size_in_bytes : ('a, 'b, 'c) t -> int

size_in_bytes a is the number of elements in a multiplied by a's kind_size_in_bytes.

  • since 4.03
val get : ('a, 'b, 'c) t -> int -> int -> int -> 'a

Array3.get a x y z, also written a.{x,y,z}, returns the element of a at coordinates (x, y, z). x, y and z must be within the bounds of a, as described for Bigarray.Genarray.get; otherwise, Invalid_argument is raised.

val set : ('a, 'b, 'c) t -> int -> int -> int -> 'a -> unit

Array3.set a x y v, or alternatively a.{x,y,z} <- v, stores the value v at coordinates (x, y, z) in a. x, y and z must be within the bounds of a, as described for Bigarray.Genarray.set; otherwise, Invalid_argument is raised.

val sub_left : ('a, 'b, c_layout) t -> int -> int -> ('a, 'b, c_layout) t

Extract a three-dimensional sub-array of the given three-dimensional Bigarray by restricting the first dimension. See Bigarray.Genarray.sub_left for more details. Array3.sub_left applies only to arrays with C layout.

val sub_right : + ('a, 'b, fortran_layout) t -> + int -> + int -> + ('a, 'b, fortran_layout) t

Extract a three-dimensional sub-array of the given three-dimensional Bigarray by restricting the second dimension. See Bigarray.Genarray.sub_right for more details. Array3.sub_right applies only to arrays with Fortran layout.

val slice_left_1 : + ('a, 'b, c_layout) t -> + int -> + int -> + ('a, 'b, c_layout) Array1.t

Extract a one-dimensional slice of the given three-dimensional Bigarray by fixing the first two coordinates. The integer parameters are the coordinates of the slice to extract. See Bigarray.Genarray.slice_left for more details. Array3.slice_left_1 applies only to arrays with C layout.

val slice_right_1 : + ('a, 'b, fortran_layout) t -> + int -> + int -> + ('a, 'b, fortran_layout) Array1.t

Extract a one-dimensional slice of the given three-dimensional Bigarray by fixing the last two coordinates. The integer parameters are the coordinates of the slice to extract. See Bigarray.Genarray.slice_right for more details. Array3.slice_right_1 applies only to arrays with Fortran layout.

val slice_left_2 : ('a, 'b, c_layout) t -> int -> ('a, 'b, c_layout) Array2.t

Extract a two-dimensional slice of the given three-dimensional Bigarray by fixing the first coordinate. The integer parameter is the first coordinate of the slice to extract. See Bigarray.Genarray.slice_left for more details. Array3.slice_left_2 applies only to arrays with C layout.

val slice_right_2 : + ('a, 'b, fortran_layout) t -> + int -> + ('a, 'b, fortran_layout) Array2.t

Extract a two-dimensional slice of the given three-dimensional Bigarray by fixing the last coordinate. The integer parameter is the coordinate of the slice to extract. See Bigarray.Genarray.slice_right for more details. Array3.slice_right_2 applies only to arrays with Fortran layout.

val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit

Copy the first Bigarray to the second Bigarray. See Bigarray.Genarray.blit for more details.

val fill : ('a, 'b, 'c) t -> 'a -> unit

Fill the given Bigarray with the given value. See Bigarray.Genarray.fill for more details.

val of_array : + ('a, 'b) kind -> + 'c layout -> + 'a array array array -> + ('a, 'b, 'c) t

Build a three-dimensional Bigarray initialized from the given array of arrays of arrays.

val unsafe_get : ('a, 'b, 'c) t -> int -> int -> int -> 'a

Like Bigarray.Array3.get, but bounds checking is not always performed.

val unsafe_set : ('a, 'b, 'c) t -> int -> int -> int -> 'a -> unit

Like Bigarray.Array3.set, but bounds checking is not always performed.

diff --git a/stdlib/Stdlib/Bigarray/Genarray/index.html b/stdlib/Stdlib/Bigarray/Genarray/index.html new file mode 100644 index 000000000..71f7f4530 --- /dev/null +++ b/stdlib/Stdlib/Bigarray/Genarray/index.html @@ -0,0 +1,15 @@ + +Genarray (docs.stdlib.Stdlib.Bigarray.Genarray)

Module Bigarray.Genarray

type (!'a, !'b, !'c) t

The type Genarray.t is the type of Bigarrays with variable numbers of dimensions. Any number of dimensions between 0 and 16 is supported.

The three type parameters to Genarray.t identify the array element kind and layout, as follows:

  • the first parameter, 'a, is the OCaml type for accessing array elements (float, int, int32, int64, nativeint);
  • the second parameter, 'b, is the actual kind of array elements (float32_elt, float64_elt, int8_signed_elt, int8_unsigned_elt, etc);
  • the third parameter, 'c, identifies the array layout (c_layout or fortran_layout).

For instance, (float, float32_elt, fortran_layout) Genarray.t is the type of generic Bigarrays containing 32-bit floats in Fortran layout; reads and writes in this array use the OCaml type float.

val create : ('a, 'b) kind -> 'c layout -> int array -> ('a, 'b, 'c) t

Genarray.create kind layout dimensions returns a new Bigarray whose element kind is determined by the parameter kind (one of float32, float64, int8_signed, etc) and whose layout is determined by the parameter layout (one of c_layout or fortran_layout). The dimensions parameter is an array of integers that indicate the size of the Bigarray in each dimension. The length of dimensions determines the number of dimensions of the Bigarray.

For instance, Genarray.create int32 c_layout [|4;6;8|] returns a fresh Bigarray of 32-bit integers, in C layout, having three dimensions, the three dimensions being 4, 6 and 8 respectively.

Bigarrays returned by Genarray.create are not initialized: the initial values of array elements is unspecified.

Genarray.create raises Invalid_argument if the number of dimensions is not in the range 0 to 16 inclusive, or if one of the dimensions is negative.

val init : + ('a, 'b) kind -> + 'c layout -> + int array -> + (int array -> 'a) -> + ('a, 'b, 'c) t

Genarray.init kind layout dimensions f returns a new Bigarray b whose element kind is determined by the parameter kind (one of float32, float64, int8_signed, etc) and whose layout is determined by the parameter layout (one of c_layout or fortran_layout). The dimensions parameter is an array of integers that indicate the size of the Bigarray in each dimension. The length of dimensions determines the number of dimensions of the Bigarray.

Each element Genarray.get b i is initialized to the result of f i. In other words, Genarray.init kind layout dimensions f tabulates the results of f applied to the indices of a new Bigarray whose layout is described by kind, layout and dimensions. The index array i may be shared and mutated between calls to f.

For instance, Genarray.init int c_layout [|2; 1; 3|] + (Array.fold_left (+) 0) returns a fresh Bigarray of integers, in C layout, having three dimensions (2, 1, 3, respectively), with the element values 0, 1, 2, 1, 2, 3.

Genarray.init raises Invalid_argument if the number of dimensions is not in the range 0 to 16 inclusive, or if one of the dimensions is negative.

  • since 4.12
val num_dims : ('a, 'b, 'c) t -> int

Return the number of dimensions of the given Bigarray.

val dims : ('a, 'b, 'c) t -> int array

Genarray.dims a returns all dimensions of the Bigarray a, as an array of integers of length Genarray.num_dims a.

val nth_dim : ('a, 'b, 'c) t -> int -> int

Genarray.nth_dim a n returns the n-th dimension of the Bigarray a. The first dimension corresponds to n = 0; the second dimension corresponds to n = 1; the last dimension, to n = Genarray.num_dims a - 1.

  • raises Invalid_argument

    if n is less than 0 or greater or equal than Genarray.num_dims a.

val kind : ('a, 'b, 'c) t -> ('a, 'b) kind

Return the kind of the given Bigarray.

val layout : ('a, 'b, 'c) t -> 'c layout

Return the layout of the given Bigarray.

val change_layout : ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t

Genarray.change_layout a layout returns a Bigarray with the specified layout, sharing the data with a (and hence having the same dimensions as a). No copying of elements is involved: the new array and the original array share the same storage space. The dimensions are reversed, such that get v [| a; b |] in C layout becomes get v [| b+1; a+1 |] in Fortran layout.

  • since 4.04
val size_in_bytes : ('a, 'b, 'c) t -> int

size_in_bytes a is the number of elements in a multiplied by a's kind_size_in_bytes.

  • since 4.03
val get : ('a, 'b, 'c) t -> int array -> 'a

Read an element of a generic Bigarray. Genarray.get a [|i1; ...; iN|] returns the element of a whose coordinates are i1 in the first dimension, i2 in the second dimension, ..., iN in the N-th dimension.

If a has C layout, the coordinates must be greater or equal than 0 and strictly less than the corresponding dimensions of a. If a has Fortran layout, the coordinates must be greater or equal than 1 and less or equal than the corresponding dimensions of a.

If N > 3, alternate syntax is provided: you can write a.{i1, i2, ..., iN} instead of Genarray.get a [|i1; ...; iN|]. (The syntax a.{...} with one, two or three coordinates is reserved for accessing one-, two- and three-dimensional arrays as described below.)

  • raises Invalid_argument

    if the array a does not have exactly N dimensions, or if the coordinates are outside the array bounds.

val set : ('a, 'b, 'c) t -> int array -> 'a -> unit

Assign an element of a generic Bigarray. Genarray.set a [|i1; ...; iN|] v stores the value v in the element of a whose coordinates are i1 in the first dimension, i2 in the second dimension, ..., iN in the N-th dimension.

The array a must have exactly N dimensions, and all coordinates must lie inside the array bounds, as described for Genarray.get; otherwise, Invalid_argument is raised.

If N > 3, alternate syntax is provided: you can write a.{i1, i2, ..., iN} <- v instead of Genarray.set a [|i1; ...; iN|] v. (The syntax a.{...} <- v with one, two or three coordinates is reserved for updating one-, two- and three-dimensional arrays as described below.)

val sub_left : ('a, 'b, c_layout) t -> int -> int -> ('a, 'b, c_layout) t

Extract a sub-array of the given Bigarray by restricting the first (left-most) dimension. Genarray.sub_left a ofs len returns a Bigarray with the same number of dimensions as a, and the same dimensions as a, except the first dimension, which corresponds to the interval [ofs ... ofs + len - 1] of the first dimension of a. No copying of elements is involved: the sub-array and the original array share the same storage space. In other terms, the element at coordinates [|i1; ...; iN|] of the sub-array is identical to the element at coordinates [|i1+ofs; ...; iN|] of the original array a.

Genarray.sub_left applies only to Bigarrays in C layout.

  • raises Invalid_argument

    if ofs and len do not designate a valid sub-array of a, that is, if ofs < 0, or len < 0, or ofs + len > Genarray.nth_dim a 0.

val sub_right : + ('a, 'b, fortran_layout) t -> + int -> + int -> + ('a, 'b, fortran_layout) t

Extract a sub-array of the given Bigarray by restricting the last (right-most) dimension. Genarray.sub_right a ofs len returns a Bigarray with the same number of dimensions as a, and the same dimensions as a, except the last dimension, which corresponds to the interval [ofs ... ofs + len - 1] of the last dimension of a. No copying of elements is involved: the sub-array and the original array share the same storage space. In other terms, the element at coordinates [|i1; ...; iN|] of the sub-array is identical to the element at coordinates [|i1; ...; iN+ofs|] of the original array a.

Genarray.sub_right applies only to Bigarrays in Fortran layout.

  • raises Invalid_argument

    if ofs and len do not designate a valid sub-array of a, that is, if ofs < 1, or len < 0, or ofs + len > Genarray.nth_dim a (Genarray.num_dims a - 1).

val slice_left : ('a, 'b, c_layout) t -> int array -> ('a, 'b, c_layout) t

Extract a sub-array of lower dimension from the given Bigarray by fixing one or several of the first (left-most) coordinates. Genarray.slice_left a [|i1; ... ; iM|] returns the 'slice' of a obtained by setting the first M coordinates to i1, ..., iM. If a has N dimensions, the slice has dimension N - M, and the element at coordinates [|j1; ...; j(N-M)|] in the slice is identical to the element at coordinates [|i1; ...; iM; j1; ...; j(N-M)|] in the original array a. No copying of elements is involved: the slice and the original array share the same storage space.

Genarray.slice_left applies only to Bigarrays in C layout.

  • raises Invalid_argument

    if M >= N, or if [|i1; ... ; iM|] is outside the bounds of a.

val slice_right : + ('a, 'b, fortran_layout) t -> + int array -> + ('a, 'b, fortran_layout) t

Extract a sub-array of lower dimension from the given Bigarray by fixing one or several of the last (right-most) coordinates. Genarray.slice_right a [|i1; ... ; iM|] returns the 'slice' of a obtained by setting the last M coordinates to i1, ..., iM. If a has N dimensions, the slice has dimension N - M, and the element at coordinates [|j1; ...; j(N-M)|] in the slice is identical to the element at coordinates [|j1; ...; j(N-M); i1; ...; iM|] in the original array a. No copying of elements is involved: the slice and the original array share the same storage space.

Genarray.slice_right applies only to Bigarrays in Fortran layout.

  • raises Invalid_argument

    if M >= N, or if [|i1; ... ; iM|] is outside the bounds of a.

val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit

Copy all elements of a Bigarray in another Bigarray. Genarray.blit src dst copies all elements of src into dst. Both arrays src and dst must have the same number of dimensions and equal dimensions. Copying a sub-array of src to a sub-array of dst can be achieved by applying Genarray.blit to sub-array or slices of src and dst.

val fill : ('a, 'b, 'c) t -> 'a -> unit

Set all elements of a Bigarray to a given value. Genarray.fill a v stores the value v in all elements of the Bigarray a. Setting only some elements of a to v can be achieved by applying Genarray.fill to a sub-array or a slice of a.

diff --git a/stdlib/Stdlib/Bigarray/index.html b/stdlib/Stdlib/Bigarray/index.html new file mode 100644 index 000000000..c8bcbb6c6 --- /dev/null +++ b/stdlib/Stdlib/Bigarray/index.html @@ -0,0 +1,24 @@ + +Bigarray (docs.stdlib.Stdlib.Bigarray)

Module Stdlib.Bigarray

Large, multi-dimensional, numerical arrays.

This module implements multi-dimensional arrays of integers and floating-point numbers, thereafter referred to as 'Bigarrays', to distinguish them from the standard OCaml arrays described in Array.

The implementation allows efficient sharing of large numerical arrays between OCaml code and C or Fortran numerical libraries.

The main differences between 'Bigarrays' and standard OCaml arrays are as follows:

  • Bigarrays are not limited in size, unlike OCaml arrays. (Normal float arrays are limited to 2,097,151 elements on a 32-bit platform, and normal arrays of other types to 4,194,303 elements.)
  • Bigarrays are multi-dimensional. Any number of dimensions between 0 and 16 is supported. In contrast, OCaml arrays are mono-dimensional and require encoding multi-dimensional arrays as arrays of arrays.
  • Bigarrays can only contain integers and floating-point numbers, while OCaml arrays can contain arbitrary OCaml data types.
  • Bigarrays provide more space-efficient storage of integer and floating-point elements than normal OCaml arrays, in particular because they support 'small' types such as single-precision floats and 8 and 16-bit integers, in addition to the standard OCaml types of double-precision floats and 32 and 64-bit integers.
  • The memory layout of Bigarrays is entirely compatible with that of arrays in C and Fortran, allowing large arrays to be passed back and forth between OCaml code and C / Fortran code with no data copying at all.
  • Bigarrays support interesting high-level operations that normal arrays do not provide efficiently, such as extracting sub-arrays and 'slicing' a multi-dimensional array along certain dimensions, all without any copying.

Users of this module are encouraged to do open Bigarray in their source, then refer to array types and operations via short dot notation, e.g. Array1.t or Array2.sub.

Bigarrays support all the OCaml ad-hoc polymorphic operations:

Element kinds

Bigarrays can contain elements of the following kinds:

Each element kind is represented at the type level by one of the *_elt types defined below (defined with a single constructor instead of abstract types for technical injectivity reasons).

  • since 4.07 Moved from otherlibs to stdlib.
type float32_elt =
  1. | Float32_elt
type float64_elt =
  1. | Float64_elt
type int8_signed_elt =
  1. | Int8_signed_elt
type int8_unsigned_elt =
  1. | Int8_unsigned_elt
type int16_signed_elt =
  1. | Int16_signed_elt
type int16_unsigned_elt =
  1. | Int16_unsigned_elt
type int32_elt =
  1. | Int32_elt
type int64_elt =
  1. | Int64_elt
type int_elt =
  1. | Int_elt
type nativeint_elt =
  1. | Nativeint_elt
type complex32_elt =
  1. | Complex32_elt
type complex64_elt =
  1. | Complex64_elt
type ('a, 'b) kind =
  1. | Float32 : (float, float32_elt) kind
  2. | Float64 : (float, float64_elt) kind
  3. | Int8_signed : (int, int8_signed_elt) kind
  4. | Int8_unsigned : (int, int8_unsigned_elt) kind
  5. | Int16_signed : (int, int16_signed_elt) kind
  6. | Int16_unsigned : (int, int16_unsigned_elt) kind
  7. | Int32 : (int32, int32_elt) kind
  8. | Int64 : (int64, int64_elt) kind
  9. | Int : (int, int_elt) kind
  10. | Nativeint : (nativeint, nativeint_elt) kind
  11. | Complex32 : (Complex.t, complex32_elt) kind
  12. | Complex64 : (Complex.t, complex64_elt) kind
  13. | Char : (char, int8_unsigned_elt) kind

To each element kind is associated an OCaml type, which is the type of OCaml values that can be stored in the Bigarray or read back from it. This type is not necessarily the same as the type of the array elements proper: for instance, a Bigarray whose elements are of kind float32_elt contains 32-bit single precision floats, but reading or writing one of its elements from OCaml uses the OCaml type float, which is 64-bit double precision floats.

The GADT type ('a, 'b) kind captures this association of an OCaml type 'a for values read or written in the Bigarray, and of an element kind 'b which represents the actual contents of the Bigarray. Its constructors list all possible associations of OCaml types with element kinds, and are re-exported below for backward-compatibility reasons.

Using a generalized algebraic datatype (GADT) here allows writing well-typed polymorphic functions whose return type depend on the argument type, such as:

let zero : type a b. (a, b) kind -> a = function
+  | Float32 -> 0.0 | Complex32 -> Complex.zero
+  | Float64 -> 0.0 | Complex64 -> Complex.zero
+  | Int8_signed -> 0 | Int8_unsigned -> 0
+  | Int16_signed -> 0 | Int16_unsigned -> 0
+  | Int32 -> 0l | Int64 -> 0L
+  | Int -> 0 | Nativeint -> 0n
+  | Char -> '\000'
val float32 : (float, float32_elt) kind
val float64 : (float, float64_elt) kind
val complex32 : (Complex.t, complex32_elt) kind
val complex64 : (Complex.t, complex64_elt) kind
val int8_signed : (int, int8_signed_elt) kind
val int8_unsigned : (int, int8_unsigned_elt) kind
val int16_signed : (int, int16_signed_elt) kind
val int16_unsigned : (int, int16_unsigned_elt) kind
val int : (int, int_elt) kind
val int32 : (int32, int32_elt) kind
val int64 : (int64, int64_elt) kind
val nativeint : (nativeint, nativeint_elt) kind
val char : (char, int8_unsigned_elt) kind

As shown by the types of the values above, Bigarrays of kind float32_elt and float64_elt are accessed using the OCaml type float. Bigarrays of complex kinds complex32_elt, complex64_elt are accessed with the OCaml type Complex.t. Bigarrays of integer kinds are accessed using the smallest OCaml integer type large enough to represent the array elements: int for 8- and 16-bit integer Bigarrays, as well as OCaml-integer Bigarrays; int32 for 32-bit integer Bigarrays; int64 for 64-bit integer Bigarrays; and nativeint for platform-native integer Bigarrays. Finally, Bigarrays of kind int8_unsigned_elt can also be accessed as arrays of characters instead of arrays of small integers, by using the kind value char instead of int8_unsigned.

val kind_size_in_bytes : ('a, 'b) kind -> int

kind_size_in_bytes k is the number of bytes used to store an element of type k.

  • since 4.03

Array layouts

type c_layout =
  1. | C_layout_typ
type fortran_layout =
  1. | Fortran_layout_typ

To facilitate interoperability with existing C and Fortran code, this library supports two different memory layouts for Bigarrays, one compatible with the C conventions, the other compatible with the Fortran conventions.

In the C-style layout, array indices start at 0, and multi-dimensional arrays are laid out in row-major format. That is, for a two-dimensional array, all elements of row 0 are contiguous in memory, followed by all elements of row 1, etc. In other terms, the array elements at (x,y) and (x, y+1) are adjacent in memory.

In the Fortran-style layout, array indices start at 1, and multi-dimensional arrays are laid out in column-major format. That is, for a two-dimensional array, all elements of column 0 are contiguous in memory, followed by all elements of column 1, etc. In other terms, the array elements at (x,y) and (x+1, y) are adjacent in memory.

Each layout style is identified at the type level by the phantom types Bigarray.c_layout and Bigarray.fortran_layout respectively.

Supported layouts

The GADT type 'a layout represents one of the two supported memory layouts: C-style or Fortran-style. Its constructors are re-exported as values below for backward-compatibility reasons.

type 'a layout =
  1. | C_layout : c_layout layout
  2. | Fortran_layout : fortran_layout layout
val c_layout : c_layout layout
val fortran_layout : fortran_layout layout

Generic arrays (of arbitrarily many dimensions)

module Genarray : sig ... end

Zero-dimensional arrays

module Array0 : sig ... end

Zero-dimensional arrays. The Array0 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of zero-dimensional arrays that only contain a single scalar value. Statically knowing the number of dimensions of the array allows faster operations, and more precise static type-checking.

One-dimensional arrays

module Array1 : sig ... end

One-dimensional arrays. The Array1 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of one-dimensional arrays. (The Array2 and Array3 structures below provide operations specialized for two- and three-dimensional arrays.) Statically knowing the number of dimensions of the array allows faster operations, and more precise static type-checking.

Two-dimensional arrays

module Array2 : sig ... end

Two-dimensional arrays. The Array2 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of two-dimensional arrays.

Three-dimensional arrays

module Array3 : sig ... end

Three-dimensional arrays. The Array3 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of three-dimensional arrays.

Coercions between generic Bigarrays and fixed-dimension Bigarrays

val genarray_of_array0 : ('a, 'b, 'c) Array0.t -> ('a, 'b, 'c) Genarray.t

Return the generic Bigarray corresponding to the given zero-dimensional Bigarray.

  • since 4.05
val genarray_of_array1 : ('a, 'b, 'c) Array1.t -> ('a, 'b, 'c) Genarray.t

Return the generic Bigarray corresponding to the given one-dimensional Bigarray.

val genarray_of_array2 : ('a, 'b, 'c) Array2.t -> ('a, 'b, 'c) Genarray.t

Return the generic Bigarray corresponding to the given two-dimensional Bigarray.

val genarray_of_array3 : ('a, 'b, 'c) Array3.t -> ('a, 'b, 'c) Genarray.t

Return the generic Bigarray corresponding to the given three-dimensional Bigarray.

val array0_of_genarray : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array0.t

Return the zero-dimensional Bigarray corresponding to the given generic Bigarray.

  • raises Invalid_argument

    if the generic Bigarray does not have exactly zero dimension.

  • since 4.05
val array1_of_genarray : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array1.t

Return the one-dimensional Bigarray corresponding to the given generic Bigarray.

  • raises Invalid_argument

    if the generic Bigarray does not have exactly one dimension.

val array2_of_genarray : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array2.t

Return the two-dimensional Bigarray corresponding to the given generic Bigarray.

  • raises Invalid_argument

    if the generic Bigarray does not have exactly two dimensions.

val array3_of_genarray : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array3.t

Return the three-dimensional Bigarray corresponding to the given generic Bigarray.

  • raises Invalid_argument

    if the generic Bigarray does not have exactly three dimensions.

Re-shaping Bigarrays

val reshape : ('a, 'b, 'c) Genarray.t -> int array -> ('a, 'b, 'c) Genarray.t

reshape b [|d1;...;dN|] converts the Bigarray b to a N-dimensional array of dimensions d1...dN. The returned array and the original array b share their data and have the same layout. For instance, assuming that b is a one-dimensional array of dimension 12, reshape b [|3;4|] returns a two-dimensional array b' of dimensions 3 and 4. If b has C layout, the element (x,y) of b' corresponds to the element x * 3 + y of b. If b has Fortran layout, the element (x,y) of b' corresponds to the element x + (y - 1) * 4 of b. The returned Bigarray must have exactly the same number of elements as the original Bigarray b. That is, the product of the dimensions of b must be equal to i1 * ... * iN. Otherwise, Invalid_argument is raised.

val reshape_0 : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array0.t

Specialized version of Bigarray.reshape for reshaping to zero-dimensional arrays.

  • since 4.05
val reshape_1 : ('a, 'b, 'c) Genarray.t -> int -> ('a, 'b, 'c) Array1.t

Specialized version of Bigarray.reshape for reshaping to one-dimensional arrays.

val reshape_2 : ('a, 'b, 'c) Genarray.t -> int -> int -> ('a, 'b, 'c) Array2.t

Specialized version of Bigarray.reshape for reshaping to two-dimensional arrays.

val reshape_3 : + ('a, 'b, 'c) Genarray.t -> + int -> + int -> + int -> + ('a, 'b, 'c) Array3.t

Specialized version of Bigarray.reshape for reshaping to three-dimensional arrays.

Bigarrays and concurrency safety

Care must be taken when concurrently accessing bigarrays from multiple domains: accessing a bigarray will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every bigarray operation that accesses more than one array element is not atomic. This includes slicing, bliting, and filling bigarrays.

For example, consider the following program:

open Bigarray
+let size = 100_000_000
+let a = Array1.init Int C_layout size (fun _ -> 1)
+let update f a () =
+  for i = 0 to size - 1 do a.{i} <- f a.{i} done
+let d1 = Domain.spawn (update (fun x -> x + 1) a)
+let d2 = Domain.spawn (update (fun x -> 2 * x + 1) a)
+let () = Domain.join d1; Domain.join d2

After executing this code, each field of the bigarray a is either 2, 3, 4 or 5. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

Data races

If two domains only access disjoint parts of the bigarray, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

A data race is said to occur when two domains access the same bigarray element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the bigarray elements.

Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains.

Tearing

Bigarrays have a distinct caveat in the presence of data races: concurrent bigarray operations might produce surprising values due to tearing. More precisely, the interleaving of partial writes and reads might create values that would not exist with a sequential execution. For instance, at the end of

let res = Array1.init Complex64 c_layout size (fun _ -> Complex.zero)
+let d1 = Domain.spawn (fun () -> Array1.fill res Complex.one)
+let d2 = Domain.spawn (fun () -> Array1.fill res Complex.i)
+let () = Domain.join d1; Domain.join d2

the res bigarray might contain values that are neither Complex.i nor Complex.one (for instance 1 + i).

diff --git a/stdlib/Stdlib/Bool/index.html b/stdlib/Stdlib/Bool/index.html new file mode 100644 index 000000000..7c99b1b24 --- /dev/null +++ b/stdlib/Stdlib/Bool/index.html @@ -0,0 +1,2 @@ + +Bool (docs.stdlib.Stdlib.Bool)

Module Stdlib.Bool

Boolean values.

  • since 4.08

Booleans

type t = bool =
  1. | false
  2. | true

The type of booleans (truth values).

The constructors false and true are included here so that they have paths, but they are not intended to be used in user-defined data types.

val not : bool -> bool

not b is the boolean negation of b.

val (&&) : bool -> bool -> bool

e0 && e1 is the lazy boolean conjunction of expressions e0 and e1. If e0 evaluates to false, e1 is not evaluated. Right-associative operator at precedence level 3/11.

val (||) : bool -> bool -> bool

e0 || e1 is the lazy boolean disjunction of expressions e0 and e1. If e0 evaluates to true, e1 is not evaluated. Right-associative operator at precedence level 2/11.

Predicates and comparisons

val equal : bool -> bool -> bool

equal b0 b1 is true if and only if b0 and b1 are both true or both false.

val compare : bool -> bool -> int

compare b0 b1 is a total order on boolean values. false is smaller than true.

Converting

val to_int : bool -> int

to_int b is 0 if b is false and 1 if b is true.

val to_float : bool -> float

to_float b is 0. if b is false and 1. if b is true.

val to_string : bool -> string

to_string b is "true" if b is true and "false" if b is false.

val seeded_hash : int -> bool -> int

A seeded hash function for booleans, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : bool -> int

An unseeded hash function for booleans, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.1
diff --git a/stdlib/Stdlib/Buffer/index.html b/stdlib/Stdlib/Buffer/index.html new file mode 100644 index 000000000..9fe4dd483 --- /dev/null +++ b/stdlib/Stdlib/Buffer/index.html @@ -0,0 +1,5 @@ + +Buffer (docs.stdlib.Stdlib.Buffer)

Module Stdlib.Buffer

Extensible buffers.

This module implements buffers that automatically expand as necessary. It provides accumulative concatenation of strings in linear time (instead of quadratic time when strings are concatenated pairwise). For example:

let concat_strings ss =
+  let b = Buffer.create 16 in
+    List.iter (Buffer.add_string b) ss;
+    Buffer.contents b

Unsynchronized accesses

Unsynchronized accesses to a buffer may lead to an invalid buffer state. Thus, concurrent accesses to a buffer must be synchronized (for instance with a Mutex.t).

type t

The abstract type of buffers.

val create : int -> t

create n returns a fresh buffer, initially empty. The n parameter is the initial size of the internal byte sequence that holds the buffer contents. That byte sequence is automatically reallocated when more than n characters are stored in the buffer, but shrinks back to n characters when reset is called. For best performance, n should be of the same order of magnitude as the number of characters that are expected to be stored in the buffer (for instance, 80 for a buffer that holds one output line). Nothing bad will happen if the buffer grows beyond that limit, however. In doubt, take n = 16 for instance. If n is not between 1 and Sys.max_string_length, it will be clipped to that interval.

val contents : t -> string

Return a copy of the current contents of the buffer. The buffer itself is unchanged.

val to_bytes : t -> bytes

Return a copy of the current contents of the buffer. The buffer itself is unchanged.

  • since 4.02
val sub : t -> int -> int -> string

Buffer.sub b off len returns a copy of len bytes from the current contents of the buffer b, starting at offset off.

val blit : t -> int -> bytes -> int -> int -> unit

Buffer.blit src srcoff dst dstoff len copies len characters from the current contents of the buffer src, starting at offset srcoff to dst, starting at character dstoff.

  • raises Invalid_argument

    if srcoff and len do not designate a valid range of src, or if dstoff and len do not designate a valid range of dst.

  • since 3.11.2
val nth : t -> int -> char

Get the n-th character of the buffer.

val length : t -> int

Return the number of characters currently contained in the buffer.

val clear : t -> unit

Empty the buffer.

val reset : t -> unit

Empty the buffer and deallocate the internal byte sequence holding the buffer contents, replacing it with the initial internal byte sequence of length n that was allocated by Buffer.create n. For long-lived buffers that may have grown a lot, reset allows faster reclamation of the space used by the buffer.

val output_buffer : out_channel -> t -> unit

output_buffer oc b writes the current contents of buffer b on the output channel oc.

val truncate : t -> int -> unit

truncate b len truncates the length of b to len Note: the internal byte sequence is not shortened.

  • since 4.05

Appending

Note: all add_* operations can raise Failure if the internal byte sequence of the buffer would need to grow beyond Sys.max_string_length.

val add_char : t -> char -> unit

add_char b c appends the character c at the end of buffer b.

val add_utf_8_uchar : t -> Uchar.t -> unit

add_utf_8_uchar b u appends the UTF-8 encoding of u at the end of buffer b.

  • since 4.06
val add_utf_16le_uchar : t -> Uchar.t -> unit

add_utf_16le_uchar b u appends the UTF-16LE encoding of u at the end of buffer b.

  • since 4.06
val add_utf_16be_uchar : t -> Uchar.t -> unit

add_utf_16be_uchar b u appends the UTF-16BE encoding of u at the end of buffer b.

  • since 4.06
val add_string : t -> string -> unit

add_string b s appends the string s at the end of buffer b.

val add_bytes : t -> bytes -> unit

add_bytes b s appends the byte sequence s at the end of buffer b.

  • since 4.02
val add_substring : t -> string -> int -> int -> unit

add_substring b s ofs len takes len characters from offset ofs in string s and appends them at the end of buffer b.

val add_subbytes : t -> bytes -> int -> int -> unit

add_subbytes b s ofs len takes len characters from offset ofs in byte sequence s and appends them at the end of buffer b.

  • since 4.02
val add_substitute : t -> (string -> string) -> string -> unit

add_substitute b f s appends the string pattern s at the end of buffer b with substitution. The substitution process looks for variables into the pattern and substitutes each variable name by its value, as obtained by applying the mapping f to the variable name. Inside the string pattern, a variable name immediately follows a non-escaped $ character and is one of the following:

  • a non empty sequence of alphanumeric or _ characters,
  • an arbitrary sequence of characters enclosed by a pair of matching parentheses or curly brackets. An escaped $ character is a $ that immediately follows a backslash character; it then stands for a plain $.
  • raises Not_found

    if the closing character of a parenthesized variable cannot be found.

val add_buffer : t -> t -> unit

add_buffer b1 b2 appends the current contents of buffer b2 at the end of buffer b1. b2 is not modified.

val add_channel : t -> in_channel -> int -> unit

add_channel b ic n reads at most n characters from the input channel ic and stores them at the end of buffer b.

  • raises End_of_file

    if the channel contains fewer than n characters. In this case, the characters are still added to the buffer, so as to avoid loss of data.

Buffers and Sequences

val to_seq : t -> char Seq.t

Iterate on the buffer, in increasing order.

The behavior is not specified if the buffer is modified during iteration.

  • since 4.07
val to_seqi : t -> (int * char) Seq.t

Iterate on the buffer, in increasing order, yielding indices along chars.

The behavior is not specified if the buffer is modified during iteration.

  • since 4.07
val add_seq : t -> char Seq.t -> unit

Add chars to the buffer

  • since 4.07
val of_seq : char Seq.t -> t

Create a buffer from the generator

  • since 4.07

Binary encoding of integers

The functions in this section append binary encodings of integers to buffers.

Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. Functions that encode these values truncate their inputs to their least significant bytes.

val add_uint8 : t -> int -> unit

add_uint8 b i appends a binary unsigned 8-bit integer i to b.

  • since 4.08
val add_int8 : t -> int -> unit

add_int8 b i appends a binary signed 8-bit integer i to b.

  • since 4.08
val add_uint16_ne : t -> int -> unit

add_uint16_ne b i appends a binary native-endian unsigned 16-bit integer i to b.

  • since 4.08
val add_uint16_be : t -> int -> unit

add_uint16_be b i appends a binary big-endian unsigned 16-bit integer i to b.

  • since 4.08
val add_uint16_le : t -> int -> unit

add_uint16_le b i appends a binary little-endian unsigned 16-bit integer i to b.

  • since 4.08
val add_int16_ne : t -> int -> unit

add_int16_ne b i appends a binary native-endian signed 16-bit integer i to b.

  • since 4.08
val add_int16_be : t -> int -> unit

add_int16_be b i appends a binary big-endian signed 16-bit integer i to b.

  • since 4.08
val add_int16_le : t -> int -> unit

add_int16_le b i appends a binary little-endian signed 16-bit integer i to b.

  • since 4.08
val add_int32_ne : t -> int32 -> unit

add_int32_ne b i appends a binary native-endian 32-bit integer i to b.

  • since 4.08
val add_int32_be : t -> int32 -> unit

add_int32_be b i appends a binary big-endian 32-bit integer i to b.

  • since 4.08
val add_int32_le : t -> int32 -> unit

add_int32_le b i appends a binary little-endian 32-bit integer i to b.

  • since 4.08
val add_int64_ne : t -> int64 -> unit

add_int64_ne b i appends a binary native-endian 64-bit integer i to b.

  • since 4.08
val add_int64_be : t -> int64 -> unit

add_int64_be b i appends a binary big-endian 64-bit integer i to b.

  • since 4.08
val add_int64_le : t -> int64 -> unit

add_int64_ne b i appends a binary little-endian 64-bit integer i to b.

  • since 4.08
diff --git a/stdlib/Stdlib/Bytes/index.html b/stdlib/Stdlib/Bytes/index.html new file mode 100644 index 000000000..5c4c9c930 --- /dev/null +++ b/stdlib/Stdlib/Bytes/index.html @@ -0,0 +1,17 @@ + +Bytes (docs.stdlib.Stdlib.Bytes)

Module Stdlib.Bytes

Byte sequence operations.

A byte sequence is a mutable data structure that contains a fixed-length sequence of bytes. Each byte can be indexed in constant time for reading or writing.

Given a byte sequence s of length l, we can access each of the l bytes of s via its index in the sequence. Indexes start at 0, and we will call an index valid in s if it falls within the range [0...l-1] (inclusive). A position is the point between two bytes or at the beginning or end of the sequence. We call a position valid in s if it falls within the range [0...l] (inclusive). Note that the byte at index n is between positions n and n+1.

Two parameters start and len are said to designate a valid range of s if len >= 0 and start and start+len are valid positions in s.

Byte sequences can be modified in place, for instance via the set and blit functions described below. See also strings (module String), which are almost the same data structure, but cannot be modified in place.

Bytes are represented by the OCaml type char.

The labeled version of this module can be used as described in the StdLabels module.

  • since 4.02
val length : bytes -> int

Return the length (number of bytes) of the argument.

val get : bytes -> int -> char

get s n returns the byte at index n in argument s.

val set : bytes -> int -> char -> unit

set s n c modifies s in place, replacing the byte at index n with c.

val create : int -> bytes

create n returns a new byte sequence of length n. The sequence is uninitialized and contains arbitrary bytes.

val make : int -> char -> bytes

make n c returns a new byte sequence of length n, filled with the byte c.

val init : int -> (int -> char) -> bytes

init n f returns a fresh byte sequence of length n, with character i initialized to the result of f i (in increasing index order).

val empty : bytes

A byte sequence of size 0.

val copy : bytes -> bytes

Return a new byte sequence that contains the same bytes as the argument.

val of_string : string -> bytes

Return a new byte sequence that contains the same bytes as the given string.

val to_string : bytes -> string

Return a new string that contains the same bytes as the given byte sequence.

val sub : bytes -> int -> int -> bytes

sub s pos len returns a new byte sequence of length len, containing the subsequence of s that starts at position pos and has length len.

val sub_string : bytes -> int -> int -> string

Same as sub but return a string instead of a byte sequence.

val extend : bytes -> int -> int -> bytes

extend s left right returns a new byte sequence that contains the bytes of s, with left uninitialized bytes prepended and right uninitialized bytes appended to it. If left or right is negative, then bytes are removed (instead of appended) from the corresponding side of s.

  • since 4.05 in BytesLabels
val fill : bytes -> int -> int -> char -> unit

fill s pos len c modifies s in place, replacing len characters with c, starting at pos.

val blit : bytes -> int -> bytes -> int -> int -> unit

blit src src_pos dst dst_pos len copies len bytes from byte sequence src, starting at index src_pos, to byte sequence dst, starting at index dst_pos. It works correctly even if src and dst are the same byte sequence, and the source and destination intervals overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

val blit_string : string -> int -> bytes -> int -> int -> unit

blit_string src src_pos dst dst_pos len copies len bytes from string src, starting at index src_pos, to byte sequence dst, starting at index dst_pos.

  • raises Invalid_argument

    if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

  • since 4.05 in BytesLabels
val concat : bytes -> bytes list -> bytes

concat sep sl concatenates the list of byte sequences sl, inserting the separator byte sequence sep between each, and returns the result as a new byte sequence.

val cat : bytes -> bytes -> bytes

cat s1 s2 concatenates s1 and s2 and returns the result as a new byte sequence.

  • since 4.05 in BytesLabels
val iter : (char -> unit) -> bytes -> unit

iter f s applies function f in turn to all the bytes of s. It is equivalent to f (get s 0); f (get s 1); ...; f (get s + (length s - 1)); ().

val iteri : (int -> char -> unit) -> bytes -> unit

Same as iter, but the function is applied to the index of the byte as first argument and the byte itself as second argument.

val map : (char -> char) -> bytes -> bytes

map f s applies function f in turn to all the bytes of s (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

val mapi : (int -> char -> char) -> bytes -> bytes

mapi f s calls f with each character of s and its index (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

val fold_left : ('acc -> char -> 'acc) -> 'acc -> bytes -> 'acc

fold_left f x s computes f (... (f (f x (get s 0)) (get s 1)) ...) (get s (n-1)), where n is the length of s.

  • since 4.13
val fold_right : (char -> 'acc -> 'acc) -> bytes -> 'acc -> 'acc

fold_right f s x computes f (get s 0) (f (get s 1) ( ... (f (get s (n-1)) x) ...)), where n is the length of s.

  • since 4.13
val for_all : (char -> bool) -> bytes -> bool

for_all p s checks if all characters in s satisfy the predicate p.

  • since 4.13
val exists : (char -> bool) -> bytes -> bool

exists p s checks if at least one character of s satisfies the predicate p.

  • since 4.13
val trim : bytes -> bytes

Return a copy of the argument, without leading and trailing whitespace. The bytes regarded as whitespace are the ASCII characters ' ', '\012', '\n', '\r', and '\t'.

val escaped : bytes -> bytes

Return a copy of the argument, with special characters represented by escape sequences, following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash and double-quote.

val index : bytes -> char -> int

index s c returns the index of the first occurrence of byte c in s.

val index_opt : bytes -> char -> int option

index_opt s c returns the index of the first occurrence of byte c in s or None if c does not occur in s.

  • since 4.05
val rindex : bytes -> char -> int

rindex s c returns the index of the last occurrence of byte c in s.

val rindex_opt : bytes -> char -> int option

rindex_opt s c returns the index of the last occurrence of byte c in s or None if c does not occur in s.

  • since 4.05
val index_from : bytes -> int -> char -> int

index_from s i c returns the index of the first occurrence of byte c in s after position i. index s c is equivalent to index_from s 0 c.

  • raises Not_found

    if c does not occur in s after position i.

val index_from_opt : bytes -> int -> char -> int option

index_from_opt s i c returns the index of the first occurrence of byte c in s after position i or None if c does not occur in s after position i. index_opt s c is equivalent to index_from_opt s 0 c.

  • since 4.05
val rindex_from : bytes -> int -> char -> int

rindex_from s i c returns the index of the last occurrence of byte c in s before position i+1. rindex s c is equivalent to rindex_from s (length s - 1) c.

  • raises Not_found

    if c does not occur in s before position i+1.

val rindex_from_opt : bytes -> int -> char -> int option

rindex_from_opt s i c returns the index of the last occurrence of byte c in s before position i+1 or None if c does not occur in s before position i+1. rindex_opt s c is equivalent to rindex_from s (length s - 1) c.

  • since 4.05
val contains : bytes -> char -> bool

contains s c tests if byte c appears in s.

val contains_from : bytes -> int -> char -> bool

contains_from s start c tests if byte c appears in s after position start. contains s c is equivalent to contains_from + s 0 c.

val rcontains_from : bytes -> int -> char -> bool

rcontains_from s stop c tests if byte c appears in s before position stop+1.

val uppercase_ascii : bytes -> bytes

Return a copy of the argument, with all lowercase letters translated to uppercase, using the US-ASCII character set.

  • since 4.03 (4.05 in BytesLabels)
val lowercase_ascii : bytes -> bytes

Return a copy of the argument, with all uppercase letters translated to lowercase, using the US-ASCII character set.

  • since 4.03 (4.05 in BytesLabels)
val capitalize_ascii : bytes -> bytes

Return a copy of the argument, with the first character set to uppercase, using the US-ASCII character set.

  • since 4.03 (4.05 in BytesLabels)
val uncapitalize_ascii : bytes -> bytes

Return a copy of the argument, with the first character set to lowercase, using the US-ASCII character set.

  • since 4.03 (4.05 in BytesLabels)
type t = bytes

An alias for the type of byte sequences.

val compare : t -> t -> int

The comparison function for byte sequences, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Bytes to be passed as argument to the functors Set.Make and Map.Make.

val equal : t -> t -> bool

The equality function for byte sequences.

  • since 4.03 (4.05 in BytesLabels)
val starts_with : prefix:bytes -> bytes -> bool

starts_with ~prefix s is true if and only if s starts with prefix.

  • since 4.13
val ends_with : suffix:bytes -> bytes -> bool

ends_with ~suffix s is true if and only if s ends with suffix.

  • since 4.13

Unsafe conversions (for advanced users)

This section describes unsafe, low-level conversion functions between bytes and string. They do not copy the internal data; used improperly, they can break the immutability invariant on strings provided by the -safe-string option. They are available for expert library authors, but for most purposes you should use the always-correct to_string and of_string instead.

val unsafe_to_string : bytes -> string

Unsafely convert a byte sequence into a string.

To reason about the use of unsafe_to_string, it is convenient to consider an "ownership" discipline. A piece of code that manipulates some data "owns" it; there are several disjoint ownership modes, including:

  • Unique ownership: the data may be accessed and mutated
  • Shared ownership: the data has several owners, that may only access it, not mutate it.

Unique ownership is linear: passing the data to another piece of code means giving up ownership (we cannot write the data again). A unique owner may decide to make the data shared (giving up mutation rights on it), but shared data may not become uniquely-owned again.

unsafe_to_string s can only be used when the caller owns the byte sequence s -- either uniquely or as shared immutable data. The caller gives up ownership of s, and gains ownership of the returned string.

There are two valid use-cases that respect this ownership discipline:

1. Creating a string by initializing and mutating a byte sequence that is never changed after initialization is performed.

let string_init len f : string =
+  let s = Bytes.create len in
+  for i = 0 to len - 1 do Bytes.set s i (f i) done;
+  Bytes.unsafe_to_string s

This function is safe because the byte sequence s will never be accessed or mutated after unsafe_to_string is called. The string_init code gives up ownership of s, and returns the ownership of the resulting string to its caller.

Note that it would be unsafe if s was passed as an additional parameter to the function f as it could escape this way and be mutated in the future -- string_init would give up ownership of s to pass it to f, and could not call unsafe_to_string safely.

We have provided the String.init, String.map and String.mapi functions to cover most cases of building new strings. You should prefer those over to_string or unsafe_to_string whenever applicable.

2. Temporarily giving ownership of a byte sequence to a function that expects a uniquely owned string and returns ownership back, so that we can mutate the sequence again after the call ended.

let bytes_length (s : bytes) =
+  String.length (Bytes.unsafe_to_string s)

In this use-case, we do not promise that s will never be mutated after the call to bytes_length s. The String.length function temporarily borrows unique ownership of the byte sequence (and sees it as a string), but returns this ownership back to the caller, which may assume that s is still a valid byte sequence after the call. Note that this is only correct because we know that String.length does not capture its argument -- it could escape by a side-channel such as a memoization combinator.

The caller may not mutate s while the string is borrowed (it has temporarily given up ownership). This affects concurrent programs, but also higher-order functions: if String.length returned a closure to be called later, s should not be mutated until this closure is fully applied and returns ownership.

val unsafe_of_string : string -> bytes

Unsafely convert a shared string to a byte sequence that should not be mutated.

The same ownership discipline that makes unsafe_to_string correct applies to unsafe_of_string: you may use it if you were the owner of the string value, and you will own the return bytes in the same mode.

In practice, unique ownership of string values is extremely difficult to reason about correctly. You should always assume strings are shared, never uniquely owned.

For example, string literals are implicitly shared by the compiler, so you never uniquely own them.

let incorrect = Bytes.unsafe_of_string "hello"
+let s = Bytes.of_string "hello"

The first declaration is incorrect, because the string literal "hello" could be shared by the compiler with other parts of the program, and mutating incorrect is a bug. You must always use the second version, which performs a copy and is thus correct.

Assuming unique ownership of strings that are not string literals, but are (partly) built from string literals, is also incorrect. For example, mutating unsafe_of_string ("foo" ^ s) could mutate the shared string "foo" -- assuming a rope-like representation of strings. More generally, functions operating on strings will assume shared ownership, they do not preserve unique ownership. It is thus incorrect to assume unique ownership of the result of unsafe_of_string.

The only case we have reasonable confidence is safe is if the produced bytes is shared -- used as an immutable byte sequence. This is possibly useful for incremental migration of low-level programs that manipulate immutable sequences of bytes (for example Marshal.from_bytes) and previously used the string type for this purpose.

val split_on_char : char -> bytes -> bytes list

split_on_char sep s returns the list of all (possibly empty) subsequences of s that are delimited by the sep character.

The function's output is specified by the following invariants:

  • The list is not empty.
  • Concatenating its elements using sep as a separator returns a byte sequence equal to the input (Bytes.concat (Bytes.make 1 sep) + (Bytes.split_on_char sep s) = s).
  • No byte sequence in the result contains the sep character.
  • since 4.13

Iterators

val to_seq : t -> char Seq.t

Iterate on the string, in increasing index order. Modifications of the string during iteration will be reflected in the sequence.

  • since 4.07
val to_seqi : t -> (int * char) Seq.t

Iterate on the string, in increasing order, yielding indices along chars

  • since 4.07
val of_seq : char Seq.t -> t

Create a string from the generator

  • since 4.07

UTF codecs and validations

  • since 4.14

UTF-8

val get_utf_8_uchar : t -> int -> Uchar.utf_decode

get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

val set_utf_8_uchar : t -> int -> Uchar.t -> int

set_utf_8_uchar b i u UTF-8 encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

val is_valid_utf_8 : t -> bool

is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

UTF-16BE

val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

val set_utf_16be_uchar : t -> int -> Uchar.t -> int

set_utf_16be_uchar b i u UTF-16BE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

val is_valid_utf_16be : t -> bool

is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

UTF-16LE

val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

val set_utf_16le_uchar : t -> int -> Uchar.t -> int

set_utf_16le_uchar b i u UTF-16LE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

val is_valid_utf_16le : t -> bool

is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

Binary encoding/decoding of integers

The functions in this section binary encode and decode integers to and from byte sequences.

All following functions raise Invalid_argument if the space needed at index i to decode or encode the integer is not available.

Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are handled as follows:

  • Functions that decode signed (resp. unsigned) 8-bit or 16-bit integers represented by int values sign-extend (resp. zero-extend) their result.
  • Functions that encode 8-bit or 16-bit integers represented by int values truncate their input to their least significant bytes.
val get_uint8 : bytes -> int -> int

get_uint8 b i is b's unsigned 8-bit integer starting at byte index i.

  • since 4.08
val get_int8 : bytes -> int -> int

get_int8 b i is b's signed 8-bit integer starting at byte index i.

  • since 4.08
val get_uint16_ne : bytes -> int -> int

get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at byte index i.

  • since 4.08
val get_uint16_be : bytes -> int -> int

get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at byte index i.

  • since 4.08
val get_uint16_le : bytes -> int -> int

get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at byte index i.

  • since 4.08
val get_int16_ne : bytes -> int -> int

get_int16_ne b i is b's native-endian signed 16-bit integer starting at byte index i.

  • since 4.08
val get_int16_be : bytes -> int -> int

get_int16_be b i is b's big-endian signed 16-bit integer starting at byte index i.

  • since 4.08
val get_int16_le : bytes -> int -> int

get_int16_le b i is b's little-endian signed 16-bit integer starting at byte index i.

  • since 4.08
val get_int32_ne : bytes -> int -> int32

get_int32_ne b i is b's native-endian 32-bit integer starting at byte index i.

  • since 4.08
val get_int32_be : bytes -> int -> int32

get_int32_be b i is b's big-endian 32-bit integer starting at byte index i.

  • since 4.08
val get_int32_le : bytes -> int -> int32

get_int32_le b i is b's little-endian 32-bit integer starting at byte index i.

  • since 4.08
val get_int64_ne : bytes -> int -> int64

get_int64_ne b i is b's native-endian 64-bit integer starting at byte index i.

  • since 4.08
val get_int64_be : bytes -> int -> int64

get_int64_be b i is b's big-endian 64-bit integer starting at byte index i.

  • since 4.08
val get_int64_le : bytes -> int -> int64

get_int64_le b i is b's little-endian 64-bit integer starting at byte index i.

  • since 4.08
val set_uint8 : bytes -> int -> int -> unit

set_uint8 b i v sets b's unsigned 8-bit integer starting at byte index i to v.

  • since 4.08
val set_int8 : bytes -> int -> int -> unit

set_int8 b i v sets b's signed 8-bit integer starting at byte index i to v.

  • since 4.08
val set_uint16_ne : bytes -> int -> int -> unit

set_uint16_ne b i v sets b's native-endian unsigned 16-bit integer starting at byte index i to v.

  • since 4.08
val set_uint16_be : bytes -> int -> int -> unit

set_uint16_be b i v sets b's big-endian unsigned 16-bit integer starting at byte index i to v.

  • since 4.08
val set_uint16_le : bytes -> int -> int -> unit

set_uint16_le b i v sets b's little-endian unsigned 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int16_ne : bytes -> int -> int -> unit

set_int16_ne b i v sets b's native-endian signed 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int16_be : bytes -> int -> int -> unit

set_int16_be b i v sets b's big-endian signed 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int16_le : bytes -> int -> int -> unit

set_int16_le b i v sets b's little-endian signed 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int32_ne : bytes -> int -> int32 -> unit

set_int32_ne b i v sets b's native-endian 32-bit integer starting at byte index i to v.

  • since 4.08
val set_int32_be : bytes -> int -> int32 -> unit

set_int32_be b i v sets b's big-endian 32-bit integer starting at byte index i to v.

  • since 4.08
val set_int32_le : bytes -> int -> int32 -> unit

set_int32_le b i v sets b's little-endian 32-bit integer starting at byte index i to v.

  • since 4.08
val set_int64_ne : bytes -> int -> int64 -> unit

set_int64_ne b i v sets b's native-endian 64-bit integer starting at byte index i to v.

  • since 4.08
val set_int64_be : bytes -> int -> int64 -> unit

set_int64_be b i v sets b's big-endian 64-bit integer starting at byte index i to v.

  • since 4.08
val set_int64_le : bytes -> int -> int64 -> unit

set_int64_le b i v sets b's little-endian 64-bit integer starting at byte index i to v.

  • since 4.08

Byte sequences and concurrency safety

Care must be taken when concurrently accessing byte sequences from multiple domains: accessing a byte sequence will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every byte sequence operation that accesses more than one byte is not atomic. This includes iteration and scanning.

For example, consider the following program:

let size = 100_000_000
+let b = Bytes.make size  ' '
+let update b f ()  =
+  Bytes.iteri (fun i x -> Bytes.set b i (Char.chr (f (Char.code x)))) b
+let d1 = Domain.spawn (update b (fun x -> x + 1))
+let d2 = Domain.spawn (update b (fun x -> 2 * x + 1))
+let () = Domain.join d1; Domain.join d2

the bytes sequence b may contain a non-deterministic mixture of '!', 'A', 'B', and 'C' values.

After executing this code, each byte of the sequence b is either '!', 'A', 'B', or 'C'. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

Data races

If two domains only access disjoint parts of a byte sequence, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

A data race is said to occur when two domains access the same byte without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the elements of the sequence.

Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location.

Mixed-size accesses

Another subtle point is that if a data race involves mixed-size writes and reads to the same location, the order in which those writes and reads are observed by domains is not specified. For instance, the following code write sequentially a 32-bit integer and a char to the same index

let b = Bytes.make 10 '\000'
+let d1 = Domain.spawn (fun () -> Bytes.set_int32_ne b 0 100; b.[0] <- 'd' )

In this situation, a domain that observes the write of 'd' to b.0 is not guaranteed to also observe the write to indices 1, 2, or 3.

diff --git a/stdlib/Stdlib/BytesLabels/index.html b/stdlib/Stdlib/BytesLabels/index.html new file mode 100644 index 000000000..1ba65765b --- /dev/null +++ b/stdlib/Stdlib/BytesLabels/index.html @@ -0,0 +1,29 @@ + +BytesLabels (docs.stdlib.Stdlib.BytesLabels)

Module Stdlib.BytesLabels

Byte sequence operations.

A byte sequence is a mutable data structure that contains a fixed-length sequence of bytes. Each byte can be indexed in constant time for reading or writing.

Given a byte sequence s of length l, we can access each of the l bytes of s via its index in the sequence. Indexes start at 0, and we will call an index valid in s if it falls within the range [0...l-1] (inclusive). A position is the point between two bytes or at the beginning or end of the sequence. We call a position valid in s if it falls within the range [0...l] (inclusive). Note that the byte at index n is between positions n and n+1.

Two parameters start and len are said to designate a valid range of s if len >= 0 and start and start+len are valid positions in s.

Byte sequences can be modified in place, for instance via the set and blit functions described below. See also strings (module String), which are almost the same data structure, but cannot be modified in place.

Bytes are represented by the OCaml type char.

The labeled version of this module can be used as described in the StdLabels module.

  • since 4.02
val length : bytes -> int

Return the length (number of bytes) of the argument.

val get : bytes -> int -> char

get s n returns the byte at index n in argument s.

val set : bytes -> int -> char -> unit

set s n c modifies s in place, replacing the byte at index n with c.

val create : int -> bytes

create n returns a new byte sequence of length n. The sequence is uninitialized and contains arbitrary bytes.

val make : int -> char -> bytes

make n c returns a new byte sequence of length n, filled with the byte c.

val init : int -> f:(int -> char) -> bytes

init n f returns a fresh byte sequence of length n, with character i initialized to the result of f i (in increasing index order).

val empty : bytes

A byte sequence of size 0.

val copy : bytes -> bytes

Return a new byte sequence that contains the same bytes as the argument.

val of_string : string -> bytes

Return a new byte sequence that contains the same bytes as the given string.

val to_string : bytes -> string

Return a new string that contains the same bytes as the given byte sequence.

val sub : bytes -> pos:int -> len:int -> bytes

sub s ~pos ~len returns a new byte sequence of length len, containing the subsequence of s that starts at position pos and has length len.

val sub_string : bytes -> pos:int -> len:int -> string

Same as sub but return a string instead of a byte sequence.

val extend : bytes -> left:int -> right:int -> bytes

extend s ~left ~right returns a new byte sequence that contains the bytes of s, with left uninitialized bytes prepended and right uninitialized bytes appended to it. If left or right is negative, then bytes are removed (instead of appended) from the corresponding side of s.

  • since 4.05 in BytesLabels
val fill : bytes -> pos:int -> len:int -> char -> unit

fill s ~pos ~len c modifies s in place, replacing len characters with c, starting at pos.

val blit : + src:bytes -> + src_pos:int -> + dst:bytes -> + dst_pos:int -> + len:int -> + unit

blit ~src ~src_pos ~dst ~dst_pos ~len copies len bytes from byte sequence src, starting at index src_pos, to byte sequence dst, starting at index dst_pos. It works correctly even if src and dst are the same byte sequence, and the source and destination intervals overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

val blit_string : + src:string -> + src_pos:int -> + dst:bytes -> + dst_pos:int -> + len:int -> + unit

blit_string ~src ~src_pos ~dst ~dst_pos ~len copies len bytes from string src, starting at index src_pos, to byte sequence dst, starting at index dst_pos.

  • raises Invalid_argument

    if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

  • since 4.05 in BytesLabels
val concat : sep:bytes -> bytes list -> bytes

concat ~sep sl concatenates the list of byte sequences sl, inserting the separator byte sequence sep between each, and returns the result as a new byte sequence.

val cat : bytes -> bytes -> bytes

cat s1 s2 concatenates s1 and s2 and returns the result as a new byte sequence.

  • since 4.05 in BytesLabels
val iter : f:(char -> unit) -> bytes -> unit

iter ~f s applies function f in turn to all the bytes of s. It is equivalent to f (get s 0); f (get s 1); ...; f (get s + (length s - 1)); ().

val iteri : f:(int -> char -> unit) -> bytes -> unit

Same as iter, but the function is applied to the index of the byte as first argument and the byte itself as second argument.

val map : f:(char -> char) -> bytes -> bytes

map ~f s applies function f in turn to all the bytes of s (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

val mapi : f:(int -> char -> char) -> bytes -> bytes

mapi ~f s calls f with each character of s and its index (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> bytes -> 'acc

fold_left f x s computes f (... (f (f x (get s 0)) (get s 1)) ...) (get s (n-1)), where n is the length of s.

  • since 4.13
val fold_right : f:(char -> 'acc -> 'acc) -> bytes -> init:'acc -> 'acc

fold_right f s x computes f (get s 0) (f (get s 1) ( ... (f (get s (n-1)) x) ...)), where n is the length of s.

  • since 4.13
val for_all : f:(char -> bool) -> bytes -> bool

for_all p s checks if all characters in s satisfy the predicate p.

  • since 4.13
val exists : f:(char -> bool) -> bytes -> bool

exists p s checks if at least one character of s satisfies the predicate p.

  • since 4.13
val trim : bytes -> bytes

Return a copy of the argument, without leading and trailing whitespace. The bytes regarded as whitespace are the ASCII characters ' ', '\012', '\n', '\r', and '\t'.

val escaped : bytes -> bytes

Return a copy of the argument, with special characters represented by escape sequences, following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash and double-quote.

val index : bytes -> char -> int

index s c returns the index of the first occurrence of byte c in s.

val index_opt : bytes -> char -> int option

index_opt s c returns the index of the first occurrence of byte c in s or None if c does not occur in s.

  • since 4.05
val rindex : bytes -> char -> int

rindex s c returns the index of the last occurrence of byte c in s.

val rindex_opt : bytes -> char -> int option

rindex_opt s c returns the index of the last occurrence of byte c in s or None if c does not occur in s.

  • since 4.05
val index_from : bytes -> int -> char -> int

index_from s i c returns the index of the first occurrence of byte c in s after position i. index s c is equivalent to index_from s 0 c.

  • raises Not_found

    if c does not occur in s after position i.

val index_from_opt : bytes -> int -> char -> int option

index_from_opt s i c returns the index of the first occurrence of byte c in s after position i or None if c does not occur in s after position i. index_opt s c is equivalent to index_from_opt s 0 c.

  • since 4.05
val rindex_from : bytes -> int -> char -> int

rindex_from s i c returns the index of the last occurrence of byte c in s before position i+1. rindex s c is equivalent to rindex_from s (length s - 1) c.

  • raises Not_found

    if c does not occur in s before position i+1.

val rindex_from_opt : bytes -> int -> char -> int option

rindex_from_opt s i c returns the index of the last occurrence of byte c in s before position i+1 or None if c does not occur in s before position i+1. rindex_opt s c is equivalent to rindex_from s (length s - 1) c.

  • since 4.05
val contains : bytes -> char -> bool

contains s c tests if byte c appears in s.

val contains_from : bytes -> int -> char -> bool

contains_from s start c tests if byte c appears in s after position start. contains s c is equivalent to contains_from + s 0 c.

val rcontains_from : bytes -> int -> char -> bool

rcontains_from s stop c tests if byte c appears in s before position stop+1.

val uppercase_ascii : bytes -> bytes

Return a copy of the argument, with all lowercase letters translated to uppercase, using the US-ASCII character set.

  • since 4.05
val lowercase_ascii : bytes -> bytes

Return a copy of the argument, with all uppercase letters translated to lowercase, using the US-ASCII character set.

  • since 4.05
val capitalize_ascii : bytes -> bytes

Return a copy of the argument, with the first character set to uppercase, using the US-ASCII character set.

  • since 4.05
val uncapitalize_ascii : bytes -> bytes

Return a copy of the argument, with the first character set to lowercase, using the US-ASCII character set.

  • since 4.05
type t = bytes

An alias for the type of byte sequences.

val compare : t -> t -> int

The comparison function for byte sequences, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Bytes to be passed as argument to the functors Set.Make and Map.Make.

val equal : t -> t -> bool

The equality function for byte sequences.

  • since 4.05
val starts_with : prefix:bytes -> bytes -> bool

starts_with ~prefix s is true if and only if s starts with prefix.

  • since 4.13
val ends_with : suffix:bytes -> bytes -> bool

ends_with ~suffix s is true if and only if s ends with suffix.

  • since 4.13

Unsafe conversions (for advanced users)

This section describes unsafe, low-level conversion functions between bytes and string. They do not copy the internal data; used improperly, they can break the immutability invariant on strings provided by the -safe-string option. They are available for expert library authors, but for most purposes you should use the always-correct to_string and of_string instead.

val unsafe_to_string : bytes -> string

Unsafely convert a byte sequence into a string.

To reason about the use of unsafe_to_string, it is convenient to consider an "ownership" discipline. A piece of code that manipulates some data "owns" it; there are several disjoint ownership modes, including:

  • Unique ownership: the data may be accessed and mutated
  • Shared ownership: the data has several owners, that may only access it, not mutate it.

Unique ownership is linear: passing the data to another piece of code means giving up ownership (we cannot write the data again). A unique owner may decide to make the data shared (giving up mutation rights on it), but shared data may not become uniquely-owned again.

unsafe_to_string s can only be used when the caller owns the byte sequence s -- either uniquely or as shared immutable data. The caller gives up ownership of s, and gains ownership of the returned string.

There are two valid use-cases that respect this ownership discipline:

1. Creating a string by initializing and mutating a byte sequence that is never changed after initialization is performed.

let string_init len f : string =
+  let s = Bytes.create len in
+  for i = 0 to len - 1 do Bytes.set s i (f i) done;
+  Bytes.unsafe_to_string s

This function is safe because the byte sequence s will never be accessed or mutated after unsafe_to_string is called. The string_init code gives up ownership of s, and returns the ownership of the resulting string to its caller.

Note that it would be unsafe if s was passed as an additional parameter to the function f as it could escape this way and be mutated in the future -- string_init would give up ownership of s to pass it to f, and could not call unsafe_to_string safely.

We have provided the String.init, String.map and String.mapi functions to cover most cases of building new strings. You should prefer those over to_string or unsafe_to_string whenever applicable.

2. Temporarily giving ownership of a byte sequence to a function that expects a uniquely owned string and returns ownership back, so that we can mutate the sequence again after the call ended.

let bytes_length (s : bytes) =
+  String.length (Bytes.unsafe_to_string s)

In this use-case, we do not promise that s will never be mutated after the call to bytes_length s. The String.length function temporarily borrows unique ownership of the byte sequence (and sees it as a string), but returns this ownership back to the caller, which may assume that s is still a valid byte sequence after the call. Note that this is only correct because we know that String.length does not capture its argument -- it could escape by a side-channel such as a memoization combinator.

The caller may not mutate s while the string is borrowed (it has temporarily given up ownership). This affects concurrent programs, but also higher-order functions: if String.length returned a closure to be called later, s should not be mutated until this closure is fully applied and returns ownership.

val unsafe_of_string : string -> bytes

Unsafely convert a shared string to a byte sequence that should not be mutated.

The same ownership discipline that makes unsafe_to_string correct applies to unsafe_of_string: you may use it if you were the owner of the string value, and you will own the return bytes in the same mode.

In practice, unique ownership of string values is extremely difficult to reason about correctly. You should always assume strings are shared, never uniquely owned.

For example, string literals are implicitly shared by the compiler, so you never uniquely own them.

let incorrect = Bytes.unsafe_of_string "hello"
+let s = Bytes.of_string "hello"

The first declaration is incorrect, because the string literal "hello" could be shared by the compiler with other parts of the program, and mutating incorrect is a bug. You must always use the second version, which performs a copy and is thus correct.

Assuming unique ownership of strings that are not string literals, but are (partly) built from string literals, is also incorrect. For example, mutating unsafe_of_string ("foo" ^ s) could mutate the shared string "foo" -- assuming a rope-like representation of strings. More generally, functions operating on strings will assume shared ownership, they do not preserve unique ownership. It is thus incorrect to assume unique ownership of the result of unsafe_of_string.

The only case we have reasonable confidence is safe is if the produced bytes is shared -- used as an immutable byte sequence. This is possibly useful for incremental migration of low-level programs that manipulate immutable sequences of bytes (for example Marshal.from_bytes) and previously used the string type for this purpose.

val split_on_char : sep:char -> bytes -> bytes list

split_on_char sep s returns the list of all (possibly empty) subsequences of s that are delimited by the sep character.

The function's output is specified by the following invariants:

  • The list is not empty.
  • Concatenating its elements using sep as a separator returns a byte sequence equal to the input (Bytes.concat (Bytes.make 1 sep) + (Bytes.split_on_char sep s) = s).
  • No byte sequence in the result contains the sep character.
  • since 4.13

Iterators

val to_seq : t -> char Seq.t

Iterate on the string, in increasing index order. Modifications of the string during iteration will be reflected in the sequence.

  • since 4.07
val to_seqi : t -> (int * char) Seq.t

Iterate on the string, in increasing order, yielding indices along chars

  • since 4.07
val of_seq : char Seq.t -> t

Create a string from the generator

  • since 4.07

UTF codecs and validations

  • since 4.14

UTF-8

val get_utf_8_uchar : t -> int -> Uchar.utf_decode

get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

val set_utf_8_uchar : t -> int -> Uchar.t -> int

set_utf_8_uchar b i u UTF-8 encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

val is_valid_utf_8 : t -> bool

is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

UTF-16BE

val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

val set_utf_16be_uchar : t -> int -> Uchar.t -> int

set_utf_16be_uchar b i u UTF-16BE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

val is_valid_utf_16be : t -> bool

is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

UTF-16LE

val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

val set_utf_16le_uchar : t -> int -> Uchar.t -> int

set_utf_16le_uchar b i u UTF-16LE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

val is_valid_utf_16le : t -> bool

is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

Binary encoding/decoding of integers

The functions in this section binary encode and decode integers to and from byte sequences.

All following functions raise Invalid_argument if the space needed at index i to decode or encode the integer is not available.

Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are handled as follows:

  • Functions that decode signed (resp. unsigned) 8-bit or 16-bit integers represented by int values sign-extend (resp. zero-extend) their result.
  • Functions that encode 8-bit or 16-bit integers represented by int values truncate their input to their least significant bytes.
val get_uint8 : bytes -> int -> int

get_uint8 b i is b's unsigned 8-bit integer starting at byte index i.

  • since 4.08
val get_int8 : bytes -> int -> int

get_int8 b i is b's signed 8-bit integer starting at byte index i.

  • since 4.08
val get_uint16_ne : bytes -> int -> int

get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at byte index i.

  • since 4.08
val get_uint16_be : bytes -> int -> int

get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at byte index i.

  • since 4.08
val get_uint16_le : bytes -> int -> int

get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at byte index i.

  • since 4.08
val get_int16_ne : bytes -> int -> int

get_int16_ne b i is b's native-endian signed 16-bit integer starting at byte index i.

  • since 4.08
val get_int16_be : bytes -> int -> int

get_int16_be b i is b's big-endian signed 16-bit integer starting at byte index i.

  • since 4.08
val get_int16_le : bytes -> int -> int

get_int16_le b i is b's little-endian signed 16-bit integer starting at byte index i.

  • since 4.08
val get_int32_ne : bytes -> int -> int32

get_int32_ne b i is b's native-endian 32-bit integer starting at byte index i.

  • since 4.08
val get_int32_be : bytes -> int -> int32

get_int32_be b i is b's big-endian 32-bit integer starting at byte index i.

  • since 4.08
val get_int32_le : bytes -> int -> int32

get_int32_le b i is b's little-endian 32-bit integer starting at byte index i.

  • since 4.08
val get_int64_ne : bytes -> int -> int64

get_int64_ne b i is b's native-endian 64-bit integer starting at byte index i.

  • since 4.08
val get_int64_be : bytes -> int -> int64

get_int64_be b i is b's big-endian 64-bit integer starting at byte index i.

  • since 4.08
val get_int64_le : bytes -> int -> int64

get_int64_le b i is b's little-endian 64-bit integer starting at byte index i.

  • since 4.08
val set_uint8 : bytes -> int -> int -> unit

set_uint8 b i v sets b's unsigned 8-bit integer starting at byte index i to v.

  • since 4.08
val set_int8 : bytes -> int -> int -> unit

set_int8 b i v sets b's signed 8-bit integer starting at byte index i to v.

  • since 4.08
val set_uint16_ne : bytes -> int -> int -> unit

set_uint16_ne b i v sets b's native-endian unsigned 16-bit integer starting at byte index i to v.

  • since 4.08
val set_uint16_be : bytes -> int -> int -> unit

set_uint16_be b i v sets b's big-endian unsigned 16-bit integer starting at byte index i to v.

  • since 4.08
val set_uint16_le : bytes -> int -> int -> unit

set_uint16_le b i v sets b's little-endian unsigned 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int16_ne : bytes -> int -> int -> unit

set_int16_ne b i v sets b's native-endian signed 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int16_be : bytes -> int -> int -> unit

set_int16_be b i v sets b's big-endian signed 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int16_le : bytes -> int -> int -> unit

set_int16_le b i v sets b's little-endian signed 16-bit integer starting at byte index i to v.

  • since 4.08
val set_int32_ne : bytes -> int -> int32 -> unit

set_int32_ne b i v sets b's native-endian 32-bit integer starting at byte index i to v.

  • since 4.08
val set_int32_be : bytes -> int -> int32 -> unit

set_int32_be b i v sets b's big-endian 32-bit integer starting at byte index i to v.

  • since 4.08
val set_int32_le : bytes -> int -> int32 -> unit

set_int32_le b i v sets b's little-endian 32-bit integer starting at byte index i to v.

  • since 4.08
val set_int64_ne : bytes -> int -> int64 -> unit

set_int64_ne b i v sets b's native-endian 64-bit integer starting at byte index i to v.

  • since 4.08
val set_int64_be : bytes -> int -> int64 -> unit

set_int64_be b i v sets b's big-endian 64-bit integer starting at byte index i to v.

  • since 4.08
val set_int64_le : bytes -> int -> int64 -> unit

set_int64_le b i v sets b's little-endian 64-bit integer starting at byte index i to v.

  • since 4.08

Byte sequences and concurrency safety

Care must be taken when concurrently accessing byte sequences from multiple domains: accessing a byte sequence will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every byte sequence operation that accesses more than one byte is not atomic. This includes iteration and scanning.

For example, consider the following program:

let size = 100_000_000
+let b = Bytes.make size  ' '
+let update b f ()  =
+  Bytes.iteri (fun i x -> Bytes.set b i (Char.chr (f (Char.code x)))) b
+let d1 = Domain.spawn (update b (fun x -> x + 1))
+let d2 = Domain.spawn (update b (fun x -> 2 * x + 1))
+let () = Domain.join d1; Domain.join d2

the bytes sequence b may contain a non-deterministic mixture of '!', 'A', 'B', and 'C' values.

After executing this code, each byte of the sequence b is either '!', 'A', 'B', or 'C'. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

Data races

If two domains only access disjoint parts of a byte sequence, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

A data race is said to occur when two domains access the same byte without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the elements of the sequence.

Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location.

Mixed-size accesses

Another subtle point is that if a data race involves mixed-size writes and reads to the same location, the order in which those writes and reads are observed by domains is not specified. For instance, the following code write sequentially a 32-bit integer and a char to the same index

let b = Bytes.make 10 '\000'
+let d1 = Domain.spawn (fun () -> Bytes.set_int32_ne b 0 100; b.[0] <- 'd' )

In this situation, a domain that observes the write of 'd' to b.0 is not guaranteed to also observe the write to indices 1, 2, or 3.

diff --git a/stdlib/Stdlib/Callback/index.html b/stdlib/Stdlib/Callback/index.html new file mode 100644 index 000000000..c9ece54d3 --- /dev/null +++ b/stdlib/Stdlib/Callback/index.html @@ -0,0 +1,2 @@ + +Callback (docs.stdlib.Stdlib.Callback)

Module Stdlib.Callback

Registering OCaml values with the C runtime.

This module allows OCaml values to be registered with the C runtime under a symbolic name, so that C code can later call back registered OCaml functions, or raise registered OCaml exceptions.

val register : string -> 'a -> unit

Callback.register n v registers the value v under the name n. C code can later retrieve a handle to v by calling caml_named_value(n).

val register_exception : string -> exn -> unit

Callback.register_exception n exn registers the exception contained in the exception value exn under the name n. C code can later retrieve a handle to the exception by calling caml_named_value(n). The exception value thus obtained is suitable for passing as first argument to raise_constant or raise_with_arg.

diff --git a/stdlib/Stdlib/Char/index.html b/stdlib/Stdlib/Char/index.html new file mode 100644 index 000000000..2050c7ea1 --- /dev/null +++ b/stdlib/Stdlib/Char/index.html @@ -0,0 +1,2 @@ + +Char (docs.stdlib.Stdlib.Char)

Module Stdlib.Char

Character operations.

val code : char -> int

Return the ASCII code of the argument.

val chr : int -> char

Return the character with the given ASCII code.

val escaped : char -> string

Return a string representing the given character, with special characters escaped following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash, double-quote, and single-quote.

val lowercase_ascii : char -> char

Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

  • since 4.03
val uppercase_ascii : char -> char

Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

  • since 4.03
type t = char

An alias for the type of characters.

val compare : t -> t -> int

The comparison function for characters, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Char to be passed as argument to the functors Set.Make and Map.Make.

val equal : t -> t -> bool

The equal function for chars.

  • since 4.03
val seeded_hash : int -> t -> int

A seeded hash function for characters, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : t -> int

An unseeded hash function for characters, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.1
diff --git a/stdlib/Stdlib/Complex/index.html b/stdlib/Stdlib/Complex/index.html new file mode 100644 index 000000000..d92a3e0ea --- /dev/null +++ b/stdlib/Stdlib/Complex/index.html @@ -0,0 +1,2 @@ + +Complex (docs.stdlib.Stdlib.Complex)

Module Stdlib.Complex

Complex numbers.

This module provides arithmetic operations on complex numbers. Complex numbers are represented by their real and imaginary parts (cartesian representation). Each part is represented by a double-precision floating-point number (type float).

type t = {
  1. re : float;
  2. im : float;
}

The type of complex numbers. re is the real part and im the imaginary part.

val zero : t

The complex number 0.

val one : t

The complex number 1.

val i : t

The complex number i.

val neg : t -> t

Unary negation.

val conj : t -> t

Conjugate: given the complex x + i.y, returns x - i.y.

val add : t -> t -> t

Addition

val sub : t -> t -> t

Subtraction

val mul : t -> t -> t

Multiplication

val inv : t -> t

Multiplicative inverse (1/z).

val div : t -> t -> t

Division

val sqrt : t -> t

Square root. The result x + i.y is such that x > 0 or x = 0 and y >= 0. This function has a discontinuity along the negative real axis.

val norm2 : t -> float

Norm squared: given x + i.y, returns x^2 + y^2.

val norm : t -> float

Norm: given x + i.y, returns sqrt(x^2 + y^2).

val arg : t -> float

Argument. The argument of a complex number is the angle in the complex plane between the positive real axis and a line passing through zero and the number. This angle ranges from -pi to pi. This function has a discontinuity along the negative real axis.

val polar : float -> float -> t

polar norm arg returns the complex having norm norm and argument arg.

val exp : t -> t

Exponentiation. exp z returns e to the z power.

val log : t -> t

Natural logarithm (in base e).

val pow : t -> t -> t

Power function. pow z1 z2 returns z1 to the z2 power.

diff --git a/stdlib/Stdlib/Condition/index.html b/stdlib/Stdlib/Condition/index.html new file mode 100644 index 000000000..4fa1938a0 --- /dev/null +++ b/stdlib/Stdlib/Condition/index.html @@ -0,0 +1,31 @@ + +Condition (docs.stdlib.Stdlib.Condition)

Module Stdlib.Condition

Condition variables.

Condition variables are useful when several threads wish to access a shared data structure that is protected by a mutex (a mutual exclusion lock).

A condition variable is a communication channel. On the receiver side, one or more threads can indicate that they wish to wait for a certain property to become true. On the sender side, a thread can signal that this property has become true, causing one (or more) waiting threads to be woken up.

For instance, in the implementation of a queue data structure, if a thread that wishes to extract an element finds that the queue is currently empty, then this thread waits for the queue to become nonempty. A thread that inserts an element into the queue signals that the queue has become nonempty. A condition variable is used for this purpose. This communication channel conveys the information that the property "the queue is nonempty" is true, or more accurately, may be true. (We explain below why the receiver of a signal cannot be certain that the property holds.)

To continue the example of the queue, assuming that the queue has a fixed maximum capacity, then a thread that wishes to insert an element may find that the queue is full. Then, this thread must wait for the queue to become not full, and a thread that extracts an element of the queue signals that the queue has become not full. Another condition variable is used for this purpose.

In short, a condition variable c is used to convey the information that a certain property P about a shared data structure D, protected by a mutex m, may be true.

Condition variables provide an efficient alternative to busy-waiting. When one wishes to wait for the property P to be true, instead of writing a busy-waiting loop:

Mutex.lock m;
+while not P do
+  Mutex.unlock m; Mutex.lock m
+done;
+<update the data structure>;
+Mutex.unlock m

one uses wait in the body of the loop, as follows:

Mutex.lock m;
+while not P do
+  Condition.wait c m
+done;
+<update the data structure>;
+Mutex.unlock m

The busy-waiting loop is inefficient because the waiting thread consumes processing time and creates contention of the mutex m. Calling wait allows the waiting thread to be suspended, so it does not consume any computing resources while waiting.

With a condition variable c, exactly one mutex m is associated. This association is implicit: the mutex m is not explicitly passed as an argument to create. It is up to the programmer to know, for each condition variable c, which is the associated mutex m.

With a mutex m, several condition variables can be associated. In the example of the bounded queue, one condition variable is used to indicate that the queue is nonempty, and another condition variable is used to indicate that the queue is not full.

With a condition variable c, exactly one logical property P should be associated. Examples of such properties include "the queue is nonempty" and "the queue is not full". It is up to the programmer to keep track, for each condition variable, of the corresponding property P. A signal is sent on the condition variable c as an indication that the property P is true, or may be true. On the receiving end, however, a thread that is woken up cannot assume that P is true; after a call to wait terminates, one must explicitly test whether P is true. There are several reasons why this is so. One reason is that, between the moment when the signal is sent and the moment when a waiting thread receives the signal and is scheduled, the property P may be falsified by some other thread that is able to acquire the mutex m and alter the data structure D. Another reason is that spurious wakeups may occur: a waiting thread can be woken up even if no signal was sent.

Here is a complete example, where a mutex protects a sequential unbounded queue, and where a condition variable is used to signal that the queue is nonempty.

type 'a safe_queue =
+  { queue : 'a Queue.t; mutex : Mutex.t; nonempty : Condition.t }
+
+let create () =
+  { queue = Queue.create(); mutex = Mutex.create();
+    nonempty = Condition.create() }
+
+let add v q =
+  Mutex.lock q.mutex;
+  let was_empty = Queue.is_empty q.queue in
+  Queue.add v q.queue;
+  if was_empty then Condition.broadcast q.nonempty;
+  Mutex.unlock q.mutex
+
+let take q =
+  Mutex.lock q.mutex;
+  while Queue.is_empty q.queue do Condition.wait q.nonempty q.mutex done;
+  let v = Queue.take q.queue in (* cannot fail since queue is nonempty *)
+  Mutex.unlock q.mutex;
+  v

Because the call to broadcast takes place inside the critical section, the following property holds whenever the mutex is unlocked: if the queue is nonempty, then no thread is waiting, or, in other words, if some thread is waiting, then the queue must be empty. This is a desirable property: if a thread that attempts to execute a take operation could remain suspended even though the queue is nonempty, that would be a problematic situation, known as a deadlock.

type t

The type of condition variables.

val create : unit -> t

create() creates and returns a new condition variable. This condition variable should be associated (in the programmer's mind) with a certain mutex m and with a certain property P of the data structure that is protected by the mutex m.

val wait : t -> Mutex.t -> unit

The call wait c m is permitted only if m is the mutex associated with the condition variable c, and only if m is currently locked. This call atomically unlocks the mutex m and suspends the current thread on the condition variable c. This thread can later be woken up after the condition variable c has been signaled via signal or broadcast; however, it can also be woken up for no reason. The mutex m is locked again before wait returns. One cannot assume that the property P associated with the condition variable c holds when wait returns; one must explicitly test whether P holds after calling wait.

val signal : t -> unit

signal c wakes up one of the threads waiting on the condition variable c, if there is one. If there is none, this call has no effect.

It is recommended to call signal c inside a critical section, that is, while the mutex m associated with c is locked.

val broadcast : t -> unit

broadcast c wakes up all threads waiting on the condition variable c. If there are none, this call has no effect.

It is recommended to call broadcast c inside a critical section, that is, while the mutex m associated with c is locked.

diff --git a/stdlib/Stdlib/Digest/index.html b/stdlib/Stdlib/Digest/index.html new file mode 100644 index 000000000..06cb5e1dc --- /dev/null +++ b/stdlib/Stdlib/Digest/index.html @@ -0,0 +1,2 @@ + +Digest (docs.stdlib.Stdlib.Digest)

Module Stdlib.Digest

MD5 message digest.

This module provides functions to compute 128-bit 'digests' of arbitrary-length strings or files. The algorithm used is MD5.

The MD5 hash function is not cryptographically secure. Hence, this module should not be used for security-sensitive applications. More recent, stronger cryptographic primitives should be used instead.

type t = string

The type of digests: 16-character strings.

val compare : t -> t -> int

The comparison function for 16-character digest, with the same specification as Stdlib.compare and the implementation shared with String.compare. Along with the type t, this function compare allows the module Digest to be passed as argument to the functors Set.Make and Map.Make.

  • since 4.00
val equal : t -> t -> bool

The equal function for 16-character digest.

  • since 4.03
val string : string -> t

Return the digest of the given string.

val bytes : bytes -> t

Return the digest of the given byte sequence.

  • since 4.02
val substring : string -> int -> int -> t

Digest.substring s ofs len returns the digest of the substring of s starting at index ofs and containing len characters.

val subbytes : bytes -> int -> int -> t

Digest.subbytes s ofs len returns the digest of the subsequence of s starting at index ofs and containing len bytes.

  • since 4.02
val channel : in_channel -> int -> t

If len is nonnegative, Digest.channel ic len reads len characters from channel ic and returns their digest, or raises End_of_file if end-of-file is reached before len characters are read. If len is negative, Digest.channel ic len reads all characters from ic until end-of-file is reached and return their digest.

val file : string -> t

Return the digest of the file whose name is given.

val output : out_channel -> t -> unit

Write a digest on the given output channel.

val input : in_channel -> t

Read a digest from the given input channel.

val to_hex : t -> string

Return the printable hexadecimal representation of the given digest.

val from_hex : string -> t

Convert a hexadecimal representation back into the corresponding digest.

  • raises Invalid_argument

    if the argument is not exactly 32 hexadecimal characters.

  • since 4.00
diff --git a/stdlib/Stdlib/Domain/DLS/index.html b/stdlib/Stdlib/Domain/DLS/index.html new file mode 100644 index 000000000..6991ae4ea --- /dev/null +++ b/stdlib/Stdlib/Domain/DLS/index.html @@ -0,0 +1,12 @@ + +DLS (docs.stdlib.Stdlib.Domain.DLS)

Module Domain.DLS

Domain-local Storage

type 'a key

Type of a DLS key

val new_key : ?split_from_parent:('a -> 'a) -> (unit -> 'a) -> 'a key

new_key f returns a new key bound to initialiser f for accessing , domain-local variables.

If split_from_parent is not provided, the value for a new domain will be computed on-demand by the new domain: the first get call will call the initializer f and store that value.

If split_from_parent is provided, spawning a domain will derive the child value (for this key) from the parent value. This computation happens in the parent domain and it always happens, regardless of whether the child domain will use it. If the splitting function is expensive or requires child-side computation, consider using 'a Lazy.t key:

let init () = ...
+
+let split_from_parent parent_value =
+  ... parent-side computation ...;
+  lazy (
+    ... child-side computation ...
+  )
+
+let key = Domain.DLS.new_key ~split_from_parent init
+
+let get () = Lazy.force (Domain.DLS.get key)

In this case a part of the computation happens on the child domain; in particular, it can access parent_value concurrently with the parent domain, which may require explicit synchronization to avoid data races.

val get : 'a key -> 'a

get k returns v if a value v is associated to the key k on the calling domain's domain-local state. Sets k's value with its initialiser and returns it otherwise.

val set : 'a key -> 'a -> unit

set k v updates the calling domain's domain-local state to associate the key k with value v. It overwrites any previous values associated to k, which cannot be restored later.

diff --git a/stdlib/Stdlib/Domain/index.html b/stdlib/Stdlib/Domain/index.html new file mode 100644 index 000000000..d1c03ca87 --- /dev/null +++ b/stdlib/Stdlib/Domain/index.html @@ -0,0 +1,5 @@ + +Domain (docs.stdlib.Stdlib.Domain)

Module Stdlib.Domain

  • alert unstable The Domain interface may change in incompatible ways in the future.

Domains.

See 'Parallel programming' chapter in the manual.

  • since 5.0
  • alert unstable The Domain interface may change in incompatible ways in the future.
type !'a t

A domain of type 'a t runs independently, eventually producing a result of type 'a, or an exception

val spawn : (unit -> 'a) -> 'a t

spawn f creates a new domain that runs in parallel with the current domain.

  • raises Failure

    if the program has insufficient resources to create another domain.

val join : 'a t -> 'a

join d blocks until domain d runs to completion. If d results in a value, then that is returned by join d. If d raises an uncaught exception, then that is re-raised by join d.

type id = private int

Domains have unique integer identifiers

val get_id : 'a t -> id

get_id d returns the identifier of the domain d

val self : unit -> id

self () is the identifier of the currently running domain

val before_first_spawn : (unit -> unit) -> unit

before_first_spawn f registers f to be called before the first domain is spawned by the program. The functions registered with before_first_spawn are called on the main (initial) domain. The functions registered with before_first_spawn are called in 'first in, first out' order: the oldest function added with before_first_spawn is called first.

val at_exit : (unit -> unit) -> unit

at_exit f registers f to be called when the current domain exits. Note that at_exit callbacks are domain-local and only apply to the calling domain. The registered functions are called in 'last in, first out' order: the function most recently added with at_exit is called first. An example:

let temp_file_key = Domain.DLS.new_key (fun _ ->
+  let tmp = snd (Filename.open_temp_file "" "") in
+  Domain.at_exit (fun () -> close_out_noerr tmp);
+  tmp)

The snippet above creates a key that when retrieved for the first time will open a temporary file and register an at_exit callback to close it, thus guaranteeing the descriptor is not leaked in case the current domain exits.

val cpu_relax : unit -> unit

If busy-waiting, calling cpu_relax () between iterations will improve performance on some CPU architectures

val is_main_domain : unit -> bool

is_main_domain () returns true if called from the initial domain.

The recommended maximum number of domains which should be running simultaneously (including domains already running).

The value returned is at least 1.

module DLS : sig ... end

Domain-local Storage

diff --git a/stdlib/Stdlib/Effect/Deep/index.html b/stdlib/Stdlib/Effect/Deep/index.html new file mode 100644 index 000000000..6d3f36dbc --- /dev/null +++ b/stdlib/Stdlib/Effect/Deep/index.html @@ -0,0 +1,6 @@ + +Deep (docs.stdlib.Stdlib.Effect.Deep)

Module Effect.Deep

Deep handlers

type ('a, 'b) continuation

('a,'b) continuation is a delimited continuation that expects a 'a value and returns a 'b value.

val continue : ('a, 'b) continuation -> 'a -> 'b

continue k x resumes the continuation k by passing x to k.

val discontinue : ('a, 'b) continuation -> exn -> 'b

discontinue k e resumes the continuation k by raising the exception e in k.

val discontinue_with_backtrace : + ('a, 'b) continuation -> + exn -> + Printexc.raw_backtrace -> + 'b

discontinue_with_backtrace k e bt resumes the continuation k by raising the exception e in k using bt as the origin for the exception.

type ('a, 'b) handler = {
  1. retc : 'a -> 'b;
  2. exnc : exn -> 'b;
  3. effc : 'c. 'c t -> (('c, 'b) continuation -> 'b) option;
}

('a,'b) handler is a handler record with three fields -- retc is the value handler, exnc handles exceptions, and effc handles the effects performed by the computation enclosed by the handler.

val match_with : ('c -> 'a) -> 'c -> ('a, 'b) handler -> 'b

match_with f v h runs the computation f v in the handler h.

type 'a effect_handler = {
  1. effc : 'b. 'b t -> (('b, 'a) continuation -> 'a) option;
}

'a effect_handler is a deep handler with an identity value handler fun x -> x and an exception handler that raises any exception fun e -> raise e.

val try_with : ('b -> 'a) -> 'b -> 'a effect_handler -> 'a

try_with f v h runs the computation f v under the handler h.

val get_callstack : ('a, 'b) continuation -> int -> Printexc.raw_backtrace

get_callstack c n returns a description of the top of the call stack on the continuation c, with at most n entries.

diff --git a/stdlib/Stdlib/Effect/Shallow/index.html b/stdlib/Stdlib/Effect/Shallow/index.html new file mode 100644 index 000000000..e476b10d4 --- /dev/null +++ b/stdlib/Stdlib/Effect/Shallow/index.html @@ -0,0 +1,7 @@ + +Shallow (docs.stdlib.Stdlib.Effect.Shallow)

Module Effect.Shallow

type ('a, 'b) continuation

('a,'b) continuation is a delimited continuation that expects a 'a value and returns a 'b value.

val fiber : ('a -> 'b) -> ('a, 'b) continuation

fiber f constructs a continuation that runs the computation f.

type ('a, 'b) handler = {
  1. retc : 'a -> 'b;
  2. exnc : exn -> 'b;
  3. effc : 'c. 'c t -> (('c, 'a) continuation -> 'b) option;
}

('a,'b) handler is a handler record with three fields -- retc is the value handler, exnc handles exceptions, and effc handles the effects performed by the computation enclosed by the handler.

val continue_with : ('c, 'a) continuation -> 'c -> ('a, 'b) handler -> 'b

continue_with k v h resumes the continuation k with value v with the handler h.

val discontinue_with : ('c, 'a) continuation -> exn -> ('a, 'b) handler -> 'b

discontinue_with k e h resumes the continuation k by raising the exception e with the handler h.

val discontinue_with_backtrace : + ('a, 'b) continuation -> + exn -> + Printexc.raw_backtrace -> + ('b, 'c) handler -> + 'c

discontinue_with k e bt h resumes the continuation k by raising the exception e with the handler h using the raw backtrace bt as the origin of the exception.

val get_callstack : ('a, 'b) continuation -> int -> Printexc.raw_backtrace

get_callstack c n returns a description of the top of the call stack on the continuation c, with at most n entries.

diff --git a/stdlib/Stdlib/Effect/index.html b/stdlib/Stdlib/Effect/index.html new file mode 100644 index 000000000..98d07ba35 --- /dev/null +++ b/stdlib/Stdlib/Effect/index.html @@ -0,0 +1,2 @@ + +Effect (docs.stdlib.Stdlib.Effect)

Module Stdlib.Effect

  • alert unstable The Effect interface may change in incompatible ways in the future.

Effects.

See 'Language extensions/Effect handlers' section in the manual.

  • since 5.0
  • alert unstable The Effect interface may change in incompatible ways in the future.
type _ t = ..

The type of effects.

exception Unhandled : 'a t -> exn

Unhandled e is raised when effect e is performed and there is no handler for it.

exception Continuation_already_resumed

Exception raised when a continuation is continued or discontinued more than once.

val perform : 'a t -> 'a

perform e performs an effect e.

  • raises Unhandled

    if there is no handler for e.

module Deep : sig ... end

Deep handlers

module Shallow : sig ... end
diff --git a/stdlib/Stdlib/Either/index.html b/stdlib/Stdlib/Either/index.html new file mode 100644 index 000000000..305247daf --- /dev/null +++ b/stdlib/Stdlib/Either/index.html @@ -0,0 +1,17 @@ + +Either (docs.stdlib.Stdlib.Either)

Module Stdlib.Either

Either type.

Either is the simplest and most generic sum/variant type: a value of ('a, 'b) Either.t is either a Left (v : 'a) or a Right (v : 'b).

It is a natural choice in the API of generic functions where values could fall in two different cases, possibly at different types, without assigning a specific meaning to what each case should be.

For example:

List.partition_map:
+  ('a -> ('b, 'c) Either.t) -> 'a list -> 'b list * 'c list

If you are looking for a parametrized type where one alternative means success and the other means failure, you should use the more specific type Result.t.

  • since 4.12
type ('a, 'b) t =
  1. | Left of 'a
  2. | Right of 'b

A value of ('a, 'b) Either.t contains either a value of 'a or a value of 'b

val left : 'a -> ('a, 'b) t

left v is Left v.

val right : 'b -> ('a, 'b) t

right v is Right v.

val is_left : ('a, 'b) t -> bool

is_left (Left v) is true, is_left (Right v) is false.

val is_right : ('a, 'b) t -> bool

is_right (Left v) is false, is_right (Right v) is true.

val find_left : ('a, 'b) t -> 'a option

find_left (Left v) is Some v, find_left (Right _) is None

val find_right : ('a, 'b) t -> 'b option

find_right (Right v) is Some v, find_right (Left _) is None

val map_left : ('a1 -> 'a2) -> ('a1, 'b) t -> ('a2, 'b) t

map_left f e is Left (f v) if e is Left v and e if e is Right _.

val map_right : ('b1 -> 'b2) -> ('a, 'b1) t -> ('a, 'b2) t

map_right f e is Right (f v) if e is Right v and e if e is Left _.

val map : + left:('a1 -> 'a2) -> + right:('b1 -> 'b2) -> + ('a1, 'b1) t -> + ('a2, 'b2) t

map ~left ~right (Left v) is Left (left v), map ~left ~right (Right v) is Right (right v).

val fold : left:('a -> 'c) -> right:('b -> 'c) -> ('a, 'b) t -> 'c

fold ~left ~right (Left v) is left v, and fold ~left ~right (Right v) is right v.

val iter : left:('a -> unit) -> right:('b -> unit) -> ('a, 'b) t -> unit

iter ~left ~right (Left v) is left v, and iter ~left ~right (Right v) is right v.

val for_all : left:('a -> bool) -> right:('b -> bool) -> ('a, 'b) t -> bool

for_all ~left ~right (Left v) is left v, and for_all ~left ~right (Right v) is right v.

val equal : + left:('a -> 'a -> bool) -> + right:('b -> 'b -> bool) -> + ('a, 'b) t -> + ('a, 'b) t -> + bool

equal ~left ~right e0 e1 tests equality of e0 and e1 using left and right to respectively compare values wrapped by Left _ and Right _.

val compare : + left:('a -> 'a -> int) -> + right:('b -> 'b -> int) -> + ('a, 'b) t -> + ('a, 'b) t -> + int

compare ~left ~right e0 e1 totally orders e0 and e1 using left and right to respectively compare values wrapped by Left _ and Right _. Left _ values are smaller than Right _ values.

diff --git a/stdlib/Stdlib/Ephemeron/K1/Bucket/index.html b/stdlib/Stdlib/Ephemeron/K1/Bucket/index.html new file mode 100644 index 000000000..c4e07f2d1 --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/K1/Bucket/index.html @@ -0,0 +1,2 @@ + +Bucket (docs.stdlib.Stdlib.Ephemeron.K1.Bucket)

Module K1.Bucket

type ('k, 'd) t

A bucket is a mutable "list" of ephemerons.

val make : unit -> ('k, 'd) t

Create a new bucket.

val add : ('k, 'd) t -> 'k -> 'd -> unit

Add an ephemeron to the bucket.

val remove : ('k, 'd) t -> 'k -> unit

remove b k removes from b the most-recently added ephemeron with key k, or does nothing if there is no such ephemeron.

val find : ('k, 'd) t -> 'k -> 'd option

Returns the data of the most-recently added ephemeron with the given key, or None if there is no such ephemeron.

val length : ('k, 'd) t -> int

Returns an upper bound on the length of the bucket.

val clear : ('k, 'd) t -> unit

Remove all ephemerons from the bucket.

diff --git a/stdlib/Stdlib/Ephemeron/K1/Make/argument-1-H/index.html b/stdlib/Stdlib/Ephemeron/K1/Make/argument-1-H/index.html new file mode 100644 index 000000000..114ce9bd2 --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/K1/Make/argument-1-H/index.html @@ -0,0 +1,2 @@ + +H (docs.stdlib.Stdlib.Ephemeron.K1.Make.H)

Parameter Make.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/stdlib/Stdlib/Ephemeron/K1/Make/index.html b/stdlib/Stdlib/Ephemeron/K1/Make/index.html new file mode 100644 index 000000000..0474559cb --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/K1/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.stdlib.Stdlib.Ephemeron.K1.Make)

Module K1.Make

Functor building an implementation of a weak hash table

Propose the same interface as usual hash table. However since the bindings are weak, even if mem h k is true, a subsequent find h k may raise Not_found because the garbage collector can run between the two.

Parameters

Signature

type key = H.t
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
val of_seq : (key * 'a) Seq.t -> 'a t
val clean : 'a t -> unit

remove all dead bindings. Done automatically during automatic resizing.

val stats_alive : 'a t -> Hashtbl.statistics

same as Hashtbl.SeededS.stats but only count the alive bindings

diff --git a/stdlib/Stdlib/Ephemeron/K1/MakeSeeded/argument-1-H/index.html b/stdlib/Stdlib/Ephemeron/K1/MakeSeeded/argument-1-H/index.html new file mode 100644 index 000000000..e06ed642d --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/K1/MakeSeeded/argument-1-H/index.html @@ -0,0 +1,2 @@ + +H (docs.stdlib.Stdlib.Ephemeron.K1.MakeSeeded.H)

Parameter MakeSeeded.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

diff --git a/stdlib/Stdlib/Ephemeron/K1/MakeSeeded/index.html b/stdlib/Stdlib/Ephemeron/K1/MakeSeeded/index.html new file mode 100644 index 000000000..5b9252113 --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/K1/MakeSeeded/index.html @@ -0,0 +1,2 @@ + +MakeSeeded (docs.stdlib.Stdlib.Ephemeron.K1.MakeSeeded)

Module K1.MakeSeeded

Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

Parameters

Signature

type key = H.t
type !'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
val of_seq : (key * 'a) Seq.t -> 'a t
val clean : 'a t -> unit

remove all dead bindings. Done automatically during automatic resizing.

val stats_alive : 'a t -> Hashtbl.statistics

same as Hashtbl.SeededS.stats but only count the alive bindings

diff --git a/stdlib/Stdlib/Ephemeron/K1/index.html b/stdlib/Stdlib/Ephemeron/K1/index.html new file mode 100644 index 000000000..e46d5bc92 --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/K1/index.html @@ -0,0 +1,2 @@ + +K1 (docs.stdlib.Stdlib.Ephemeron.K1)

Module Ephemeron.K1

Ephemerons with one key.

type ('k, 'd) t

an ephemeron with one key

val make : 'k -> 'd -> ('k, 'd) t

Ephemeron.K1.make k d creates an ephemeron with key k and data d.

val query : ('k, 'd) t -> 'k -> 'd option

Ephemeron.K1.query eph key returns Some x (where x is the ephemeron's data) if key is physically equal to eph's key, and None if eph is empty or key is not equal to eph's key.

module Make (H : Hashtbl.HashedType) : S with type key = H.t

Functor building an implementation of a weak hash table

Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

module Bucket : sig ... end
diff --git a/stdlib/Stdlib/Ephemeron/K2/Bucket/index.html b/stdlib/Stdlib/Ephemeron/K2/Bucket/index.html new file mode 100644 index 000000000..d276b67c0 --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/K2/Bucket/index.html @@ -0,0 +1,2 @@ + +Bucket (docs.stdlib.Stdlib.Ephemeron.K2.Bucket)

Module K2.Bucket

type ('k1, 'k2, 'd) t

A bucket is a mutable "list" of ephemerons.

val make : unit -> ('k1, 'k2, 'd) t

Create a new bucket.

val add : ('k1, 'k2, 'd) t -> 'k1 -> 'k2 -> 'd -> unit

Add an ephemeron to the bucket.

val remove : ('k1, 'k2, 'd) t -> 'k1 -> 'k2 -> unit

remove b k1 k2 removes from b the most-recently added ephemeron with keys k1 and k2, or does nothing if there is no such ephemeron.

val find : ('k1, 'k2, 'd) t -> 'k1 -> 'k2 -> 'd option

Returns the data of the most-recently added ephemeron with the given keys, or None if there is no such ephemeron.

val length : ('k1, 'k2, 'd) t -> int

Returns an upper bound on the length of the bucket.

val clear : ('k1, 'k2, 'd) t -> unit

Remove all ephemerons from the bucket.

diff --git a/stdlib/Stdlib/Ephemeron/K2/Make/argument-1-H1/index.html b/stdlib/Stdlib/Ephemeron/K2/Make/argument-1-H1/index.html new file mode 100644 index 000000000..b12c49c98 --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/K2/Make/argument-1-H1/index.html @@ -0,0 +1,2 @@ + +H1 (docs.stdlib.Stdlib.Ephemeron.K2.Make.H1)

Parameter Make.H1

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/stdlib/Stdlib/Ephemeron/K2/Make/argument-2-H2/index.html b/stdlib/Stdlib/Ephemeron/K2/Make/argument-2-H2/index.html new file mode 100644 index 000000000..e553f3c91 --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/K2/Make/argument-2-H2/index.html @@ -0,0 +1,2 @@ + +H2 (docs.stdlib.Stdlib.Ephemeron.K2.Make.H2)

Parameter Make.H2

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/stdlib/Stdlib/Ephemeron/K2/Make/index.html b/stdlib/Stdlib/Ephemeron/K2/Make/index.html new file mode 100644 index 000000000..4c7cc5b6c --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/K2/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.stdlib.Stdlib.Ephemeron.K2.Make)

Module K2.Make

Functor building an implementation of a weak hash table

Propose the same interface as usual hash table. However since the bindings are weak, even if mem h k is true, a subsequent find h k may raise Not_found because the garbage collector can run between the two.

Parameters

Signature

type key = H1.t * H2.t
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
val of_seq : (key * 'a) Seq.t -> 'a t
val clean : 'a t -> unit

remove all dead bindings. Done automatically during automatic resizing.

val stats_alive : 'a t -> Hashtbl.statistics

same as Hashtbl.SeededS.stats but only count the alive bindings

diff --git a/stdlib/Stdlib/Ephemeron/K2/MakeSeeded/argument-1-H1/index.html b/stdlib/Stdlib/Ephemeron/K2/MakeSeeded/argument-1-H1/index.html new file mode 100644 index 000000000..fa8a6e3fd --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/K2/MakeSeeded/argument-1-H1/index.html @@ -0,0 +1,2 @@ + +H1 (docs.stdlib.Stdlib.Ephemeron.K2.MakeSeeded.H1)

Parameter MakeSeeded.H1

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

diff --git a/stdlib/Stdlib/Ephemeron/K2/MakeSeeded/argument-2-H2/index.html b/stdlib/Stdlib/Ephemeron/K2/MakeSeeded/argument-2-H2/index.html new file mode 100644 index 000000000..12e7cf7e7 --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/K2/MakeSeeded/argument-2-H2/index.html @@ -0,0 +1,2 @@ + +H2 (docs.stdlib.Stdlib.Ephemeron.K2.MakeSeeded.H2)

Parameter MakeSeeded.H2

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

diff --git a/stdlib/Stdlib/Ephemeron/K2/MakeSeeded/index.html b/stdlib/Stdlib/Ephemeron/K2/MakeSeeded/index.html new file mode 100644 index 000000000..24b0c1ecb --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/K2/MakeSeeded/index.html @@ -0,0 +1,2 @@ + +MakeSeeded (docs.stdlib.Stdlib.Ephemeron.K2.MakeSeeded)

Module K2.MakeSeeded

Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

Parameters

Signature

type key = H1.t * H2.t
type !'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
val of_seq : (key * 'a) Seq.t -> 'a t
val clean : 'a t -> unit

remove all dead bindings. Done automatically during automatic resizing.

val stats_alive : 'a t -> Hashtbl.statistics

same as Hashtbl.SeededS.stats but only count the alive bindings

diff --git a/stdlib/Stdlib/Ephemeron/K2/index.html b/stdlib/Stdlib/Ephemeron/K2/index.html new file mode 100644 index 000000000..19e6cfc2c --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/K2/index.html @@ -0,0 +1,8 @@ + +K2 (docs.stdlib.Stdlib.Ephemeron.K2)

Module Ephemeron.K2

Ephemerons with two keys.

type ('k1, 'k2, 'd) t

an ephemeron with two keys

val make : 'k1 -> 'k2 -> 'd -> ('k1, 'k2, 'd) t
val query : ('k1, 'k2, 'd) t -> 'k1 -> 'k2 -> 'd option
module Make + (H1 : Hashtbl.HashedType) + (H2 : Hashtbl.HashedType) : + S with type key = H1.t * H2.t

Functor building an implementation of a weak hash table

Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

module Bucket : sig ... end
diff --git a/stdlib/Stdlib/Ephemeron/Kn/Bucket/index.html b/stdlib/Stdlib/Ephemeron/Kn/Bucket/index.html new file mode 100644 index 000000000..7eb677c64 --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/Kn/Bucket/index.html @@ -0,0 +1,2 @@ + +Bucket (docs.stdlib.Stdlib.Ephemeron.Kn.Bucket)

Module Kn.Bucket

type ('k, 'd) t

A bucket is a mutable "list" of ephemerons.

val make : unit -> ('k, 'd) t

Create a new bucket.

val add : ('k, 'd) t -> 'k array -> 'd -> unit

Add an ephemeron to the bucket.

val remove : ('k, 'd) t -> 'k array -> unit

remove b k removes from b the most-recently added ephemeron with keys k, or does nothing if there is no such ephemeron.

val find : ('k, 'd) t -> 'k array -> 'd option

Returns the data of the most-recently added ephemeron with the given keys, or None if there is no such ephemeron.

val length : ('k, 'd) t -> int

Returns an upper bound on the length of the bucket.

val clear : ('k, 'd) t -> unit

Remove all ephemerons from the bucket.

diff --git a/stdlib/Stdlib/Ephemeron/Kn/Make/argument-1-H/index.html b/stdlib/Stdlib/Ephemeron/Kn/Make/argument-1-H/index.html new file mode 100644 index 000000000..c85ccaa56 --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/Kn/Make/argument-1-H/index.html @@ -0,0 +1,2 @@ + +H (docs.stdlib.Stdlib.Ephemeron.Kn.Make.H)

Parameter Make.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/stdlib/Stdlib/Ephemeron/Kn/Make/index.html b/stdlib/Stdlib/Ephemeron/Kn/Make/index.html new file mode 100644 index 000000000..c0c98253c --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/Kn/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.stdlib.Stdlib.Ephemeron.Kn.Make)

Module Kn.Make

Functor building an implementation of a weak hash table

Propose the same interface as usual hash table. However since the bindings are weak, even if mem h k is true, a subsequent find h k may raise Not_found because the garbage collector can run between the two.

Parameters

Signature

type key = H.t array
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
val of_seq : (key * 'a) Seq.t -> 'a t
val clean : 'a t -> unit

remove all dead bindings. Done automatically during automatic resizing.

val stats_alive : 'a t -> Hashtbl.statistics

same as Hashtbl.SeededS.stats but only count the alive bindings

diff --git a/stdlib/Stdlib/Ephemeron/Kn/MakeSeeded/argument-1-H/index.html b/stdlib/Stdlib/Ephemeron/Kn/MakeSeeded/argument-1-H/index.html new file mode 100644 index 000000000..80268ebb5 --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/Kn/MakeSeeded/argument-1-H/index.html @@ -0,0 +1,2 @@ + +H (docs.stdlib.Stdlib.Ephemeron.Kn.MakeSeeded.H)

Parameter MakeSeeded.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

diff --git a/stdlib/Stdlib/Ephemeron/Kn/MakeSeeded/index.html b/stdlib/Stdlib/Ephemeron/Kn/MakeSeeded/index.html new file mode 100644 index 000000000..a47dc20fe --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/Kn/MakeSeeded/index.html @@ -0,0 +1,2 @@ + +MakeSeeded (docs.stdlib.Stdlib.Ephemeron.Kn.MakeSeeded)

Module Kn.MakeSeeded

Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

Parameters

Signature

type key = H.t array
type !'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
val of_seq : (key * 'a) Seq.t -> 'a t
val clean : 'a t -> unit

remove all dead bindings. Done automatically during automatic resizing.

val stats_alive : 'a t -> Hashtbl.statistics

same as Hashtbl.SeededS.stats but only count the alive bindings

diff --git a/stdlib/Stdlib/Ephemeron/Kn/index.html b/stdlib/Stdlib/Ephemeron/Kn/index.html new file mode 100644 index 000000000..3618b374e --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/Kn/index.html @@ -0,0 +1,4 @@ + +Kn (docs.stdlib.Stdlib.Ephemeron.Kn)

Module Ephemeron.Kn

Ephemerons with arbitrary number of keys of the same type.

type ('k, 'd) t

an ephemeron with an arbitrary number of keys of the same type

val make : 'k array -> 'd -> ('k, 'd) t
val query : ('k, 'd) t -> 'k array -> 'd option
module Make (H : Hashtbl.HashedType) : S with type key = H.t array

Functor building an implementation of a weak hash table

module MakeSeeded + (H : Hashtbl.SeededHashedType) : + SeededS with type key = H.t array

Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

module Bucket : sig ... end
diff --git a/stdlib/Stdlib/Ephemeron/index.html b/stdlib/Stdlib/Ephemeron/index.html new file mode 100644 index 000000000..286d78a05 --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/index.html @@ -0,0 +1,2 @@ + +Ephemeron (docs.stdlib.Stdlib.Ephemeron)

Module Stdlib.Ephemeron

Ephemerons and weak hash tables.

Ephemerons and weak hash tables are useful when one wants to cache or memorize the computation of a function, as long as the arguments and the function are used, without creating memory leaks by continuously keeping old computation results that are not useful anymore because one argument or the function is freed. An implementation using Hashtbl.t is not suitable because all associations would keep the arguments and the result in memory.

Ephemerons can also be used for "adding" a field to an arbitrary boxed OCaml value: you can attach some information to a value created by an external library without memory leaks.

Ephemerons hold some keys and one or no data. They are all boxed OCaml values. The keys of an ephemeron have the same behavior as weak pointers according to the garbage collector. In fact OCaml weak pointers are implemented as ephemerons without data.

The keys and data of an ephemeron are said to be full if they point to a value, or empty if the value has never been set, has been unset, or was erased by the GC. In the function that accesses the keys or data these two states are represented by the option type.

The data is considered by the garbage collector alive if all the full keys are alive and if the ephemeron is alive. When one of the keys is not considered alive anymore by the GC, the data is emptied from the ephemeron. The data could be alive for another reason and in that case the GC will not free it, but the ephemeron will not hold the data anymore.

The ephemerons complicate the notion of liveness of values, because it is not anymore an equivalence with the reachability from root value by usual pointers (not weak and not ephemerons). With ephemerons the notion of liveness is constructed by the least fixpoint of: A value is alive if:

  • it is a root value
  • it is reachable from alive value by usual pointers
  • it is the data of an alive ephemeron with all its full keys alive

Notes:

Ephemerons are defined in a language agnostic way in this paper: B. Hayes, Ephemerons: A New Finalization Mechanism, OOPSLA'97

  • since 4.03

Unsynchronized accesses

Unsynchronized accesses to a weak hash table may lead to an invalid weak hash table state. Thus, concurrent accesses to a buffer must be synchronized (for instance with a Mutex.t).

module type S = sig ... end

The output signature of the functors K1.Make and K2.Make. These hash tables are weak in the keys. If all the keys of a binding are alive the binding is kept, but if one of the keys of the binding is dead then the binding is removed.

module type SeededS = sig ... end

The output signature of the functors K1.MakeSeeded and K2.MakeSeeded.

module K1 : sig ... end

Ephemerons with one key.

module K2 : sig ... end

Ephemerons with two keys.

module Kn : sig ... end

Ephemerons with arbitrary number of keys of the same type.

diff --git a/stdlib/Stdlib/Ephemeron/module-type-S/index.html b/stdlib/Stdlib/Ephemeron/module-type-S/index.html new file mode 100644 index 000000000..7667103cf --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (docs.stdlib.Stdlib.Ephemeron.S)

Module type Ephemeron.S

The output signature of the functors K1.Make and K2.Make. These hash tables are weak in the keys. If all the keys of a binding are alive the binding is kept, but if one of the keys of the binding is dead then the binding is removed.

Propose the same interface as usual hash table. However since the bindings are weak, even if mem h k is true, a subsequent find h k may raise Not_found because the garbage collector can run between the two.

type key
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
val of_seq : (key * 'a) Seq.t -> 'a t
val clean : 'a t -> unit

remove all dead bindings. Done automatically during automatic resizing.

val stats_alive : 'a t -> Hashtbl.statistics

same as Hashtbl.SeededS.stats but only count the alive bindings

diff --git a/stdlib/Stdlib/Ephemeron/module-type-SeededS/index.html b/stdlib/Stdlib/Ephemeron/module-type-SeededS/index.html new file mode 100644 index 000000000..e9e2fe39e --- /dev/null +++ b/stdlib/Stdlib/Ephemeron/module-type-SeededS/index.html @@ -0,0 +1,2 @@ + +SeededS (docs.stdlib.Stdlib.Ephemeron.SeededS)

Module type Ephemeron.SeededS

The output signature of the functors K1.MakeSeeded and K2.MakeSeeded.

type key
type !'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
val of_seq : (key * 'a) Seq.t -> 'a t
val clean : 'a t -> unit

remove all dead bindings. Done automatically during automatic resizing.

val stats_alive : 'a t -> Hashtbl.statistics

same as Hashtbl.SeededS.stats but only count the alive bindings

diff --git a/stdlib/Stdlib/Filename/index.html b/stdlib/Stdlib/Filename/index.html new file mode 100644 index 000000000..7e3d4b6df --- /dev/null +++ b/stdlib/Stdlib/Filename/index.html @@ -0,0 +1,14 @@ + +Filename (docs.stdlib.Stdlib.Filename)

Module Stdlib.Filename

Operations on file names.

val current_dir_name : string

The conventional name for the current directory (e.g. . in Unix).

val parent_dir_name : string

The conventional name for the parent of the current directory (e.g. .. in Unix).

val dir_sep : string

The directory separator (e.g. / in Unix).

  • since 3.11.2
val concat : string -> string -> string

concat dir file returns a file name that designates file file in directory dir.

val is_relative : string -> bool

Return true if the file name is relative to the current directory, false if it is absolute (i.e. in Unix, starts with /).

val is_implicit : string -> bool

Return true if the file name is relative and does not start with an explicit reference to the current directory (./ or ../ in Unix), false if it starts with an explicit reference to the root directory or the current directory.

val check_suffix : string -> string -> bool

check_suffix name suff returns true if the filename name ends with the suffix suff.

Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

val chop_suffix : string -> string -> string

chop_suffix name suff removes the suffix suff from the filename name.

val chop_suffix_opt : suffix:string -> string -> string option

chop_suffix_opt ~suffix filename removes the suffix from the filename if possible, or returns None if the filename does not end with the suffix.

Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

  • since 4.08
val extension : string -> string

extension name is the shortest suffix ext of name0 where:

  • name0 is the longest suffix of name that does not contain a directory separator;
  • ext starts with a period;
  • ext is preceded by at least one non-period character in name0.

If such a suffix does not exist, extension name is the empty string.

  • since 4.04
val remove_extension : string -> string

Return the given file name without its extension, as defined in Filename.extension. If the extension is empty, the function returns the given file name.

The following invariant holds for any file name s:

remove_extension s ^ extension s = s

  • since 4.04
val chop_extension : string -> string

Same as Filename.remove_extension, but raise Invalid_argument if the given name has an empty extension.

val basename : string -> string

Split a file name into directory name / base file name. If name is a valid file name, then concat (dirname name) (basename name) returns a file name which is equivalent to name. Moreover, after setting the current directory to dirname name (with Sys.chdir), references to basename name (which is a relative file name) designate the same file as name before the call to Sys.chdir.

This function conforms to the specification of POSIX.1-2008 for the basename utility.

val dirname : string -> string

See Filename.basename. This function conforms to the specification of POSIX.1-2008 for the dirname utility.

val null : string

null is "/dev/null" on POSIX and "NUL" on Windows. It represents a file on the OS that discards all writes and returns end of file on reads.

  • since 4.10
val temp_file : ?temp_dir:string -> string -> string -> string

temp_file prefix suffix returns the name of a fresh temporary file in the temporary directory. The base name of the temporary file is formed by concatenating prefix, then a suitably chosen integer number, then suffix. The optional argument temp_dir indicates the temporary directory to use, defaulting to the current result of Filename.get_temp_dir_name. The temporary file is created empty, with permissions 0o600 (readable and writable only by the file owner). The file is guaranteed to be different from any other file that existed when temp_file was called.

  • raises Sys_error

    if the file could not be created.

  • before 3.11.2

    no ?temp_dir optional argument

val open_temp_file : + ?mode:open_flag list -> + ?perms:int -> + ?temp_dir:string -> + string -> + string -> + string * out_channel

Same as Filename.temp_file, but returns both the name of a fresh temporary file, and an output channel opened (atomically) on this file. This function is more secure than temp_file: there is no risk that the temporary file will be modified (e.g. replaced by a symbolic link) before the program opens it. The optional argument mode is a list of additional flags to control the opening of the file. It can contain one or several of Open_append, Open_binary, and Open_text. The default is [Open_text] (open in text mode). The file is created with permissions perms (defaults to readable and writable only by the file owner, 0o600).

  • raises Sys_error

    if the file could not be opened.

  • before 4.03

    no ?perms optional argument

  • before 3.11.2

    no ?temp_dir optional argument

val temp_dir : ?temp_dir:string -> ?perms:int -> string -> string -> string

temp_dir prefix suffix creates and returns the name of a fresh temporary directory with permissions perms (defaults to 0o700) inside temp_dir. The base name of the temporary directory is formed by concatenating prefix, then a suitably chosen integer number, then suffix. The optional argument temp_dir indicates the temporary directory to use, defaulting to the current result of Filename.get_temp_dir_name. The temporary directory is created empty, with permissions 0o700 (readable, writable, and searchable only by the file owner). The directory is guaranteed to be different from any other directory that existed when temp_dir was called.

If temp_dir does not exist, this function does not create it. Instead, it raises Sys_error.

  • raises Sys_error

    if the directory could not be created.

  • since 5.1
val get_temp_dir_name : unit -> string

The name of the temporary directory: Under Unix, the value of the TMPDIR environment variable, or "/tmp" if the variable is not set. Under Windows, the value of the TEMP environment variable, or "." if the variable is not set. The temporary directory can be changed with Filename.set_temp_dir_name.

  • since 4.00
val set_temp_dir_name : string -> unit

Change the temporary directory returned by Filename.get_temp_dir_name and used by Filename.temp_file and Filename.open_temp_file. The temporary directory is a domain-local value which is inherited by child domains.

  • since 4.00
val quote : string -> string

Return a quoted version of a file name, suitable for use as one argument in a command line, escaping all meta-characters. Warning: under Windows, the output is only suitable for use with programs that follow the standard Windows quoting conventions.

val quote_command : + string -> + ?stdin:string -> + ?stdout:string -> + ?stderr:string -> + string list -> + string

quote_command cmd args returns a quoted command line, suitable for use as an argument to Sys.command, Unix.system, and the Unix.open_process functions.

The string cmd is the command to call. The list args is the list of arguments to pass to this command. It can be empty.

The optional arguments ?stdin and ?stdout and ?stderr are file names used to redirect the standard input, the standard output, or the standard error of the command. If ~stdin:f is given, a redirection < f is performed and the standard input of the command reads from file f. If ~stdout:f is given, a redirection > f is performed and the standard output of the command is written to file f. If ~stderr:f is given, a redirection 2> f is performed and the standard error of the command is written to file f. If both ~stdout:f and ~stderr:f are given, with the exact same file name f, a 2>&1 redirection is performed so that the standard output and the standard error of the command are interleaved and redirected to the same file f.

Under Unix and Cygwin, the command, the arguments, and the redirections if any are quoted using Filename.quote, then concatenated. Under Win32, additional quoting is performed as required by the cmd.exe shell that is called by Sys.command.

  • raises Failure

    if the command cannot be escaped on the current platform.

  • since 4.10
diff --git a/stdlib/Stdlib/Float/Array/index.html b/stdlib/Stdlib/Float/Array/index.html new file mode 100644 index 000000000..397e2e4e0 --- /dev/null +++ b/stdlib/Stdlib/Float/Array/index.html @@ -0,0 +1,13 @@ + +Array (docs.stdlib.Stdlib.Float.Array)

Module Float.Array

Float arrays with packed representation.

type t = floatarray

The type of float arrays with packed representation.

  • since 4.08
val length : t -> int

Return the length (number of elements) of the given floatarray.

val get : t -> int -> float

get a n returns the element number n of floatarray a.

val set : t -> int -> float -> unit

set a n x modifies floatarray a in place, replacing element number n with x.

val make : int -> float -> t

make n x returns a fresh floatarray of length n, initialized with x.

val create : int -> t

create n returns a fresh floatarray of length n, with uninitialized data.

val init : int -> (int -> float) -> t

init n f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n f tabulates the results of f applied to the integers 0 to n-1.

val append : t -> t -> t

append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

val concat : t list -> t

Same as append, but concatenates a list of floatarrays.

val sub : t -> int -> int -> t

sub a pos len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

  • raises Invalid_argument

    if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

val copy : t -> t

copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

val fill : t -> int -> int -> float -> unit

fill a pos len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

val blit : t -> int -> t -> int -> int -> unit

blit src src_pos dst dst_pos len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

val to_list : t -> float list

to_list a returns the list of all the elements of a.

val of_list : float list -> t

of_list l returns a fresh floatarray containing the elements of l.

  • raises Invalid_argument

    if the length of l is greater than Sys.max_floatarray_length.

Iterators

val iter : (float -> unit) -> t -> unit

iter f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

val iteri : (int -> float -> unit) -> t -> unit

Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

val map : (float -> float) -> t -> t

map f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

val map_inplace : (float -> float) -> t -> unit

map_inplace f a applies function f to all elements of a, and updates their values in place.

  • since 5.1
val mapi : (int -> float -> float) -> t -> t

Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

val mapi_inplace : (int -> float -> float) -> t -> unit

Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

  • since 5.1
val fold_left : ('acc -> float -> 'acc) -> 'acc -> t -> 'acc

fold_left f x init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

val fold_right : (float -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

Iterators on two arrays

val iter2 : (float -> float -> unit) -> t -> t -> unit

Array.iter2 f a b applies function f to all the elements of a and b.

val map2 : (float -> float -> float) -> t -> t -> t

map2 f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

Array scanning

val for_all : (float -> bool) -> t -> bool

for_all f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

val exists : (float -> bool) -> t -> bool

exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

val mem : float -> t -> bool

mem a set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

val mem_ieee : float -> t -> bool

Same as mem, but uses IEEE equality instead of structural equality.

Array searching

val find_opt : (float -> bool) -> t -> float option
val find_index : (float -> bool) -> t -> int option

find_index f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_map : (float -> 'a option) -> t -> 'a option
val find_mapi : (int -> float -> 'a option) -> t -> 'a option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1

Sorting

val sort : (float -> float -> int) -> t -> unit

Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

The current implementation uses Heap Sort. It runs in constant stack space.

Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

  • cmp x y > 0 if and only if cmp y x < 0
  • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

  • cmp a.(i) a.(j) >= 0 if and only if i >= j
val stable_sort : (float -> float -> int) -> t -> unit

Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

val fast_sort : (float -> float -> int) -> t -> unit

Same as sort or stable_sort, whichever is faster on typical input.

Float arrays and Sequences

val to_seq : t -> float Seq.t

Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

val to_seqi : t -> (int * float) Seq.t

Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

val of_seq : float Seq.t -> t

Create an array from the generator.

val map_to_array : (float -> 'a) -> t -> 'a array

map_to_array f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

val map_from_array : ('a -> float) -> 'a array -> t

map_from_array f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

Arrays and concurrency safety

Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

For example, consider the following program:

let size = 100_000_000
+let a = Float.Array.make size 1.
+let update a f () =
+   Float.Array.iteri (fun i x -> Float.Array.set a i (f x)) a
+let d1 = Domain.spawn (update a (fun x -> x +. 1.))
+let d2 = Domain.spawn (update a (fun x ->  2. *. x +. 1.))
+let () = Domain.join d1; Domain.join d2

After executing this code, each field of the float array a is either 2., 3., 4. or 5.. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

Data races

If two domains only access disjoint parts of the array, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

A data race is said to occur when two domains access the same array element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the array elements.

Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location with a few exceptions.

Tearing

Float arrays have two supplementary caveats in the presence of data races.

First, the blit operation might copy an array byte-by-byte. Data races between such a blit operation and another operation might produce surprising values due to tearing: partial writes interleaved with other operations can create float values that would not exist with a sequential execution.

For instance, at the end of

let zeros = Float.Array.make size 0.
+let max_floats = Float.Array.make size Float.max_float
+let res = Float.Array.copy zeros
+let d1 = Domain.spawn (fun () -> Float.Array.blit zeros 0 res 0 size)
+let d2 = Domain.spawn (fun () -> Float.Array.blit max_floats 0 res 0 size)
+let () = Domain.join d1; Domain.join d2

the res float array might contain values that are neither 0. nor max_float.

Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation.

diff --git a/stdlib/Stdlib/Float/ArrayLabels/index.html b/stdlib/Stdlib/Float/ArrayLabels/index.html new file mode 100644 index 000000000..46f1d0bf7 --- /dev/null +++ b/stdlib/Stdlib/Float/ArrayLabels/index.html @@ -0,0 +1,13 @@ + +ArrayLabels (docs.stdlib.Stdlib.Float.ArrayLabels)

Module Float.ArrayLabels

Float arrays with packed representation (labeled functions).

type t = floatarray

The type of float arrays with packed representation.

  • since 4.08
val length : t -> int

Return the length (number of elements) of the given floatarray.

val get : t -> int -> float

get a n returns the element number n of floatarray a.

val set : t -> int -> float -> unit

set a n x modifies floatarray a in place, replacing element number n with x.

val make : int -> float -> t

make n x returns a fresh floatarray of length n, initialized with x.

val create : int -> t

create n returns a fresh floatarray of length n, with uninitialized data.

val init : int -> f:(int -> float) -> t

init n ~f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n ~f tabulates the results of f applied to the integers 0 to n-1.

val append : t -> t -> t

append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

val concat : t list -> t

Same as append, but concatenates a list of floatarrays.

val sub : t -> pos:int -> len:int -> t

sub a ~pos ~len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

  • raises Invalid_argument

    if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

val copy : t -> t

copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

val fill : t -> pos:int -> len:int -> float -> unit

fill a ~pos ~len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

val blit : src:t -> src_pos:int -> dst:t -> dst_pos:int -> len:int -> unit

blit ~src ~src_pos ~dst ~dst_pos ~len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

  • raises Invalid_argument

    if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

val to_list : t -> float list

to_list a returns the list of all the elements of a.

val of_list : float list -> t

of_list l returns a fresh floatarray containing the elements of l.

  • raises Invalid_argument

    if the length of l is greater than Sys.max_floatarray_length.

Iterators

val iter : f:(float -> unit) -> t -> unit

iter ~f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

val iteri : f:(int -> float -> unit) -> t -> unit

Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

val map : f:(float -> float) -> t -> t

map ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

val map_inplace : f:(float -> float) -> t -> unit

map_inplace f a applies function f to all elements of a, and updates their values in place.

  • since 5.1
val mapi : f:(int -> float -> float) -> t -> t

Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

val mapi_inplace : f:(int -> float -> float) -> t -> unit

Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

  • since 5.1
val fold_left : f:('acc -> float -> 'acc) -> init:'acc -> t -> 'acc

fold_left ~f x ~init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

val fold_right : f:(float -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

Iterators on two arrays

val iter2 : f:(float -> float -> unit) -> t -> t -> unit

Array.iter2 ~f a b applies function f to all the elements of a and b.

val map2 : f:(float -> float -> float) -> t -> t -> t

map2 ~f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

Array scanning

val for_all : f:(float -> bool) -> t -> bool

for_all ~f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

val exists : f:(float -> bool) -> t -> bool

exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

val mem : float -> set:t -> bool

mem a ~set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

val mem_ieee : float -> set:t -> bool

Same as mem, but uses IEEE equality instead of structural equality.

Array searching

val find_opt : f:(float -> bool) -> t -> float option
val find_index : f:(float -> bool) -> t -> int option

find_index ~f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_map : f:(float -> 'a option) -> t -> 'a option
val find_mapi : f:(int -> float -> 'a option) -> t -> 'a option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1

Sorting

val sort : cmp:(float -> float -> int) -> t -> unit

Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

The current implementation uses Heap Sort. It runs in constant stack space.

Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

  • cmp x y > 0 if and only if cmp y x < 0
  • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

  • cmp a.(i) a.(j) >= 0 if and only if i >= j
val stable_sort : cmp:(float -> float -> int) -> t -> unit

Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

val fast_sort : cmp:(float -> float -> int) -> t -> unit

Same as sort or stable_sort, whichever is faster on typical input.

Float arrays and Sequences

val to_seq : t -> float Seq.t

Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

val to_seqi : t -> (int * float) Seq.t

Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

val of_seq : float Seq.t -> t

Create an array from the generator.

val map_to_array : f:(float -> 'a) -> t -> 'a array

map_to_array ~f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

val map_from_array : f:('a -> float) -> 'a array -> t

map_from_array ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

Arrays and concurrency safety

Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

Atomicity

Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

For example, consider the following program:

let size = 100_000_000
+let a = Float.ArrayLabels.make size 1.
+let update a f () =
+   Float.ArrayLabels.iteri ~f:(fun i x -> Float.Array.set a i (f x)) a
+let d1 = Domain.spawn (update a (fun x -> x +. 1.))
+let d2 = Domain.spawn (update a (fun x ->  2. *. x +. 1.))
+let () = Domain.join d1; Domain.join d2

After executing this code, each field of the float array a is either 2., 3., 4. or 5.. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

Data races

If two domains only access disjoint parts of the array, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

A data race is said to occur when two domains access the same array element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the array elements.

Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location with a few exceptions.

Tearing

Float arrays have two supplementary caveats in the presence of data races.

First, the blit operation might copy an array byte-by-byte. Data races between such a blit operation and another operation might produce surprising values due to tearing: partial writes interleaved with other operations can create float values that would not exist with a sequential execution.

For instance, at the end of

let zeros = Float.Array.make size 0.
+let max_floats = Float.Array.make size Float.max_float
+let res = Float.Array.copy zeros
+let d1 = Domain.spawn (fun () -> Float.Array.blit zeros 0 res 0 size)
+let d2 = Domain.spawn (fun () -> Float.Array.blit max_floats 0 res 0 size)
+let () = Domain.join d1; Domain.join d2

the res float array might contain values that are neither 0. nor max_float.

Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation.

diff --git a/stdlib/Stdlib/Float/index.html b/stdlib/Stdlib/Float/index.html new file mode 100644 index 000000000..7d6f9457f --- /dev/null +++ b/stdlib/Stdlib/Float/index.html @@ -0,0 +1,2 @@ + +Float (docs.stdlib.Stdlib.Float)

Module Stdlib.Float

Floating-point arithmetic.

OCaml's floating-point numbers follow the IEEE 754 standard, using double precision (64 bits) numbers. Floating-point operations never raise an exception on overflow, underflow, division by zero, etc. Instead, special IEEE numbers are returned as appropriate, such as infinity for 1.0 /. 0.0, neg_infinity for -1.0 /. 0.0, and nan ('not a number') for 0.0 /. 0.0. These special numbers then propagate through floating-point computations as expected: for instance, 1.0 /. infinity is 0.0, basic arithmetic operations (+., -., *., /.) with nan as an argument return nan, ...

  • since 4.07
val zero : float

The floating point 0.

  • since 4.08
val one : float

The floating-point 1.

  • since 4.08
val minus_one : float

The floating-point -1.

  • since 4.08
val neg : float -> float

Unary negation.

val add : float -> float -> float

Floating-point addition.

val sub : float -> float -> float

Floating-point subtraction.

val mul : float -> float -> float

Floating-point multiplication.

val div : float -> float -> float

Floating-point division.

val fma : float -> float -> float -> float

fma x y z returns x * y + z, with a best effort for computing this expression with a single rounding, using either hardware instructions (providing full IEEE compliance) or a software emulation.

On 64-bit Cygwin, 64-bit mingw-w64 and MSVC 2017 and earlier, this function may be emulated owing to known bugs on limitations on these platforms. Note: since software emulation of the fma is costly, make sure that you are using hardware fma support if performance matters.

  • since 4.08
val rem : float -> float -> float

rem a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

val succ : float -> float

succ x returns the floating point number right after x i.e., the smallest floating-point number greater than x. See also next_after.

  • since 4.08
val pred : float -> float

pred x returns the floating-point number right before x i.e., the greatest floating-point number smaller than x. See also next_after.

  • since 4.08
val abs : float -> float

abs f returns the absolute value of f.

val infinity : float

Positive infinity.

val neg_infinity : float

Negative infinity.

val nan : float

A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

nan is quiet_nan since 5.1; it was a signaling NaN before.

val signaling_nan : float

Signaling NaN. The corresponding signals do not raise OCaml exception, but the value can be useful for interoperability with C libraries.

  • since 5.1
val quiet_nan : float

Quiet NaN.

  • since 5.1
val pi : float

The constant pi.

val max_float : float

The largest positive finite value of type float.

val min_float : float

The smallest positive, non-zero, non-denormalized value of type float.

val epsilon : float

The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

val is_finite : float -> bool

is_finite x is true if and only if x is finite i.e., not infinite and not nan.

  • since 4.08
val is_infinite : float -> bool

is_infinite x is true if and only if x is infinity or neg_infinity.

  • since 4.08
val is_nan : float -> bool

is_nan x is true if and only if x is not a number (see nan).

  • since 4.08
val is_integer : float -> bool

is_integer x is true if and only if x is an integer.

  • since 4.08
val of_int : int -> float

Convert an integer to floating-point.

val to_int : float -> int

Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

val of_string : string -> float

Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X). The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit. The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit. In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional. The _ (underscore) character can appear anywhere in the string and is ignored. Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

  • raises Failure

    if the given string is not a valid representation of a float.

val of_string_opt : string -> float option

Same as of_string, but returns None instead of raising.

val to_string : float -> string

Return a string representation of a floating-point number.

This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

This function is an alias for Stdlib.string_of_float.

type fpclass = fpclass =
  1. | FP_normal
    (*

    Normal number, none of the below

    *)
  2. | FP_subnormal
    (*

    Number very close to 0.0, has reduced precision

    *)
  3. | FP_zero
    (*

    Number is 0.0 or -0.0

    *)
  4. | FP_infinite
    (*

    Number is positive or negative infinity

    *)
  5. | FP_nan
    (*

    Not a number: result of an undefined operation

    *)

The five classes of floating-point numbers, as determined by the classify_float function.

val classify_float : float -> fpclass

Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

val pow : float -> float -> float

Exponentiation.

val sqrt : float -> float

Square root.

val cbrt : float -> float

Cube root.

  • since 4.13
val exp : float -> float

Exponential.

val exp2 : float -> float

Base 2 exponential function.

  • since 4.13
val log : float -> float

Natural logarithm.

val log10 : float -> float

Base 10 logarithm.

val log2 : float -> float

Base 2 logarithm.

  • since 4.13
val expm1 : float -> float

expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

val log1p : float -> float

log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

val cos : float -> float

Cosine. Argument is in radians.

val sin : float -> float

Sine. Argument is in radians.

val tan : float -> float

Tangent. Argument is in radians.

val acos : float -> float

Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

val asin : float -> float

Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

val atan : float -> float

Arc tangent. Result is in radians and is between -pi/2 and pi/2.

val atan2 : float -> float -> float

atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

val hypot : float -> float -> float

hypot x y returns sqrt(x *. x +. y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

val cosh : float -> float

Hyperbolic cosine. Argument is in radians.

val sinh : float -> float

Hyperbolic sine. Argument is in radians.

val tanh : float -> float

Hyperbolic tangent. Argument is in radians.

val acosh : float -> float

Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

  • since 4.13
val asinh : float -> float

Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

  • since 4.13
val atanh : float -> float

Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

  • since 4.13
val erf : float -> float

Error function. The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

  • since 4.13
val erfc : float -> float

Complementary error function (erfc x = 1 - erf x). The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

  • since 4.13
val trunc : float -> float

trunc x rounds x to the nearest integer whose absolute value is less than or equal to x.

  • since 4.08
val round : float -> float

round x rounds x to the nearest integer with ties (fractional values of 0.5) rounded away from zero, regardless of the current rounding direction. If x is an integer, +0., -0., nan, or infinite, x itself is returned.

On 64-bit mingw-w64, this function may be emulated owing to a bug in the C runtime library (CRT) on this platform.

  • since 4.08
val ceil : float -> float

Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

val floor : float -> float

Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

val next_after : float -> float -> float

next_after x y returns the next representable floating-point value following x in the direction of y. More precisely, if y is greater (resp. less) than x, it returns the smallest (resp. largest) representable number greater (resp. less) than x. If x equals y, the function returns y. If x or y is nan, a nan is returned. Note that next_after max_float infinity = infinity and that next_after 0. infinity is the smallest denormalized positive number. If x is the smallest denormalized positive number, next_after x 0. = 0.

  • since 4.08
val copy_sign : float -> float -> float

copy_sign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

val sign_bit : float -> bool

sign_bit x is true if and only if the sign bit of x is set. For example sign_bit 1. and signbit 0. are false while sign_bit (-1.) and sign_bit (-0.) are true.

  • since 4.08
val frexp : float -> float * int

frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

val ldexp : float -> int -> float

ldexp x n returns x *. 2 ** n.

val modf : float -> float * float

modf f returns the pair of the fractional and integral part of f.

type t = float

An alias for the type of floating-point numbers.

val compare : t -> t -> int

compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

val equal : t -> t -> bool

The equal function for floating-point numbers, compared using compare.

val min : t -> t -> t

min x y returns the minimum of x and y. It returns nan when x or y is nan. Moreover min (-0.) (+0.) = -0.

  • since 4.08
val max : float -> float -> float

max x y returns the maximum of x and y. It returns nan when x or y is nan. Moreover max (-0.) (+0.) = +0.

  • since 4.08
val min_max : float -> float -> float * float

min_max x y is (min x y, max x y), just more efficient.

  • since 4.08
val min_num : t -> t -> t

min_num x y returns the minimum of x and y treating nan as missing values. If both x and y are nan, nan is returned. Moreover min_num (-0.) (+0.) = -0.

  • since 4.08
val max_num : t -> t -> t

max_num x y returns the maximum of x and y treating nan as missing values. If both x and y are nan nan is returned. Moreover max_num (-0.) (+0.) = +0.

  • since 4.08
val min_max_num : float -> float -> float * float

min_max_num x y is (min_num x y, max_num x y), just more efficient. Note that in particular min_max_num x nan = (x, x) and min_max_num nan y = (y, y).

  • since 4.08
val seeded_hash : int -> t -> int

A seeded hash function for floats, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : t -> int

An unseeded hash function for floats, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

module Array : sig ... end

Float arrays with packed representation.

module ArrayLabels : sig ... end

Float arrays with packed representation (labeled functions).

diff --git a/stdlib/Stdlib/Format/index.html b/stdlib/Stdlib/Format/index.html new file mode 100644 index 000000000..3e99f7dea --- /dev/null +++ b/stdlib/Stdlib/Format/index.html @@ -0,0 +1,148 @@ + +Format (docs.stdlib.Stdlib.Format)

Module Stdlib.Format

Pretty-printing.

If you are new to this module, see the examples below.

This module implements a pretty-printing facility to format values within 'pretty-printing boxes' and 'semantic tags' combined with a set of printf-like functions. The pretty-printer splits lines at specified break hints, and indents lines according to the box structure. Similarly, semantic tags can be used to decouple text presentation from its contents.

This pretty-printing facility is implemented as an overlay on top of abstract formatters which provide basic output functions. Some formatters are predefined, notably:

Most functions in the Format module come in two variants: a short version that operates on the current domain's standard formatter as obtained using get_std_formatter and the generic version prefixed by pp_ that takes a formatter as its first argument. For the version that operates on the current domain's standard formatter, the call to get_std_formatter is delayed until the last argument is received.

More formatters can be created with formatter_of_out_channel, formatter_of_buffer, formatter_of_symbolic_output_buffer or using custom formatters.

Warning: Since formatters contain mutable state, it is not thread-safe to use the same formatter on multiple domains in parallel without synchronization.

If multiple domains write to the same output channel using the predefined formatters (as obtained by get_std_formatter or get_err_formatter), the output from the domains will be interleaved with each other at points where the formatters are flushed, such as with print_flush. This synchronization is not performed by formatters obtained from formatter_of_out_channel (on the standard out channels or others).

Introduction

You may consider this module as providing an extension to the printf facility to provide automatic line splitting. The addition of pretty-printing annotations to your regular printf format strings gives you fancy indentation and line breaks. Pretty-printing annotations are described below in the documentation of the function Format.fprintf.

You may also use the explicit pretty-printing box management and printing functions provided by this module. This style is more basic but more verbose than the concise fprintf format strings.

For instance, the sequence open_box 0; print_string "x ="; print_space (); + print_int 1; close_box (); print_newline () that prints x = 1 within a pretty-printing box, can be abbreviated as printf "@[%s@ %i@]@." "x =" 1, or even shorter printf "@[x =@ %i@]@." 1.

Rule of thumb for casual users of this library:

  • use simple pretty-printing boxes (as obtained by open_box 0);
  • use simple break hints as obtained by print_cut () that outputs a simple break hint, or by print_space () that outputs a space indicating a break hint;
  • once a pretty-printing box is open, display its material with basic printing functions (e. g. print_int and print_string);
  • when the material for a pretty-printing box has been printed, call close_box () to close the box;
  • at the end of pretty-printing, flush the pretty-printer to display all the remaining material, e.g. evaluate print_newline ().

The behavior of pretty-printing commands is unspecified if there is no open pretty-printing box. Each box opened by one of the open_ functions below must be closed using close_box for proper formatting. Otherwise, some of the material printed in the boxes may not be output, or may be formatted incorrectly.

In case of interactive use, each phrase is executed in the initial state of the standard pretty-printer: after each phrase execution, the interactive system closes all open pretty-printing boxes, flushes all pending text, and resets the standard pretty-printer.

Warning: mixing calls to pretty-printing functions of this module with calls to Stdlib low level output functions is error prone.

The pretty-printing functions output material that is delayed in the pretty-printer queue and stacks in order to compute proper line splitting. In contrast, basic I/O output functions write directly in their output device. As a consequence, the output of a basic I/O function may appear before the output of a pretty-printing function that has been called before. For instance, + Stdlib.print_string "<"; + Format.print_string "PRETTY"; + Stdlib.print_string ">"; + Format.print_string "TEXT"; + leads to output <>PRETTYTEXT.

Formatters

type formatter

Abstract data corresponding to a pretty-printer (also called a formatter) and all its machinery. See also Defining formatters.

Pretty-printing boxes

The pretty-printing engine uses the concepts of pretty-printing box and break hint to drive indentation and line splitting behavior of the pretty-printer.

Each different pretty-printing box kind introduces a specific line splitting policy:

  • within an horizontal box, break hints never split the line (but the line may be split in a box nested deeper),
  • within a vertical box, break hints always split the line,
  • within an horizontal/vertical box, if the box fits on the current line then break hints never split the line, otherwise break hint always split the line,
  • within a compacting box, a break hint never splits the line, unless there is no more room on the current line.

Note that line splitting policy is box specific: the policy of a box does not rule the policy of inner boxes. For instance, if a vertical box is nested in an horizontal box, all break hints within the vertical box will split the line.

Moreover, opening a box after the maximum indentation limit splits the line whether or not the box would end up fitting on the line.

val pp_open_box : formatter -> int -> unit
val open_box : int -> unit

pp_open_box ppf d opens a new compacting pretty-printing box with offset d in the formatter ppf.

Within this box, the pretty-printer prints as much as possible material on every line.

A break hint splits the line if there is no more room on the line to print the remainder of the box.

Within this box, the pretty-printer emphasizes the box structure: if a structural box does not fit fully on a simple line, a break hint also splits the line if the splitting ``moves to the left'' (i.e. the new line gets an indentation smaller than the one of the current line).

This box is the general purpose pretty-printing box.

If the pretty-printer splits the line in the box, offset d is added to the current indentation.

val pp_close_box : formatter -> unit -> unit
val close_box : unit -> unit

Closes the most recently open pretty-printing box.

val pp_open_hbox : formatter -> unit -> unit
val open_hbox : unit -> unit

pp_open_hbox ppf () opens a new 'horizontal' pretty-printing box.

This box prints material on a single line.

Break hints in a horizontal box never split the line. (Line splitting may still occur inside boxes nested deeper).

val pp_open_vbox : formatter -> int -> unit
val open_vbox : int -> unit

pp_open_vbox ppf d opens a new 'vertical' pretty-printing box with offset d.

This box prints material on as many lines as break hints in the box.

Every break hint in a vertical box splits the line.

If the pretty-printer splits the line in the box, d is added to the current indentation.

val pp_open_hvbox : formatter -> int -> unit
val open_hvbox : int -> unit

pp_open_hvbox ppf d opens a new 'horizontal/vertical' pretty-printing box with offset d.

This box behaves as an horizontal box if it fits on a single line, otherwise it behaves as a vertical box.

If the pretty-printer splits the line in the box, d is added to the current indentation.

val pp_open_hovbox : formatter -> int -> unit
val open_hovbox : int -> unit

pp_open_hovbox ppf d opens a new 'horizontal-or-vertical' pretty-printing box with offset d.

This box prints material as much as possible on every line.

A break hint splits the line if there is no more room on the line to print the remainder of the box.

If the pretty-printer splits the line in the box, d is added to the current indentation.

Formatting functions

val pp_print_string : formatter -> string -> unit
val print_string : string -> unit

pp_print_string ppf s prints s in the current pretty-printing box.

val pp_print_bytes : formatter -> bytes -> unit
val print_bytes : bytes -> unit

pp_print_bytes ppf b prints b in the current pretty-printing box.

  • since 4.13
val pp_print_as : formatter -> int -> string -> unit
val print_as : int -> string -> unit

pp_print_as ppf len s prints s in the current pretty-printing box. The pretty-printer formats s as if it were of length len.

val pp_print_int : formatter -> int -> unit
val print_int : int -> unit

Print an integer in the current pretty-printing box.

val pp_print_float : formatter -> float -> unit
val print_float : float -> unit

Print a floating point number in the current pretty-printing box.

val pp_print_char : formatter -> char -> unit
val print_char : char -> unit

Print a character in the current pretty-printing box.

val pp_print_bool : formatter -> bool -> unit
val print_bool : bool -> unit

Print a boolean in the current pretty-printing box.

Break hints

A 'break hint' tells the pretty-printer to output some space or split the line whichever way is more appropriate to the current pretty-printing box splitting rules.

Break hints are used to separate printing items and are mandatory to let the pretty-printer correctly split lines and indent items.

Simple break hints are:

  • the 'space': output a space or split the line if appropriate,
  • the 'cut': split the line if appropriate.

Note: the notions of space and line splitting are abstract for the pretty-printing engine, since those notions can be completely redefined by the programmer. However, in the pretty-printer default setting, ``output a space'' simply means printing a space character (ASCII code 32) and ``split the line'' means printing a newline character (ASCII code 10).

val pp_print_space : formatter -> unit -> unit
val print_space : unit -> unit

pp_print_space ppf () emits a 'space' break hint: the pretty-printer may split the line at this point, otherwise it prints one space.

pp_print_space ppf () is equivalent to pp_print_break ppf 1 0.

val pp_print_cut : formatter -> unit -> unit
val print_cut : unit -> unit

pp_print_cut ppf () emits a 'cut' break hint: the pretty-printer may split the line at this point, otherwise it prints nothing.

pp_print_cut ppf () is equivalent to pp_print_break ppf 0 0.

val pp_print_break : formatter -> int -> int -> unit
val print_break : int -> int -> unit

pp_print_break ppf nspaces offset emits a 'full' break hint: the pretty-printer may split the line at this point, otherwise it prints nspaces spaces.

If the pretty-printer splits the line, offset is added to the current indentation.

val pp_print_custom_break : + formatter -> + fits:(string * int * string) -> + breaks:(string * int * string) -> + unit

pp_print_custom_break ppf ~fits:(s1, n, s2) ~breaks:(s3, m, s4) emits a custom break hint: the pretty-printer may split the line at this point.

If it does not split the line, then the s1 is emitted, then n spaces, then s2.

If it splits the line, then it emits the s3 string, then an indent (according to the box rules), then an offset of m spaces, then the s4 string.

While n and m are handled by formatter_out_functions.out_indent, the strings will be handled by formatter_out_functions.out_string. This allows for a custom formatter that handles indentation distinctly, for example, outputs <br/> tags or &nbsp; entities.

The custom break is useful if you want to change which visible (non-whitespace) characters are printed in case of break or no break. For example, when printing a list [a; b; c] , you might want to add a trailing semicolon when it is printed vertically:

[
+  a;
+  b;
+  c;
+]

You can do this as follows:

printf "@[<v 0>[@;<0 2>@[<v 0>a;@,b;@,c@]%t]@]@\n"
+  (pp_print_custom_break ~fits:("", 0, "") ~breaks:(";", 0, ""))
  • since 4.08
val pp_force_newline : formatter -> unit -> unit
val force_newline : unit -> unit

Force a new line in the current pretty-printing box.

The pretty-printer must split the line at this point,

Not the normal way of pretty-printing, since imperative line splitting may interfere with current line counters and box size calculation. Using break hints within an enclosing vertical box is a better alternative.

val pp_print_if_newline : formatter -> unit -> unit
val print_if_newline : unit -> unit

Execute the next formatting command if the preceding line has just been split. Otherwise, ignore the next formatting command.

Pretty-printing termination

val pp_print_flush : formatter -> unit -> unit
val print_flush : unit -> unit

End of pretty-printing: resets the pretty-printer to initial state.

All open pretty-printing boxes are closed, all pending text is printed. In addition, the pretty-printer low level output device is flushed to ensure that all pending text is really displayed.

Note: never use print_flush in the normal course of a pretty-printing routine, since the pretty-printer uses a complex buffering machinery to properly indent the output; manually flushing those buffers at random would conflict with the pretty-printer strategy and result to poor rendering.

Only consider using print_flush when displaying all pending material is mandatory (for instance in case of interactive use when you want the user to read some text) and when resetting the pretty-printer state will not disturb further pretty-printing.

Warning: If the output device of the pretty-printer is an output channel, repeated calls to print_flush means repeated calls to Stdlib.flush to flush the out channel; these explicit flush calls could foil the buffering strategy of output channels and could dramatically impact efficiency.

val pp_print_newline : formatter -> unit -> unit
val print_newline : unit -> unit

End of pretty-printing: resets the pretty-printer to initial state.

All open pretty-printing boxes are closed, all pending text is printed.

Equivalent to print_flush with a new line emitted on the pretty-printer low-level output device immediately before the device is flushed. See corresponding words of caution for print_flush.

Note: this is not the normal way to output a new line; the preferred method is using break hints within a vertical pretty-printing box.

Margin

val pp_set_margin : formatter -> int -> unit
val set_margin : int -> unit

pp_set_margin ppf d sets the right margin to d (in characters): the pretty-printer splits lines that overflow the right margin according to the break hints given. Setting the margin to d means that the formatting engine aims at printing at most d-1 characters per line. Nothing happens if d is smaller than 2. If d is too large, the right margin is set to the maximum admissible value (which is greater than 10 ^ 9). If d is less than the current maximum indentation limit, the maximum indentation limit is decreased while trying to preserve a minimal ratio max_indent/margin>=50% and if possible the current difference margin - max_indent.

See also pp_set_geometry.

val pp_get_margin : formatter -> unit -> int
val get_margin : unit -> int

Returns the position of the right margin.

Maximum indentation limit

val pp_set_max_indent : formatter -> int -> unit
val set_max_indent : int -> unit

pp_set_max_indent ppf d sets the maximum indentation limit of lines to d (in characters): once this limit is reached, new pretty-printing boxes are rejected to the left, unless the enclosing box fully fits on the current line. As an illustration,

set_margin 10; set_max_indent 5; printf "@[123456@[7@]89A@]@." 

yields

123456
+789A

because the nested box "@[7@]" is opened after the maximum indentation limit (7>5) and its parent box does not fit on the current line. Either decreasing the length of the parent box to make it fit on a line:

printf "@[123456@[7@]89@]@." 

or opening an intermediary box before the maximum indentation limit which fits on the current line

printf "@[123@[456@[7@]89@]A@]@." 

avoids the rejection to the left of the inner boxes and print respectively "123456789" and "123456789A" . Note also that vertical boxes never fit on a line whereas horizontal boxes always fully fit on the current line. Opening a box may split a line whereas the contents may have fit. If this behavior is problematic, it can be curtailed by setting the maximum indentation limit to margin - 1. Note that setting the maximum indentation limit to margin is invalid.

Nothing happens if d is smaller than 2.

If d is too large, the limit is set to the maximum admissible value (which is greater than 10 ^ 9).

If d is greater or equal than the current margin, it is ignored, and the current maximum indentation limit is kept.

See also pp_set_geometry.

val pp_get_max_indent : formatter -> unit -> int
val get_max_indent : unit -> int

Return the maximum indentation limit (in characters).

Geometry

Geometric functions can be used to manipulate simultaneously the coupled variables, margin and maximum indentation limit.

type geometry = {
  1. max_indent : int;
  2. margin : int;
}
  • since 4.08
val check_geometry : geometry -> bool

Check if the formatter geometry is valid: 1 < max_indent < margin

  • since 4.08
val pp_set_geometry : formatter -> max_indent:int -> margin:int -> unit
val set_geometry : max_indent:int -> margin:int -> unit
val pp_safe_set_geometry : formatter -> max_indent:int -> margin:int -> unit
val safe_set_geometry : max_indent:int -> margin:int -> unit

pp_set_geometry ppf ~max_indent ~margin sets both the margin and maximum indentation limit for ppf.

When 1 < max_indent < margin, pp_set_geometry ppf ~max_indent ~margin is equivalent to pp_set_margin ppf margin; pp_set_max_indent ppf max_indent; and avoids the subtly incorrect pp_set_max_indent ppf max_indent; pp_set_margin ppf margin;

Outside of this domain, pp_set_geometry raises an invalid argument exception whereas pp_safe_set_geometry does nothing.

  • since 4.08
val pp_update_geometry : formatter -> (geometry -> geometry) -> unit

pp_update_geometry ppf (fun geo -> { geo with ... }) lets you update a formatter's geometry in a way that is robust to extension of the geometry record with new fields.

Raises an invalid argument exception if the returned geometry does not satisfy check_geometry.

  • since 4.11
val update_geometry : (geometry -> geometry) -> unit
val pp_get_geometry : formatter -> unit -> geometry
val get_geometry : unit -> geometry

Return the current geometry of the formatter

  • since 4.08

Maximum formatting depth

The maximum formatting depth is the maximum number of pretty-printing boxes simultaneously open.

Material inside boxes nested deeper is printed as an ellipsis (more precisely as the text returned by get_ellipsis_text ()).

val pp_set_max_boxes : formatter -> int -> unit
val set_max_boxes : int -> unit

pp_set_max_boxes ppf max sets the maximum number of pretty-printing boxes simultaneously open.

Material inside boxes nested deeper is printed as an ellipsis (more precisely as the text returned by get_ellipsis_text ()).

Nothing happens if max is smaller than 2.

val pp_get_max_boxes : formatter -> unit -> int
val get_max_boxes : unit -> int

Returns the maximum number of pretty-printing boxes allowed before ellipsis.

val pp_over_max_boxes : formatter -> unit -> bool
val over_max_boxes : unit -> bool

Tests if the maximum number of pretty-printing boxes allowed have already been opened.

Tabulation boxes

A tabulation box prints material on lines divided into cells of fixed length. A tabulation box provides a simple way to display vertical columns of left adjusted text.

This box features command set_tab to define cell boundaries, and command print_tab to move from cell to cell and split the line when there is no more cells to print on the line.

Note: printing within tabulation box is line directed, so arbitrary line splitting inside a tabulation box leads to poor rendering. Yet, controlled use of tabulation boxes allows simple printing of columns within module Format.

val pp_open_tbox : formatter -> unit -> unit
val open_tbox : unit -> unit

open_tbox () opens a new tabulation box.

This box prints lines separated into cells of fixed width.

Inside a tabulation box, special tabulation markers defines points of interest on the line (for instance to delimit cell boundaries). Function Format.set_tab sets a tabulation marker at insertion point.

A tabulation box features specific tabulation breaks to move to next tabulation marker or split the line. Function Format.print_tbreak prints a tabulation break.

val pp_close_tbox : formatter -> unit -> unit
val close_tbox : unit -> unit

Closes the most recently opened tabulation box.

val pp_set_tab : formatter -> unit -> unit
val set_tab : unit -> unit

Sets a tabulation marker at current insertion point.

val pp_print_tab : formatter -> unit -> unit
val print_tab : unit -> unit

print_tab () emits a 'next' tabulation break hint: if not already set on a tabulation marker, the insertion point moves to the first tabulation marker on the right, or the pretty-printer splits the line and insertion point moves to the leftmost tabulation marker.

It is equivalent to print_tbreak 0 0.

val pp_print_tbreak : formatter -> int -> int -> unit
val print_tbreak : int -> int -> unit

print_tbreak nspaces offset emits a 'full' tabulation break hint.

If not already set on a tabulation marker, the insertion point moves to the first tabulation marker on the right and the pretty-printer prints nspaces spaces.

If there is no next tabulation marker on the right, the pretty-printer splits the line at this point, then insertion point moves to the leftmost tabulation marker of the box.

If the pretty-printer splits the line, offset is added to the current indentation.

Ellipsis

val pp_set_ellipsis_text : formatter -> string -> unit
val set_ellipsis_text : string -> unit

Set the text of the ellipsis printed when too many pretty-printing boxes are open (a single dot, ., by default).

val pp_get_ellipsis_text : formatter -> unit -> string
val get_ellipsis_text : unit -> string

Return the text of the ellipsis.

Semantic tags

type stag = ..

Semantic tags (or simply tags) are user's defined annotations to associate user's specific operations to printed entities.

Common usage of semantic tags is text decoration to get specific font or text size rendering for a display device, or marking delimitation of entities (e.g. HTML or TeX elements or terminal escape sequences). More sophisticated usage of semantic tags could handle dynamic modification of the pretty-printer behavior to properly print the material within some specific tags. For instance, we can define an RGB tag like so:

type stag += RGB of {r:int;g:int;b:int}

In order to properly delimit printed entities, a semantic tag must be opened before and closed after the entity. Semantic tags must be properly nested like parentheses using pp_open_stag and pp_close_stag.

Tag specific operations occur any time a tag is opened or closed, At each occurrence, two kinds of operations are performed tag-marking and tag-printing:

  • The tag-marking operation is the simpler tag specific operation: it simply writes a tag specific string into the output device of the formatter. Tag-marking does not interfere with line-splitting computation.
  • The tag-printing operation is the more involved tag specific operation: it can print arbitrary material to the formatter. Tag-printing is tightly linked to the current pretty-printer operations.

Roughly speaking, tag-marking is commonly used to get a better rendering of texts in the rendering device, while tag-printing allows fine tuning of printing routines to print the same entity differently according to the semantic tags (i.e. print additional material or even omit parts of the output).

More precisely: when a semantic tag is opened or closed then both and successive 'tag-printing' and 'tag-marking' operations occur:

  • Tag-printing a semantic tag means calling the formatter specific function print_open_stag (resp. print_close_stag) with the name of the tag as argument: that tag-printing function can then print any regular material to the formatter (so that this material is enqueued as usual in the formatter queue for further line splitting computation).
  • Tag-marking a semantic tag means calling the formatter specific function mark_open_stag (resp. mark_close_stag) with the name of the tag as argument: that tag-marking function can then return the 'tag-opening marker' (resp. `tag-closing marker') for direct output into the output device of the formatter.

Being written directly into the output device of the formatter, semantic tag marker strings are not considered as part of the printing material that drives line splitting (in other words, the length of the strings corresponding to tag markers is considered as zero for line splitting).

Thus, semantic tag handling is in some sense transparent to pretty-printing and does not interfere with usual indentation. Hence, a single pretty-printing routine can output both simple 'verbatim' material or richer decorated output depending on the treatment of tags. By default, tags are not active, hence the output is not decorated with tag information. Once set_tags is set to true, the pretty-printer engine honors tags and decorates the output accordingly.

Default tag-marking functions behave the HTML way: string tags are enclosed in "<" and ">" while other tags are ignored; hence, opening marker for tag string "t" is "<t>" and closing marker is "</t>".

Default tag-printing functions just do nothing.

Tag-marking and tag-printing functions are user definable and can be set by calling set_formatter_stag_functions.

Semantic tag operations may be set on or off with set_tags. Tag-marking operations may be set on or off with set_mark_tags. Tag-printing operations may be set on or off with set_print_tags.

  • since 4.08
type tag = string
type stag +=
  1. | String_tag of tag
    (*

    String_tag s is a string tag s. String tags can be inserted either by explicitly using the constructor String_tag or by using the dedicated format syntax "@{<s> ... @}".

    • since 4.08
    *)
val pp_open_stag : formatter -> stag -> unit
val open_stag : stag -> unit

pp_open_stag ppf t opens the semantic tag named t.

The print_open_stag tag-printing function of the formatter is called with t as argument; then the opening tag marker for t, as given by mark_open_stag t, is written into the output device of the formatter.

  • since 4.08
val pp_close_stag : formatter -> unit -> unit
val close_stag : unit -> unit

pp_close_stag ppf () closes the most recently opened semantic tag t.

The closing tag marker, as given by mark_close_stag t, is written into the output device of the formatter; then the print_close_stag tag-printing function of the formatter is called with t as argument.

  • since 4.08
val pp_set_tags : formatter -> bool -> unit
val set_tags : bool -> unit

pp_set_tags ppf b turns on or off the treatment of semantic tags (default is off).

val pp_set_print_tags : formatter -> bool -> unit
val set_print_tags : bool -> unit

pp_set_print_tags ppf b turns on or off the tag-printing operations.

val pp_set_mark_tags : formatter -> bool -> unit
val set_mark_tags : bool -> unit

pp_set_mark_tags ppf b turns on or off the tag-marking operations.

val pp_get_print_tags : formatter -> unit -> bool
val get_print_tags : unit -> bool

Return the current status of tag-printing operations.

val pp_get_mark_tags : formatter -> unit -> bool
val get_mark_tags : unit -> bool

Return the current status of tag-marking operations.

val pp_set_formatter_out_channel : formatter -> out_channel -> unit

Redirecting the standard formatter output

val set_formatter_out_channel : out_channel -> unit

Redirect the standard pretty-printer output to the given channel. (All the output functions of the standard formatter are set to the default output functions printing to the given channel.)

set_formatter_out_channel is equivalent to pp_set_formatter_out_channel std_formatter.

val pp_set_formatter_output_functions : + formatter -> + (string -> int -> int -> unit) -> + (unit -> unit) -> + unit
val set_formatter_output_functions : + (string -> int -> int -> unit) -> + (unit -> unit) -> + unit

pp_set_formatter_output_functions ppf out flush redirects the standard pretty-printer output functions to the functions out and flush.

The out function performs all the pretty-printer string output. It is called with a string s, a start position p, and a number of characters n; it is supposed to output characters p to p + n - 1 of s.

The flush function is called whenever the pretty-printer is flushed (via conversion %!, or pretty-printing indications @? or @., or using low level functions print_flush or print_newline).

val pp_get_formatter_output_functions : + formatter -> + unit -> + (string -> int -> int -> unit) * (unit -> unit)
val get_formatter_output_functions : + unit -> + (string -> int -> int -> unit) * (unit -> unit)

Return the current output functions of the standard pretty-printer.

Redefining formatter output

The Format module is versatile enough to let you completely redefine the meaning of pretty-printing output: you may provide your own functions to define how to handle indentation, line splitting, and even printing of all the characters that have to be printed!

Redefining output functions

type formatter_out_functions = {
  1. out_string : string -> int -> int -> unit;
  2. out_flush : unit -> unit;
  3. out_newline : unit -> unit;
  4. out_spaces : int -> unit;
  5. out_indent : int -> unit;
    (*
    • since 4.06
    *)
}

The set of output functions specific to a formatter:

  • the out_string function performs all the pretty-printer string output. It is called with a string s, a start position p, and a number of characters n; it is supposed to output characters p to p + n - 1 of s.
  • the out_flush function flushes the pretty-printer output device.
  • out_newline is called to open a new line when the pretty-printer splits the line.
  • the out_spaces function outputs spaces when a break hint leads to spaces instead of a line split. It is called with the number of spaces to output.
  • the out_indent function performs new line indentation when the pretty-printer splits the line. It is called with the indentation value of the new line.

By default:

  • fields out_string and out_flush are output device specific; (e.g. Stdlib.output_string and Stdlib.flush for a Stdlib.out_channel device, or Buffer.add_substring and Stdlib.ignore for a Buffer.t output device),
  • field out_newline is equivalent to out_string "\n" 0 1;
  • fields out_spaces and out_indent are equivalent to out_string (String.make n ' ') 0 n.
  • since 4.01
val pp_set_formatter_out_functions : + formatter -> + formatter_out_functions -> + unit
val set_formatter_out_functions : formatter_out_functions -> unit

pp_set_formatter_out_functions ppf out_funs Set all the pretty-printer output functions of ppf to those of argument out_funs,

This way, you can change the meaning of indentation (which can be something else than just printing space characters) and the meaning of new lines opening (which can be connected to any other action needed by the application at hand).

Reasonable defaults for functions out_spaces and out_newline are respectively out_funs.out_string (String.make n ' ') 0 n and out_funs.out_string "\n" 0 1.

  • since 4.01
val pp_get_formatter_out_functions : + formatter -> + unit -> + formatter_out_functions
val get_formatter_out_functions : unit -> formatter_out_functions

Return the current output functions of the pretty-printer, including line splitting and indentation functions. Useful to record the current setting and restore it afterwards.

  • since 4.01

Redefining semantic tag operations

type formatter_stag_functions = {
  1. mark_open_stag : stag -> string;
  2. mark_close_stag : stag -> string;
  3. print_open_stag : stag -> unit;
  4. print_close_stag : stag -> unit;
}

The semantic tag handling functions specific to a formatter: mark versions are the 'tag-marking' functions that associate a string marker to a tag in order for the pretty-printing engine to write those markers as 0 length tokens in the output device of the formatter. print versions are the 'tag-printing' functions that can perform regular printing when a tag is closed or opened.

  • since 4.08
val pp_set_formatter_stag_functions : + formatter -> + formatter_stag_functions -> + unit
val set_formatter_stag_functions : formatter_stag_functions -> unit

pp_set_formatter_stag_functions ppf tag_funs changes the meaning of opening and closing semantic tag operations to use the functions in tag_funs when printing on ppf.

When opening a semantic tag with name t, the string t is passed to the opening tag-marking function (the mark_open_stag field of the record tag_funs), that must return the opening tag marker for that name. When the next call to close_stag () happens, the semantic tag name t is sent back to the closing tag-marking function (the mark_close_stag field of record tag_funs), that must return a closing tag marker for that name.

The print_ field of the record contains the tag-printing functions that are called at tag opening and tag closing time, to output regular material in the pretty-printer queue.

  • since 4.08
val pp_get_formatter_stag_functions : + formatter -> + unit -> + formatter_stag_functions
val get_formatter_stag_functions : unit -> formatter_stag_functions

Return the current semantic tag operation functions of the standard pretty-printer.

  • since 4.08

Defining formatters

Defining new formatters permits unrelated output of material in parallel on several output devices. All the parameters of a formatter are local to the formatter: right margin, maximum indentation limit, maximum number of pretty-printing boxes simultaneously open, ellipsis, and so on, are specific to each formatter and may be fixed independently.

For instance, given a Buffer.t buffer b, formatter_of_buffer b returns a new formatter using buffer b as its output device. Similarly, given a Stdlib.out_channel output channel oc, formatter_of_out_channel oc returns a new formatter using channel oc as its output device.

Alternatively, given out_funs, a complete set of output functions for a formatter, then formatter_of_out_functions out_funs computes a new formatter using those functions for output.

val formatter_of_out_channel : out_channel -> formatter

formatter_of_out_channel oc returns a new formatter writing to the corresponding output channel oc.

val synchronized_formatter_of_out_channel : + out_channel -> + formatter Domain.DLS.key

synchronized_formatter_of_out_channel oc returns the key to the domain-local state that holds the domain-local formatter for writing to the corresponding output channel oc.

When the formatter is used with multiple domains, the output from the domains will be interleaved with each other at points where the formatter is flushed, such as with print_flush.

  • alert unstable
val std_formatter : formatter

The initial domain's standard formatter to write to standard output.

It is defined as formatter_of_out_channel Stdlib.stdout.

val get_std_formatter : unit -> formatter

get_std_formatter () returns the current domain's standard formatter used to write to standard output.

  • since 5.0
val err_formatter : formatter

The initial domain's formatter to write to standard error.

It is defined as formatter_of_out_channel Stdlib.stderr.

val get_err_formatter : unit -> formatter

get_err_formatter () returns the current domain's formatter used to write to standard error.

  • since 5.0
val formatter_of_buffer : Buffer.t -> formatter

formatter_of_buffer b returns a new formatter writing to buffer b. At the end of pretty-printing, the formatter must be flushed using pp_print_flush or pp_print_newline, to print all the pending material into the buffer.

val stdbuf : Buffer.t

The initial domain's string buffer in which str_formatter writes.

val get_stdbuf : unit -> Buffer.t

get_stdbuf () returns the current domain's string buffer in which the current domain's string formatter writes.

  • since 5.0
val str_formatter : formatter

The initial domain's formatter to output to the stdbuf string buffer.

str_formatter is defined as formatter_of_buffer stdbuf.

val get_str_formatter : unit -> formatter

The current domain's formatter to output to the current domains string buffer.

  • since 5.0
val flush_str_formatter : unit -> string

Returns the material printed with str_formatter of the current domain, flushes the formatter and resets the corresponding buffer.

val make_formatter : + (string -> int -> int -> unit) -> + (unit -> unit) -> + formatter

make_formatter out flush returns a new formatter that outputs with function out, and flushes with function flush.

For instance,

make_formatter
+  (Stdlib.output oc)
+  (fun () -> Stdlib.flush oc)

returns a formatter to the Stdlib.out_channel oc.

val make_synchronized_formatter : + (string -> int -> int -> unit) -> + (unit -> unit) -> + formatter Domain.DLS.key

make_synchronized_formatter out flush returns the key to the domain-local state that holds the domain-local formatter that outputs with function out, and flushes with function flush.

When the formatter is used with multiple domains, the output from the domains will be interleaved with each other at points where the formatter is flushed, such as with print_flush.

  • since 5.0
  • alert unstable
val formatter_of_out_functions : formatter_out_functions -> formatter

formatter_of_out_functions out_funs returns a new formatter that writes with the set of output functions out_funs.

See definition of type formatter_out_functions for the meaning of argument out_funs.

  • since 4.06

Symbolic pretty-printing

Symbolic pretty-printing is pretty-printing using a symbolic formatter, i.e. a formatter that outputs symbolic pretty-printing items.

When using a symbolic formatter, all regular pretty-printing activities occur but output material is symbolic and stored in a buffer of output items. At the end of pretty-printing, flushing the output buffer allows post-processing of symbolic output before performing low level output operations.

In practice, first define a symbolic output buffer b using:

  • let sob = make_symbolic_output_buffer (). Then define a symbolic formatter with:
  • let ppf = formatter_of_symbolic_output_buffer sob

Use symbolic formatter ppf as usual, and retrieve symbolic items at end of pretty-printing by flushing symbolic output buffer sob with:

  • flush_symbolic_output_buffer sob.
type symbolic_output_item =
  1. | Output_flush
    (*

    symbolic flush command

    *)
  2. | Output_newline
    (*

    symbolic newline command

    *)
  3. | Output_string of string
    (*

    Output_string s: symbolic output for string s

    *)
  4. | Output_spaces of int
    (*

    Output_spaces n: symbolic command to output n spaces

    *)
  5. | Output_indent of int
    (*

    Output_indent i: symbolic indentation of size i

    *)

Items produced by symbolic pretty-printers

  • since 4.06
type symbolic_output_buffer

The output buffer of a symbolic pretty-printer.

  • since 4.06
val make_symbolic_output_buffer : unit -> symbolic_output_buffer

make_symbolic_output_buffer () returns a fresh buffer for symbolic output.

  • since 4.06
val clear_symbolic_output_buffer : symbolic_output_buffer -> unit

clear_symbolic_output_buffer sob resets buffer sob.

  • since 4.06
val get_symbolic_output_buffer : + symbolic_output_buffer -> + symbolic_output_item list

get_symbolic_output_buffer sob returns the contents of buffer sob.

  • since 4.06
val flush_symbolic_output_buffer : + symbolic_output_buffer -> + symbolic_output_item list

flush_symbolic_output_buffer sob returns the contents of buffer sob and resets buffer sob. flush_symbolic_output_buffer sob is equivalent to let items = get_symbolic_output_buffer sob in + clear_symbolic_output_buffer sob; items

  • since 4.06
val add_symbolic_output_item : + symbolic_output_buffer -> + symbolic_output_item -> + unit

add_symbolic_output_item sob itm adds item itm to buffer sob.

  • since 4.06
val formatter_of_symbolic_output_buffer : symbolic_output_buffer -> formatter

formatter_of_symbolic_output_buffer sob returns a symbolic formatter that outputs to symbolic_output_buffer sob.

  • since 4.06

Convenience formatting functions.

val pp_print_iter : + ?pp_sep:(formatter -> unit -> unit) -> + (('a -> unit) -> 'b -> unit) -> + (formatter -> 'a -> unit) -> + formatter -> + 'b -> + unit

pp_print_iter ~pp_sep iter pp_v ppf v formats on ppf the iterations of iter over a collection v of values using pp_v. Iterations are separated by pp_sep (defaults to pp_print_cut).

  • since 5.1
val pp_print_list : + ?pp_sep:(formatter -> unit -> unit) -> + (formatter -> 'a -> unit) -> + formatter -> + 'a list -> + unit

pp_print_list ?pp_sep pp_v ppf l prints items of list l, using pp_v to print each item, and calling pp_sep between items (pp_sep defaults to pp_print_cut). Does nothing on empty lists.

  • since 4.02
val pp_print_array : + ?pp_sep:(formatter -> unit -> unit) -> + (formatter -> 'a -> unit) -> + formatter -> + 'a array -> + unit

pp_print_array ?pp_sep pp_v ppf a prints items of array a, using pp_v to print each item, and calling pp_sep between items (pp_sep defaults to pp_print_cut). Does nothing on empty arrays.

If a is mutated after pp_print_array is called, the printed values may not be what is expected because Format can delay the printing. This can be avoided by flushing ppf.

  • since 5.1
val pp_print_seq : + ?pp_sep:(formatter -> unit -> unit) -> + (formatter -> 'a -> unit) -> + formatter -> + 'a Seq.t -> + unit

pp_print_seq ?pp_sep pp_v ppf s prints items of sequence s, using pp_v to print each item, and calling pp_sep between items (pp_sep defaults to pp_print_cut. Does nothing on empty sequences.

This function does not terminate on infinite sequences.

  • since 4.12
val pp_print_text : formatter -> string -> unit

pp_print_text ppf s prints s with spaces and newlines respectively printed using pp_print_space and pp_force_newline.

  • since 4.02
val pp_print_option : + ?none:(formatter -> unit -> unit) -> + (formatter -> 'a -> unit) -> + formatter -> + 'a option -> + unit

pp_print_option ?none pp_v ppf o prints o on ppf using pp_v if o is Some v and none if it is None. none prints nothing by default.

  • since 4.08
val pp_print_result : + ok:(formatter -> 'a -> unit) -> + error:(formatter -> 'e -> unit) -> + formatter -> + ('a, 'e) result -> + unit

pp_print_result ~ok ~error ppf r prints r on ppf using ok if r is Ok _ and error if r is Error _.

  • since 4.08
val pp_print_either : + left:(formatter -> 'a -> unit) -> + right:(formatter -> 'b -> unit) -> + formatter -> + ('a, 'b) Either.t -> + unit

pp_print_either ~left ~right ppf e prints e on ppf using left if e is Either.Left _ and right if e is Either.Right _.

  • since 4.13

Formatted pretty-printing

Module Format provides a complete set of printf like functions for pretty-printing using format string specifications.

Specific annotations may be added in the format strings to give pretty-printing commands to the pretty-printing engine.

Those annotations are introduced in the format strings using the @ character. For instance, @ means a space break, @, means a cut, @[ opens a new box, and @] closes the last open box.

val fprintf : formatter -> ('a, formatter, unit) format -> 'a

fprintf ff fmt arg1 ... argN formats the arguments arg1 to argN according to the format string fmt, and outputs the resulting string on the formatter ff.

The format string fmt is a character string which contains three types of objects: plain characters and conversion specifications as specified in the Printf module, and pretty-printing indications specific to the Format module.

The pretty-printing indication characters are introduced by a @ character, and their meanings are:

  • @[: open a pretty-printing box. The type and offset of the box may be optionally specified with the following syntax: the < character, followed by an optional box type indication, then an optional integer offset, and the closing > character. Pretty-printing box type is one of h, v, hv, b, or hov. 'h' stands for an 'horizontal' pretty-printing box, 'v' stands for a 'vertical' pretty-printing box, 'hv' stands for an 'horizontal/vertical' pretty-printing box, 'b' stands for an 'horizontal-or-vertical' pretty-printing box demonstrating indentation, 'hov' stands a simple 'horizontal-or-vertical' pretty-printing box. For instance, @[<hov 2> opens an 'horizontal-or-vertical' pretty-printing box with indentation 2 as obtained with open_hovbox 2. For more details about pretty-printing boxes, see the various box opening functions open_*box.
  • @]: close the most recently opened pretty-printing box.
  • @,: output a 'cut' break hint, as with print_cut ().
  • @ : output a 'space' break hint, as with print_space ().
  • @;: output a 'full' break hint as with print_break. The nspaces and offset parameters of the break hint may be optionally specified with the following syntax: the < character, followed by an integer nspaces value, then an integer offset, and a closing > character. If no parameters are provided, the full break defaults to a 'space' break hint.
  • @.: flush the pretty-printer and split the line, as with print_newline ().
  • @<n>: print the following item as if it were of length n. Hence, printf "@<0>%s" arg prints arg as a zero length string. If @<n> is not followed by a conversion specification, then the following character of the format is printed as if it were of length n.
  • @\{: open a semantic tag. The name of the tag may be optionally specified with the following syntax: the < character, followed by an optional string specification, and the closing > character. The string specification is any character string that does not contain the closing character '>'. If omitted, the tag name defaults to the empty string. For more details about semantic tags, see the functions open_stag and close_stag.
  • @\}: close the most recently opened semantic tag.
  • @?: flush the pretty-printer as with print_flush (). This is equivalent to the conversion %!.
  • @\n: force a newline, as with force_newline (), not the normal way of pretty-printing, you should prefer using break hints inside a vertical pretty-printing box.

Note: To prevent the interpretation of a @ character as a pretty-printing indication, escape it with a % character. Old quotation mode @@ is deprecated since it is not compatible with formatted input interpretation of character '@'.

Example: printf "@[%s@ %d@]@." "x =" 1 is equivalent to open_box (); print_string "x ="; print_space (); + print_int 1; close_box (); print_newline (). It prints x = 1 within a pretty-printing 'horizontal-or-vertical' box.

val printf : ('a, formatter, unit) format -> 'a

Same as fprintf above, but output on get_std_formatter ().

It is defined similarly to fun fmt -> fprintf (get_std_formatter ()) fmt but delays calling get_std_formatter until after the final argument required by the format is received. When used with multiple domains, the output from the domains will be interleaved with each other at points where the formatter is flushed, such as with print_flush.

val eprintf : ('a, formatter, unit) format -> 'a

Same as fprintf above, but output on get_err_formatter ().

It is defined similarly to fun fmt -> fprintf (get_err_formatter ()) fmt but delays calling get_err_formatter until after the final argument required by the format is received. When used with multiple domains, the output from the domains will be interleaved with each other at points where the formatter is flushed, such as with print_flush.

val sprintf : ('a, unit, string) format -> 'a

Same as printf above, but instead of printing on a formatter, returns a string containing the result of formatting the arguments. Note that the pretty-printer queue is flushed at the end of each call to sprintf. Note that if your format string contains a %a, you should use asprintf.

In case of multiple and related calls to sprintf to output material on a single string, you should consider using fprintf with the predefined formatter str_formatter and call flush_str_formatter () to get the final result.

Alternatively, you can use Format.fprintf with a formatter writing to a buffer of your own: flushing the formatter and the buffer at the end of pretty-printing returns the desired string.

val asprintf : ('a, formatter, unit, string) format4 -> 'a

Same as printf above, but instead of printing on a formatter, returns a string containing the result of formatting the arguments. The type of asprintf is general enough to interact nicely with %a conversions.

  • since 4.01
val dprintf : ('a, formatter, unit, formatter -> unit) format4 -> 'a

Same as fprintf, except the formatter is the last argument. dprintf "..." a b c is a function of type formatter -> unit which can be given to a format specifier %t.

This can be used as a replacement for asprintf to delay formatting decisions. Using the string returned by asprintf in a formatting context forces formatting decisions to be taken in isolation, and the final string may be created prematurely. dprintf allows delay of formatting decisions until the final formatting context is known. For example:

let t = Format.dprintf "%i@ %i@ %i" 1 2 3 in
+...
+Format.printf "@[<v>%t@]" t
  • since 4.08
val ifprintf : formatter -> ('a, formatter, unit) format -> 'a

Same as fprintf above, but does not print anything. Useful to ignore some material when conditionally printing.

  • since 3.10

Formatted Pretty-Printing with continuations.

val kfprintf : + (formatter -> 'a) -> + formatter -> + ('b, formatter, unit, 'a) format4 -> + 'b

Same as fprintf above, but instead of returning immediately, passes the formatter to its first argument at the end of printing.

val kdprintf : + ((formatter -> unit) -> 'a) -> + ('b, formatter, unit, 'a) format4 -> + 'b

Same as dprintf above, but instead of returning immediately, passes the suspended printer to its first argument at the end of printing.

  • since 4.08
val ikfprintf : + (formatter -> 'a) -> + formatter -> + ('b, formatter, unit, 'a) format4 -> + 'b

Same as kfprintf above, but does not print anything. Useful to ignore some material when conditionally printing.

  • since 3.12
val ksprintf : (string -> 'a) -> ('b, unit, string, 'a) format4 -> 'b

Same as sprintf above, but instead of returning the string, passes it to the first argument.

val kasprintf : (string -> 'a) -> ('b, formatter, unit, 'a) format4 -> 'b

Same as asprintf above, but instead of returning the string, passes it to the first argument.

  • since 4.03

Examples

A few warmup examples to get an idea of how Format is used.

We have a list l of pairs (int * bool), which the toplevel prints for us:

# let l = List.init 20 (fun n -> n, n mod 2 = 0)
+val l : (int * bool) list =
+[(0, true); (1, false); (2, true); (3, false); (4, true); (5, false);
+ (6, true); (7, false); (8, true); (9, false); (10, true); (11, false);
+ (12, true); (13, false); (14, true); (15, false); (16, true); (17, false);
+ (18, true); (19, false)]

If we want to print it ourself without the toplevel magic, we can try this:

# let pp_pair out (x,y) = Format.fprintf out "(%d, %b)" x y
+val pp_pair : Format.formatter -> int * bool -> unit = <fun>
+# Format.printf "l: [@[<hov>%a@]]@."
+  Format.(pp_print_list ~pp_sep:(fun out () -> fprintf out ";@ ") pp_pair) l
+  l: [(0, true); (1, false); (2, true); (3, false); (4, true); (5, false);
+      (6, true); (7, false); (8, true); (9, false); (10, true); (11, false);
+      (12, true); (13, false); (14, true); (15, false); (16, true);
+      (17, false); (18, true); (19, false)]

What this does, briefly, is:

  • pp_pair prints a pair bool*int surrounded in "(" ")". It takes a formatter (into which formatting happens), and the pair itself. When printing is done it returns ().
  • Format.printf "l = [@[<hov>%a@]]@." ... l is like printf, but with additional formatting instructions (denoted with "@"). The pair "@<hov>" and "@" is a "horizontal-or-vertical box".
  • "@." ends formatting with a newline. It is similar to "\n" but is also aware of the Format.formatter's state. Do not use "\n" with Format.
  • "%a" is a formatting instruction, like "%d" or "%s" for printf. However, where "%d" prints an integer and "%s" prints a string, "%a" takes a printer (of type Format.formatter -> 'a -> unit) and a value (of type 'a) and applies the printer to the value. This is key to compositionality of printers.
  • We build a list printer using Format.pp_print_list ~pp_sep:(...) pp_pair. pp_print_list takes an element printer and returns a list printer. The ?pp_sep optional argument, if provided, is called in between each element to print a separator.
  • Here, for a separator, we use (fun out () -> Format.fprintf out ";@ "). It prints ";", and then "@ " which is a breaking space (either it prints " ", or it prints a newline if the box is about to overflow). This "@ " is responsible for the list printing splitting into several lines.

If we omit "@ ", we get an ugly single-line print:

# Format.printf "l: [@[<hov>%a@]]@."
+      Format.(pp_print_list ~pp_sep:(fun out () -> fprintf out "; ") pp_pair) l
+  l: [(0, true); (1, false); (2, true); (* ... *); (18, true); (19, false)]
+- : unit = ()

Generally, it is good practice to define custom printers for important types in your program. If, for example, you were to define basic geometry types like so:

type point = {
+  x: float;
+  y: float;
+}
+
+type rectangle = {
+  ll: point; (* lower left *)
+  ur: point; (* upper right *)
+}

For debugging purpose, or to display information in logs, or on the console, it would be convenient to define printers for these types. Here is an example of to do it. Note that "%.3f" is a float printer up to 3 digits of precision after the dot; "%f" would print as many digits as required, which is somewhat verbose; "%h" is an hexadecimal float printer.

let pp_point out (p:point) =
+  Format.fprintf out "{ @[x=%.3f;@ y=%.3f@] }" p.x p.y
+
+let pp_rectangle out (r:rectangle) =
+  Format.fprintf out "{ @[ll=%a;@ ur=%a@] }"
+    pp_point r.ll pp_point r.ur

In the .mli file, we could have:

val pp_point : Format.formatter -> point -> unit
+
+val pp_rectangle : Format.formatter -> rectangle -> unit

These printers can now be used with "%a" inside other printers.

# Format.printf "some rectangle: %a@."
+      (Format.pp_print_option pp_rectangle)
+      (Some {ll={x=1.; y=2.}; ur={x=42.; y=500.12345}})
+some rectangle: { l={ x=1.000; y=2.000 }; ur={ x=42.000; y=500.123 } }
+
+# Format.printf "no rectangle: %a@."
+      (Format.pp_option pp_rectangle)
+      None
+no rectangle:

See how we combine pp_print_option (option printer) and our newly defined rectangle printer, like we did with pp_print_list earlier.

For a more extensive tutorial, see "Using the Format module".

A final note: the Format module is a starting point. The OCaml ecosystem has libraries that makes formatting easier and more expressive, with more combinators, more concise names, etc. An example of such a library is Fmt.

Automatic deriving of pretty-printers from type definitions is also possible, using https://github.com/ocaml-ppx/ppx_deriving or similar ppx derivers.

diff --git a/stdlib/Stdlib/Fun/index.html b/stdlib/Stdlib/Fun/index.html new file mode 100644 index 000000000..551ee34c1 --- /dev/null +++ b/stdlib/Stdlib/Fun/index.html @@ -0,0 +1,2 @@ + +Fun (docs.stdlib.Stdlib.Fun)

Module Stdlib.Fun

Function manipulation.

  • since 4.08

Combinators

val id : 'a -> 'a

id is the identity function. For any argument x, id x is x.

val const : 'a -> _ -> 'a

const c is a function that always returns the value c. For any argument x, (const c) x is c.

val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c

flip f reverses the argument order of the binary function f. For any arguments x and y, (flip f) x y is f y x.

val negate : ('a -> bool) -> 'a -> bool

negate p is the negation of the predicate function p. For any argument x, (negate p) x is not (p x).

Exception handling

val protect : finally:(unit -> unit) -> (unit -> 'a) -> 'a

protect ~finally work invokes work () and then finally () before work () returns with its value or an exception. In the latter case the exception is re-raised after finally (). If finally () raises an exception, then the exception Finally_raised is raised instead.

protect can be used to enforce local invariants whether work () returns normally or raises an exception. However, it does not protect against unexpected exceptions raised inside finally () such as Stdlib.Out_of_memory, Stdlib.Stack_overflow, or asynchronous exceptions raised by signal handlers (e.g. Sys.Break).

Note: It is a programming error if other kinds of exceptions are raised by finally, as any exception raised in work () will be lost in the event of a Finally_raised exception. Therefore, one should make sure to handle those inside the finally.

exception Finally_raised of exn

Finally_raised exn is raised by protect ~finally work when finally raises an exception exn. This exception denotes either an unexpected exception or a programming error. As a general rule, one should not catch a Finally_raised exception except as part of a catch-all handler.

diff --git a/stdlib/Stdlib/Gc/Memprof/index.html b/stdlib/Stdlib/Gc/Memprof/index.html new file mode 100644 index 000000000..5189b2c92 --- /dev/null +++ b/stdlib/Stdlib/Gc/Memprof/index.html @@ -0,0 +1,6 @@ + +Memprof (docs.stdlib.Stdlib.Gc.Memprof)

Module Gc.Memprof

Memprof is a sampling engine for allocated memory words. Every allocated word has a probability of being sampled equal to a configurable sampling rate. Once a block is sampled, it becomes tracked. A tracked block triggers a user-defined callback as soon as it is allocated, promoted or deallocated.

Since blocks are composed of several words, a block can potentially be sampled several times. If a block is sampled several times, then each of the callback is called once for each event of this block: the multiplicity is given in the n_samples field of the allocation structure.

This engine makes it possible to implement a low-overhead memory profiler as an OCaml library.

Note: this API is EXPERIMENTAL. It may change without prior notice.

type allocation_source =
  1. | Normal
  2. | Marshal
  3. | Custom
type allocation = private {
  1. n_samples : int;
    (*

    The number of samples in this block (>= 1).

    *)
  2. size : int;
    (*

    The size of the block, in words, excluding the header.

    *)
  3. source : allocation_source;
    (*

    The type of the allocation.

    *)
  4. callstack : Printexc.raw_backtrace;
    (*

    The callstack for the allocation.

    *)
}

The type of metadata associated with allocations. This is the type of records passed to the callback triggered by the sampling of an allocation.

type ('minor, 'major) tracker = {
  1. alloc_minor : allocation -> 'minor option;
  2. alloc_major : allocation -> 'major option;
  3. promote : 'minor -> 'major option;
  4. dealloc_minor : 'minor -> unit;
  5. dealloc_major : 'major -> unit;
}

A ('minor, 'major) tracker describes how memprof should track sampled blocks over their lifetime, keeping a user-defined piece of metadata for each of them: 'minor is the type of metadata to keep for minor blocks, and 'major the type of metadata for major blocks.

When using threads, it is guaranteed that allocation callbacks are always run in the thread where the allocation takes place.

If an allocation-tracking or promotion-tracking function returns None, memprof stops tracking the corresponding value.

val null_tracker : ('minor, 'major) tracker

Default callbacks simply return None or ()

val start : + sampling_rate:float -> + ?callstack_size:int -> + ('minor, 'major) tracker -> + unit

Start the sampling with the given parameters. Fails if sampling is already active.

The parameter sampling_rate is the sampling rate in samples per word (including headers). Usually, with cheap callbacks, a rate of 1e-4 has no visible effect on performance, and 1e-3 causes the program to run a few percent slower

The parameter callstack_size is the length of the callstack recorded at every sample. Its default is max_int.

The parameter tracker determines how to track sampled blocks over their lifetime in the minor and major heap.

Sampling is temporarily disabled when calling a callback for the current thread. So they do not need to be re-entrant if the program is single-threaded. However, if threads are used, it is possible that a context switch occurs during a callback, in this case the callback functions must be re-entrant.

Note that the callback can be postponed slightly after the actual event. The callstack passed to the callback is always accurate, but the program state may have evolved.

val stop : unit -> unit

Stop the sampling. Fails if sampling is not active.

This function does not allocate memory.

All the already tracked blocks are discarded. If there are pending postponed callbacks, they may be discarded.

Calling stop when a callback is running can lead to callbacks not being called even though some events happened.

diff --git a/stdlib/Stdlib/Gc/index.html b/stdlib/Stdlib/Gc/index.html new file mode 100644 index 000000000..34c6026cb --- /dev/null +++ b/stdlib/Stdlib/Gc/index.html @@ -0,0 +1,2 @@ + +Gc (docs.stdlib.Stdlib.Gc)

Module Stdlib.Gc

Memory management control and statistics; finalised values.

type stat = {
  1. minor_words : float;
    (*

    Number of words allocated in the minor heap since the program was started.

    *)
  2. promoted_words : float;
    (*

    Number of words allocated in the minor heap that survived a minor collection and were moved to the major heap since the program was started.

    *)
  3. major_words : float;
    (*

    Number of words allocated in the major heap, including the promoted words, since the program was started.

    *)
  4. minor_collections : int;
    (*

    Number of minor collections since the program was started.

    *)
  5. major_collections : int;
    (*

    Number of major collection cycles completed since the program was started.

    *)
  6. heap_words : int;
    (*

    Total size of the major heap, in words.

    *)
  7. heap_chunks : int;
    (*

    Number of contiguous pieces of memory that make up the major heap. This metrics is currently not available in OCaml 5: the field value is always 0.

    *)
  8. live_words : int;
    (*

    Number of words of live data in the major heap, including the header words.

    Note that "live" words refers to every word in the major heap that isn't currently known to be collectable, which includes words that have become unreachable by the program after the start of the previous gc cycle. It is typically much simpler and more predictable to call Gc.full_major (or Gc.compact) then computing gc stats, as then "live" words has the simple meaning of "reachable by the program". One caveat is that a single call to Gc.full_major will not reclaim values that have a finaliser from Gc.finalise (this does not apply to Gc.finalise_last). If this caveat matters, simply call Gc.full_major twice instead of once.

    *)
  9. live_blocks : int;
    (*

    Number of live blocks in the major heap.

    See live_words for a caveat about what "live" means.

    *)
  10. free_words : int;
    (*

    Number of words in the free list.

    *)
  11. free_blocks : int;
    (*

    Number of blocks in the free list. This metrics is currently not available in OCaml 5: the field value is always 0.

    *)
  12. largest_free : int;
    (*

    Size (in words) of the largest block in the free list. This metrics is currently not available in OCaml 5: the field value is always 0.

    *)
  13. fragments : int;
    (*

    Number of wasted words due to fragmentation. These are 1-words free blocks placed between two live blocks. They are not available for allocation.

    *)
  14. compactions : int;
    (*

    Number of heap compactions since the program was started.

    *)
  15. top_heap_words : int;
    (*

    Maximum size reached by the major heap, in words.

    *)
  16. stack_size : int;
    (*

    Current size of the stack, in words. This metrics is currently not available in OCaml 5: the field value is always 0.

    • since 3.12
    *)
  17. forced_major_collections : int;
    (*

    Number of forced full major collections completed since the program was started.

    • since 4.12
    *)
}

The memory management counters are returned in a stat record. These counters give values for the whole program.

The total amount of memory allocated by the program since it was started is (in words) minor_words + major_words - promoted_words. Multiply by the word size (4 on a 32-bit machine, 8 on a 64-bit machine) to get the number of bytes.

type control = {
  1. minor_heap_size : int;
    (*

    The size (in words) of the minor heap. Changing this parameter will trigger a minor collection. The total size of the minor heap used by this program is the sum of the heap sizes of the active domains. Default: 256k.

    *)
  2. major_heap_increment : int;
    (*

    How much to add to the major heap when increasing it. If this number is less than or equal to 1000, it is a percentage of the current heap size (i.e. setting it to 100 will double the heap size at each increase). If it is more than 1000, it is a fixed number of words that will be added to the heap. Default: 15.

    *)
  3. space_overhead : int;
    (*

    The major GC speed is computed from this parameter. This is the memory that will be "wasted" because the GC does not immediately collect unreachable blocks. It is expressed as a percentage of the memory used for live data. The GC will work more (use more CPU time and collect blocks more eagerly) if space_overhead is smaller. Default: 120.

    *)
  4. verbose : int;
    (*

    This value controls the GC messages on standard error output. It is a sum of some of the following flags, to print messages on the corresponding events:

    • 0x001 Start and end of major GC cycle.
    • 0x002 Minor collection and major GC slice.
    • 0x004 Growing and shrinking of the heap.
    • 0x008 Resizing of stacks and memory manager tables.
    • 0x010 Heap compaction.
    • 0x020 Change of GC parameters.
    • 0x040 Computation of major GC slice size.
    • 0x080 Calling of finalisation functions.
    • 0x100 Bytecode executable and shared library search at start-up.
    • 0x200 Computation of compaction-triggering condition.
    • 0x400 Output GC statistics at program exit. Default: 0.
    *)
  5. max_overhead : int;
    (*

    Heap compaction is triggered when the estimated amount of "wasted" memory is more than max_overhead percent of the amount of live data. If max_overhead is set to 0, heap compaction is triggered at the end of each major GC cycle (this setting is intended for testing purposes only). If max_overhead >= 1000000, compaction is never triggered. If compaction is permanently disabled, it is strongly suggested to set allocation_policy to 2. Default: 500.

    *)
  6. stack_limit : int;
    (*

    The maximum size of the fiber stacks (in words). Default: 1024k.

    *)
  7. allocation_policy : int;
    (*

    The policy used for allocating in the major heap. Possible values are 0, 1 and 2.

    • 0 is the next-fit policy, which is usually fast but can result in fragmentation, increasing memory consumption.
    • 1 is the first-fit policy, which avoids fragmentation but has corner cases (in certain realistic workloads) where it is sensibly slower.
    • 2 is the best-fit policy, which is fast and avoids fragmentation. In our experiments it is faster and uses less memory than both next-fit and first-fit. (since OCaml 4.10)

    The default is best-fit.

    On one example that was known to be bad for next-fit and first-fit, next-fit takes 28s using 855Mio of memory, first-fit takes 47s using 566Mio of memory, best-fit takes 27s using 545Mio of memory.

    Note: If you change to next-fit, you may need to reduce the space_overhead setting, for example using 80 instead of the default 120 which is tuned for best-fit. Otherwise, your program will need more memory.

    Note: changing the allocation policy at run-time forces a heap compaction, which is a lengthy operation unless the heap is small (e.g. at the start of the program).

    Default: 2.

    • since 3.11
    *)
  8. window_size : int;
    (*

    The size of the window used by the major GC for smoothing out variations in its workload. This is an integer between 1 and 50. Default: 1.

    • since 4.03
    *)
  9. custom_major_ratio : int;
    (*

    Target ratio of floating garbage to major heap size for out-of-heap memory held by custom values located in the major heap. The GC speed is adjusted to try to use this much memory for dead values that are not yet collected. Expressed as a percentage of major heap size. The default value keeps the out-of-heap floating garbage about the same size as the in-heap overhead. Note: this only applies to values allocated with caml_alloc_custom_mem (e.g. bigarrays). Default: 44.

    • since 4.08
    *)
  10. custom_minor_ratio : int;
    (*

    Bound on floating garbage for out-of-heap memory held by custom values in the minor heap. A minor GC is triggered when this much memory is held by custom values located in the minor heap. Expressed as a percentage of minor heap size. Note: this only applies to values allocated with caml_alloc_custom_mem (e.g. bigarrays). Default: 100.

    • since 4.08
    *)
  11. custom_minor_max_size : int;
    (*

    Maximum amount of out-of-heap memory for each custom value allocated in the minor heap. Custom values that hold more than this many bytes are allocated on the major heap. Note: this only applies to values allocated with caml_alloc_custom_mem (e.g. bigarrays). Default: 70000 bytes.

    • since 4.08
    *)
}

The GC parameters are given as a control record. Note that these parameters can also be initialised by setting the OCAMLRUNPARAM environment variable. See the documentation of ocamlrun.

val stat : unit -> stat

Return the current values of the memory management counters in a stat record that represent the program's total memory stats. This function causes a full major collection.

val quick_stat : unit -> stat

Same as stat except that live_words, live_blocks, free_words, free_blocks, largest_free, and fragments are set to 0. Due to per-domain buffers it may only represent the state of the program's total memory usage since the last minor collection. This function is much faster than stat because it does not need to trigger a full major collection.

val counters : unit -> float * float * float

Return (minor_words, promoted_words, major_words) for the current domain or potentially previous domains. This function is as fast as quick_stat.

val minor_words : unit -> float

Number of words allocated in the minor heap by this domain or potentially previous domains. This number is accurate in byte-code programs, but only an approximation in programs compiled to native code.

In native code this function does not allocate.

  • since 4.04
val get : unit -> control

Return the current values of the GC parameters in a control record.

  • alert unsynchronized_access GC parameters are a mutable global state.
val set : control -> unit

set r changes the GC parameters according to the control record r. The normal usage is: Gc.set { (Gc.get()) with Gc.verbose = 0x00d }

  • alert unsynchronized_access GC parameters are a mutable global state.
val minor : unit -> unit

Trigger a minor collection.

val major_slice : int -> int

major_slice n Do a minor collection and a slice of major collection. n is the size of the slice: the GC will do enough work to free (on average) n words of memory. If n = 0, the GC will try to do enough work to ensure that the next automatic slice has no work to do. This function returns an unspecified integer (currently: 0).

val major : unit -> unit

Do a minor collection and finish the current major collection cycle.

val full_major : unit -> unit

Do a minor collection, finish the current major collection cycle, and perform a complete new cycle. This will collect all currently unreachable blocks.

val compact : unit -> unit

Perform a full major collection and compact the heap. Note that heap compaction is a lengthy operation.

val print_stat : out_channel -> unit

Print the current values of the memory management counters (in human-readable form) of the total program into the channel argument.

val allocated_bytes : unit -> float

Return the number of bytes allocated by this domain and potentially a previous domain. It is returned as a float to avoid overflow problems with int on 32-bit machines.

val get_minor_free : unit -> int

Return the current size of the free space inside the minor heap of this domain.

  • since 4.03
val finalise : ('a -> unit) -> 'a -> unit

finalise f v registers f as a finalisation function for v. v must be heap-allocated. f will be called with v as argument at some point between the first time v becomes unreachable (including through weak pointers) and the time v is collected by the GC. Several functions can be registered for the same value, or even several instances of the same function. Each instance will be called once (or never, if the program terminates before v becomes unreachable).

The GC will call the finalisation functions in the order of deallocation. When several values become unreachable at the same time (i.e. during the same GC cycle), the finalisation functions will be called in the reverse order of the corresponding calls to finalise. If finalise is called in the same order as the values are allocated, that means each value is finalised before the values it depends upon. Of course, this becomes false if additional dependencies are introduced by assignments.

In the presence of multiple OCaml threads it should be assumed that any particular finaliser may be executed in any of the threads.

Anything reachable from the closure of finalisation functions is considered reachable, so the following code will not work as expected:

  • let v = ... in Gc.finalise (fun _ -> ...v...) v

Instead you should make sure that v is not in the closure of the finalisation function by writing:

  • let f = fun x -> ... let v = ... in Gc.finalise f v

The f function can use all features of OCaml, including assignments that make the value reachable again. It can also loop forever (in this case, the other finalisation functions will not be called during the execution of f, unless it calls finalise_release). It can call finalise on v or other values to register other functions or even itself. It can raise an exception; in this case the exception will interrupt whatever the program was doing when the function was called.

finalise will raise Invalid_argument if v is not guaranteed to be heap-allocated. Some examples of values that are not heap-allocated are integers, constant constructors, booleans, the empty array, the empty list, the unit value. The exact list of what is heap-allocated or not is implementation-dependent. Some constant values can be heap-allocated but never deallocated during the lifetime of the program, for example a list of integer constants; this is also implementation-dependent. Note that values of types float are sometimes allocated and sometimes not, so finalising them is unsafe, and finalise will also raise Invalid_argument for them. Values of type 'a Lazy.t (for any 'a) are like float in this respect, except that the compiler sometimes optimizes them in a way that prevents finalise from detecting them. In this case, it will not raise Invalid_argument, but you should still avoid calling finalise on lazy values.

The results of calling String.make, Bytes.make, Bytes.create, Array.make, and Stdlib.ref are guaranteed to be heap-allocated and non-constant except when the length argument is 0.

val finalise_last : (unit -> unit) -> 'a -> unit

same as finalise except the value is not given as argument. So you can't use the given value for the computation of the finalisation function. The benefit is that the function is called after the value is unreachable for the last time instead of the first time. So contrary to finalise the value will never be reachable again or used again. In particular every weak pointer and ephemeron that contained this value as key or data is unset before running the finalisation function. Moreover the finalisation functions attached with finalise are always called before the finalisation functions attached with finalise_last.

  • since 4.04
val finalise_release : unit -> unit

A finalisation function may call finalise_release to tell the GC that it can launch the next finalisation function without waiting for the current one to return.

type alarm

An alarm is a piece of data that calls a user function at the end of each major GC cycle. The following functions are provided to create and delete alarms.

val create_alarm : (unit -> unit) -> alarm

create_alarm f will arrange for f to be called at the end of each major GC cycle, not caused by f itself, starting with the current cycle or the next one. A value of type alarm is returned that you can use to call delete_alarm.

val delete_alarm : alarm -> unit

delete_alarm a will stop the calls to the function associated to a. Calling delete_alarm a again has no effect.

val eventlog_pause : unit -> unit
  • deprecated Use Runtime_events.pause instead.
val eventlog_resume : unit -> unit
  • deprecated Use Runtime_events.resume instead.
module Memprof : sig ... end

Memprof is a sampling engine for allocated memory words. Every allocated word has a probability of being sampled equal to a configurable sampling rate. Once a block is sampled, it becomes tracked. A tracked block triggers a user-defined callback as soon as it is allocated, promoted or deallocated.

diff --git a/stdlib/Stdlib/Hashtbl/Make/argument-1-H/index.html b/stdlib/Stdlib/Hashtbl/Make/argument-1-H/index.html new file mode 100644 index 000000000..e3c2c456f --- /dev/null +++ b/stdlib/Stdlib/Hashtbl/Make/argument-1-H/index.html @@ -0,0 +1,2 @@ + +H (docs.stdlib.Stdlib.Hashtbl.Make.H)

Parameter Make.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/stdlib/Stdlib/Hashtbl/Make/index.html b/stdlib/Stdlib/Hashtbl/Make/index.html new file mode 100644 index 000000000..f332c2e30 --- /dev/null +++ b/stdlib/Stdlib/Hashtbl/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.stdlib.Stdlib.Hashtbl.Make)

Module Hashtbl.Make

Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

Parameters

module H : HashedType

Signature

type key = H.t
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/stdlib/Stdlib/Hashtbl/MakeSeeded/argument-1-H/index.html b/stdlib/Stdlib/Hashtbl/MakeSeeded/argument-1-H/index.html new file mode 100644 index 000000000..e316c0a7c --- /dev/null +++ b/stdlib/Stdlib/Hashtbl/MakeSeeded/argument-1-H/index.html @@ -0,0 +1,2 @@ + +H (docs.stdlib.Stdlib.Hashtbl.MakeSeeded.H)

Parameter MakeSeeded.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

diff --git a/stdlib/Stdlib/Hashtbl/MakeSeeded/index.html b/stdlib/Stdlib/Hashtbl/MakeSeeded/index.html new file mode 100644 index 000000000..4897c9572 --- /dev/null +++ b/stdlib/Stdlib/Hashtbl/MakeSeeded/index.html @@ -0,0 +1,2 @@ + +MakeSeeded (docs.stdlib.Stdlib.Hashtbl.MakeSeeded)

Module Hashtbl.MakeSeeded

Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

  • since 4.00

Parameters

Signature

type key = H.t
type !'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/stdlib/Stdlib/Hashtbl/index.html b/stdlib/Stdlib/Hashtbl/index.html new file mode 100644 index 000000000..85f5f9e30 --- /dev/null +++ b/stdlib/Stdlib/Hashtbl/index.html @@ -0,0 +1,80 @@ + +Hashtbl (docs.stdlib.Stdlib.Hashtbl)

Module Stdlib.Hashtbl

Hash tables and hash functions.

Hash tables are hashed association tables, with in-place modification. Because most operations on a hash table modify their input, they're more commonly used in imperative code. The lookup of the value associated with a key (see find, find_opt) is normally very fast, often faster than the equivalent lookup in Map.

The functors Make and MakeSeeded can be used when performance or flexibility are key. The user provides custom equality and hash functions for the key type, and obtains a custom hash table type for this particular type of key.

Warning a hash table is only as good as the hash function. A bad hash function will turn the table into a degenerate association list, with linear time lookup instead of constant time lookup.

The polymorphic t hash table is useful in simpler cases or in interactive environments. It uses the polymorphic hash function defined in the OCaml runtime (at the time of writing, it's SipHash), as well as the polymorphic equality (=).

See the examples section.

Unsynchronized accesses

Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

Generic interface

type (!'a, !'b) t

The type of hash tables from type 'a to type 'b.

val create : ?random:bool -> int -> ('a, 'b) t

Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

  • before 4.00

    the ~random parameter was not present and all hash tables were created in non-randomized mode.

val clear : ('a, 'b) t -> unit

Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

val reset : ('a, 'b) t -> unit

Empty a hash table and shrink the size of the bucket table to its initial size.

  • since 4.00
val copy : ('a, 'b) t -> ('a, 'b) t

Return a copy of the given hashtable.

val add : ('a, 'b) t -> 'a -> 'b -> unit

Hashtbl.add tbl key data adds a binding of key to data in table tbl.

Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

If you desire the classic behavior of replacing elements, see replace.

val find : ('a, 'b) t -> 'a -> 'b

Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

val find_opt : ('a, 'b) t -> 'a -> 'b option

Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

  • since 4.05
val find_all : ('a, 'b) t -> 'a -> 'b list

Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

val mem : ('a, 'b) t -> 'a -> bool

Hashtbl.mem tbl x checks if x is bound in tbl.

val remove : ('a, 'b) t -> 'a -> unit

Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

val replace : ('a, 'b) t -> 'a -> 'b -> unit

Hashtbl.replace tbl key data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit

Hashtbl.iter f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

The behavior is not specified if the hash table is modified by f during the iteration.

val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit

Hashtbl.filter_map_inplace f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

Other comments for iter apply as well.

  • since 4.03
val fold : ('a -> 'b -> 'acc -> 'acc) -> ('a, 'b) t -> 'acc -> 'acc

Hashtbl.fold f tbl init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

The behavior is not specified if the hash table is modified by f during the iteration.

val length : ('a, 'b) t -> int

Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

val randomize : unit -> unit

After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

  • since 4.00
val is_randomized : unit -> bool

Return true if the tables are currently created in randomized mode by default, false otherwise.

  • since 4.03
val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

  • since 4.12
type statistics = {
  1. num_bindings : int;
    (*

    Number of bindings present in the table. Same value as returned by length.

    *)
  2. num_buckets : int;
    (*

    Number of buckets in the table.

    *)
  3. max_bucket_length : int;
    (*

    Maximal number of bindings per bucket.

    *)
  4. bucket_histogram : int array;
    (*

    Histogram of bucket sizes. This array histo has length max_bucket_length + 1. The value of histo.(i) is the number of buckets whose size is i.

    *)
}
  • since 4.00
val stats : ('a, 'b) t -> statistics

Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

  • since 4.00

Hash tables and Sequences

val to_seq : ('a, 'b) t -> ('a * 'b) Seq.t

Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

The behavior is not specified if the hash table is modified during the iteration.

  • since 4.07
val to_seq_keys : ('a, _) t -> 'a Seq.t

Same as Seq.map fst (to_seq m)

  • since 4.07
val to_seq_values : (_, 'b) t -> 'b Seq.t

Same as Seq.map snd (to_seq m)

  • since 4.07
val add_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

Add the given bindings to the table, using add

  • since 4.07
val replace_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

Add the given bindings to the table, using replace

  • since 4.07
val of_seq : ('a * 'b) Seq.t -> ('a, 'b) t

Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

  • since 4.07

Functorial interface

The functorial interface allows the use of specific comparison and hash functions, either for performance/security concerns, or because keys are not hashable/comparable with the polymorphic builtins.

For instance, one might want to specialize a table for integer keys:

module IntHash =
+  struct
+    type t = int
+    let equal i j = i=j
+    let hash i = i land max_int
+  end
+
+module IntHashtbl = Hashtbl.Make(IntHash)
+
+let h = IntHashtbl.create 17 in
+IntHashtbl.add h 12 "hello"

This creates a new module IntHashtbl, with a new type 'a + IntHashtbl.t of tables from int to 'a. In this example, h contains string values so its type is string IntHashtbl.t.

Note that the new type 'a IntHashtbl.t is not compatible with the type ('a,'b) Hashtbl.t of the generic interface. For example, Hashtbl.length h would not type-check, you must use IntHashtbl.length.

module type HashedType = sig ... end

The input signature of the functor Make.

module type S = sig ... end

The output signature of the functor Make.

module Make (H : HashedType) : S with type key = H.t

Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

module type SeededHashedType = sig ... end

The input signature of the functor MakeSeeded.

module type SeededS = sig ... end

The output signature of the functor MakeSeeded.

module MakeSeeded (H : SeededHashedType) : SeededS with type key = H.t

Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

The polymorphic hash functions

val hash : 'a -> int

Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

val seeded_hash : int -> 'a -> int

A variant of hash that is further parameterized by an integer seed.

  • since 4.00
val hash_param : int -> int -> 'a -> int

Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

val seeded_hash_param : int -> int -> int -> 'a -> int

A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

  • since 4.00

Examples

Basic Example

(* 0...99 *)
+let seq = Seq.ints 0 |> Seq.take 100
+
+(* build from Seq.t *)
+# let tbl =
+    seq
+    |> Seq.map (fun x -> x, string_of_int x)
+    |> Hashtbl.of_seq
+val tbl : (int, string) Hashtbl.t = <abstr>
+
+# Hashtbl.length tbl
+- : int = 100
+
+# Hashtbl.find_opt tbl 32
+- : string option = Some "32"
+
+# Hashtbl.find_opt tbl 166
+- : string option = None
+
+# Hashtbl.replace tbl 166 "one six six"
+- : unit = ()
+
+# Hashtbl.find_opt tbl 166
+- : string option = Some "one six six"
+
+# Hashtbl.length tbl
+- : int = 101

Counting Elements

Given a sequence of elements (here, a Seq.t), we want to count how many times each distinct element occurs in the sequence. A simple way to do this, assuming the elements are comparable and hashable, is to use a hash table that maps elements to their number of occurrences.

Here we illustrate that principle using a sequence of (ascii) characters (type char). We use a custom Char_tbl specialized for char.

# module Char_tbl = Hashtbl.Make(struct
+    type t = char
+    let equal = Char.equal
+    let hash = Hashtbl.hash
+  end)
+
+(*  count distinct occurrences of chars in [seq] *)
+# let count_chars (seq : char Seq.t) : _ list =
+    let counts = Char_tbl.create 16 in
+    Seq.iter
+      (fun c ->
+        let count_c =
+          Char_tbl.find_opt counts c
+          |> Option.value ~default:0
+        in
+        Char_tbl.replace counts c (count_c + 1))
+      seq;
+    (* turn into a list *)
+    Char_tbl.fold (fun c n l -> (c,n) :: l) counts []
+      |> List.sort (fun (c1,_)(c2,_) -> Char.compare c1 c2)
+val count_chars : Char_tbl.key Seq.t -> (Char.t * int) list = <fun>
+
+(* basic seq from a string *)
+# let seq = String.to_seq "hello world, and all the camels in it!"
+val seq : char Seq.t = <fun>
+
+# count_chars seq
+- : (Char.t * int) list =
+[(' ', 7); ('!', 1); (',', 1); ('a', 3); ('c', 1); ('d', 2); ('e', 3);
+ ('h', 2); ('i', 2); ('l', 6); ('m', 1); ('n', 2); ('o', 2); ('r', 1);
+ ('s', 1); ('t', 2); ('w', 1)]
+
+(* "abcabcabc..." *)
+# let seq2 =
+    Seq.cycle (String.to_seq "abc") |> Seq.take 31
+val seq2 : char Seq.t = <fun>
+
+# String.of_seq seq2
+- : String.t = "abcabcabcabcabcabcabcabcabcabca"
+
+# count_chars seq2
+- : (Char.t * int) list = [('a', 11); ('b', 10); ('c', 10)]
diff --git a/stdlib/Stdlib/Hashtbl/module-type-HashedType/index.html b/stdlib/Stdlib/Hashtbl/module-type-HashedType/index.html new file mode 100644 index 000000000..8a633dd58 --- /dev/null +++ b/stdlib/Stdlib/Hashtbl/module-type-HashedType/index.html @@ -0,0 +1,2 @@ + +HashedType (docs.stdlib.Stdlib.Hashtbl.HashedType)

Module type Hashtbl.HashedType

The input signature of the functor Make.

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/stdlib/Stdlib/Hashtbl/module-type-S/index.html b/stdlib/Stdlib/Hashtbl/module-type-S/index.html new file mode 100644 index 000000000..96f210c5d --- /dev/null +++ b/stdlib/Stdlib/Hashtbl/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (docs.stdlib.Stdlib.Hashtbl.S)

Module type Hashtbl.S

The output signature of the functor Make.

type key
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/stdlib/Stdlib/Hashtbl/module-type-SeededHashedType/index.html b/stdlib/Stdlib/Hashtbl/module-type-SeededHashedType/index.html new file mode 100644 index 000000000..645b00f5d --- /dev/null +++ b/stdlib/Stdlib/Hashtbl/module-type-SeededHashedType/index.html @@ -0,0 +1,2 @@ + +SeededHashedType (docs.stdlib.Stdlib.Hashtbl.SeededHashedType)

Module type Hashtbl.SeededHashedType

The input signature of the functor MakeSeeded.

  • since 4.00
type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

diff --git a/stdlib/Stdlib/Hashtbl/module-type-SeededS/index.html b/stdlib/Stdlib/Hashtbl/module-type-SeededS/index.html new file mode 100644 index 000000000..e13eeb2c4 --- /dev/null +++ b/stdlib/Stdlib/Hashtbl/module-type-SeededS/index.html @@ -0,0 +1,2 @@ + +SeededS (docs.stdlib.Stdlib.Hashtbl.SeededS)

Module type Hashtbl.SeededS

The output signature of the functor MakeSeeded.

  • since 4.00
type key
type !'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/stdlib/Stdlib/In_channel/index.html b/stdlib/Stdlib/In_channel/index.html new file mode 100644 index 000000000..95c1c4d41 --- /dev/null +++ b/stdlib/Stdlib/In_channel/index.html @@ -0,0 +1,3 @@ + +In_channel (docs.stdlib.Stdlib.In_channel)

Module Stdlib.In_channel

Input channels.

This module provides functions for working with input channels.

See the example section below.

  • since 4.14

Channels

type t = in_channel

The type of input channel.

type open_flag = open_flag =
  1. | Open_rdonly
    (*

    open for reading.

    *)
  2. | Open_wronly
    (*

    open for writing.

    *)
  3. | Open_append
    (*

    open for appending: always write at end of file.

    *)
  4. | Open_creat
    (*

    create the file if it does not exist.

    *)
  5. | Open_trunc
    (*

    empty the file if it already exists.

    *)
  6. | Open_excl
    (*

    fail if Open_creat and the file already exists.

    *)
  7. | Open_binary
    (*

    open in binary mode (no conversion).

    *)
  8. | Open_text
    (*

    open in text mode (may perform conversions).

    *)
  9. | Open_nonblock
    (*

    open in non-blocking mode.

    *)

Opening modes for open_gen.

val stdin : t

The standard input for the process.

val open_bin : string -> t

Open the named file for reading, and return a new input channel on that file, positioned at the beginning of the file.

val open_text : string -> t

Same as open_bin, but the file is opened in text mode, so that newline translation takes place during reads. On operating systems that do not distinguish between text mode and binary mode, this function behaves like open_bin.

val open_gen : open_flag list -> int -> string -> t

open_gen mode perm filename opens the named file for reading, as described above. The extra arguments mode and perm specify the opening mode and file permissions. open_text and open_bin are special cases of this function.

val with_open_bin : string -> (t -> 'a) -> 'a

with_open_bin fn f opens a channel ic on file fn and returns f + ic. After f returns, either with a value or by raising an exception, ic is guaranteed to be closed.

val with_open_text : string -> (t -> 'a) -> 'a

Like with_open_bin, but the channel is opened in text mode (see open_text).

val with_open_gen : open_flag list -> int -> string -> (t -> 'a) -> 'a

Like with_open_bin, but can specify the opening mode and file permission, in case the file must be created (see open_gen).

val close : t -> unit

Close the given channel. Input functions raise a Sys_error exception when they are applied to a closed input channel, except close, which does nothing when applied to an already closed channel.

val close_noerr : t -> unit

Same as close, but ignore all errors.

Input

val input_char : t -> char option

Read one character from the given input channel. Returns None if there are no more characters to read.

val input_byte : t -> int option

Same as input_char, but return the 8-bit integer representing the character. Returns None if the end of file was reached.

val input_line : t -> string option

input_line ic reads characters from ic until a newline or the end of file is reached. Returns the string of all characters read, without the newline (if any). Returns None if the end of the file has been reached. In particular, this will be the case if the last line of input is empty.

A newline is the character \n unless the file is open in text mode and Sys.win32 is true in which case it is the sequence of characters \r\n.

val really_input_string : t -> int -> string option

really_input_string ic len reads len characters from channel ic and returns them in a new string. Returns None if the end of file is reached before len characters have been read.

If the same channel is read concurrently by multiple threads, the returned string is not guaranteed to contain contiguous characters from the input.

val input_all : t -> string

input_all ic reads all remaining data from ic.

If the same channel is read concurrently by multiple threads, the returned string is not guaranteed to contain contiguous characters from the input.

val input_lines : t -> string list

input_lines ic reads lines using input_line until the end of file is reached. It returns the list of all lines read, in the order they were read. The newline characters that terminate lines are not included in the returned strings. Empty lines produce empty strings.

  • since 5.1

Advanced input

val input : t -> bytes -> int -> int -> int

input ic buf pos len reads up to len characters from the given channel ic, storing them in byte sequence buf, starting at character number pos. It returns the actual number of characters read, between 0 and len (inclusive). A return value of 0 means that the end of file was reached.

Use really_input to read exactly len characters.

val really_input : t -> bytes -> int -> int -> unit option

really_input ic buf pos len reads len characters from channel ic, storing them in byte sequence buf, starting at character number pos.

Returns None if the end of file is reached before len characters have been read.

If the same channel is read concurrently by multiple threads, the bytes read by really_input are not guaranteed to be contiguous.

val fold_lines : ('acc -> string -> 'acc) -> 'acc -> t -> 'acc

fold_lines f init ic reads lines from ic using input_line until the end of file is reached, and successively passes each line to function f in the style of a fold. More precisely, if lines l1, ..., lN are read, fold_lines f init ic computes f (... (f (f init l1) l2) ...) lN. If f has no side effects, this is equivalent to List.fold_left f init (In_channel.input_lines ic), but is more efficient since it does not construct the list of all lines read.

  • since 5.1

Seeking

val seek : t -> int64 -> unit

seek chan pos sets the current reading position to pos for channel chan. This works only for regular files. On files of other kinds, the behavior is unspecified.

val pos : t -> int64

Return the current reading position for the given channel. For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos, then going back to this position using seek will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

Attributes

val length : t -> int64

Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless. The returned size does not take into account the end-of-line translations that can be performed when reading from a channel opened in text mode.

val set_binary_mode : t -> bool -> unit

set_binary_mode ic true sets the channel ic to binary mode: no translations take place during input.

set_binary_mode ic false sets the channel ic to text mode: depending on the operating system, some translations may take place during input. For instance, under Windows, end-of-lines will be translated from \r\n to \n.

This function has no effect under operating systems that do not distinguish between text mode and binary mode.

val isatty : t -> bool

isatty ic is true if ic refers to a terminal or console window, false otherwise.

  • since 5.1

Examples

Reading the contents of a file:

let read_file file = In_channel.with_open_bin file In_channel.input_all

Reading a line from stdin:

let user_input () = In_channel.input_line In_channel.stdin
diff --git a/stdlib/Stdlib/Int/index.html b/stdlib/Stdlib/Int/index.html new file mode 100644 index 000000000..355d315e0 --- /dev/null +++ b/stdlib/Stdlib/Int/index.html @@ -0,0 +1,2 @@ + +Int (docs.stdlib.Stdlib.Int)

Module Stdlib.Int

Integer values.

Integers are Sys.int_size bits wide and use two's complement representation. All operations are taken modulo 2Sys.int_size. They do not fail on overflow.

  • since 4.08

Integers

type t = int

The type for integer values.

val zero : int

zero is the integer 0.

val one : int

one is the integer 1.

val minus_one : int

minus_one is the integer -1.

val neg : int -> int

neg x is ~-x.

val add : int -> int -> int

add x y is the addition x + y.

val sub : int -> int -> int

sub x y is the subtraction x - y.

val mul : int -> int -> int

mul x y is the multiplication x * y.

val div : int -> int -> int

div x y is the division x / y. See Stdlib.(/) for details.

val rem : int -> int -> int

rem x y is the remainder x mod y. See Stdlib.(mod) for details.

val succ : int -> int

succ x is add x 1.

val pred : int -> int

pred x is sub x 1.

val abs : int -> int

abs x is the absolute value of x. That is x if x is positive and neg x if x is negative. Warning. This may be negative if the argument is min_int.

val max_int : int

max_int is the greatest representable integer, 2{^[Sys.int_size - 1]} - 1.

val min_int : int

min_int is the smallest representable integer, -2{^[Sys.int_size - 1]}.

val logand : int -> int -> int

logand x y is the bitwise logical and of x and y.

val logor : int -> int -> int

logor x y is the bitwise logical or of x and y.

val logxor : int -> int -> int

logxor x y is the bitwise logical exclusive or of x and y.

val lognot : int -> int

lognot x is the bitwise logical negation of x.

val shift_left : int -> int -> int

shift_left x n shifts x to the left by n bits. The result is unspecified if n < 0 or n > Sys.int_size.

val shift_right : int -> int -> int

shift_right x n shifts x to the right by n bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if n < 0 or n > Sys.int_size.

val shift_right_logical : int -> int -> int

shift_right x n shifts x to the right by n bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if n < 0 or n > Sys.int_size.

Predicates and comparisons

val equal : int -> int -> bool

equal x y is true if and only if x = y.

val compare : int -> int -> int

compare x y is Stdlib.compare x y but more efficient.

val min : int -> int -> int

Return the smaller of the two arguments.

  • since 4.13
val max : int -> int -> int

Return the greater of the two arguments.

  • since 4.13

Converting

val to_float : int -> float

to_float x is x as a floating point number.

val of_float : float -> int

of_float x truncates x to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

val to_string : int -> string

to_string x is the written representation of x in decimal.

val seeded_hash : int -> int -> int

A seeded hash function for ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : int -> int

An unseeded hash function for ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.1
diff --git a/stdlib/Stdlib/Int32/index.html b/stdlib/Stdlib/Int32/index.html new file mode 100644 index 000000000..5e0923386 --- /dev/null +++ b/stdlib/Stdlib/Int32/index.html @@ -0,0 +1,4 @@ + +Int32 (docs.stdlib.Stdlib.Int32)

Module Stdlib.Int32

32-bit integers.

This module provides operations on the type int32 of signed 32-bit integers. Unlike the built-in int type, the type int32 is guaranteed to be exactly 32-bit wide on all platforms. All arithmetic operations over int32 are taken modulo 232.

Performance notice: values of type int32 occupy more memory space than values of type int, and arithmetic operations on int32 are generally slower than those on int. Use int32 only when the application requires exact 32-bit arithmetic.

Literals for 32-bit integers are suffixed by l:

let zero: int32 = 0l
+let one: int32 = 1l
+let m_one: int32 = -1l
val zero : int32

The 32-bit integer 0.

val one : int32

The 32-bit integer 1.

val minus_one : int32

The 32-bit integer -1.

val neg : int32 -> int32

Unary negation.

val add : int32 -> int32 -> int32

Addition.

val sub : int32 -> int32 -> int32

Subtraction.

val mul : int32 -> int32 -> int32

Multiplication.

val div : int32 -> int32 -> int32

Integer division. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val unsigned_div : int32 -> int32 -> int32

Same as div, except that arguments and result are interpreted as unsigned 32-bit integers.

  • since 4.08
val rem : int32 -> int32 -> int32

Integer remainder. If y is not zero, the result of Int32.rem x y satisfies the following property: x = Int32.add (Int32.mul (Int32.div x y) y) (Int32.rem x y). If y = 0, Int32.rem x y raises Division_by_zero.

val unsigned_rem : int32 -> int32 -> int32

Same as rem, except that arguments and result are interpreted as unsigned 32-bit integers.

  • since 4.08
val succ : int32 -> int32

Successor. Int32.succ x is Int32.add x Int32.one.

val pred : int32 -> int32

Predecessor. Int32.pred x is Int32.sub x Int32.one.

val abs : int32 -> int32

abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

val max_int : int32

The greatest representable 32-bit integer, 231 - 1.

val min_int : int32

The smallest representable 32-bit integer, -231.

val logand : int32 -> int32 -> int32

Bitwise logical and.

val logor : int32 -> int32 -> int32

Bitwise logical or.

val logxor : int32 -> int32 -> int32

Bitwise logical exclusive or.

val lognot : int32 -> int32

Bitwise logical negation.

val shift_left : int32 -> int -> int32

Int32.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= 32.

val shift_right : int32 -> int -> int32

Int32.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 32.

val shift_right_logical : int32 -> int -> int32

Int32.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 32.

val of_int : int -> int32

Convert the given integer (type int) to a 32-bit integer (type int32). On 64-bit platforms, the argument is taken modulo 232.

val to_int : int32 -> int

Convert the given 32-bit integer (type int32) to an integer (type int). On 32-bit platforms, the 32-bit integer is taken modulo 231, i.e. the high-order bit is lost during the conversion. On 64-bit platforms, the conversion is exact.

val unsigned_to_int : int32 -> int option

Same as to_int, but interprets the argument as an unsigned integer. Returns None if the unsigned value of the argument cannot fit into an int.

  • since 4.08
val of_float : float -> int32

Convert the given floating-point number to a 32-bit integer, discarding the fractional part (truncate towards 0). If the truncated floating-point number is outside the range [Int32.min_int, Int32.max_int], no exception is raised, and an unspecified, platform-dependent integer is returned.

val to_float : int32 -> float

Convert the given 32-bit integer to a floating-point number.

val of_string : string -> int32

Convert the given string to a 32-bit integer. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.

The 0u prefix reads the input as an unsigned integer in the range [0, 2*Int32.max_int+1]. If the input exceeds Int32.max_int it is converted to the signed integer Int32.min_int + input - Int32.max_int - 1.

The _ (underscore) character can appear anywhere in the string and is ignored.

  • raises Failure

    if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int32.

val of_string_opt : string -> int32 option

Same as of_string, but return None instead of raising.

  • since 4.05
val to_string : int32 -> string

Return the string representation of its argument, in signed decimal.

val bits_of_float : float -> int32

Return the internal representation of the given float according to the IEEE 754 floating-point 'single format' bit layout. Bit 31 of the result represents the sign of the float; bits 30 to 23 represent the (biased) exponent; bits 22 to 0 represent the mantissa.

val float_of_bits : int32 -> float

Return the floating-point number whose internal representation, according to the IEEE 754 floating-point 'single format' bit layout, is the given int32.

type t = int32

An alias for the type of 32-bit integers.

val compare : t -> t -> int

The comparison function for 32-bit integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Int32 to be passed as argument to the functors Set.Make and Map.Make.

val unsigned_compare : t -> t -> int

Same as compare, except that arguments are interpreted as unsigned 32-bit integers.

  • since 4.08
val equal : t -> t -> bool

The equal function for int32s.

  • since 4.03
val min : t -> t -> t

Return the smaller of the two arguments.

  • since 4.13
val max : t -> t -> t

Return the greater of the two arguments.

  • since 4.13
val seeded_hash : int -> t -> int

A seeded hash function for 32-bit ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : t -> int

An unseeded hash function for 32-bit ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.1
diff --git a/stdlib/Stdlib/Int64/index.html b/stdlib/Stdlib/Int64/index.html new file mode 100644 index 000000000..833e37170 --- /dev/null +++ b/stdlib/Stdlib/Int64/index.html @@ -0,0 +1,4 @@ + +Int64 (docs.stdlib.Stdlib.Int64)

Module Stdlib.Int64

64-bit integers.

This module provides operations on the type int64 of signed 64-bit integers. Unlike the built-in int type, the type int64 is guaranteed to be exactly 64-bit wide on all platforms. All arithmetic operations over int64 are taken modulo 264

Performance notice: values of type int64 occupy more memory space than values of type int, and arithmetic operations on int64 are generally slower than those on int. Use int64 only when the application requires exact 64-bit arithmetic.

Literals for 64-bit integers are suffixed by L:

let zero: int64 = 0L
+let one: int64 = 1L
+let m_one: int64 = -1L
val zero : int64

The 64-bit integer 0.

val one : int64

The 64-bit integer 1.

val minus_one : int64

The 64-bit integer -1.

val neg : int64 -> int64

Unary negation.

val add : int64 -> int64 -> int64

Addition.

val sub : int64 -> int64 -> int64

Subtraction.

val mul : int64 -> int64 -> int64

Multiplication.

val div : int64 -> int64 -> int64

Integer division.

  • raises Division_by_zero

    if the second argument is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val unsigned_div : int64 -> int64 -> int64

Same as div, except that arguments and result are interpreted as unsigned 64-bit integers.

  • since 4.08
val rem : int64 -> int64 -> int64

Integer remainder. If y is not zero, the result of Int64.rem x y satisfies the following property: x = Int64.add (Int64.mul (Int64.div x y) y) (Int64.rem x y). If y = 0, Int64.rem x y raises Division_by_zero.

val unsigned_rem : int64 -> int64 -> int64

Same as rem, except that arguments and result are interpreted as unsigned 64-bit integers.

  • since 4.08
val succ : int64 -> int64

Successor. Int64.succ x is Int64.add x Int64.one.

val pred : int64 -> int64

Predecessor. Int64.pred x is Int64.sub x Int64.one.

val abs : int64 -> int64

abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

val max_int : int64

The greatest representable 64-bit integer, 263 - 1.

val min_int : int64

The smallest representable 64-bit integer, -263.

val logand : int64 -> int64 -> int64

Bitwise logical and.

val logor : int64 -> int64 -> int64

Bitwise logical or.

val logxor : int64 -> int64 -> int64

Bitwise logical exclusive or.

val lognot : int64 -> int64

Bitwise logical negation.

val shift_left : int64 -> int -> int64

Int64.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= 64.

val shift_right : int64 -> int -> int64

Int64.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 64.

val shift_right_logical : int64 -> int -> int64

Int64.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 64.

val of_int : int -> int64

Convert the given integer (type int) to a 64-bit integer (type int64).

val to_int : int64 -> int

Convert the given 64-bit integer (type int64) to an integer (type int). On 64-bit platforms, the 64-bit integer is taken modulo 263, i.e. the high-order bit is lost during the conversion. On 32-bit platforms, the 64-bit integer is taken modulo 231, i.e. the top 33 bits are lost during the conversion.

val unsigned_to_int : int64 -> int option

Same as to_int, but interprets the argument as an unsigned integer. Returns None if the unsigned value of the argument cannot fit into an int.

  • since 4.08
val of_float : float -> int64

Convert the given floating-point number to a 64-bit integer, discarding the fractional part (truncate towards 0). If the truncated floating-point number is outside the range [Int64.min_int, Int64.max_int], no exception is raised, and an unspecified, platform-dependent integer is returned.

val to_float : int64 -> float

Convert the given 64-bit integer to a floating-point number.

val of_int32 : int32 -> int64

Convert the given 32-bit integer (type int32) to a 64-bit integer (type int64).

val to_int32 : int64 -> int32

Convert the given 64-bit integer (type int64) to a 32-bit integer (type int32). The 64-bit integer is taken modulo 232, i.e. the top 32 bits are lost during the conversion.

val of_nativeint : nativeint -> int64

Convert the given native integer (type nativeint) to a 64-bit integer (type int64).

val to_nativeint : int64 -> nativeint

Convert the given 64-bit integer (type int64) to a native integer. On 32-bit platforms, the 64-bit integer is taken modulo 232. On 64-bit platforms, the conversion is exact.

val of_string : string -> int64

Convert the given string to a 64-bit integer. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.

The 0u prefix reads the input as an unsigned integer in the range [0, 2*Int64.max_int+1]. If the input exceeds Int64.max_int it is converted to the signed integer Int64.min_int + input - Int64.max_int - 1.

The _ (underscore) character can appear anywhere in the string and is ignored.

  • raises Failure

    if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int64.

val of_string_opt : string -> int64 option

Same as of_string, but return None instead of raising.

  • since 4.05
val to_string : int64 -> string

Return the string representation of its argument, in decimal.

val bits_of_float : float -> int64

Return the internal representation of the given float according to the IEEE 754 floating-point 'double format' bit layout. Bit 63 of the result represents the sign of the float; bits 62 to 52 represent the (biased) exponent; bits 51 to 0 represent the mantissa.

val float_of_bits : int64 -> float

Return the floating-point number whose internal representation, according to the IEEE 754 floating-point 'double format' bit layout, is the given int64.

type t = int64

An alias for the type of 64-bit integers.

val compare : t -> t -> int

The comparison function for 64-bit integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Int64 to be passed as argument to the functors Set.Make and Map.Make.

val unsigned_compare : t -> t -> int

Same as compare, except that arguments are interpreted as unsigned 64-bit integers.

  • since 4.08
val equal : t -> t -> bool

The equal function for int64s.

  • since 4.03
val min : t -> t -> t

Return the smaller of the two arguments.

  • since 4.13
val max : t -> t -> t

Return the greater of the two arguments.

  • since 4.13
val seeded_hash : int -> t -> int

A seeded hash function for 64-bit ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : t -> int

An unseeded hash function for 64-bit ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.1
diff --git a/stdlib/Stdlib/LargeFile/index.html b/stdlib/Stdlib/LargeFile/index.html new file mode 100644 index 000000000..ff4a8400e --- /dev/null +++ b/stdlib/Stdlib/LargeFile/index.html @@ -0,0 +1,2 @@ + +LargeFile (docs.stdlib.Stdlib.LargeFile)

Module Stdlib.LargeFile

Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

val seek_out : out_channel -> int64 -> unit
val pos_out : out_channel -> int64
val out_channel_length : out_channel -> int64
val seek_in : in_channel -> int64 -> unit
val pos_in : in_channel -> int64
val in_channel_length : in_channel -> int64
diff --git a/stdlib/Stdlib/Lazy/index.html b/stdlib/Stdlib/Lazy/index.html new file mode 100644 index 000000000..a70986add --- /dev/null +++ b/stdlib/Stdlib/Lazy/index.html @@ -0,0 +1,5 @@ + +Lazy (docs.stdlib.Stdlib.Lazy)

Module Stdlib.Lazy

Deferred computations.

type 'a t = 'a CamlinternalLazy.t

A value of type 'a Lazy.t is a deferred computation, called a suspension, that has a result of type 'a. The special expression syntax lazy (expr) makes a suspension of the computation of expr, without computing expr itself yet. "Forcing" the suspension will then compute expr and return its result. Matching a suspension with the special pattern syntax lazy(pattern) also computes the underlying expression and tries to bind it to pattern:

let lazy_option_map f x =
+match x with
+| lazy (Some x) -> Some (Lazy.force f x)
+| _ -> None

Note: If lazy patterns appear in multiple cases in a pattern-matching, lazy expressions may be forced even outside of the case ultimately selected by the pattern matching. In the example above, the suspension x is always computed.

Note: lazy_t is the built-in type constructor used by the compiler for the lazy keyword. You should not use it directly. Always use Lazy.t instead.

Note: Lazy.force is not concurrency-safe. If you use this module with multiple fibers, systhreads or domains, then you will need to add some locks. The module however ensures memory-safety, and hence, concurrently accessing this module will not lead to a crash but the behaviour is unspecified.

Note: if the program is compiled with the -rectypes option, ill-founded recursive definitions of the form let rec x = lazy x or let rec x = lazy(lazy(...(lazy x))) are accepted by the type-checker and lead, when forced, to ill-formed values that trigger infinite loops in the garbage collector and other parts of the run-time system. Without the -rectypes option, such ill-founded recursive definitions are rejected by the type-checker.

exception Undefined

Raised when forcing a suspension concurrently from multiple fibers, systhreads or domains, or when the suspension tries to force itself recursively.

val force : 'a t -> 'a

force x forces the suspension x and returns its result. If x has already been forced, Lazy.force x returns the same value again without recomputing it. If it raised an exception, the same exception is raised again.

Iterators

val map : ('a -> 'b) -> 'a t -> 'b t

map f x returns a suspension that, when forced, forces x and applies f to its value.

It is equivalent to lazy (f (Lazy.force x)).

  • since 4.13

Reasoning on already-forced suspensions

val is_val : 'a t -> bool

is_val x returns true if x has already been forced and did not raise an exception.

  • since 4.00
val from_val : 'a -> 'a t

from_val v evaluates v first (as any function would) and returns an already-forced suspension of its result. It is the same as let x = v in lazy x, but uses dynamic tests to optimize suspension creation in some cases.

  • since 4.00
val map_val : ('a -> 'b) -> 'a t -> 'b t

map_val f x applies f directly if x is already forced, otherwise it behaves as map f x.

When x is already forced, this behavior saves the construction of a suspension, but on the other hand it performs more work eagerly that may not be useful if you never force the function result.

If f raises an exception, it will be raised immediately when is_val x, or raised only when forcing the thunk otherwise.

If map_val f x does not raise an exception, then is_val (map_val f x) is equal to is_val x.

  • since 4.13

Advanced

The following definitions are for advanced uses only; they require familiary with the lazy compilation scheme to be used appropriately.

val from_fun : (unit -> 'a) -> 'a t

from_fun f is the same as lazy (f ()) but slightly more efficient.

It should only be used if the function f is already defined. In particular it is always less efficient to write from_fun (fun () -> expr) than lazy expr.

  • since 4.00
val force_val : 'a t -> 'a

force_val x forces the suspension x and returns its result. If x has already been forced, force_val x returns the same value again without recomputing it.

If the computation of x raises an exception, it is unspecified whether force_val x raises the same exception or Undefined.

  • raises Undefined

    if the forcing of x tries to force x itself recursively.

diff --git a/stdlib/Stdlib/Lexing/index.html b/stdlib/Stdlib/Lexing/index.html new file mode 100644 index 000000000..c48262a7b --- /dev/null +++ b/stdlib/Stdlib/Lexing/index.html @@ -0,0 +1,2 @@ + +Lexing (docs.stdlib.Stdlib.Lexing)

Module Stdlib.Lexing

The run-time library for lexers generated by ocamllex.

Positions

type position = {
  1. pos_fname : string;
  2. pos_lnum : int;
  3. pos_bol : int;
  4. pos_cnum : int;
}

A value of type position describes a point in a source file. pos_fname is the file name; pos_lnum is the line number; pos_bol is the offset of the beginning of the line (number of characters between the beginning of the lexbuf and the beginning of the line); pos_cnum is the offset of the position (number of characters between the beginning of the lexbuf and the position). The difference between pos_cnum and pos_bol is the character offset within the line (i.e. the column number, assuming each character is one column wide).

See the documentation of type lexbuf for information about how the lexing engine will manage positions.

val dummy_pos : position

A value of type position, guaranteed to be different from any valid position.

Lexer buffers

type lexbuf = {
  1. refill_buff : lexbuf -> unit;
  2. mutable lex_buffer : bytes;
  3. mutable lex_buffer_len : int;
  4. mutable lex_abs_pos : int;
  5. mutable lex_start_pos : int;
  6. mutable lex_curr_pos : int;
  7. mutable lex_last_pos : int;
  8. mutable lex_last_action : int;
  9. mutable lex_eof_reached : bool;
  10. mutable lex_mem : int array;
  11. mutable lex_start_p : position;
  12. mutable lex_curr_p : position;
}

The type of lexer buffers. A lexer buffer is the argument passed to the scanning functions defined by the generated scanners. The lexer buffer holds the current state of the scanner, plus a function to refill the buffer from the input.

Lexers can optionally maintain the lex_curr_p and lex_start_p position fields. This "position tracking" mode is the default, and it corresponds to passing ~with_position:true to functions that create lexer buffers. In this mode, the lexing engine and lexer actions are co-responsible for properly updating the position fields, as described in the next paragraph. When the mode is explicitly disabled (with ~with_position:false), the lexing engine will not touch the position fields and the lexer actions should be careful not to do it either; the lex_curr_p and lex_start_p field will then always hold the dummy_pos invalid position. Not tracking positions avoids allocations and memory writes and can significantly improve the performance of the lexer in contexts where lex_start_p and lex_curr_p are not needed.

Position tracking mode works as follows. At each token, the lexing engine will copy lex_curr_p to lex_start_p, then change the pos_cnum field of lex_curr_p by updating it with the number of characters read since the start of the lexbuf. The other fields are left unchanged by the lexing engine. In order to keep them accurate, they must be initialised before the first use of the lexbuf, and updated by the relevant lexer actions (i.e. at each end of line -- see also new_line).

val from_channel : ?with_positions:bool -> in_channel -> lexbuf

Create a lexer buffer on the given input channel. Lexing.from_channel inchan returns a lexer buffer which reads from the input channel inchan, at the current reading position.

val from_string : ?with_positions:bool -> string -> lexbuf

Create a lexer buffer which reads from the given string. Reading starts from the first character in the string. An end-of-input condition is generated when the end of the string is reached.

val from_function : ?with_positions:bool -> (bytes -> int -> int) -> lexbuf

Create a lexer buffer with the given function as its reading method. When the scanner needs more characters, it will call the given function, giving it a byte sequence s and a byte count n. The function should put n bytes or fewer in s, starting at index 0, and return the number of bytes provided. A return value of 0 means end of input.

val set_position : lexbuf -> position -> unit

Set the initial tracked input position for lexbuf to a custom value. Ignores pos_fname. See set_filename for changing this field.

  • since 4.11
val set_filename : lexbuf -> string -> unit

Set filename in the initial tracked position to file in lexbuf.

  • since 4.11
val with_positions : lexbuf -> bool

Tell whether the lexer buffer keeps track of position fields lex_curr_p / lex_start_p, as determined by the corresponding optional argument for functions that create lexer buffers (whose default value is true).

When with_positions is false, lexer actions should not modify position fields. Doing it nevertheless could re-enable the with_position mode and degrade performances.

Functions for lexer semantic actions

The following functions can be called from the semantic actions of lexer definitions (the ML code enclosed in braces that computes the value returned by lexing functions). They give access to the character string matched by the regular expression associated with the semantic action. These functions must be applied to the argument lexbuf, which, in the code generated by ocamllex, is bound to the lexer buffer passed to the parsing function.

val lexeme : lexbuf -> string

Lexing.lexeme lexbuf returns the string matched by the regular expression.

val lexeme_char : lexbuf -> int -> char

Lexing.lexeme_char lexbuf i returns character number i in the matched string.

val lexeme_start : lexbuf -> int

Lexing.lexeme_start lexbuf returns the offset in the input stream of the first character of the matched string. The first character of the stream has offset 0.

val lexeme_end : lexbuf -> int

Lexing.lexeme_end lexbuf returns the offset in the input stream of the character following the last character of the matched string. The first character of the stream has offset 0.

val lexeme_start_p : lexbuf -> position

Like lexeme_start, but return a complete position instead of an offset. When position tracking is disabled, the function returns dummy_pos.

val lexeme_end_p : lexbuf -> position

Like lexeme_end, but return a complete position instead of an offset. When position tracking is disabled, the function returns dummy_pos.

val new_line : lexbuf -> unit

Update the lex_curr_p field of the lexbuf to reflect the start of a new line. You can call this function in the semantic action of the rule that matches the end-of-line character. The function does nothing when position tracking is disabled.

  • since 3.11

Miscellaneous functions

val flush_input : lexbuf -> unit

Discard the contents of the buffer and reset the current position to 0. The next use of the lexbuf will trigger a refill.

diff --git a/stdlib/Stdlib/List/index.html b/stdlib/Stdlib/List/index.html new file mode 100644 index 000000000..9149b50ac --- /dev/null +++ b/stdlib/Stdlib/List/index.html @@ -0,0 +1,16 @@ + +List (docs.stdlib.Stdlib.List)

Module Stdlib.List

List operations.

Some functions are flagged as not tail-recursive. A tail-recursive function uses constant stack space, while a non-tail-recursive function uses stack space proportional to the length of its list argument, which can be a problem with very long lists. When the function takes several list arguments, an approximate formula giving stack usage (in some unspecified constant unit) is shown in parentheses.

The above considerations can usually be ignored if your lists are not longer than about 10000 elements.

The labeled version of this module can be used as described in the StdLabels module.

type 'a t = 'a list =
  1. | []
  2. | :: of 'a * 'a list

An alias for the type of lists.

val length : 'a list -> int

Return the length (number of elements) of the given list.

val compare_lengths : 'a list -> 'b list -> int

Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

  • since 4.05
val compare_length_with : 'a list -> int -> int

Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

  • since 4.05
val is_empty : 'a list -> bool

is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

  • since 5.1
val cons : 'a -> 'a list -> 'a list

cons x xs is x :: xs

  • since 4.03 (4.05 in ListLabels)
val hd : 'a list -> 'a

Return the first element of the given list.

  • raises Failure

    if the list is empty.

val tl : 'a list -> 'a list

Return the given list without its first element.

  • raises Failure

    if the list is empty.

val nth : 'a list -> int -> 'a

Return the n-th element of the given list. The first element (head of the list) is at position 0.

  • raises Failure

    if the list is too short.

val nth_opt : 'a list -> int -> 'a option

Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

  • since 4.05
val rev : 'a list -> 'a list

List reversal.

val init : int -> (int -> 'a) -> 'a list

init len f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

  • since 4.06
val append : 'a list -> 'a list -> 'a list

append l0 l1 appends l1 to l0. Same function as the infix operator @.

  • since 5.1 this function is tail-recursive.
val rev_append : 'a list -> 'a list -> 'a list

rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

val concat : 'a list list -> 'a list

Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

val flatten : 'a list list -> 'a list

Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

Comparison

val equal : ('a -> 'a -> bool) -> 'a list -> 'a list -> bool

equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

  • since 4.12
val compare : ('a -> 'a -> int) -> 'a list -> 'a list -> int

compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

  • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
  • the empty list [] is strictly smaller than non-empty lists

Note: the cmp function will be called even if the lists have different lengths.

  • since 4.12

Iterators

val iter : ('a -> unit) -> 'a list -> unit

iter f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

val iteri : (int -> 'a -> unit) -> 'a list -> unit

Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val map : ('a -> 'b) -> 'a list -> 'b list

map f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list

Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val rev_map : ('a -> 'b) -> 'a list -> 'b list

rev_map f l gives the same result as rev (map f l), but is more efficient.

val filter_map : ('a -> 'b option) -> 'a list -> 'b list

filter_map f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

  • since 4.08
val concat_map : ('a -> 'b list) -> 'a list -> 'b list

concat_map f l gives the same result as concat (map f l). Tail-recursive.

  • since 4.10
val fold_left_map : + ('acc -> 'a -> 'acc * 'b) -> + 'acc -> + 'a list -> + 'acc * 'b list

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.11
val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc

fold_left f init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

val fold_right : ('a -> 'acc -> 'acc) -> 'a list -> 'acc -> 'acc

fold_right f [a1; ...; an] init is f a1 (f a2 (... (f an init) ...)). Not tail-recursive.

Iterators on two lists

val iter2 : ('a -> 'b -> unit) -> 'a list -> 'b list -> unit

iter2 f [a1; ...; an] [b1; ...; bn] calls in turn f a1 b1; ...; f an bn.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

map2 f [a1; ...; an] [b1; ...; bn] is [f a1 b1; ...; f an bn].

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val rev_map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

rev_map2 f l1 l2 gives the same result as rev (map2 f l1 l2), but is more efficient.

val fold_left2 : + ('acc -> 'a -> 'b -> 'acc) -> + 'acc -> + 'a list -> + 'b list -> + 'acc

fold_left2 f init [a1; ...; an] [b1; ...; bn] is f (... (f (f init a1 b1) a2 b2) ...) an bn.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val fold_right2 : + ('a -> 'b -> 'acc -> 'acc) -> + 'a list -> + 'b list -> + 'acc -> + 'acc

fold_right2 f [a1; ...; an] [b1; ...; bn] init is f a1 b1 (f a2 b2 (... (f an bn init) ...)).

  • raises Invalid_argument

    if the two lists are determined to have different lengths. Not tail-recursive.

List scanning

val for_all : ('a -> bool) -> 'a list -> bool

for_all f [a1; ...; an] checks if all elements of the list satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an) for a non-empty list and true if the list is empty.

val exists : ('a -> bool) -> 'a list -> bool

exists f [a1; ...; an] checks if at least one element of the list satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an) for a non-empty list and false if the list is empty.

val for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool

Same as for_all, but for a two-argument predicate.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val exists2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool

Same as exists, but for a two-argument predicate.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val mem : 'a -> 'a list -> bool

mem a set is true if and only if a is equal to an element of set.

val memq : 'a -> 'a list -> bool

Same as mem, but uses physical equality instead of structural equality to compare list elements.

List searching

val find : ('a -> bool) -> 'a list -> 'a

find f l returns the first element of the list l that satisfies the predicate f.

  • raises Not_found

    if there is no value that satisfies f in the list l.

val find_opt : ('a -> bool) -> 'a list -> 'a option

find f l returns the first element of the list l that satisfies the predicate f. Returns None if there is no value that satisfies f in the list l.

  • since 4.05
val find_index : ('a -> bool) -> 'a list -> int option

find_index f xs returns Some i, where i is the index of the first element of the list xs that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_map : ('a -> 'b option) -> 'a list -> 'b option

find_map f l applies f to the elements of l in order, and returns the first result of the form Some v, or None if none exist.

  • since 4.10
val find_mapi : (int -> 'a -> 'b option) -> 'a list -> 'b option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1
val filter : ('a -> bool) -> 'a list -> 'a list

filter f l returns all the elements of the list l that satisfy the predicate f. The order of the elements in the input list is preserved.

val find_all : ('a -> bool) -> 'a list -> 'a list

find_all is another name for filter.

val filteri : (int -> 'a -> bool) -> 'a list -> 'a list

Same as filter, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.11
val partition : ('a -> bool) -> 'a list -> 'a list * 'a list

partition f l returns a pair of lists (l1, l2), where l1 is the list of all the elements of l that satisfy the predicate f, and l2 is the list of all the elements of l that do not satisfy f. The order of the elements in the input list is preserved.

val partition_map : ('a -> ('b, 'c) Either.t) -> 'a list -> 'b list * 'c list

partition_map f l returns a pair of lists (l1, l2) such that, for each element x of the input list l:

  • if f x is Left y1, then y1 is in l1, and
  • if f x is Right y2, then y2 is in l2.

The output elements are included in l1 and l2 in the same relative order as the corresponding input elements in l.

In particular, partition_map (fun x -> if f x then Left x else Right x) l is equivalent to partition f l.

  • since 4.12

Association lists

val assoc : 'a -> ('a * 'b) list -> 'b

assoc a l returns the value associated with key a in the list of pairs l. That is, assoc a [ ...; (a,b); ...] = b if (a,b) is the leftmost binding of a in list l.

  • raises Not_found

    if there is no value associated with a in the list l.

val assoc_opt : 'a -> ('a * 'b) list -> 'b option

assoc_opt a l returns the value associated with key a in the list of pairs l. That is, assoc_opt a [ ...; (a,b); ...] = Some b if (a,b) is the leftmost binding of a in list l. Returns None if there is no value associated with a in the list l.

  • since 4.05
val assq : 'a -> ('a * 'b) list -> 'b

Same as assoc, but uses physical equality instead of structural equality to compare keys.

val assq_opt : 'a -> ('a * 'b) list -> 'b option

Same as assoc_opt, but uses physical equality instead of structural equality to compare keys.

  • since 4.05
val mem_assoc : 'a -> ('a * 'b) list -> bool

Same as assoc, but simply return true if a binding exists, and false if no bindings exist for the given key.

val mem_assq : 'a -> ('a * 'b) list -> bool

Same as mem_assoc, but uses physical equality instead of structural equality to compare keys.

val remove_assoc : 'a -> ('a * 'b) list -> ('a * 'b) list

remove_assoc a l returns the list of pairs l without the first pair with key a, if any. Not tail-recursive.

val remove_assq : 'a -> ('a * 'b) list -> ('a * 'b) list

Same as remove_assoc, but uses physical equality instead of structural equality to compare keys. Not tail-recursive.

Lists of pairs

val split : ('a * 'b) list -> 'a list * 'b list

Transform a list of pairs into a pair of lists: split [(a1,b1); ...; (an,bn)] is ([a1; ...; an], [b1; ...; bn]). Not tail-recursive.

val combine : 'a list -> 'b list -> ('a * 'b) list

Transform a pair of lists into a list of pairs: combine [a1; ...; an] [b1; ...; bn] is [(a1,b1); ...; (an,bn)].

  • raises Invalid_argument

    if the two lists have different lengths. Not tail-recursive.

Sorting

val sort : ('a -> 'a -> int) -> 'a list -> 'a list

Sort a list in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see Array.sort for a complete specification). For example, Stdlib.compare is a suitable comparison function. The resulting list is sorted in increasing order. sort is guaranteed to run in constant heap space (in addition to the size of the result list) and logarithmic stack space.

The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

val stable_sort : ('a -> 'a -> int) -> 'a list -> 'a list

Same as sort, but the sorting algorithm is guaranteed to be stable (i.e. elements that compare equal are kept in their original order).

The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

val fast_sort : ('a -> 'a -> int) -> 'a list -> 'a list

Same as sort or stable_sort, whichever is faster on typical input.

val sort_uniq : ('a -> 'a -> int) -> 'a list -> 'a list

Same as sort, but also remove duplicates.

  • since 4.02 (4.03 in ListLabels)
val merge : ('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

Merge two lists: Assuming that l1 and l2 are sorted according to the comparison function cmp, merge cmp l1 l2 will return a sorted list containing all the elements of l1 and l2. If several elements compare equal, the elements of l1 will be before the elements of l2. Not tail-recursive (sum of the lengths of the arguments).

Lists and Sequences

val to_seq : 'a list -> 'a Seq.t

Iterate on the list.

  • since 4.07
val of_seq : 'a Seq.t -> 'a list

Create a list from a sequence.

  • since 4.07
diff --git a/stdlib/Stdlib/ListLabels/index.html b/stdlib/Stdlib/ListLabels/index.html new file mode 100644 index 000000000..3a9d7b650 --- /dev/null +++ b/stdlib/Stdlib/ListLabels/index.html @@ -0,0 +1,16 @@ + +ListLabels (docs.stdlib.Stdlib.ListLabels)

Module Stdlib.ListLabels

List operations.

Some functions are flagged as not tail-recursive. A tail-recursive function uses constant stack space, while a non-tail-recursive function uses stack space proportional to the length of its list argument, which can be a problem with very long lists. When the function takes several list arguments, an approximate formula giving stack usage (in some unspecified constant unit) is shown in parentheses.

The above considerations can usually be ignored if your lists are not longer than about 10000 elements.

The labeled version of this module can be used as described in the StdLabels module.

type 'a t = 'a list =
  1. | []
  2. | :: of 'a * 'a list

An alias for the type of lists.

val length : 'a list -> int

Return the length (number of elements) of the given list.

val compare_lengths : 'a list -> 'b list -> int

Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

  • since 4.05
val compare_length_with : 'a list -> len:int -> int

Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

  • since 4.05
val is_empty : 'a list -> bool

is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

  • since 5.1
val cons : 'a -> 'a list -> 'a list

cons x xs is x :: xs

  • since 4.05
val hd : 'a list -> 'a

Return the first element of the given list.

  • raises Failure

    if the list is empty.

val tl : 'a list -> 'a list

Return the given list without its first element.

  • raises Failure

    if the list is empty.

val nth : 'a list -> int -> 'a

Return the n-th element of the given list. The first element (head of the list) is at position 0.

  • raises Failure

    if the list is too short.

val nth_opt : 'a list -> int -> 'a option

Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

  • since 4.05
val rev : 'a list -> 'a list

List reversal.

val init : len:int -> f:(int -> 'a) -> 'a list

init ~len ~f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

  • since 4.06
val append : 'a list -> 'a list -> 'a list

append l0 l1 appends l1 to l0. Same function as the infix operator @.

  • since 5.1 this function is tail-recursive.
val rev_append : 'a list -> 'a list -> 'a list

rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

val concat : 'a list list -> 'a list

Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

val flatten : 'a list list -> 'a list

Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

Comparison

val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

  • since 4.12
val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

  • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
  • the empty list [] is strictly smaller than non-empty lists

Note: the cmp function will be called even if the lists have different lengths.

  • since 4.12

Iterators

val iter : f:('a -> unit) -> 'a list -> unit

iter ~f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val map : f:('a -> 'b) -> 'a list -> 'b list

map ~f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

val mapi : f:(int -> 'a -> 'b) -> 'a list -> 'b list

Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.00
val rev_map : f:('a -> 'b) -> 'a list -> 'b list

rev_map ~f l gives the same result as rev (map f l), but is more efficient.

val filter_map : f:('a -> 'b option) -> 'a list -> 'b list

filter_map ~f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

  • since 4.08
val concat_map : f:('a -> 'b list) -> 'a list -> 'b list

concat_map ~f l gives the same result as concat (map f l). Tail-recursive.

  • since 4.10
val fold_left_map : + f:('acc -> 'a -> 'acc * 'b) -> + init:'acc -> + 'a list -> + 'acc * 'b list

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

  • since 4.11
val fold_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a list -> 'acc

fold_left ~f ~init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

val fold_right : f:('a -> 'acc -> 'acc) -> 'a list -> init:'acc -> 'acc

fold_right ~f [a1; ...; an] ~init is f a1 (f a2 (... (f an init) ...)). Not tail-recursive.

Iterators on two lists

val iter2 : f:('a -> 'b -> unit) -> 'a list -> 'b list -> unit

iter2 ~f [a1; ...; an] [b1; ...; bn] calls in turn f a1 b1; ...; f an bn.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val map2 : f:('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

map2 ~f [a1; ...; an] [b1; ...; bn] is [f a1 b1; ...; f an bn].

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val rev_map2 : f:('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

rev_map2 ~f l1 l2 gives the same result as rev (map2 f l1 l2), but is more efficient.

val fold_left2 : + f:('acc -> 'a -> 'b -> 'acc) -> + init:'acc -> + 'a list -> + 'b list -> + 'acc

fold_left2 ~f ~init [a1; ...; an] [b1; ...; bn] is f (... (f (f init a1 b1) a2 b2) ...) an bn.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val fold_right2 : + f:('a -> 'b -> 'acc -> 'acc) -> + 'a list -> + 'b list -> + init:'acc -> + 'acc

fold_right2 ~f [a1; ...; an] [b1; ...; bn] ~init is f a1 b1 (f a2 b2 (... (f an bn init) ...)).

  • raises Invalid_argument

    if the two lists are determined to have different lengths. Not tail-recursive.

List scanning

val for_all : f:('a -> bool) -> 'a list -> bool

for_all ~f [a1; ...; an] checks if all elements of the list satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an) for a non-empty list and true if the list is empty.

val exists : f:('a -> bool) -> 'a list -> bool

exists ~f [a1; ...; an] checks if at least one element of the list satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an) for a non-empty list and false if the list is empty.

val for_all2 : f:('a -> 'b -> bool) -> 'a list -> 'b list -> bool

Same as for_all, but for a two-argument predicate.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val exists2 : f:('a -> 'b -> bool) -> 'a list -> 'b list -> bool

Same as exists, but for a two-argument predicate.

  • raises Invalid_argument

    if the two lists are determined to have different lengths.

val mem : 'a -> set:'a list -> bool

mem a ~set is true if and only if a is equal to an element of set.

val memq : 'a -> set:'a list -> bool

Same as mem, but uses physical equality instead of structural equality to compare list elements.

List searching

val find : f:('a -> bool) -> 'a list -> 'a

find ~f l returns the first element of the list l that satisfies the predicate f.

  • raises Not_found

    if there is no value that satisfies f in the list l.

val find_opt : f:('a -> bool) -> 'a list -> 'a option

find ~f l returns the first element of the list l that satisfies the predicate f. Returns None if there is no value that satisfies f in the list l.

  • since 4.05
val find_index : f:('a -> bool) -> 'a list -> int option

find_index ~f xs returns Some i, where i is the index of the first element of the list xs that satisfies f x, if there is such an element.

It returns None if there is no such element.

  • since 5.1
val find_map : f:('a -> 'b option) -> 'a list -> 'b option

find_map ~f l applies f to the elements of l in order, and returns the first result of the form Some v, or None if none exist.

  • since 4.10
val find_mapi : f:(int -> 'a -> 'b option) -> 'a list -> 'b option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 5.1
val filter : f:('a -> bool) -> 'a list -> 'a list

filter ~f l returns all the elements of the list l that satisfy the predicate f. The order of the elements in the input list is preserved.

val find_all : f:('a -> bool) -> 'a list -> 'a list

find_all is another name for filter.

val filteri : f:(int -> 'a -> bool) -> 'a list -> 'a list

Same as filter, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

  • since 4.11
val partition : f:('a -> bool) -> 'a list -> 'a list * 'a list

partition ~f l returns a pair of lists (l1, l2), where l1 is the list of all the elements of l that satisfy the predicate f, and l2 is the list of all the elements of l that do not satisfy f. The order of the elements in the input list is preserved.

val partition_map : f:('a -> ('b, 'c) Either.t) -> 'a list -> 'b list * 'c list

partition_map f l returns a pair of lists (l1, l2) such that, for each element x of the input list l:

  • if f x is Left y1, then y1 is in l1, and
  • if f x is Right y2, then y2 is in l2.

The output elements are included in l1 and l2 in the same relative order as the corresponding input elements in l.

In particular, partition_map (fun x -> if f x then Left x else Right x) l is equivalent to partition f l.

  • since 4.12

Association lists

val assoc : 'a -> ('a * 'b) list -> 'b

assoc a l returns the value associated with key a in the list of pairs l. That is, assoc a [ ...; (a,b); ...] = b if (a,b) is the leftmost binding of a in list l.

  • raises Not_found

    if there is no value associated with a in the list l.

val assoc_opt : 'a -> ('a * 'b) list -> 'b option

assoc_opt a l returns the value associated with key a in the list of pairs l. That is, assoc_opt a [ ...; (a,b); ...] = Some b if (a,b) is the leftmost binding of a in list l. Returns None if there is no value associated with a in the list l.

  • since 4.05
val assq : 'a -> ('a * 'b) list -> 'b

Same as assoc, but uses physical equality instead of structural equality to compare keys.

val assq_opt : 'a -> ('a * 'b) list -> 'b option

Same as assoc_opt, but uses physical equality instead of structural equality to compare keys.

  • since 4.05
val mem_assoc : 'a -> map:('a * 'b) list -> bool

Same as assoc, but simply return true if a binding exists, and false if no bindings exist for the given key.

val mem_assq : 'a -> map:('a * 'b) list -> bool

Same as mem_assoc, but uses physical equality instead of structural equality to compare keys.

val remove_assoc : 'a -> ('a * 'b) list -> ('a * 'b) list

remove_assoc a l returns the list of pairs l without the first pair with key a, if any. Not tail-recursive.

val remove_assq : 'a -> ('a * 'b) list -> ('a * 'b) list

Same as remove_assoc, but uses physical equality instead of structural equality to compare keys. Not tail-recursive.

Lists of pairs

val split : ('a * 'b) list -> 'a list * 'b list

Transform a list of pairs into a pair of lists: split [(a1,b1); ...; (an,bn)] is ([a1; ...; an], [b1; ...; bn]). Not tail-recursive.

val combine : 'a list -> 'b list -> ('a * 'b) list

Transform a pair of lists into a list of pairs: combine [a1; ...; an] [b1; ...; bn] is [(a1,b1); ...; (an,bn)].

  • raises Invalid_argument

    if the two lists have different lengths. Not tail-recursive.

Sorting

val sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

Sort a list in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see Array.sort for a complete specification). For example, Stdlib.compare is a suitable comparison function. The resulting list is sorted in increasing order. sort is guaranteed to run in constant heap space (in addition to the size of the result list) and logarithmic stack space.

The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

val stable_sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

Same as sort, but the sorting algorithm is guaranteed to be stable (i.e. elements that compare equal are kept in their original order).

The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

val fast_sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

Same as sort or stable_sort, whichever is faster on typical input.

val sort_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list

Same as sort, but also remove duplicates.

  • since 4.03
val merge : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

Merge two lists: Assuming that l1 and l2 are sorted according to the comparison function cmp, merge ~cmp l1 l2 will return a sorted list containing all the elements of l1 and l2. If several elements compare equal, the elements of l1 will be before the elements of l2. Not tail-recursive (sum of the lengths of the arguments).

Lists and Sequences

val to_seq : 'a list -> 'a Seq.t

Iterate on the list.

  • since 4.07
val of_seq : 'a Seq.t -> 'a list

Create a list from a sequence.

  • since 4.07
diff --git a/stdlib/Stdlib/Map/Make/argument-1-Ord/index.html b/stdlib/Stdlib/Map/Make/argument-1-Ord/index.html new file mode 100644 index 000000000..95d531c2f --- /dev/null +++ b/stdlib/Stdlib/Map/Make/argument-1-Ord/index.html @@ -0,0 +1,2 @@ + +Ord (docs.stdlib.Stdlib.Map.Make.Ord)

Parameter Make.Ord

type t

The type of the map keys.

val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/stdlib/Stdlib/Map/Make/index.html b/stdlib/Stdlib/Map/Make/index.html new file mode 100644 index 000000000..f9f849f99 --- /dev/null +++ b/stdlib/Stdlib/Map/Make/index.html @@ -0,0 +1,8 @@ + +Make (docs.stdlib.Stdlib.Map.Make)

Module Map.Make

Functor building an implementation of the map structure given a totally ordered type.

Parameters

module Ord : OrderedType

Signature

Maps

type key = Ord.t

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/stdlib/Stdlib/Map/index.html b/stdlib/Stdlib/Map/index.html new file mode 100644 index 000000000..130f2e5a7 --- /dev/null +++ b/stdlib/Stdlib/Map/index.html @@ -0,0 +1,13 @@ + +Map (docs.stdlib.Stdlib.Map)

Module Stdlib.Map

Association tables over ordered types.

This module implements applicative association tables, also known as finite maps or dictionaries, given a total ordering function over the keys. All operations over maps are purely applicative (no side-effects). The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

For instance:

module IntPairs =
+  struct
+    type t = int * int
+    let compare (x0,y0) (x1,y1) =
+      match Stdlib.compare x0 x1 with
+          0 -> Stdlib.compare y0 y1
+        | c -> c
+  end
+
+module PairsMap = Map.Make(IntPairs)
+
+let m = PairsMap.(empty |> add (0,1) "hello" |> add (1,0) "world")

This creates a new module PairsMap, with a new type 'a PairsMap.t of maps from int * int to 'a. In this example, m contains string values so its type is string PairsMap.t.

module type OrderedType = sig ... end

Input signature of the functor Make.

module type S = sig ... end

Output signature of the functor Make.

module Make (Ord : OrderedType) : S with type key = Ord.t

Functor building an implementation of the map structure given a totally ordered type.

diff --git a/stdlib/Stdlib/Map/module-type-OrderedType/index.html b/stdlib/Stdlib/Map/module-type-OrderedType/index.html new file mode 100644 index 000000000..332c64d40 --- /dev/null +++ b/stdlib/Stdlib/Map/module-type-OrderedType/index.html @@ -0,0 +1,2 @@ + +OrderedType (docs.stdlib.Stdlib.Map.OrderedType)

Module type Map.OrderedType

Input signature of the functor Make.

type t

The type of the map keys.

val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/stdlib/Stdlib/Map/module-type-S/index.html b/stdlib/Stdlib/Map/module-type-S/index.html new file mode 100644 index 000000000..1868d7750 --- /dev/null +++ b/stdlib/Stdlib/Map/module-type-S/index.html @@ -0,0 +1,8 @@ + +S (docs.stdlib.Stdlib.Map.S)

Module type Map.S

Output signature of the functor Make.

Maps

type key

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/stdlib/Stdlib/Marshal/index.html b/stdlib/Stdlib/Marshal/index.html new file mode 100644 index 000000000..5515bb8bf --- /dev/null +++ b/stdlib/Stdlib/Marshal/index.html @@ -0,0 +1,2 @@ + +Marshal (docs.stdlib.Stdlib.Marshal)

Module Stdlib.Marshal

Marshaling of data structures.

This module provides functions to encode arbitrary data structures as sequences of bytes, which can then be written on a file or sent over a pipe or network connection. The bytes can then be read back later, possibly in another process, and decoded back into a data structure. The format for the byte sequences is compatible across all machines for a given version of OCaml.

Warning: marshaling is currently not type-safe. The type of marshaled data is not transmitted along the value of the data, making it impossible to check that the data read back possesses the type expected by the context. In particular, the result type of the Marshal.from_* functions is given as 'a, but this is misleading: the returned OCaml value does not possess type 'a for all 'a; it has one, unique type which cannot be determined at compile-time. The programmer should explicitly give the expected type of the returned value, using the following syntax:

  • (Marshal.from_channel chan : type). Anything can happen at run-time if the object in the file does not belong to the given type.

Values of extensible variant types, for example exceptions (of extensible type exn), returned by the unmarshaller should not be pattern-matched over through match ... with or try ... with, because unmarshalling does not preserve the information required for matching their constructors. Structural equalities with other extensible variant values does not work either. Most other uses such as Printexc.to_string, will still work as expected.

The representation of marshaled values is not human-readable, and uses bytes that are not printable characters. Therefore, input and output channels used in conjunction with Marshal.to_channel and Marshal.from_channel must be opened in binary mode, using e.g. open_out_bin or open_in_bin; channels opened in text mode will cause unmarshaling errors on platforms where text channels behave differently than binary channels, e.g. Windows.

type extern_flags =
  1. | No_sharing
    (*

    Don't preserve sharing

    *)
  2. | Closures
    (*

    Send function closures

    *)
  3. | Compat_32
    (*

    Ensure 32-bit compatibility

    *)

The flags to the Marshal.to_* functions below.

val to_channel : out_channel -> 'a -> extern_flags list -> unit

Marshal.to_channel chan v flags writes the representation of v on channel chan. The flags argument is a possibly empty list of flags that governs the marshaling behavior with respect to sharing, functional values, and compatibility between 32- and 64-bit platforms.

If flags does not contain Marshal.No_sharing, circularities and sharing inside the value v are detected and preserved in the sequence of bytes produced. In particular, this guarantees that marshaling always terminates. Sharing between values marshaled by successive calls to Marshal.to_channel is neither detected nor preserved, though. If flags contains Marshal.No_sharing, sharing is ignored. This results in faster marshaling if v contains no shared substructures, but may cause slower marshaling and larger byte representations if v actually contains sharing, or even non-termination if v contains cycles.

If flags does not contain Marshal.Closures, marshaling fails when it encounters a functional value inside v: only 'pure' data structures, containing neither functions nor objects, can safely be transmitted between different programs. If flags contains Marshal.Closures, functional values will be marshaled as a the position in the code of the program together with the values corresponding to the free variables captured in the closure. In this case, the output of marshaling can only be read back in processes that run exactly the same program, with exactly the same compiled code. (This is checked at un-marshaling time, using an MD5 digest of the code transmitted along with the code position.)

The exact definition of which free variables are captured in a closure is not specified and can vary between bytecode and native code (and according to optimization flags). In particular, a function value accessing a global reference may or may not include the reference in its closure. If it does, unmarshaling the corresponding closure will create a new reference, different from the global one.

If flags contains Marshal.Compat_32, marshaling fails when it encounters an integer value outside the range [-2{^30}, 2{^30}-1] of integers that are representable on a 32-bit platform. This ensures that marshaled data generated on a 64-bit platform can be safely read back on a 32-bit platform. If flags does not contain Marshal.Compat_32, integer values outside the range [-2{^30}, 2{^30}-1] are marshaled, and can be read back on a 64-bit platform, but will cause an error at un-marshaling time when read back on a 32-bit platform. The Mashal.Compat_32 flag only matters when marshaling is performed on a 64-bit platform; it has no effect if marshaling is performed on a 32-bit platform.

  • raises Failure

    if chan is not in binary mode.

val to_bytes : 'a -> extern_flags list -> bytes

Marshal.to_bytes v flags returns a byte sequence containing the representation of v. The flags argument has the same meaning as for Marshal.to_channel.

  • since 4.02
val to_string : 'a -> extern_flags list -> string

Same as to_bytes but return the result as a string instead of a byte sequence.

val to_buffer : bytes -> int -> int -> 'a -> extern_flags list -> int

Marshal.to_buffer buff ofs len v flags marshals the value v, storing its byte representation in the sequence buff, starting at index ofs, and writing at most len bytes. It returns the number of bytes actually written to the sequence. If the byte representation of v does not fit in len characters, the exception Failure is raised.

val from_channel : in_channel -> 'a

Marshal.from_channel chan reads from channel chan the byte representation of a structured value, as produced by one of the Marshal.to_* functions, and reconstructs and returns the corresponding value.

  • raises End_of_file

    if chan is already at the end of the file.

  • raises Failure

    if the end of the file is reached during unmarshalling itself or if chan is not in binary mode.

val from_bytes : bytes -> int -> 'a

Marshal.from_bytes buff ofs unmarshals a structured value like Marshal.from_channel does, except that the byte representation is not read from a channel, but taken from the byte sequence buff, starting at position ofs. The byte sequence is not mutated.

  • since 4.02
val from_string : string -> int -> 'a

Same as from_bytes but take a string as argument instead of a byte sequence.

val header_size : int

The bytes representing a marshaled value are composed of a fixed-size header and a variable-sized data part, whose size can be determined from the header. Marshal.header_size is the size, in bytes, of the header. Marshal.data_size buff ofs is the size, in bytes, of the data part, assuming a valid header is stored in buff starting at position ofs. Finally, Marshal.total_size buff ofs is the total size, in bytes, of the marshaled value. Both Marshal.data_size and Marshal.total_size raise Failure if buff, ofs does not contain a valid header.

To read the byte representation of a marshaled value into a byte sequence, the program needs to read first Marshal.header_size bytes into the sequence, then determine the length of the remainder of the representation using Marshal.data_size, make sure the sequence is large enough to hold the remaining data, then read it, and finally call Marshal.from_bytes to unmarshal the value.

val data_size : bytes -> int -> int
val total_size : bytes -> int -> int
diff --git a/stdlib/Stdlib/MoreLabels/Hashtbl/Make/argument-1-H/index.html b/stdlib/Stdlib/MoreLabels/Hashtbl/Make/argument-1-H/index.html new file mode 100644 index 000000000..1f8db036f --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Hashtbl/Make/argument-1-H/index.html @@ -0,0 +1,2 @@ + +H (docs.stdlib.Stdlib.MoreLabels.Hashtbl.Make.H)

Parameter Make.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/stdlib/Stdlib/MoreLabels/Hashtbl/Make/index.html b/stdlib/Stdlib/MoreLabels/Hashtbl/Make/index.html new file mode 100644 index 000000000..777919064 --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Hashtbl/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.stdlib.Stdlib.MoreLabels.Hashtbl.Make)

Module Hashtbl.Make

Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

Parameters

module H : HashedType

Signature

type key = H.t
type 'a t = 'a Hashtbl.Make(H).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key:key -> data:'a -> unit
val mem : 'a t -> key -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/stdlib/Stdlib/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html b/stdlib/Stdlib/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html new file mode 100644 index 000000000..e72b7a042 --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html @@ -0,0 +1,2 @@ + +H (docs.stdlib.Stdlib.MoreLabels.Hashtbl.MakeSeeded.H)

Parameter MakeSeeded.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

diff --git a/stdlib/Stdlib/MoreLabels/Hashtbl/MakeSeeded/index.html b/stdlib/Stdlib/MoreLabels/Hashtbl/MakeSeeded/index.html new file mode 100644 index 000000000..b6fb4149a --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Hashtbl/MakeSeeded/index.html @@ -0,0 +1,2 @@ + +MakeSeeded (docs.stdlib.Stdlib.MoreLabels.Hashtbl.MakeSeeded)

Module Hashtbl.MakeSeeded

Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

  • since 4.00

Parameters

Signature

type key = H.t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key:key -> data:'a -> unit
val mem : 'a t -> key -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/stdlib/Stdlib/MoreLabels/Hashtbl/index.html b/stdlib/Stdlib/MoreLabels/Hashtbl/index.html new file mode 100644 index 000000000..bcda62785 --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Hashtbl/index.html @@ -0,0 +1,91 @@ + +Hashtbl (docs.stdlib.Stdlib.MoreLabels.Hashtbl)

Module MoreLabels.Hashtbl

Hash tables and hash functions.

Hash tables are hashed association tables, with in-place modification. Because most operations on a hash table modify their input, they're more commonly used in imperative code. The lookup of the value associated with a key (see find, find_opt) is normally very fast, often faster than the equivalent lookup in Map.

The functors Make and MakeSeeded can be used when performance or flexibility are key. The user provides custom equality and hash functions for the key type, and obtains a custom hash table type for this particular type of key.

Warning a hash table is only as good as the hash function. A bad hash function will turn the table into a degenerate association list, with linear time lookup instead of constant time lookup.

The polymorphic t hash table is useful in simpler cases or in interactive environments. It uses the polymorphic hash function defined in the OCaml runtime (at the time of writing, it's SipHash), as well as the polymorphic equality (=).

See the examples section.

Unsynchronized accesses

Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

Generic interface

type (!'a, !'b) t = ('a, 'b) Hashtbl.t

The type of hash tables from type 'a to type 'b.

val create : ?random:bool -> int -> ('a, 'b) t

Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

  • before 4.00

    the ~random parameter was not present and all hash tables were created in non-randomized mode.

val clear : ('a, 'b) t -> unit

Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

val reset : ('a, 'b) t -> unit

Empty a hash table and shrink the size of the bucket table to its initial size.

  • since 4.00
val copy : ('a, 'b) t -> ('a, 'b) t

Return a copy of the given hashtable.

val add : ('a, 'b) t -> key:'a -> data:'b -> unit

Hashtbl.add tbl ~key ~data adds a binding of key to data in table tbl.

Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

If you desire the classic behavior of replacing elements, see replace.

val find : ('a, 'b) t -> 'a -> 'b

Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

val find_opt : ('a, 'b) t -> 'a -> 'b option

Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

  • since 4.05
val find_all : ('a, 'b) t -> 'a -> 'b list

Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

val mem : ('a, 'b) t -> 'a -> bool

Hashtbl.mem tbl x checks if x is bound in tbl.

val remove : ('a, 'b) t -> 'a -> unit

Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

val replace : ('a, 'b) t -> key:'a -> data:'b -> unit

Hashtbl.replace tbl ~key ~data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

val iter : f:(key:'a -> data:'b -> unit) -> ('a, 'b) t -> unit

Hashtbl.iter ~f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

The behavior is not specified if the hash table is modified by f during the iteration.

val filter_map_inplace : + f:(key:'a -> data:'b -> 'b option) -> + ('a, 'b) t -> + unit

Hashtbl.filter_map_inplace ~f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

Other comments for iter apply as well.

  • since 4.03
val fold : + f:(key:'a -> data:'b -> 'acc -> 'acc) -> + ('a, 'b) t -> + init:'acc -> + 'acc

Hashtbl.fold ~f tbl ~init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

The behavior is not specified if the hash table is modified by f during the iteration.

val length : ('a, 'b) t -> int

Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

val randomize : unit -> unit

After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

  • since 4.00
val is_randomized : unit -> bool

Return true if the tables are currently created in randomized mode by default, false otherwise.

  • since 4.03
val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

  • since 4.12
type statistics = Hashtbl.statistics = {
  1. num_bindings : int;
    (*

    Number of bindings present in the table. Same value as returned by length.

    *)
  2. num_buckets : int;
    (*

    Number of buckets in the table.

    *)
  3. max_bucket_length : int;
    (*

    Maximal number of bindings per bucket.

    *)
  4. bucket_histogram : int array;
    (*

    Histogram of bucket sizes. This array histo has length max_bucket_length + 1. The value of histo.(i) is the number of buckets whose size is i.

    *)
}
  • since 4.00
val stats : ('a, 'b) t -> statistics

Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

  • since 4.00

Hash tables and Sequences

val to_seq : ('a, 'b) t -> ('a * 'b) Seq.t

Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

The behavior is not specified if the hash table is modified during the iteration.

  • since 4.07
val to_seq_keys : ('a, _) t -> 'a Seq.t

Same as Seq.map fst (to_seq m)

  • since 4.07
val to_seq_values : (_, 'b) t -> 'b Seq.t

Same as Seq.map snd (to_seq m)

  • since 4.07
val add_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

Add the given bindings to the table, using add

  • since 4.07
val replace_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

Add the given bindings to the table, using replace

  • since 4.07
val of_seq : ('a * 'b) Seq.t -> ('a, 'b) t

Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

  • since 4.07

Functorial interface

The functorial interface allows the use of specific comparison and hash functions, either for performance/security concerns, or because keys are not hashable/comparable with the polymorphic builtins.

For instance, one might want to specialize a table for integer keys:

module IntHash =
+  struct
+    type t = int
+    let equal i j = i=j
+    let hash i = i land max_int
+  end
+
+module IntHashtbl = Hashtbl.Make(IntHash)
+
+let h = IntHashtbl.create 17 in
+IntHashtbl.add h 12 "hello"

This creates a new module IntHashtbl, with a new type 'a + IntHashtbl.t of tables from int to 'a. In this example, h contains string values so its type is string IntHashtbl.t.

Note that the new type 'a IntHashtbl.t is not compatible with the type ('a,'b) Hashtbl.t of the generic interface. For example, Hashtbl.length h would not type-check, you must use IntHashtbl.length.

module type HashedType = sig ... end

The input signature of the functor Make.

module type S = sig ... end

The output signature of the functor Make.

module Make + (H : HashedType) : + S with type key = H.t and type 'a t = 'a Hashtbl.Make(H).t

Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

module type SeededHashedType = sig ... end

The input signature of the functor MakeSeeded.

module type SeededS = sig ... end

The output signature of the functor MakeSeeded.

module MakeSeeded + (H : SeededHashedType) : + SeededS with type key = H.t and type 'a t = 'a Hashtbl.MakeSeeded(H).t

Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

The polymorphic hash functions

val hash : 'a -> int

Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

val seeded_hash : int -> 'a -> int

A variant of hash that is further parameterized by an integer seed.

  • since 4.00
val hash_param : int -> int -> 'a -> int

Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

val seeded_hash_param : int -> int -> int -> 'a -> int

A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

  • since 4.00

Examples

Basic Example

(* 0...99 *)
+let seq = Seq.ints 0 |> Seq.take 100
+
+(* build from Seq.t *)
+# let tbl =
+    seq
+    |> Seq.map (fun x -> x, string_of_int x)
+    |> Hashtbl.of_seq
+val tbl : (int, string) Hashtbl.t = <abstr>
+
+# Hashtbl.length tbl
+- : int = 100
+
+# Hashtbl.find_opt tbl 32
+- : string option = Some "32"
+
+# Hashtbl.find_opt tbl 166
+- : string option = None
+
+# Hashtbl.replace tbl 166 "one six six"
+- : unit = ()
+
+# Hashtbl.find_opt tbl 166
+- : string option = Some "one six six"
+
+# Hashtbl.length tbl
+- : int = 101

Counting Elements

Given a sequence of elements (here, a Seq.t), we want to count how many times each distinct element occurs in the sequence. A simple way to do this, assuming the elements are comparable and hashable, is to use a hash table that maps elements to their number of occurrences.

Here we illustrate that principle using a sequence of (ascii) characters (type char). We use a custom Char_tbl specialized for char.

# module Char_tbl = Hashtbl.Make(struct
+    type t = char
+    let equal = Char.equal
+    let hash = Hashtbl.hash
+  end)
+
+(*  count distinct occurrences of chars in [seq] *)
+# let count_chars (seq : char Seq.t) : _ list =
+    let counts = Char_tbl.create 16 in
+    Seq.iter
+      (fun c ->
+        let count_c =
+          Char_tbl.find_opt counts c
+          |> Option.value ~default:0
+        in
+        Char_tbl.replace counts c (count_c + 1))
+      seq;
+    (* turn into a list *)
+    Char_tbl.fold (fun c n l -> (c,n) :: l) counts []
+      |> List.sort (fun (c1,_)(c2,_) -> Char.compare c1 c2)
+val count_chars : Char_tbl.key Seq.t -> (Char.t * int) list = <fun>
+
+(* basic seq from a string *)
+# let seq = String.to_seq "hello world, and all the camels in it!"
+val seq : char Seq.t = <fun>
+
+# count_chars seq
+- : (Char.t * int) list =
+[(' ', 7); ('!', 1); (',', 1); ('a', 3); ('c', 1); ('d', 2); ('e', 3);
+ ('h', 2); ('i', 2); ('l', 6); ('m', 1); ('n', 2); ('o', 2); ('r', 1);
+ ('s', 1); ('t', 2); ('w', 1)]
+
+(* "abcabcabc..." *)
+# let seq2 =
+    Seq.cycle (String.to_seq "abc") |> Seq.take 31
+val seq2 : char Seq.t = <fun>
+
+# String.of_seq seq2
+- : String.t = "abcabcabcabcabcabcabcabcabcabca"
+
+# count_chars seq2
+- : (Char.t * int) list = [('a', 11); ('b', 10); ('c', 10)]
diff --git a/stdlib/Stdlib/MoreLabels/Hashtbl/module-type-HashedType/index.html b/stdlib/Stdlib/MoreLabels/Hashtbl/module-type-HashedType/index.html new file mode 100644 index 000000000..44b38ce0c --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Hashtbl/module-type-HashedType/index.html @@ -0,0 +1,2 @@ + +HashedType (docs.stdlib.Stdlib.MoreLabels.Hashtbl.HashedType)

Module type Hashtbl.HashedType

The input signature of the functor Make.

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/stdlib/Stdlib/MoreLabels/Hashtbl/module-type-S/index.html b/stdlib/Stdlib/MoreLabels/Hashtbl/module-type-S/index.html new file mode 100644 index 000000000..cfb9751f4 --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Hashtbl/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (docs.stdlib.Stdlib.MoreLabels.Hashtbl.S)

Module type Hashtbl.S

The output signature of the functor Make.

type key
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key:key -> data:'a -> unit
val mem : 'a t -> key -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/stdlib/Stdlib/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html b/stdlib/Stdlib/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html new file mode 100644 index 000000000..f2ab0876b --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html @@ -0,0 +1,2 @@ + +SeededHashedType (docs.stdlib.Stdlib.MoreLabels.Hashtbl.SeededHashedType)

Module type Hashtbl.SeededHashedType

The input signature of the functor MakeSeeded.

  • since 4.00
type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val seeded_hash : int -> t -> int

A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

diff --git a/stdlib/Stdlib/MoreLabels/Hashtbl/module-type-SeededS/index.html b/stdlib/Stdlib/MoreLabels/Hashtbl/module-type-SeededS/index.html new file mode 100644 index 000000000..dfad5cca4 --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Hashtbl/module-type-SeededS/index.html @@ -0,0 +1,2 @@ + +SeededS (docs.stdlib.Stdlib.MoreLabels.Hashtbl.SeededS)

Module type Hashtbl.SeededS

The output signature of the functor MakeSeeded.

  • since 4.00
type key
type !'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key:key -> data:'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key:key -> data:'a -> unit
val mem : 'a t -> key -> bool
val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> statistics
val to_seq : 'a t -> (key * 'a) Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t
  • since 4.07
diff --git a/stdlib/Stdlib/MoreLabels/Map/Make/argument-1-Ord/index.html b/stdlib/Stdlib/MoreLabels/Map/Make/argument-1-Ord/index.html new file mode 100644 index 000000000..6f78db6c0 --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Map/Make/argument-1-Ord/index.html @@ -0,0 +1,2 @@ + +Ord (docs.stdlib.Stdlib.MoreLabels.Map.Make.Ord)

Parameter Make.Ord

type t

The type of the map keys.

val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/stdlib/Stdlib/MoreLabels/Map/Make/index.html b/stdlib/Stdlib/MoreLabels/Map/Make/index.html new file mode 100644 index 000000000..03764b0e3 --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Map/Make/index.html @@ -0,0 +1,8 @@ + +Make (docs.stdlib.Stdlib.MoreLabels.Map.Make)

Module Map.Make

Functor building an implementation of the map structure given a totally ordered type.

Parameters

module Ord : OrderedType

Signature

Maps

type key = Ord.t

The type of the map keys.

type 'a t = 'a Map.Make(Ord).t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key:key -> data:'a -> 'a t -> 'a t

add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + f:(key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge ~f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : f:(key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union ~f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : f:(key -> bool) -> 'a t -> key * 'a

find_first ~f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : f:(key -> bool) -> 'a t -> (key * 'a) option

find_first_opt ~f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : f:(key -> bool) -> 'a t -> key * 'a

find_last ~f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : f:(key -> bool) -> 'a t -> (key * 'a) option

find_last_opt ~f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit

iter ~f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc

fold ~f m ~init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : f:('a -> 'b) -> 'a t -> 'b t

map ~f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : f:(key -> 'a -> bool) -> 'a t -> 'a t

filter ~f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : f:(key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map ~f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : f:(key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition ~f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal ~cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : cmp:('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : f:(key -> 'a -> bool) -> 'a t -> bool

for_all ~f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : f:(key -> 'a -> bool) -> 'a t -> bool

exists ~f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/stdlib/Stdlib/MoreLabels/Map/index.html b/stdlib/Stdlib/MoreLabels/Map/index.html new file mode 100644 index 000000000..a292b9728 --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Map/index.html @@ -0,0 +1,15 @@ + +Map (docs.stdlib.Stdlib.MoreLabels.Map)

Module MoreLabels.Map

Association tables over ordered types.

This module implements applicative association tables, also known as finite maps or dictionaries, given a total ordering function over the keys. All operations over maps are purely applicative (no side-effects). The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

For instance:

module IntPairs =
+  struct
+    type t = int * int
+    let compare (x0,y0) (x1,y1) =
+      match Stdlib.compare x0 x1 with
+          0 -> Stdlib.compare y0 y1
+        | c -> c
+  end
+
+module PairsMap = Map.Make(IntPairs)
+
+let m = PairsMap.(empty |> add (0,1) "hello" |> add (1,0) "world")

This creates a new module PairsMap, with a new type 'a PairsMap.t of maps from int * int to 'a. In this example, m contains string values so its type is string PairsMap.t.

module type OrderedType = sig ... end

Input signature of the functor Make.

module type S = sig ... end

Output signature of the functor Make.

module Make + (Ord : OrderedType) : + S with type key = Ord.t and type 'a t = 'a Map.Make(Ord).t

Functor building an implementation of the map structure given a totally ordered type.

diff --git a/stdlib/Stdlib/MoreLabels/Map/module-type-OrderedType/index.html b/stdlib/Stdlib/MoreLabels/Map/module-type-OrderedType/index.html new file mode 100644 index 000000000..7cfce626e --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Map/module-type-OrderedType/index.html @@ -0,0 +1,2 @@ + +OrderedType (docs.stdlib.Stdlib.MoreLabels.Map.OrderedType)

Module type Map.OrderedType

Input signature of the functor Make.

type t

The type of the map keys.

val compare : t -> t -> int

A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/stdlib/Stdlib/MoreLabels/Map/module-type-S/index.html b/stdlib/Stdlib/MoreLabels/Map/module-type-S/index.html new file mode 100644 index 000000000..e06a9fb21 --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Map/module-type-S/index.html @@ -0,0 +1,8 @@ + +S (docs.stdlib.Stdlib.MoreLabels.Map.S)

Module type Map.S

Output signature of the functor Make.

Maps

type key

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key:key -> data:'a -> 'a t -> 'a t

add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : + f:(key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t

merge ~f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : f:(key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union ~f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : f:(key -> bool) -> 'a t -> key * 'a

find_first ~f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : f:(key -> bool) -> 'a t -> (key * 'a) option

find_first_opt ~f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : f:(key -> bool) -> 'a t -> key * 'a

find_last ~f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : f:(key -> bool) -> 'a t -> (key * 'a) option

find_last_opt ~f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit

iter ~f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc

fold ~f m ~init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : f:('a -> 'b) -> 'a t -> 'b t

map ~f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : f:(key -> 'a -> bool) -> 'a t -> 'a t

filter ~f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : f:(key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map ~f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  (fun _k li -> match li with [] -> None | _::tl -> Some tl)
+  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : f:(key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition ~f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal ~cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : cmp:('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : f:(key -> 'a -> bool) -> 'a t -> bool

for_all ~f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : f:(key -> 'a -> bool) -> 'a t -> bool

exists ~f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/stdlib/Stdlib/MoreLabels/Set/Make/argument-1-Ord/index.html b/stdlib/Stdlib/MoreLabels/Set/Make/argument-1-Ord/index.html new file mode 100644 index 000000000..ca5b59dfa --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Set/Make/argument-1-Ord/index.html @@ -0,0 +1,2 @@ + +Ord (docs.stdlib.Stdlib.MoreLabels.Set.Make.Ord)

Parameter Make.Ord

type t

The type of the set elements.

val compare : t -> t -> int

A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/stdlib/Stdlib/MoreLabels/Set/Make/index.html b/stdlib/Stdlib/MoreLabels/Set/Make/index.html new file mode 100644 index 000000000..ed2d5914b --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Set/Make/index.html @@ -0,0 +1,3 @@ + +Make (docs.stdlib.Stdlib.MoreLabels.Set.Make)

Module Set.Make

Functor building an implementation of the set structure given a totally ordered type.

Parameters

module Ord : OrderedType

Signature

Sets

type elt = Ord.t

The type of the set elements.

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : f:(elt -> bool) -> t -> elt

find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : f:(elt -> bool) -> t -> elt option

find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : f:(elt -> bool) -> t -> elt

find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : f:(elt -> bool) -> t -> elt option

find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : f:(elt -> unit) -> t -> unit

iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : f:(elt -> elt) -> t -> t

map ~f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : f:(elt -> bool) -> t -> t

filter ~f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : f:(elt -> elt option) -> t -> t

filter_map ~f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : f:(elt -> bool) -> t -> t * t

partition ~f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : f:(elt -> bool) -> t -> bool

for_all ~f s checks if all elements of the set satisfy the predicate f.

val exists : f:(elt -> bool) -> t -> bool

exists ~f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/stdlib/Stdlib/MoreLabels/Set/index.html b/stdlib/Stdlib/MoreLabels/Set/index.html new file mode 100644 index 000000000..3f22286a1 --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Set/index.html @@ -0,0 +1,15 @@ + +Set (docs.stdlib.Stdlib.MoreLabels.Set)

Module MoreLabels.Set

Sets over ordered types.

This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance.

The Make functor constructs implementations for any type, given a compare function. For instance:

module IntPairs =
+  struct
+    type t = int * int
+    let compare (x0,y0) (x1,y1) =
+      match Stdlib.compare x0 x1 with
+          0 -> Stdlib.compare y0 y1
+        | c -> c
+  end
+
+module PairsSet = Set.Make(IntPairs)
+
+let m = PairsSet.(empty |> add (2,3) |> add (5,7) |> add (11,13))

This creates a new module PairsSet, with a new type PairsSet.t of sets of int * int.

module type OrderedType = sig ... end

Input signature of the functor Make.

module type S = sig ... end

Output signature of the functor Make.

module Make + (Ord : OrderedType) : + S with type elt = Ord.t and type t = Set.Make(Ord).t

Functor building an implementation of the set structure given a totally ordered type.

diff --git a/stdlib/Stdlib/MoreLabels/Set/module-type-OrderedType/index.html b/stdlib/Stdlib/MoreLabels/Set/module-type-OrderedType/index.html new file mode 100644 index 000000000..aaeadfd58 --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Set/module-type-OrderedType/index.html @@ -0,0 +1,2 @@ + +OrderedType (docs.stdlib.Stdlib.MoreLabels.Set.OrderedType)

Module type Set.OrderedType

Input signature of the functor Make.

type t

The type of the set elements.

val compare : t -> t -> int

A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/stdlib/Stdlib/MoreLabels/Set/module-type-S/index.html b/stdlib/Stdlib/MoreLabels/Set/module-type-S/index.html new file mode 100644 index 000000000..141eb18a4 --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/Set/module-type-S/index.html @@ -0,0 +1,3 @@ + +S (docs.stdlib.Stdlib.MoreLabels.Set.S)

Module type Set.S

Output signature of the functor Make.

Sets

type elt

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : f:(elt -> bool) -> t -> elt

find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : f:(elt -> bool) -> t -> elt option

find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : f:(elt -> bool) -> t -> elt

find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : f:(elt -> bool) -> t -> elt option

find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : f:(elt -> unit) -> t -> unit

iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : f:(elt -> elt) -> t -> t

map ~f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : f:(elt -> bool) -> t -> t

filter ~f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : f:(elt -> elt option) -> t -> t

filter_map ~f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : f:(elt -> bool) -> t -> t * t

partition ~f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : f:(elt -> bool) -> t -> bool

for_all ~f s checks if all elements of the set satisfy the predicate f.

val exists : f:(elt -> bool) -> t -> bool

exists ~f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/stdlib/Stdlib/MoreLabels/index.html b/stdlib/Stdlib/MoreLabels/index.html new file mode 100644 index 000000000..bd945dea4 --- /dev/null +++ b/stdlib/Stdlib/MoreLabels/index.html @@ -0,0 +1,4 @@ + +MoreLabels (docs.stdlib.Stdlib.MoreLabels)

Module Stdlib.MoreLabels

Extra labeled libraries.

This meta-module provides labelized versions of the Hashtbl, Map and Set modules.

This module is intended to be used through open MoreLabels which replaces Hashtbl, Map, and Set with their labeled counterparts.

For example:

open MoreLabels
+
+Hashtbl.iter ~f:(fun ~key ~data -> g key data) table
module Hashtbl : sig ... end

Hash tables and hash functions.

module Map : sig ... end

Association tables over ordered types.

module Set : sig ... end

Sets over ordered types.

diff --git a/stdlib/Stdlib/Mutex/index.html b/stdlib/Stdlib/Mutex/index.html new file mode 100644 index 000000000..be37952bd --- /dev/null +++ b/stdlib/Stdlib/Mutex/index.html @@ -0,0 +1,4 @@ + +Mutex (docs.stdlib.Stdlib.Mutex)

Module Stdlib.Mutex

Locks for mutual exclusion.

Mutexes (mutual-exclusion locks) are used to implement critical sections and protect shared mutable data structures against concurrent accesses. The typical use is (if m is the mutex associated with the data structure D):

Mutex.lock m;
+(* Critical section that operates over D *);
+Mutex.unlock m
type t

The type of mutexes.

val create : unit -> t

Return a new mutex.

val lock : t -> unit

Lock the given mutex. Only one thread can have the mutex locked at any time. A thread that attempts to lock a mutex already locked by another thread will suspend until the other thread unlocks the mutex.

  • before 4.12

    Sys_error was not raised for recursive locking (platform-dependent behaviour)

val try_lock : t -> bool

Same as Mutex.lock, but does not suspend the calling thread if the mutex is already locked: just return false immediately in that case. If the mutex is unlocked, lock it and return true.

val unlock : t -> unit

Unlock the given mutex. Other threads suspended trying to lock the mutex will restart. The mutex must have been previously locked by the thread that calls Mutex.unlock.

  • raises Sys_error

    if the mutex is unlocked or was locked by another thread.

  • before 4.12

    Sys_error was not raised when unlocking an unlocked mutex or when unlocking a mutex from a different thread.

val protect : t -> (unit -> 'a) -> 'a

protect mutex f runs f() in a critical section where mutex is locked (using lock); it then takes care of releasing mutex, whether f() returned a value or raised an exception.

The unlocking operation is guaranteed to always takes place, even in the event an asynchronous exception (e.g. Sys.Break) is raised in some signal handler.

  • since 5.1
diff --git a/stdlib/Stdlib/Nativeint/index.html b/stdlib/Stdlib/Nativeint/index.html new file mode 100644 index 000000000..e14198be9 --- /dev/null +++ b/stdlib/Stdlib/Nativeint/index.html @@ -0,0 +1,5 @@ + +Nativeint (docs.stdlib.Stdlib.Nativeint)

Module Stdlib.Nativeint

Processor-native integers.

This module provides operations on the type nativeint of signed 32-bit integers (on 32-bit platforms) or signed 64-bit integers (on 64-bit platforms). This integer type has exactly the same width as that of a pointer type in the C compiler. All arithmetic operations over nativeint are taken modulo 232 or 264 depending on the word size of the architecture.

Performance notice: values of type nativeint occupy more memory space than values of type int, and arithmetic operations on nativeint are generally slower than those on int. Use nativeint only when the application requires the extra bit of precision over the int type.

Literals for native integers are suffixed by n:

let zero: nativeint = 0n
+let one: nativeint = 1n
+let m_one: nativeint = -1n
val zero : nativeint

The native integer 0.

val one : nativeint

The native integer 1.

val minus_one : nativeint

The native integer -1.

val neg : nativeint -> nativeint

Unary negation.

val add : nativeint -> nativeint -> nativeint

Addition.

val sub : nativeint -> nativeint -> nativeint

Subtraction.

val mul : nativeint -> nativeint -> nativeint

Multiplication.

val div : nativeint -> nativeint -> nativeint

Integer division. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

val unsigned_div : nativeint -> nativeint -> nativeint

Same as div, except that arguments and result are interpreted as unsigned native integers.

  • since 4.08
val rem : nativeint -> nativeint -> nativeint

Integer remainder. If y is not zero, the result of Nativeint.rem x y satisfies the following properties: Nativeint.zero <= Nativeint.rem x y < Nativeint.abs y and x = Nativeint.add (Nativeint.mul (Nativeint.div x y) y) + (Nativeint.rem x y). If y = 0, Nativeint.rem x y raises Division_by_zero.

val unsigned_rem : nativeint -> nativeint -> nativeint

Same as rem, except that arguments and result are interpreted as unsigned native integers.

  • since 4.08
val succ : nativeint -> nativeint

Successor. Nativeint.succ x is Nativeint.add x Nativeint.one.

val pred : nativeint -> nativeint

Predecessor. Nativeint.pred x is Nativeint.sub x Nativeint.one.

val abs : nativeint -> nativeint

abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

val size : int

The size in bits of a native integer. This is equal to 32 on a 32-bit platform and to 64 on a 64-bit platform.

val max_int : nativeint

The greatest representable native integer, either 231 - 1 on a 32-bit platform, or 263 - 1 on a 64-bit platform.

val min_int : nativeint

The smallest representable native integer, either -231 on a 32-bit platform, or -263 on a 64-bit platform.

val logand : nativeint -> nativeint -> nativeint

Bitwise logical and.

val logor : nativeint -> nativeint -> nativeint

Bitwise logical or.

val logxor : nativeint -> nativeint -> nativeint

Bitwise logical exclusive or.

val lognot : nativeint -> nativeint

Bitwise logical negation.

val shift_left : nativeint -> int -> nativeint

Nativeint.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= bitsize, where bitsize is 32 on a 32-bit platform and 64 on a 64-bit platform.

val shift_right : nativeint -> int -> nativeint

Nativeint.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= bitsize.

val shift_right_logical : nativeint -> int -> nativeint

Nativeint.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= bitsize.

val of_int : int -> nativeint

Convert the given integer (type int) to a native integer (type nativeint).

val to_int : nativeint -> int

Convert the given native integer (type nativeint) to an integer (type int). The high-order bit is lost during the conversion.

val unsigned_to_int : nativeint -> int option

Same as to_int, but interprets the argument as an unsigned integer. Returns None if the unsigned value of the argument cannot fit into an int.

  • since 4.08
val of_float : float -> nativeint

Convert the given floating-point number to a native integer, discarding the fractional part (truncate towards 0). If the truncated floating-point number is outside the range [Nativeint.min_int, Nativeint.max_int], no exception is raised, and an unspecified, platform-dependent integer is returned.

val to_float : nativeint -> float

Convert the given native integer to a floating-point number.

val of_int32 : int32 -> nativeint

Convert the given 32-bit integer (type int32) to a native integer.

val to_int32 : nativeint -> int32

Convert the given native integer to a 32-bit integer (type int32). On 64-bit platforms, the 64-bit native integer is taken modulo 232, i.e. the top 32 bits are lost. On 32-bit platforms, the conversion is exact.

val of_string : string -> nativeint

Convert the given string to a native integer. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.

The 0u prefix reads the input as an unsigned integer in the range [0, 2*Nativeint.max_int+1]. If the input exceeds Nativeint.max_int it is converted to the signed integer Int64.min_int + input - Nativeint.max_int - 1.

  • raises Failure

    if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type nativeint.

val of_string_opt : string -> nativeint option

Same as of_string, but return None instead of raising.

  • since 4.05
val to_string : nativeint -> string

Return the string representation of its argument, in decimal.

type t = nativeint

An alias for the type of native integers.

val compare : t -> t -> int

The comparison function for native integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Nativeint to be passed as argument to the functors Set.Make and Map.Make.

val unsigned_compare : t -> t -> int

Same as compare, except that arguments are interpreted as unsigned native integers.

  • since 4.08
val equal : t -> t -> bool

The equal function for native ints.

  • since 4.03
val min : t -> t -> t

Return the smaller of the two arguments.

  • since 4.13
val max : t -> t -> t

Return the greater of the two arguments.

  • since 4.13
val seeded_hash : int -> t -> int

A seeded hash function for native ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.1
val hash : t -> int

An unseeded hash function for native ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.1
diff --git a/stdlib/Stdlib/Obj/Closure/index.html b/stdlib/Stdlib/Obj/Closure/index.html new file mode 100644 index 000000000..dfc650ecc --- /dev/null +++ b/stdlib/Stdlib/Obj/Closure/index.html @@ -0,0 +1,2 @@ + +Closure (docs.stdlib.Stdlib.Obj.Closure)

Module Obj.Closure

type info = {
  1. arity : int;
  2. start_env : int;
}
val info : t -> info
diff --git a/stdlib/Stdlib/Obj/Ephemeron/index.html b/stdlib/Stdlib/Obj/Ephemeron/index.html new file mode 100644 index 000000000..c0270731c --- /dev/null +++ b/stdlib/Stdlib/Obj/Ephemeron/index.html @@ -0,0 +1,2 @@ + +Ephemeron (docs.stdlib.Stdlib.Obj.Ephemeron)

Module Obj.Ephemeron

Ephemeron with arbitrary arity and untyped

type obj_t = t

alias for Obj.t

type t

an ephemeron cf Ephemeron

val create : int -> t

create n returns an ephemeron with n keys. All the keys and the data are initially empty. The argument n must be between zero and max_ephe_length (limits included).

val length : t -> int

return the number of keys

val get_key : t -> int -> obj_t option
val get_key_copy : t -> int -> obj_t option
val set_key : t -> int -> obj_t -> unit
val unset_key : t -> int -> unit
val check_key : t -> int -> bool
val blit_key : t -> int -> t -> int -> int -> unit
val get_data : t -> obj_t option
val get_data_copy : t -> obj_t option
val set_data : t -> obj_t -> unit
val unset_data : t -> unit
val check_data : t -> bool
val blit_data : t -> t -> unit
val max_ephe_length : int

Maximum length of an ephemeron, ie the maximum number of keys an ephemeron could contain

diff --git a/stdlib/Stdlib/Obj/Extension_constructor/index.html b/stdlib/Stdlib/Obj/Extension_constructor/index.html new file mode 100644 index 000000000..798897500 --- /dev/null +++ b/stdlib/Stdlib/Obj/Extension_constructor/index.html @@ -0,0 +1,2 @@ + +Extension_constructor (docs.stdlib.Stdlib.Obj.Extension_constructor)

Module Obj.Extension_constructor

type t = extension_constructor
val of_val : 'a -> t
val name : t -> string
val id : t -> int
diff --git a/stdlib/Stdlib/Obj/index.html b/stdlib/Stdlib/Obj/index.html new file mode 100644 index 000000000..404c6277f --- /dev/null +++ b/stdlib/Stdlib/Obj/index.html @@ -0,0 +1,2 @@ + +Obj (docs.stdlib.Stdlib.Obj)

Module Stdlib.Obj

Operations on internal representations of values.

Not for the casual user.

type t
type raw_data = nativeint
val repr : 'a -> t
val obj : t -> 'a
val magic : 'a -> 'b
val is_block : t -> bool
val is_int : t -> bool
val tag : t -> int
val size : t -> int
val reachable_words : t -> int

Computes the total size (in words, including the headers) of all heap blocks accessible from the argument. Statically allocated blocks are included.

  • since 4.04
val field : t -> int -> t
val set_field : t -> int -> t -> unit

When using flambda:

set_field MUST NOT be called on immutable blocks. (Blocks allocated in C stubs, or with new_block below, are always considered mutable.)

The same goes for set_double_field.

For experts only: set_field et al can be made safe by first wrapping the block in Sys.opaque_identity, so any information about its contents will not be propagated.

val double_field : t -> int -> float
val set_double_field : t -> int -> float -> unit
val raw_field : t -> int -> raw_data
val set_raw_field : t -> int -> raw_data -> unit
val new_block : int -> int -> t
val dup : t -> t
val add_offset : t -> Int32.t -> t
val with_tag : int -> t -> t
val first_non_constant_constructor_tag : int
val last_non_constant_constructor_tag : int
val forcing_tag : int
val cont_tag : int
val lazy_tag : int
val closure_tag : int
val object_tag : int
val infix_tag : int
val forward_tag : int
val no_scan_tag : int
val abstract_tag : int
val string_tag : int
val double_tag : int
val double_array_tag : int
val custom_tag : int
val int_tag : int
val out_of_heap_tag : int
val unaligned_tag : int
module Closure : sig ... end
module Extension_constructor : sig ... end
module Ephemeron : sig ... end

Ephemeron with arbitrary arity and untyped

diff --git a/stdlib/Stdlib/Oo/index.html b/stdlib/Stdlib/Oo/index.html new file mode 100644 index 000000000..605910b82 --- /dev/null +++ b/stdlib/Stdlib/Oo/index.html @@ -0,0 +1,2 @@ + +Oo (docs.stdlib.Stdlib.Oo)

Module Stdlib.Oo

Operations on objects

val copy : < .. > as 'a -> 'a

Oo.copy o returns a copy of object o, that is a fresh object with the same methods and instance variables as o.

  • alert unsynchronized_access Unsynchronized accesses to mutable objects are a programming error.
val id : < .. > -> int

Return an integer identifying this object, unique for the current execution of the program. The generic comparison and hashing functions are based on this integer. When an object is obtained by unmarshaling, the id is refreshed, and thus different from the original object. As a consequence, the internal invariants of data structures such as hash table or sets containing objects are broken after unmarshaling the data structures.

diff --git a/stdlib/Stdlib/Option/index.html b/stdlib/Stdlib/Option/index.html new file mode 100644 index 000000000..5ded0b7c6 --- /dev/null +++ b/stdlib/Stdlib/Option/index.html @@ -0,0 +1,2 @@ + +Option (docs.stdlib.Stdlib.Option)

Module Stdlib.Option

Option values.

Option values explicitly indicate the presence or absence of a value.

  • since 4.08

Options

type 'a t = 'a option =
  1. | None
  2. | Some of 'a

The type for option values. Either None or a value Some v.

val none : 'a option

none is None.

val some : 'a -> 'a option

some v is Some v.

val value : 'a option -> default:'a -> 'a

value o ~default is v if o is Some v and default otherwise.

val get : 'a option -> 'a

get o is v if o is Some v and raise otherwise.

val bind : 'a option -> ('a -> 'b option) -> 'b option

bind o f is f v if o is Some v and None if o is None.

val join : 'a option option -> 'a option

join oo is Some v if oo is Some (Some v) and None otherwise.

val map : ('a -> 'b) -> 'a option -> 'b option

map f o is None if o is None and Some (f v) if o is Some v.

val fold : none:'a -> some:('b -> 'a) -> 'b option -> 'a

fold ~none ~some o is none if o is None and some v if o is Some v.

val iter : ('a -> unit) -> 'a option -> unit

iter f o is f v if o is Some v and () otherwise.

Predicates and comparisons

val is_none : 'a option -> bool

is_none o is true if and only if o is None.

val is_some : 'a option -> bool

is_some o is true if and only if o is Some o.

val equal : ('a -> 'a -> bool) -> 'a option -> 'a option -> bool

equal eq o0 o1 is true if and only if o0 and o1 are both None or if they are Some v0 and Some v1 and eq v0 v1 is true.

val compare : ('a -> 'a -> int) -> 'a option -> 'a option -> int

compare cmp o0 o1 is a total order on options using cmp to compare values wrapped by Some _. None is smaller than Some _ values.

Converting

val to_result : none:'e -> 'a option -> ('a, 'e) result

to_result ~none o is Ok v if o is Some v and Error none otherwise.

val to_list : 'a option -> 'a list

to_list o is [] if o is None and [v] if o is Some v.

val to_seq : 'a option -> 'a Seq.t

to_seq o is o as a sequence. None is the empty sequence and Some v is the singleton sequence containing v.

diff --git a/stdlib/Stdlib/Out_channel/index.html b/stdlib/Stdlib/Out_channel/index.html new file mode 100644 index 000000000..2f4d36ce8 --- /dev/null +++ b/stdlib/Stdlib/Out_channel/index.html @@ -0,0 +1,5 @@ + +Out_channel (docs.stdlib.Stdlib.Out_channel)

Module Stdlib.Out_channel

Output channels.

This module provides functions for working with output channels.

See the example section below.

  • since 4.14

Channels

type t = out_channel

The type of output channel.

type open_flag = open_flag =
  1. | Open_rdonly
    (*

    open for reading.

    *)
  2. | Open_wronly
    (*

    open for writing.

    *)
  3. | Open_append
    (*

    open for appending: always write at end of file.

    *)
  4. | Open_creat
    (*

    create the file if it does not exist.

    *)
  5. | Open_trunc
    (*

    empty the file if it already exists.

    *)
  6. | Open_excl
    (*

    fail if Open_creat and the file already exists.

    *)
  7. | Open_binary
    (*

    open in binary mode (no conversion).

    *)
  8. | Open_text
    (*

    open in text mode (may perform conversions).

    *)
  9. | Open_nonblock
    (*

    open in non-blocking mode.

    *)

Opening modes for open_gen.

val stdout : t

The standard output for the process.

val stderr : t

The standard error output for the process.

val open_bin : string -> t

Open the named file for writing, and return a new output channel on that file, positioned at the beginning of the file. The file is truncated to zero length if it already exists. It is created if it does not already exists.

val open_text : string -> t

Same as open_bin, but the file is opened in text mode, so that newline translation takes place during writes. On operating systems that do not distinguish between text mode and binary mode, this function behaves like open_bin.

val open_gen : open_flag list -> int -> string -> t

open_gen mode perm filename opens the named file for writing, as described above. The extra argument mode specifies the opening mode. The extra argument perm specifies the file permissions, in case the file must be created. open_text and open_bin are special cases of this function.

val with_open_bin : string -> (t -> 'a) -> 'a

with_open_bin fn f opens a channel oc on file fn and returns f + oc. After f returns, either with a value or by raising an exception, oc is guaranteed to be closed.

val with_open_text : string -> (t -> 'a) -> 'a

Like with_open_bin, but the channel is opened in text mode (see open_text).

val with_open_gen : open_flag list -> int -> string -> (t -> 'a) -> 'a

Like with_open_bin, but can specify the opening mode and file permission, in case the file must be created (see open_gen).

val close : t -> unit

Close the given channel, flushing all buffered write operations. Output functions raise a Sys_error exception when they are applied to a closed output channel, except close and flush, which do nothing when applied to an already closed channel. Note that close may raise Sys_error if the operating system signals an error when flushing or closing.

val close_noerr : t -> unit

Same as close, but ignore all errors.

Output

val output_char : t -> char -> unit

Write the character on the given output channel.

val output_byte : t -> int -> unit

Write one 8-bit integer (as the single character with that code) on the given output channel. The given integer is taken modulo 256.

val output_string : t -> string -> unit

Write the string on the given output channel.

val output_bytes : t -> bytes -> unit

Write the byte sequence on the given output channel.

Advanced output

val output : t -> bytes -> int -> int -> unit

output oc buf pos len writes len characters from byte sequence buf, starting at offset pos, to the given output channel oc.

val output_substring : t -> string -> int -> int -> unit

Same as output but take a string as argument instead of a byte sequence.

Flushing

val flush : t -> unit

Flush the buffer associated with the given output channel, performing all pending writes on that channel. Interactive programs must be careful about flushing standard output and standard error at the right time.

val flush_all : unit -> unit

Flush all open output channels; ignore errors.

Seeking

val seek : t -> int64 -> unit

seek chan pos sets the current writing position to pos for channel chan. This works only for regular files. On files of other kinds (such as terminals, pipes and sockets), the behavior is unspecified.

val pos : t -> int64

Return the current writing position for the given channel. Does not work on channels opened with the Open_append flag (returns unspecified results).

For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos, then going back to this position using seek will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

Attributes

val length : t -> int64

Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless.

val set_binary_mode : t -> bool -> unit

set_binary_mode oc true sets the channel oc to binary mode: no translations take place during output.

set_binary_mode oc false sets the channel oc to text mode: depending on the operating system, some translations may take place during output. For instance, under Windows, end-of-lines will be translated from \n to \r\n.

This function has no effect under operating systems that do not distinguish between text mode and binary mode.

val set_buffered : t -> bool -> unit

set_buffered oc true sets the channel oc to buffered mode. In this mode, data output on oc will be buffered until either the internal buffer is full or the function flush or flush_all is called, at which point it will be sent to the output device.

set_buffered oc false sets the channel oc to unbuffered mode. In this mode, data output on oc will be sent to the output device immediately.

All channels are open in buffered mode by default.

val is_buffered : t -> bool

is_buffered oc returns whether the channel oc is buffered (see set_buffered).

val isatty : t -> bool

isatty oc is true if oc refers to a terminal or console window, false otherwise.

  • since 5.1

Examples

Writing the contents of a file:

let write_file file s =
+  Out_channel.with_open_bin file
+    (fun oc -> Out_channel.output_string oc s))
diff --git a/stdlib/Stdlib/Parsing/index.html b/stdlib/Stdlib/Parsing/index.html new file mode 100644 index 000000000..af3843e8e --- /dev/null +++ b/stdlib/Stdlib/Parsing/index.html @@ -0,0 +1,2 @@ + +Parsing (docs.stdlib.Stdlib.Parsing)

Module Stdlib.Parsing

The run-time library for parsers generated by ocamlyacc.

val symbol_start : unit -> int

symbol_start and Parsing.symbol_end are to be called in the action part of a grammar rule only. They return the offset of the string that matches the left-hand side of the rule: symbol_start() returns the offset of the first character; symbol_end() returns the offset after the last character. The first character in a file is at offset 0.

val symbol_end : unit -> int
val rhs_start : int -> int

Same as Parsing.symbol_start and Parsing.symbol_end, but return the offset of the string matching the nth item on the right-hand side of the rule, where n is the integer parameter to rhs_start and rhs_end. n is 1 for the leftmost item.

val rhs_end : int -> int
val symbol_start_pos : unit -> Lexing.position

Same as symbol_start, but return a position instead of an offset.

val symbol_end_pos : unit -> Lexing.position

Same as symbol_end, but return a position instead of an offset.

val rhs_start_pos : int -> Lexing.position

Same as rhs_start, but return a position instead of an offset.

val rhs_end_pos : int -> Lexing.position

Same as rhs_end, but return a position instead of an offset.

val clear_parser : unit -> unit

Empty the parser stack. Call it just after a parsing function has returned, to remove all pointers from the parser stack to structures that were built by semantic actions during parsing. This is optional, but lowers the memory requirements of the programs.

exception Parse_error

Raised when a parser encounters a syntax error. Can also be raised from the action part of a grammar rule, to initiate error recovery.

val set_trace : bool -> bool

Control debugging support for ocamlyacc-generated parsers. After Parsing.set_trace true, the pushdown automaton that executes the parsers prints a trace of its actions (reading a token, shifting a state, reducing by a rule) on standard output. Parsing.set_trace false turns this debugging trace off. The boolean returned is the previous state of the trace flag.

  • since 3.11
diff --git a/stdlib/Stdlib/Printexc/Slot/index.html b/stdlib/Stdlib/Printexc/Slot/index.html new file mode 100644 index 000000000..92c63d900 --- /dev/null +++ b/stdlib/Stdlib/Printexc/Slot/index.html @@ -0,0 +1,2 @@ + +Slot (docs.stdlib.Stdlib.Printexc.Slot)

Module Printexc.Slot

  • since 4.02
val is_raise : t -> bool

is_raise slot is true when slot refers to a raising point in the code, and false when it comes from a simple function call.

  • since 4.02
val is_inline : t -> bool

is_inline slot is true when slot refers to a call that got inlined by the compiler, and false when it comes from any other context.

  • since 4.04
val location : t -> location option

location slot returns the location information of the slot, if available, and None otherwise.

Some possible reasons for failing to return a location are as follow:

  • the slot corresponds to a compiler-inserted raise
  • the slot corresponds to a part of the program that has not been compiled with debug information (-g)
  • since 4.02
val name : t -> string option

name slot returns the name of the function or definition enclosing the location referred to by the slot.

name slot returns None if the name is unavailable, which may happen for the same reasons as location returning None.

  • since 4.11
val format : int -> t -> string option

format pos slot returns the string representation of slot as raw_backtrace_to_string would format it, assuming it is the pos-th element of the backtrace: the 0-th element is pretty-printed differently than the others.

Whole-backtrace printing functions also skip some uninformative slots; in that case, format pos slot returns None.

  • since 4.02
diff --git a/stdlib/Stdlib/Printexc/index.html b/stdlib/Stdlib/Printexc/index.html new file mode 100644 index 000000000..07a3ed852 --- /dev/null +++ b/stdlib/Stdlib/Printexc/index.html @@ -0,0 +1,18 @@ + +Printexc (docs.stdlib.Stdlib.Printexc)

Module Stdlib.Printexc

Facilities for printing exceptions and inspecting current call stack.

type t = exn = ..

The type of exception values.

val to_string : exn -> string

Printexc.to_string e returns a string representation of the exception e.

val to_string_default : exn -> string

Printexc.to_string_default e returns a string representation of the exception e, ignoring all registered exception printers.

  • since 4.09
val print : ('a -> 'b) -> 'a -> 'b

Printexc.print fn x applies fn to x and returns the result. If the evaluation of fn x raises any exception, the name of the exception is printed on standard error output, and the exception is raised again. The typical use is to catch and report exceptions that escape a function application.

val catch : ('a -> 'b) -> 'a -> 'b

Printexc.catch fn x is similar to Printexc.print, but aborts the program with exit code 2 after printing the uncaught exception. This function is deprecated: the runtime system is now able to print uncaught exceptions as precisely as Printexc.catch does. Moreover, calling Printexc.catch makes it harder to track the location of the exception using the debugger or the stack backtrace facility. So, do not use Printexc.catch in new code.

  • deprecated This function is no longer needed.
val print_backtrace : out_channel -> unit

Printexc.print_backtrace oc prints an exception backtrace on the output channel oc. The backtrace lists the program locations where the most-recently raised exception was raised and where it was propagated through function calls.

If the call is not inside an exception handler, the returned backtrace is unspecified. If the call is after some exception-catching code (before in the handler, or in a when-guard during the matching of the exception handler), the backtrace may correspond to a later exception than the handled one.

  • since 3.11
val get_backtrace : unit -> string

Printexc.get_backtrace () returns a string containing the same exception backtrace that Printexc.print_backtrace would print. Same restriction usage than print_backtrace.

  • since 3.11
val record_backtrace : bool -> unit

Printexc.record_backtrace b turns recording of exception backtraces on (if b = true) or off (if b = false). Initially, backtraces are not recorded, unless the b flag is given to the program through the OCAMLRUNPARAM variable.

  • since 3.11
val backtrace_status : unit -> bool

Printexc.backtrace_status() returns true if exception backtraces are currently recorded, false if not.

  • since 3.11
val register_printer : (exn -> string option) -> unit

Printexc.register_printer fn registers fn as an exception printer. The printer should return None or raise an exception if it does not know how to convert the passed exception, and Some + s with s the resulting string if it can convert the passed exception. Exceptions raised by the printer are ignored.

When converting an exception into a string, the printers will be invoked in the reverse order of their registrations, until a printer returns a Some s value (if no such printer exists, the runtime will use a generic printer).

When using this mechanism, one should be aware that an exception backtrace is attached to the thread that saw it raised, rather than to the exception itself. Practically, it means that the code related to fn should not use the backtrace if it has itself raised an exception before.

  • since 3.11.2
val use_printers : exn -> string option

Printexc.use_printers e returns None if there are no registered printers and Some s with else as the resulting string otherwise.

  • since 4.09

Raw backtraces

type raw_backtrace

The type raw_backtrace stores a backtrace in a low-level format, which can be converted to usable form using raw_backtrace_entries and backtrace_slots_of_raw_entry below.

Converting backtraces to backtrace_slots is slower than capturing the backtraces. If an application processes many backtraces, it can be useful to use raw_backtrace to avoid or delay conversion.

Raw backtraces cannot be marshalled. If you need marshalling, you should use the array returned by the backtrace_slots function of the next section.

  • since 4.01
type raw_backtrace_entry = private int

A raw_backtrace_entry is an element of a raw_backtrace.

Each raw_backtrace_entry is an opaque integer, whose value is not stable between different programs, or even between different runs of the same binary.

A raw_backtrace_entry can be converted to a usable form using backtrace_slots_of_raw_entry below. Note that, due to inlining, a single raw_backtrace_entry may convert to several backtrace_slots. Since the values of a raw_backtrace_entry are not stable, they cannot be marshalled. If they are to be converted, the conversion must be done by the process that generated them.

Again due to inlining, there may be multiple distinct raw_backtrace_entry values that convert to equal backtrace_slots. However, if two raw_backtrace_entrys are equal as integers, then they represent the same backtrace_slots.

  • since 4.12
val raw_backtrace_entries : raw_backtrace -> raw_backtrace_entry array
  • since 4.12
val get_raw_backtrace : unit -> raw_backtrace

Printexc.get_raw_backtrace () returns the same exception backtrace that Printexc.print_backtrace would print, but in a raw format. Same restriction usage than print_backtrace.

  • since 4.01
val print_raw_backtrace : out_channel -> raw_backtrace -> unit

Print a raw backtrace in the same format Printexc.print_backtrace uses.

  • since 4.01
val raw_backtrace_to_string : raw_backtrace -> string

Return a string from a raw backtrace, in the same format Printexc.get_backtrace uses.

  • since 4.01
val raise_with_backtrace : exn -> raw_backtrace -> 'a

Reraise the exception using the given raw_backtrace for the origin of the exception

  • since 4.05

Current call stack

val get_callstack : int -> raw_backtrace

Printexc.get_callstack n returns a description of the top of the call stack on the current program point (for the current thread), with at most n entries. (Note: this function is not related to exceptions at all, despite being part of the Printexc module.)

  • since 4.01

Uncaught exceptions

val default_uncaught_exception_handler : exn -> raw_backtrace -> unit

Printexc.default_uncaught_exception_handler prints the exception and backtrace on standard error output.

  • since 4.11
val set_uncaught_exception_handler : (exn -> raw_backtrace -> unit) -> unit

Printexc.set_uncaught_exception_handler fn registers fn as the handler for uncaught exceptions. The default handler is Printexc.default_uncaught_exception_handler.

Note that when fn is called all the functions registered with Stdlib.at_exit have already been called. Because of this you must make sure any output channel fn writes on is flushed.

Also note that exceptions raised by user code in the interactive toplevel are not passed to this function as they are caught by the toplevel itself.

If fn raises an exception, both the exceptions passed to fn and raised by fn will be printed with their respective backtrace.

  • since 4.02

Manipulation of backtrace information

These functions are used to traverse the slots of a raw backtrace and extract information from them in a programmer-friendly format.

type backtrace_slot

The abstract type backtrace_slot represents a single slot of a backtrace.

  • since 4.02
val backtrace_slots : raw_backtrace -> backtrace_slot array option

Returns the slots of a raw backtrace, or None if none of them contain useful information.

In the return array, the slot at index 0 corresponds to the most recent function call, raise, or primitive get_backtrace call in the trace.

Some possible reasons for returning None are as follow:

  • none of the slots in the trace come from modules compiled with debug information (-g)
  • the program is a bytecode program that has not been linked with debug information enabled (ocamlc -g)
  • since 4.02
val backtrace_slots_of_raw_entry : + raw_backtrace_entry -> + backtrace_slot array option

Returns the slots of a single raw backtrace entry, or None if this entry lacks debug information.

Slots are returned in the same order as backtrace_slots: the slot at index 0 is the most recent call, raise, or primitive, and subsequent slots represent callers.

  • since 4.12
type location = {
  1. filename : string;
  2. line_number : int;
  3. start_char : int;
  4. end_char : int;
}

The type of location information found in backtraces. start_char and end_char are positions relative to the beginning of the line.

  • since 4.02
module Slot : sig ... end

Raw backtrace slots

type raw_backtrace_slot

This type is used to iterate over the slots of a raw_backtrace. For most purposes, backtrace_slots_of_raw_entry is easier to use.

Like raw_backtrace_entry, values of this type are process-specific and must absolutely not be marshalled, and are unsafe to use for this reason (marshalling them may not fail, but un-marshalling and using the result will result in undefined behavior).

Elements of this type can still be compared and hashed: when two elements are equal, then they represent the same source location (the converse is not necessarily true in presence of inlining, for example).

  • since 4.02
val raw_backtrace_length : raw_backtrace -> int

raw_backtrace_length bckt returns the number of slots in the backtrace bckt.

  • since 4.02
val get_raw_backtrace_slot : raw_backtrace -> int -> raw_backtrace_slot

get_raw_backtrace_slot bckt pos returns the slot in position pos in the backtrace bckt.

  • since 4.02
val convert_raw_backtrace_slot : raw_backtrace_slot -> backtrace_slot

Extracts the user-friendly backtrace_slot from a low-level raw_backtrace_slot.

  • since 4.02
val get_raw_backtrace_next_slot : + raw_backtrace_slot -> + raw_backtrace_slot option

get_raw_backtrace_next_slot slot returns the next slot inlined, if any.

Sample code to iterate over all frames (inlined and non-inlined):

(* Iterate over inlined frames *)
+let rec iter_raw_backtrace_slot f slot =
+  f slot;
+  match get_raw_backtrace_next_slot slot with
+  | None -> ()
+  | Some slot' -> iter_raw_backtrace_slot f slot'
+
+(* Iterate over stack frames *)
+let iter_raw_backtrace f bt =
+  for i = 0 to raw_backtrace_length bt - 1 do
+    iter_raw_backtrace_slot f (get_raw_backtrace_slot bt i)
+  done
  • since 4.04

Exception slots

val exn_slot_id : exn -> int

Printexc.exn_slot_id returns an integer which uniquely identifies the constructor used to create the exception value exn (in the current runtime).

  • since 4.02
val exn_slot_name : exn -> string

Printexc.exn_slot_name exn returns the internal name of the constructor used to create the exception value exn.

  • since 4.02
diff --git a/stdlib/Stdlib/Printf/index.html b/stdlib/Stdlib/Printf/index.html new file mode 100644 index 000000000..724f6b469 --- /dev/null +++ b/stdlib/Stdlib/Printf/index.html @@ -0,0 +1,14 @@ + +Printf (docs.stdlib.Stdlib.Printf)

Module Stdlib.Printf

Formatted output functions.

val fprintf : out_channel -> ('a, out_channel, unit) format -> 'a

fprintf outchan format arg1 ... argN formats the arguments arg1 to argN according to the format string format, and outputs the resulting string on the channel outchan.

The format string is a character string which contains two types of objects: plain characters, which are simply copied to the output channel, and conversion specifications, each of which causes conversion and printing of arguments.

Conversion specifications have the following form:

% [flags] [width] [.precision] type

In short, a conversion specification consists in the % character, followed by optional modifiers and a type which is made of one or two characters.

The types and their meanings are:

  • d, i: convert an integer argument to signed decimal. The flag # adds underscores to large values for readability.
  • u, n, l, L, or N: convert an integer argument to unsigned decimal. Warning: n, l, L, and N are used for scanf, and should not be used for printf. The flag # adds underscores to large values for readability.
  • x: convert an integer argument to unsigned hexadecimal, using lowercase letters. The flag # adds a 0x prefix to non zero values.
  • X: convert an integer argument to unsigned hexadecimal, using uppercase letters. The flag # adds a 0X prefix to non zero values.
  • o: convert an integer argument to unsigned octal. The flag # adds a 0 prefix to non zero values.
  • s: insert a string argument.
  • S: convert a string argument to OCaml syntax (double quotes, escapes).
  • c: insert a character argument.
  • C: convert a character argument to OCaml syntax (single quotes, escapes).
  • f: convert a floating-point argument to decimal notation, in the style dddd.ddd.
  • F: convert a floating-point argument to OCaml syntax (dddd. or dddd.ddd or d.ddd e+-dd). Converts to hexadecimal with the # flag (see h).
  • e or E: convert a floating-point argument to decimal notation, in the style d.ddd e+-dd (mantissa and exponent).
  • g or G: convert a floating-point argument to decimal notation, in style f or e, E (whichever is more compact). Moreover, any trailing zeros are removed from the fractional part of the result and the decimal-point character is removed if there is no fractional part remaining.
  • h or H: convert a floating-point argument to hexadecimal notation, in the style 0xh.hhhh p+-dd (hexadecimal mantissa, exponent in decimal and denotes a power of 2).
  • B: convert a boolean argument to the string true or false
  • b: convert a boolean argument (deprecated; do not use in new programs).
  • ld, li, lu, lx, lX, lo: convert an int32 argument to the format specified by the second letter (decimal, hexadecimal, etc).
  • nd, ni, nu, nx, nX, no: convert a nativeint argument to the format specified by the second letter.
  • Ld, Li, Lu, Lx, LX, Lo: convert an int64 argument to the format specified by the second letter.
  • a: user-defined printer. Take two arguments and apply the first one to outchan (the current output channel) and to the second argument. The first argument must therefore have type out_channel -> 'b -> unit and the second 'b. The output produced by the function is inserted in the output of fprintf at the current point.
  • t: same as %a, but take only one argument (with type out_channel -> unit) and apply it to outchan.
  • \{ fmt %\}: convert a format string argument to its type digest. The argument must have the same type as the internal format string fmt.
  • ( fmt %): format string substitution. Take a format string argument and substitute it to the internal format string fmt to print following arguments. The argument must have the same type as the internal format string fmt.
  • !: take no argument and flush the output.
  • %: take no argument and output one % character.
  • \@: take no argument and output one \@ character.
  • ,: take no argument and output nothing: a no-op delimiter for conversion specifications.

The optional flags are:

  • -: left-justify the output (default is right justification).
  • 0: for numerical conversions, pad with zeroes instead of spaces.
  • +: for signed numerical conversions, prefix number with a + sign if positive.
  • space: for signed numerical conversions, prefix number with a space if positive.
  • #: request an alternate formatting style for the integer types and the floating-point type F.

The optional width is an integer indicating the minimal width of the result. For instance, %6d prints an integer, prefixing it with spaces to fill at least 6 characters.

The optional precision is a dot . followed by an integer indicating how many digits follow the decimal point in the %f, %e, %E, %h, and %H conversions or the maximum number of significant digits to appear for the %F, %g and %G conversions. For instance, %.4f prints a float with 4 fractional digits.

The integer in a width or precision can also be specified as *, in which case an extra integer argument is taken to specify the corresponding width or precision. This integer argument precedes immediately the argument to print. For instance, %.*f prints a float with as many fractional digits as the value of the argument given before the float.

val printf : ('a, out_channel, unit) format -> 'a

Same as Printf.fprintf, but output on stdout.

val eprintf : ('a, out_channel, unit) format -> 'a

Same as Printf.fprintf, but output on stderr.

val sprintf : ('a, unit, string) format -> 'a

Same as Printf.fprintf, but instead of printing on an output channel, return a string containing the result of formatting the arguments.

val bprintf : Buffer.t -> ('a, Buffer.t, unit) format -> 'a

Same as Printf.fprintf, but instead of printing on an output channel, append the formatted arguments to the given extensible buffer (see module Buffer).

val ifprintf : 'b -> ('a, 'b, 'c, unit) format4 -> 'a

Same as Printf.fprintf, but does not print anything. Useful to ignore some material when conditionally printing.

  • since 3.10
val ibprintf : Buffer.t -> ('a, Buffer.t, unit) format -> 'a

Same as Printf.bprintf, but does not print anything. Useful to ignore some material when conditionally printing.

  • since 4.11

Formatted output functions with continuations.

val kfprintf : + (out_channel -> 'd) -> + out_channel -> + ('a, out_channel, unit, 'd) format4 -> + 'a

Same as fprintf, but instead of returning immediately, passes the out channel to its first argument at the end of printing.

  • since 3.09
val ikfprintf : ('b -> 'd) -> 'b -> ('a, 'b, 'c, 'd) format4 -> 'a

Same as kfprintf above, but does not print anything. Useful to ignore some material when conditionally printing.

  • since 4.01
val ksprintf : (string -> 'd) -> ('a, unit, string, 'd) format4 -> 'a

Same as sprintf above, but instead of returning the string, passes it to the first argument.

  • since 3.09
val kbprintf : + (Buffer.t -> 'd) -> + Buffer.t -> + ('a, Buffer.t, unit, 'd) format4 -> + 'a

Same as bprintf, but instead of returning immediately, passes the buffer to its first argument at the end of printing.

  • since 3.10
val ikbprintf : + (Buffer.t -> 'd) -> + Buffer.t -> + ('a, Buffer.t, unit, 'd) format4 -> + 'a

Same as kbprintf above, but does not print anything. Useful to ignore some material when conditionally printing.

  • since 4.11

Deprecated

val kprintf : (string -> 'b) -> ('a, unit, string, 'b) format4 -> 'a

A deprecated synonym for ksprintf.

  • deprecated Use Printf.ksprintf instead.
diff --git a/stdlib/Stdlib/Queue/index.html b/stdlib/Stdlib/Queue/index.html new file mode 100644 index 000000000..b526641f6 --- /dev/null +++ b/stdlib/Stdlib/Queue/index.html @@ -0,0 +1,78 @@ + +Queue (docs.stdlib.Stdlib.Queue)

Module Stdlib.Queue

First-in first-out queues.

This module implements queues (FIFOs), with in-place modification. See the example section below.

Unsynchronized accesses

Unsynchronized accesses to a queue may lead to an invalid queue state. Thus, concurrent accesses to queues must be synchronized (for instance with a Mutex.t).

type !'a t

The type of queues containing elements of type 'a.

exception Empty

Raised when Queue.take or Queue.peek is applied to an empty queue.

val create : unit -> 'a t

Return a new queue, initially empty.

val add : 'a -> 'a t -> unit

add x q adds the element x at the end of the queue q.

val push : 'a -> 'a t -> unit

push is a synonym for add.

val take : 'a t -> 'a

take q removes and returns the first element in queue q, or raises Empty if the queue is empty.

val take_opt : 'a t -> 'a option

take_opt q removes and returns the first element in queue q, or returns None if the queue is empty.

  • since 4.08
val pop : 'a t -> 'a

pop is a synonym for take.

val peek : 'a t -> 'a

peek q returns the first element in queue q, without removing it from the queue, or raises Empty if the queue is empty.

val peek_opt : 'a t -> 'a option

peek_opt q returns the first element in queue q, without removing it from the queue, or returns None if the queue is empty.

  • since 4.08
val top : 'a t -> 'a

top is a synonym for peek.

val clear : 'a t -> unit

Discard all elements from a queue.

val copy : 'a t -> 'a t

Return a copy of the given queue.

val is_empty : 'a t -> bool

Return true if the given queue is empty, false otherwise.

val length : 'a t -> int

Return the number of elements in a queue.

val iter : ('a -> unit) -> 'a t -> unit

iter f q applies f in turn to all elements of q, from the least recently entered to the most recently entered. The queue itself is unchanged.

val fold : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

fold f accu q is equivalent to List.fold_left f accu l, where l is the list of q's elements. The queue remains unchanged.

val transfer : 'a t -> 'a t -> unit

transfer q1 q2 adds all of q1's elements at the end of the queue q2, then clears q1. It is equivalent to the sequence iter (fun x -> add x q2) q1; clear q1, but runs in constant time.

Iterators

val to_seq : 'a t -> 'a Seq.t

Iterate on the queue, in front-to-back order. The behavior is not specified if the queue is modified during the iteration.

  • since 4.07
val add_seq : 'a t -> 'a Seq.t -> unit

Add the elements from a sequence to the end of the queue.

  • since 4.07
val of_seq : 'a Seq.t -> 'a t

Create a queue from a sequence.

  • since 4.07

Examples

Basic Example

A basic example:

# let q = Queue.create ()
+val q : '_weak1 Queue.t = <abstr>
+
+
+# Queue.push 1 q; Queue.push 2 q; Queue.push 3 q
+- : unit = ()
+
+# Queue.length q
+- : int = 3
+
+# Queue.pop q
+- : int = 1
+
+# Queue.pop q
+- : int = 2
+
+# Queue.pop q
+- : int = 3
+
+# Queue.pop q
+Exception: Stdlib.Queue.Empty.

Search Through a Graph

For a more elaborate example, a classic algorithmic use of queues is to implement a BFS (breadth-first search) through a graph.

 type graph = {
+   edges: (int, int list) Hashtbl.t
+ }
+
+(* Search in graph [g] using BFS, starting from node [start].
+   It returns the first node that satisfies [p], or [None] if
+   no node reachable from [start] satisfies [p].
+*)
+let search_for ~(g:graph) ~(start:int) (p:int -> bool) : int option =
+  let to_explore = Queue.create() in
+  let explored = Hashtbl.create 16 in
+
+  Queue.push start to_explore;
+  let rec loop () =
+    if Queue.is_empty to_explore then None
+    else
+      (* node to explore *)
+      let node = Queue.pop to_explore in
+      explore_node node
+
+  and explore_node node =
+    if not (Hashtbl.mem explored node) then (
+      if p node then Some node (* found *)
+      else (
+        Hashtbl.add explored node ();
+        let children =
+          Hashtbl.find_opt g.edges node
+          |> Option.value ~default:[]
+        in
+        List.iter (fun child -> Queue.push child to_explore) children;
+        loop()
+      )
+    ) else loop()
+  in
+  loop()
+
+(* a sample graph *)
+let my_graph: graph =
+  let edges =
+    List.to_seq [
+      1, [2;3];
+      2, [10; 11];
+      3, [4;5];
+      5, [100];
+      11, [0; 20];
+    ]
+    |> Hashtbl.of_seq
+  in {edges}
+
+# search_for ~g:my_graph ~start:1 (fun x -> x = 30)
+- : int option = None
+
+# search_for ~g:my_graph ~start:1 (fun x -> x >= 15)
+- : int option = Some 20
+
+# search_for ~g:my_graph ~start:1 (fun x -> x >= 50)
+- : int option = Some 100
diff --git a/stdlib/Stdlib/Random/State/index.html b/stdlib/Stdlib/Random/State/index.html new file mode 100644 index 000000000..dc2a20bf7 --- /dev/null +++ b/stdlib/Stdlib/Random/State/index.html @@ -0,0 +1,2 @@ + +State (docs.stdlib.Stdlib.Random.State)

Module Random.State

type t

The type of PRNG states.

val make : int array -> t

Create a new state and initialize it with the given seed.

val make_self_init : unit -> t

Create a new state and initialize it with a random seed chosen in a system-dependent way. The seed is obtained as described in Random.self_init.

val copy : t -> t

Return a copy of the given state.

val bits : t -> int
val int : t -> int -> int
val full_int : t -> int -> int
val int32 : t -> Int32.t -> Int32.t
val nativeint : t -> Nativeint.t -> Nativeint.t
val int64 : t -> Int64.t -> Int64.t
val float : t -> float -> float
val bool : t -> bool
val bits32 : t -> Int32.t
val bits64 : t -> Int64.t
val nativebits : t -> Nativeint.t

These functions are the same as the basic functions, except that they use (and update) the given PRNG state instead of the default one.

val split : t -> t

Draw a fresh PRNG state from the given PRNG state. (The given PRNG state is modified.) The new PRNG is statistically independent from the given PRNG. Data can be drawn from both PRNGs, in any order, without risk of correlation. Both PRNGs can be split later, arbitrarily many times.

  • since 5.0
val to_binary_string : t -> string

Serializes the PRNG state into an immutable sequence of bytes. See of_binary_string for deserialization.

The string type is intended here for serialization only, the encoding is not human-readable and may not be printable.

Note that the serialization format may differ across OCaml versions.

  • since 5.1
val of_binary_string : string -> t

Deserializes a byte sequence obtained by calling to_binary_string. The resulting PRNG state will produce the same random numbers as the state that was passed as input to to_binary_string.

  • raises Failure

    if the input is not in the expected format.

    Note that the serialization format may differ across OCaml versions.

    Unlike the functions provided by the Marshal module, this function either produces a valid state or fails cleanly with a Failure exception. It can be safely used on user-provided, untrusted inputs.

  • since 5.1
diff --git a/stdlib/Stdlib/Random/index.html b/stdlib/Stdlib/Random/index.html new file mode 100644 index 000000000..34152d01a --- /dev/null +++ b/stdlib/Stdlib/Random/index.html @@ -0,0 +1,2 @@ + +Random (docs.stdlib.Stdlib.Random)

Module Stdlib.Random

Pseudo-random number generators (PRNG).

With multiple domains, each domain has its own generator that evolves independently of the generators of other domains. When a domain is created, its generator is initialized by splitting the state of the generator associated with the parent domain.

In contrast, all threads within a domain share the same domain-local generator. Independent generators can be created with the Random.split function and used with the functions from the Random.State module.

Basic functions

val init : int -> unit

Initialize the domain-local generator, using the argument as a seed. The same seed will always yield the same sequence of numbers.

val full_init : int array -> unit

Same as Random.init but takes more data as seed.

val self_init : unit -> unit

Initialize the domain-local generator with a random seed chosen in a system-dependent way. If /dev/urandom is available on the host machine, it is used to provide a highly random initial seed. Otherwise, a less random seed is computed from system parameters (current time, process IDs, domain-local state).

val bits : unit -> int

Return 30 random bits in a nonnegative integer.

  • before 5.0

    used a different algorithm (affects all the following functions)

val int : int -> int

Random.int bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0 and less than 230.

val full_int : int -> int

Random.full_int bound returns a random integer between 0 (inclusive) and bound (exclusive). bound may be any positive integer.

If bound is less than 230, Random.full_int bound is equal to Random.int bound. If bound is greater than 230 (on 64-bit systems or non-standard environments, such as JavaScript), Random.full_int returns a value, where Random.int raises Stdlib.Invalid_argument.

  • since 4.13
val int32 : Int32.t -> Int32.t

Random.int32 bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

val nativeint : Nativeint.t -> Nativeint.t

Random.nativeint bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

val int64 : Int64.t -> Int64.t

Random.int64 bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

val float : float -> float

Random.float bound returns a random floating-point number between 0 and bound (inclusive). If bound is negative, the result is negative or zero. If bound is 0, the result is 0.

val bool : unit -> bool

Random.bool () returns true or false with probability 0.5 each.

val bits32 : unit -> Int32.t

Random.bits32 () returns 32 random bits as an integer between Int32.min_int and Int32.max_int.

  • since 4.14
val bits64 : unit -> Int64.t

Random.bits64 () returns 64 random bits as an integer between Int64.min_int and Int64.max_int.

  • since 4.14
val nativebits : unit -> Nativeint.t

Random.nativebits () returns 32 or 64 random bits (depending on the bit width of the platform) as an integer between Nativeint.min_int and Nativeint.max_int.

  • since 4.14

Advanced functions

The functions from module State manipulate the current state of the random generator explicitly. This allows using one or several deterministic PRNGs, even in a multi-threaded program, without interference from other parts of the program.

module State : sig ... end
val get_state : unit -> State.t

get_state() returns a fresh copy of the current state of the domain-local generator (which is used by the basic functions).

val set_state : State.t -> unit

set_state s updates the current state of the domain-local generator (which is used by the basic functions) by copying the state s into it.

val split : unit -> State.t

Draw a fresh PRNG state from the current state of the domain-local generator used by the default functions. (The state of the domain-local generator is modified.) See Random.State.split.

  • since 5.0
diff --git a/stdlib/Stdlib/Result/index.html b/stdlib/Stdlib/Result/index.html new file mode 100644 index 000000000..ac8ef48f9 --- /dev/null +++ b/stdlib/Stdlib/Result/index.html @@ -0,0 +1,12 @@ + +Result (docs.stdlib.Stdlib.Result)

Module Stdlib.Result

Result values.

Result values handle computation results and errors in an explicit and declarative manner without resorting to exceptions.

  • since 4.08

Results

type ('a, 'e) t = ('a, 'e) result =
  1. | Ok of 'a
  2. | Error of 'e

The type for result values. Either a value Ok v or an error Error e.

val ok : 'a -> ('a, 'e) result

ok v is Ok v.

val error : 'e -> ('a, 'e) result

error e is Error e.

val value : ('a, 'e) result -> default:'a -> 'a

value r ~default is v if r is Ok v and default otherwise.

val get_ok : ('a, 'e) result -> 'a

get_ok r is v if r is Ok v and raise otherwise.

val get_error : ('a, 'e) result -> 'e

get_error r is e if r is Error e and raise otherwise.

val bind : ('a, 'e) result -> ('a -> ('b, 'e) result) -> ('b, 'e) result

bind r f is f v if r is Ok v and r if r is Error _.

val join : (('a, 'e) result, 'e) result -> ('a, 'e) result

join rr is r if rr is Ok r and rr if rr is Error _.

val map : ('a -> 'b) -> ('a, 'e) result -> ('b, 'e) result

map f r is Ok (f v) if r is Ok v and r if r is Error _.

val map_error : ('e -> 'f) -> ('a, 'e) result -> ('a, 'f) result

map_error f r is Error (f e) if r is Error e and r if r is Ok _.

val fold : ok:('a -> 'c) -> error:('e -> 'c) -> ('a, 'e) result -> 'c

fold ~ok ~error r is ok v if r is Ok v and error e if r is Error e.

val iter : ('a -> unit) -> ('a, 'e) result -> unit

iter f r is f v if r is Ok v and () otherwise.

val iter_error : ('e -> unit) -> ('a, 'e) result -> unit

iter_error f r is f e if r is Error e and () otherwise.

Predicates and comparisons

val is_ok : ('a, 'e) result -> bool

is_ok r is true if and only if r is Ok _.

val is_error : ('a, 'e) result -> bool

is_error r is true if and only if r is Error _.

val equal : + ok:('a -> 'a -> bool) -> + error:('e -> 'e -> bool) -> + ('a, 'e) result -> + ('a, 'e) result -> + bool

equal ~ok ~error r0 r1 tests equality of r0 and r1 using ok and error to respectively compare values wrapped by Ok _ and Error _.

val compare : + ok:('a -> 'a -> int) -> + error:('e -> 'e -> int) -> + ('a, 'e) result -> + ('a, 'e) result -> + int

compare ~ok ~error r0 r1 totally orders r0 and r1 using ok and error to respectively compare values wrapped by Ok _ and Error _. Ok _ values are smaller than Error _ values.

Converting

val to_option : ('a, 'e) result -> 'a option

to_option r is r as an option, mapping Ok v to Some v and Error _ to None.

val to_list : ('a, 'e) result -> 'a list

to_list r is [v] if r is Ok v and [] otherwise.

val to_seq : ('a, 'e) result -> 'a Seq.t

to_seq r is r as a sequence. Ok v is the singleton sequence containing v and Error _ is the empty sequence.

diff --git a/stdlib/Stdlib/Scanf/Scanning/index.html b/stdlib/Stdlib/Scanf/Scanning/index.html new file mode 100644 index 000000000..5bf736317 --- /dev/null +++ b/stdlib/Stdlib/Scanf/Scanning/index.html @@ -0,0 +1,2 @@ + +Scanning (docs.stdlib.Stdlib.Scanf.Scanning)

Module Scanf.Scanning

type in_channel

The notion of input channel for the Scanf module: those channels provide all the machinery necessary to read from any source of characters, including a Stdlib.in_channel value. A Scanf.Scanning.in_channel value is also called a formatted input channel or equivalently a scanning buffer. The type Scanning.scanbuf below is an alias for Scanning.in_channel. Note that a Scanning.in_channel is not concurrency-safe: concurrent use may produce arbitrary values or exceptions.

  • since 3.12
type scanbuf = in_channel

The type of scanning buffers. A scanning buffer is the source from which a formatted input function gets characters. The scanning buffer holds the current state of the scan, plus a function to get the next char from the input, and a token buffer to store the string matched so far.

Note: a scanning action may often require to examine one character in advance; when this 'lookahead' character does not belong to the token read, it is stored back in the scanning buffer and becomes the next character yet to be read.

val stdin : in_channel

The standard input notion for the Scanf module. Scanning.stdin is the Scanning.in_channel formatted input channel attached to Stdlib.stdin.

Note: in the interactive system, when input is read from Stdlib.stdin, the newline character that triggers evaluation is part of the input; thus, the scanning specifications must properly skip this additional newline character (for instance, simply add a '\n' as the last character of the format string).

  • since 3.12
type file_name = string

A convenient alias to designate a file name.

  • since 4.00
val open_in : file_name -> in_channel

Scanning.open_in fname returns a Scanning.in_channel formatted input channel for bufferized reading in text mode from file fname.

Note: open_in returns a formatted input channel that efficiently reads characters in large chunks; in contrast, from_channel below returns formatted input channels that must read one character at a time, leading to a much slower scanning rate.

  • since 3.12
val open_in_bin : file_name -> in_channel

Scanning.open_in_bin fname returns a Scanning.in_channel formatted input channel for bufferized reading in binary mode from file fname.

  • since 3.12
val close_in : in_channel -> unit

Closes the Stdlib.in_channel associated with the given Scanning.in_channel formatted input channel.

  • since 3.12
val from_file : file_name -> in_channel

An alias for Scanning.open_in above.

val from_file_bin : string -> in_channel

An alias for Scanning.open_in_bin above.

val from_string : string -> in_channel

Scanning.from_string s returns a Scanning.in_channel formatted input channel which reads from the given string. Reading starts from the first character in the string. The end-of-input condition is set when the end of the string is reached.

val from_function : (unit -> char) -> in_channel

Scanning.from_function f returns a Scanning.in_channel formatted input channel with the given function as its reading method.

When scanning needs one more character, the given function is called.

When the function has no more character to provide, it must signal an end-of-input condition by raising the exception End_of_file.

val from_channel : in_channel -> in_channel

Scanning.from_channel ic returns a Scanning.in_channel formatted input channel which reads from the regular Stdlib.in_channel input channel ic argument. Reading starts at current reading position of ic.

val end_of_input : in_channel -> bool

Scanning.end_of_input ic tests the end-of-input condition of the given Scanning.in_channel formatted input channel.

val beginning_of_input : in_channel -> bool

Scanning.beginning_of_input ic tests the beginning of input condition of the given Scanning.in_channel formatted input channel.

val name_of_input : in_channel -> string

Scanning.name_of_input ic returns the name of the character source for the given Scanning.in_channel formatted input channel.

  • since 3.09
diff --git a/stdlib/Stdlib/Scanf/index.html b/stdlib/Stdlib/Scanf/index.html new file mode 100644 index 000000000..2ecc96012 --- /dev/null +++ b/stdlib/Stdlib/Scanf/index.html @@ -0,0 +1,26 @@ + +Scanf (docs.stdlib.Stdlib.Scanf)

Module Stdlib.Scanf

Formatted input functions.

Introduction

Functional input with format strings

The module Scanf provides formatted input functions or scanners.

The formatted input functions can read from any kind of input, including strings, files, or anything that can return characters. The more general source of characters is named a formatted input channel (or scanning buffer) and has type Scanning.in_channel. The more general formatted input function reads from any scanning buffer and is named bscanf.

Generally speaking, the formatted input functions have 3 arguments:

  • the first argument is a source of characters for the input,
  • the second argument is a format string that specifies the values to read,
  • the third argument is a receiver function that is applied to the values read.

Hence, a typical call to the formatted input function Scanf.bscanf is bscanf ic fmt f, where:

  • ic is a source of characters (typically a formatted input channel with type Scanning.in_channel),
  • fmt is a format string (the same format strings as those used to print material with module Printf or Format),
  • f is a function that has as many arguments as the number of values to read in the input according to fmt.

A simple example

As suggested above, the expression bscanf ic "%d" f reads a decimal integer n from the source of characters ic and returns f n.

For instance,

  • if we use stdin as the source of characters (Scanning.stdin is the predefined formatted input channel that reads from standard input),
  • if we define the receiver f as let f x = x + 1,

then bscanf Scanning.stdin "%d" f reads an integer n from the standard input and returns f n (that is n + 1). Thus, if we evaluate bscanf stdin "%d" f, and then enter 41 at the keyboard, the result we get is 42.

Formatted input as a functional feature

The OCaml scanning facility is reminiscent of the corresponding C feature. However, it is also largely different, simpler, and yet more powerful: the formatted input functions are higher-order functionals and the parameter passing mechanism is just the regular function application not the variable assignment based mechanism which is typical for formatted input in imperative languages; the OCaml format strings also feature useful additions to easily define complex tokens; as expected within a functional programming language, the formatted input functions also support polymorphism, in particular arbitrary interaction with polymorphic user-defined scanners. Furthermore, the OCaml formatted input facility is fully type-checked at compile time.

Unsynchronized accesses

Unsynchronized accesses to a Scanning.in_channel may lead to an invalid Scanning.in_channel state. Thus, concurrent accesses to Scanning.in_channels must be synchronized (for instance with a Mutex.t).

Formatted input channel

module Scanning : sig ... end

Type of formatted input functions

type ('a, 'b, 'c, 'd) scanner = + ('a, Scanning.in_channel, 'b, 'c, 'a -> 'd, 'd) format6 -> + 'c

The type of formatted input scanners: ('a, 'b, 'c, 'd) scanner is the type of a formatted input function that reads from some formatted input channel according to some format string; more precisely, if scan is some formatted input function, then scan + ic fmt f applies f to all the arguments specified by format string fmt, when scan has read those arguments from the Scanning.in_channel formatted input channel ic.

For instance, the Scanf.scanf function below has type ('a, 'b, 'c, 'd) scanner, since it is a formatted input function that reads from Scanning.stdin: scanf fmt f applies f to the arguments specified by fmt, reading those arguments from Stdlib.stdin as expected.

If the format fmt has some %r indications, the corresponding formatted input functions must be provided before receiver function f. For instance, if read_elem is an input function for values of type t, then bscanf ic "%r;" read_elem f reads a value v of type t followed by a ';' character, and returns f v.

  • since 3.10
type ('a, 'b, 'c, 'd) scanner_opt = + ('a, Scanning.in_channel, 'b, 'c, 'a -> 'd option, 'd) format6 -> + 'c
exception Scan_failure of string

When the input can not be read according to the format string specification, formatted input functions typically raise exception Scan_failure.

The general formatted input function

val bscanf : Scanning.in_channel -> ('a, 'b, 'c, 'd) scanner

bscanf ic fmt r1 ... rN f reads characters from the Scanning.in_channel formatted input channel ic and converts them to values according to format string fmt. As a final step, receiver function f is applied to the values read and gives the result of the bscanf call.

For instance, if f is the function fun s i -> i + 1, then Scanf.sscanf "x = 1" "%s = %i" f returns 2.

Arguments r1 to rN are user-defined input functions that read the argument corresponding to the %r conversions specified in the format string.

val bscanf_opt : Scanning.in_channel -> ('a, 'b, 'c, 'd) scanner_opt

Same as Scanf.bscanf, but returns None in case of scanning failure.

  • since 5.0

Format string description

The format string is a character string which contains three types of objects:

  • plain characters, which are simply matched with the characters of the input (with a special case for space and line feed, see space),
  • conversion specifications, each of which causes reading and conversion of one argument for the function f (see conversion),
  • scanning indications to specify boundaries of tokens (see scanning indication).

The space character in format strings

As mentioned above, a plain character in the format string is just matched with the next character of the input; however, two characters are special exceptions to this rule: the space character (' ' or ASCII code 32) and the line feed character ('\n' or ASCII code 10). A space does not match a single space character, but any amount of 'whitespace' in the input. More precisely, a space inside the format string matches any number of tab, space, line feed and carriage return characters. Similarly, a line feed character in the format string matches either a single line feed or a carriage return followed by a line feed.

Matching any amount of whitespace, a space in the format string also matches no amount of whitespace at all; hence, the call bscanf ib + "Price = %d $" (fun p -> p) succeeds and returns 1 when reading an input with various whitespace in it, such as Price = 1 $, Price = 1 $, or even Price=1$.

Conversion specifications in format strings

Conversion specifications consist in the % character, followed by an optional flag, an optional field width, and followed by one or two conversion characters.

The conversion characters and their meanings are:

  • d: reads an optionally signed decimal integer (0-9+).
  • i: reads an optionally signed integer (usual input conventions for decimal (0-9+), hexadecimal (0x[0-9a-f]+ and 0X[0-9A-F]+), octal (0o[0-7]+), and binary (0b[0-1]+) notations are understood).
  • u: reads an unsigned decimal integer.
  • x or X: reads an unsigned hexadecimal integer ([0-9a-fA-F]+).
  • o: reads an unsigned octal integer ([0-7]+).
  • s: reads a string argument that spreads as much as possible, until the following bounding condition holds:

    • a whitespace has been found (see space),
    • a scanning indication (see scanning indication) has been encountered,
    • the end-of-input has been reached.

    Hence, this conversion always succeeds: it returns an empty string if the bounding condition holds when the scan begins.

  • S: reads a delimited string argument (delimiters and special escaped characters follow the lexical conventions of OCaml).
  • c: reads a single character. To test the current input character without reading it, specify a null field width, i.e. use specification %0c. Raise Invalid_argument, if the field width specification is greater than 1.
  • C: reads a single delimited character (delimiters and special escaped characters follow the lexical conventions of OCaml).
  • f, e, E, g, G: reads an optionally signed floating-point number in decimal notation, in the style dddd.ddd + e/E+-dd.
  • h, H: reads an optionally signed floating-point number in hexadecimal notation.
  • F: reads a floating point number according to the lexical conventions of OCaml (hence the decimal point is mandatory if the exponent part is not mentioned).
  • B: reads a boolean argument (true or false).
  • b: reads a boolean argument (for backward compatibility; do not use in new programs).
  • ld, li, lu, lx, lX, lo: reads an int32 argument to the format specified by the second letter for regular integers.
  • nd, ni, nu, nx, nX, no: reads a nativeint argument to the format specified by the second letter for regular integers.
  • Ld, Li, Lu, Lx, LX, Lo: reads an int64 argument to the format specified by the second letter for regular integers.
  • [ range ]: reads characters that matches one of the characters mentioned in the range of characters range (or not mentioned in it, if the range starts with ^). Reads a string that can be empty, if the next input character does not match the range. The set of characters from c1 to c2 (inclusively) is denoted by c1-c2. Hence, %[0-9] returns a string representing a decimal number or an empty string if no decimal digit is found; similarly, %[0-9a-f] returns a string of hexadecimal digits. If a closing bracket appears in a range, it must occur as the first character of the range (or just after the ^ in case of range negation); hence []] matches a ] character and [^]] matches any character that is not ]. Use %% and %@ to include a % or a @ in a range.
  • r: user-defined reader. Takes the next ri formatted input function and applies it to the scanning buffer ib to read the next argument. The input function ri must therefore have type Scanning.in_channel -> 'a and the argument read has type 'a.
  • { fmt %}: reads a format string argument. The format string read must have the same type as the format string specification fmt. For instance, "%{ %i %}" reads any format string that can read a value of type int; hence, if s is the string "fmt:\"number is %u\"", then Scanf.sscanf s "fmt: %{%i%}" succeeds and returns the format string "number is %u".
  • ( fmt %): scanning sub-format substitution. Reads a format string rf in the input, then goes on scanning with rf instead of scanning with fmt. The format string rf must have the same type as the format string specification fmt that it replaces. For instance, "%( %i %)" reads any format string that can read a value of type int. The conversion returns the format string read rf, and then a value read using rf. Hence, if s is the string "\"%4d\"1234.00", then Scanf.sscanf s "%(%i%)" (fun fmt i -> fmt, i) evaluates to ("%4d", 1234). This behaviour is not mere format substitution, since the conversion returns the format string read as additional argument. If you need pure format substitution, use special flag _ to discard the extraneous argument: conversion %_( fmt %) reads a format string rf and then behaves the same as format string rf. Hence, if s is the string "\"%4d\"1234.00", then Scanf.sscanf s "%_(%i%)" is simply equivalent to Scanf.sscanf "1234.00" "%4d".
  • l: returns the number of lines read so far.
  • n: returns the number of characters read so far.
  • N or L: returns the number of tokens read so far.
  • !: matches the end of input condition.
  • %: matches one % character in the input.
  • @: matches one @ character in the input.
  • ,: does nothing.

Following the % character that introduces a conversion, there may be the special flag _: the conversion that follows occurs as usual, but the resulting value is discarded. For instance, if f is the function fun i -> i + 1, and s is the string "x = 1", then Scanf.sscanf s "%_s = %i" f returns 2.

The field width is composed of an optional integer literal indicating the maximal width of the token to read. For instance, %6d reads an integer, having at most 6 decimal digits; %4f reads a float with at most 4 characters; and %8[\000-\255] returns the next 8 characters (or all the characters still available, if fewer than 8 characters are available in the input).

Notes:

  • as mentioned above, a %s conversion always succeeds, even if there is nothing to read in the input: in this case, it simply returns "".
  • in addition to the relevant digits, '_' characters may appear inside numbers (this is reminiscent to the usual OCaml lexical conventions). If stricter scanning is desired, use the range conversion facility instead of the number conversions.
  • the scanf facility is not intended for heavy duty lexical analysis and parsing. If it appears not expressive enough for your needs, several alternative exists: regular expressions (module Str), stream parsers, ocamllex-generated lexers, ocamlyacc-generated parsers.

Scanning indications in format strings

Scanning indications appear just after the string conversions %s and %[ range ] to delimit the end of the token. A scanning indication is introduced by a @ character, followed by some plain character c. It means that the string token should end just before the next matching c (which is skipped). If no c character is encountered, the string token spreads as much as possible. For instance, "%s@\t" reads a string up to the next tab character or to the end of input. If a @ character appears anywhere else in the format string, it is treated as a plain character.

Note:

  • As usual in format strings, % and @ characters must be escaped using %% and %@; this rule still holds within range specifications and scanning indications. For instance, format "%s@%%" reads a string up to the next % character, and format "%s@%@" reads a string up to the next @.
  • The scanning indications introduce slight differences in the syntax of Scanf format strings, compared to those used for the Printf module. However, the scanning indications are similar to those used in the Format module; hence, when producing formatted text to be scanned by Scanf.bscanf, it is wise to use printing functions from the Format module (or, if you need to use functions from Printf, banish or carefully double check the format strings that contain '@' characters).

Exceptions during scanning

Scanners may raise the following exceptions when the input cannot be read according to the format string:

  • Raise Failure if a conversion to a number is not possible.
  • Raise End_of_file if the end of input is encountered while some more characters are needed to read the current conversion specification.
  • Raise Invalid_argument if the format string is invalid.

Note:

  • as a consequence, scanning a %s conversion never raises exception End_of_file: if the end of input is reached the conversion succeeds and simply returns the characters read so far, or "" if none were ever read.

Specialised formatted input functions

val sscanf : string -> ('a, 'b, 'c, 'd) scanner

Same as Scanf.bscanf, but reads from the given string.

val sscanf_opt : string -> ('a, 'b, 'c, 'd) scanner_opt

Same as Scanf.sscanf, but returns None in case of scanning failure.

  • since 5.0
val scanf : ('a, 'b, 'c, 'd) scanner

Same as Scanf.bscanf, but reads from the predefined formatted input channel Scanf.Scanning.stdin that is connected to Stdlib.stdin.

val scanf_opt : ('a, 'b, 'c, 'd) scanner_opt

Same as Scanf.scanf, but returns None in case of scanning failure.

  • since 5.0
val kscanf : + Scanning.in_channel -> + (Scanning.in_channel -> exn -> 'd) -> + ('a, 'b, 'c, 'd) scanner

Same as Scanf.bscanf, but takes an additional function argument ef that is called in case of error: if the scanning process or some conversion fails, the scanning function aborts and calls the error handling function ef with the formatted input channel and the exception that aborted the scanning process as arguments.

val ksscanf : + string -> + (Scanning.in_channel -> exn -> 'd) -> + ('a, 'b, 'c, 'd) scanner

Same as Scanf.kscanf but reads from the given string.

  • since 4.02

Reading format strings from input

val bscanf_format : + Scanning.in_channel -> + ('a, 'b, 'c, 'd, 'e, 'f) format6 -> + (('a, 'b, 'c, 'd, 'e, 'f) format6 -> 'g) -> + 'g

bscanf_format ic fmt f reads a format string token from the formatted input channel ic, according to the given format string fmt, and applies f to the resulting format string value.

  • raises Scan_failure

    if the format string value read does not have the same type as fmt.

  • since 3.09
val sscanf_format : + string -> + ('a, 'b, 'c, 'd, 'e, 'f) format6 -> + (('a, 'b, 'c, 'd, 'e, 'f) format6 -> 'g) -> + 'g

Same as Scanf.bscanf_format, but reads from the given string.

  • since 3.09
val format_from_string : + string -> + ('a, 'b, 'c, 'd, 'e, 'f) format6 -> + ('a, 'b, 'c, 'd, 'e, 'f) format6

format_from_string s fmt converts a string argument to a format string, according to the given format string fmt.

  • raises Scan_failure

    if s, considered as a format string, does not have the same type as fmt.

  • since 3.10
val unescaped : string -> string

unescaped s return a copy of s with escape sequences (according to the lexical conventions of OCaml) replaced by their corresponding special characters. More precisely, Scanf.unescaped has the following property: for all string s, Scanf.unescaped (String.escaped s) = s.

Always return a copy of the argument, even if there is no escape sequence in the argument.

  • raises Scan_failure

    if s is not properly escaped (i.e. s has invalid escape sequences or special characters that are not properly escaped). For instance, Scanf.unescaped "\"" will fail.

  • since 4.00
diff --git a/stdlib/Stdlib/Semaphore/Binary/index.html b/stdlib/Stdlib/Semaphore/Binary/index.html new file mode 100644 index 000000000..9568f5783 --- /dev/null +++ b/stdlib/Stdlib/Semaphore/Binary/index.html @@ -0,0 +1,2 @@ + +Binary (docs.stdlib.Stdlib.Semaphore.Binary)

Module Semaphore.Binary

type t

The type of binary semaphores.

val make : bool -> t

make b returns a new binary semaphore. If b is true, the initial value of the semaphore is 1, meaning "available". If b is false, the initial value of the semaphore is 0, meaning "unavailable".

val release : t -> unit

release s sets the value of semaphore s to 1, putting it in the "available" state. If other threads are waiting on s, one of them is restarted.

val acquire : t -> unit

acquire s blocks the calling thread until the semaphore s has value 1 (is available), then atomically sets it to 0 and returns.

val try_acquire : t -> bool

try_acquire s immediately returns false if the semaphore s has value 0. If s has value 1, its value is atomically set to 0 and try_acquire s returns true.

diff --git a/stdlib/Stdlib/Semaphore/Counting/index.html b/stdlib/Stdlib/Semaphore/Counting/index.html new file mode 100644 index 000000000..3568998d2 --- /dev/null +++ b/stdlib/Stdlib/Semaphore/Counting/index.html @@ -0,0 +1,2 @@ + +Counting (docs.stdlib.Stdlib.Semaphore.Counting)

Module Semaphore.Counting

type t

The type of counting semaphores.

val make : int -> t

make n returns a new counting semaphore, with initial value n. The initial value n must be nonnegative.

val release : t -> unit

release s increments the value of semaphore s. If other threads are waiting on s, one of them is restarted. If the current value of s is equal to max_int, the value of the semaphore is unchanged and a Sys_error exception is raised to signal overflow.

  • raises Sys_error

    if the value of the semaphore would overflow max_int

val acquire : t -> unit

acquire s blocks the calling thread until the value of semaphore s is not zero, then atomically decrements the value of s and returns.

val try_acquire : t -> bool

try_acquire s immediately returns false if the value of semaphore s is zero. Otherwise, the value of s is atomically decremented and try_acquire s returns true.

val get_value : t -> int

get_value s returns the current value of semaphore s. The current value can be modified at any time by concurrent release and acquire operations. Hence, the get_value operation is racy, and its result should only be used for debugging or informational messages.

diff --git a/stdlib/Stdlib/Semaphore/index.html b/stdlib/Stdlib/Semaphore/index.html new file mode 100644 index 000000000..ce6c3ae22 --- /dev/null +++ b/stdlib/Stdlib/Semaphore/index.html @@ -0,0 +1,2 @@ + +Semaphore (docs.stdlib.Stdlib.Semaphore)

Module Stdlib.Semaphore

Semaphores

A semaphore is a thread synchronization device that can be used to control access to a shared resource.

Two flavors of semaphores are provided: counting semaphores and binary semaphores.

  • since 4.12

Counting semaphores

A counting semaphore is a counter that can be accessed concurrently by several threads. The typical use is to synchronize producers and consumers of a resource by counting how many units of the resource are available.

The two basic operations on semaphores are:

  • "release" (also called "V", "post", "up", and "signal"), which increments the value of the counter. This corresponds to producing one more unit of the shared resource and making it available to others.
  • "acquire" (also called "P", "wait", "down", and "pend"), which waits until the counter is greater than zero and decrements it. This corresponds to consuming one unit of the shared resource.
  • since 4.12
module Counting : sig ... end

Binary semaphores

Binary semaphores are a variant of counting semaphores where semaphores can only take two values, 0 and 1.

A binary semaphore can be used to control access to a single shared resource, with value 1 meaning "resource is available" and value 0 meaning "resource is unavailable".

The "release" operation of a binary semaphore sets its value to 1, and "acquire" waits until the value is 1 and sets it to 0.

A binary semaphore can be used instead of a mutex (see module Mutex) when the mutex discipline (of unlocking the mutex from the thread that locked it) is too restrictive. The "acquire" operation corresponds to locking the mutex, and the "release" operation to unlocking it, but "release" can be performed in a thread different than the one that performed the "acquire". Likewise, it is safe to release a binary semaphore that is already available.

  • since 4.12
module Binary : sig ... end
diff --git a/stdlib/Stdlib/Seq/index.html b/stdlib/Stdlib/Seq/index.html new file mode 100644 index 000000000..51205bc42 --- /dev/null +++ b/stdlib/Stdlib/Seq/index.html @@ -0,0 +1,2 @@ + +Seq (docs.stdlib.Stdlib.Seq)

Module Stdlib.Seq

Sequences.

A sequence of type 'a Seq.t can be thought of as a delayed list, that is, a list whose elements are computed only when they are demanded by a consumer. This allows sequences to be produced and transformed lazily (one element at a time) rather than eagerly (all elements at once). This also allows constructing conceptually infinite sequences.

The type 'a Seq.t is defined as a synonym for unit -> 'a Seq.node. This is a function type: therefore, it is opaque. The consumer can query a sequence in order to request the next element (if there is one), but cannot otherwise inspect the sequence in any way.

Because it is opaque, the type 'a Seq.t does not reveal whether a sequence is:

  • persistent, which means that the sequence can be used as many times as desired, producing the same elements every time, just like an immutable list; or
  • ephemeral, which means that the sequence is not persistent. Querying an ephemeral sequence might have an observable side effect, such as incrementing a mutable counter. As a common special case, an ephemeral sequence can be affine, which means that it must be queried at most once.

It also does not reveal whether the elements of the sequence are:

  • pre-computed and stored in memory, which means that querying the sequence is cheap;
  • computed when first demanded and then stored in memory, which means that querying the sequence once can be expensive, but querying the same sequence again is cheap; or
  • re-computed every time they are demanded, which may or may not be cheap.

It is up to the programmer to keep these distinctions in mind so as to understand the time and space requirements of sequences.

For the sake of simplicity, most of the documentation that follows is written under the implicit assumption that the sequences at hand are persistent. We normally do not point out when or how many times each function is invoked, because that would be too verbose. For instance, in the description of map, we write: "if xs is the sequence x0; x1; ... then map f xs is the sequence f x0; f x1; ...". If we wished to be more explicit, we could point out that the transformation takes place on demand: that is, the elements of map f xs are computed only when they are demanded. In other words, the definition let ys = map f xs terminates immediately and does not invoke f. The function call f x0 takes place only when the first element of ys is demanded, via the function call ys(). Furthermore, calling ys() twice causes f x0 to be called twice as well. If one wishes for f to be applied at most once to each element of xs, even in scenarios where ys is queried more than once, then one should use let ys = memoize (map f xs).

As a general rule, the functions that build sequences, such as map, filter, scan, take, etc., produce sequences whose elements are computed only on demand. The functions that eagerly consume sequences, such as is_empty, find, length, iter, fold_left, etc., are the functions that force computation to take place.

When possible, we recommend using sequences rather than dispensers (functions of type unit -> 'a option that produce elements upon demand). Whereas sequences can be persistent or ephemeral, dispensers are always ephemeral, and are typically more difficult to work with than sequences. Two conversion functions, to_dispenser and of_dispenser, are provided.

  • since 4.07
type 'a t = unit -> 'a node

A sequence xs of type 'a t is a delayed list of elements of type 'a. Such a sequence is queried by performing a function application xs(). This function application returns a node, allowing the caller to determine whether the sequence is empty or nonempty, and in the latter case, to obtain its head and tail.

and +'a node =
  1. | Nil
  2. | Cons of 'a * 'a t

A node is either Nil, which means that the sequence is empty, or Cons (x, xs), which means that x is the first element of the sequence and that xs is the remainder of the sequence.

Consuming sequences

The functions in this section consume their argument, a sequence, either partially or completely:

  • is_empty and uncons consume the sequence down to depth 1. That is, they demand the first argument of the sequence, if there is one.
  • iter, fold_left, length, etc., consume the sequence all the way to its end. They terminate only if the sequence is finite.
  • for_all, exists, find, etc. consume the sequence down to a certain depth, which is a priori unpredictable.

Similarly, among the functions that consume two sequences, one can distinguish two groups:

  • iter2 and fold_left2 consume both sequences all the way to the end, provided the sequences have the same length.
  • for_all2, exists2, equal, compare consume the sequences down to a certain depth, which is a priori unpredictable.

The functions that consume two sequences can be applied to two sequences of distinct lengths: in that case, the excess elements in the longer sequence are ignored. (It may be the case that one excess element is demanded, even though this element is not used.)

None of the functions in this section is lazy. These functions are consumers: they force some computation to take place.

val is_empty : 'a t -> bool

is_empty xs determines whether the sequence xs is empty.

It is recommended that the sequence xs be persistent. Indeed, is_empty xs demands the head of the sequence xs, so, if xs is ephemeral, it may be the case that xs cannot be used any more after this call has taken place.

  • since 4.14
val uncons : 'a t -> ('a * 'a t) option

If xs is empty, then uncons xs is None.

If xs is nonempty, then uncons xs is Some (x, ys) where x is the head of the sequence and ys its tail.

  • since 4.14
val length : 'a t -> int

length xs is the length of the sequence xs.

The sequence xs must be finite.

  • since 4.14
val iter : ('a -> unit) -> 'a t -> unit

iter f xs invokes f x successively for every element x of the sequence xs, from left to right.

It terminates only if the sequence xs is finite.

val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

fold_left f _ xs invokes f _ x successively for every element x of the sequence xs, from left to right.

An accumulator of type 'a is threaded through the calls to f.

It terminates only if the sequence xs is finite.

val iteri : (int -> 'a -> unit) -> 'a t -> unit

iteri f xs invokes f i x successively for every element x located at index i in the sequence xs.

It terminates only if the sequence xs is finite.

iteri f xs is equivalent to iter (fun (i, x) -> f i x) (zip (ints 0) xs).

  • since 4.14
val fold_lefti : ('acc -> int -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

fold_lefti f _ xs invokes f _ i x successively for every element x located at index i of the sequence xs.

An accumulator of type 'b is threaded through the calls to f.

It terminates only if the sequence xs is finite.

fold_lefti f accu xs is equivalent to fold_left (fun accu (i, x) -> f accu i x) accu (zip (ints 0) xs).

  • since 4.14
val for_all : ('a -> bool) -> 'a t -> bool

for_all p xs determines whether all elements x of the sequence xs satisfy p x.

The sequence xs must be finite.

  • since 4.14
val exists : ('a -> bool) -> 'a t -> bool

exists xs p determines whether at least one element x of the sequence xs satisfies p x.

The sequence xs must be finite.

  • since 4.14
val find : ('a -> bool) -> 'a t -> 'a option

find p xs returns Some x, where x is the first element of the sequence xs that satisfies p x, if there is such an element.

It returns None if there is no such element.

The sequence xs must be finite.

  • since 4.14
val find_index : ('a -> bool) -> 'a t -> int option

find_index p xs returns Some i, where i is the index of the first element of the sequence xs that satisfies p x, if there is such an element.

It returns None if there is no such element.

The sequence xs must be finite.

  • since 5.1
val find_map : ('a -> 'b option) -> 'a t -> 'b option

find_map f xs returns Some y, where x is the first element of the sequence xs such that f x = Some _, if there is such an element, and where y is defined by f x = Some y.

It returns None if there is no such element.

The sequence xs must be finite.

  • since 4.14
val find_mapi : (int -> 'a -> 'b option) -> 'a t -> 'b option

Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

The sequence xs must be finite.

  • since 5.1
val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit

iter2 f xs ys invokes f x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

Iteration terminates only if at least one of the sequences xs and ys is finite.

iter2 f xs ys is equivalent to iter (fun (x, y) -> f x y) (zip xs ys).

  • since 4.14
val fold_left2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc

fold_left2 f _ xs ys invokes f _ x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

An accumulator of type 'a is threaded through the calls to f.

If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

Iteration terminates only if at least one of the sequences xs and ys is finite.

fold_left2 f accu xs ys is equivalent to fold_left (fun accu (x, y) -> f accu x y) (zip xs ys).

  • since 4.14
val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

for_all2 p xs ys determines whether all pairs (x, y) of elements drawn synchronously from the sequences xs and ys satisfy p x y.

If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored. In particular, if xs or ys is empty, then for_all2 p xs ys is true. This is where for_all2 and equal differ: equal eq xs ys can be true only if xs and ys have the same length.

At least one of the sequences xs and ys must be finite.

for_all2 p xs ys is equivalent to for_all (fun b -> b) (map2 p xs ys).

  • since 4.14
val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

exists2 p xs ys determines whether some pair (x, y) of elements drawn synchronously from the sequences xs and ys satisfies p x y.

If the sequences xs and ys have different lengths, then iteration must stop as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

At least one of the sequences xs and ys must be finite.

exists2 p xs ys is equivalent to exists (fun b -> b) (map2 p xs ys).

  • since 4.14
val equal : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

Provided the function eq defines an equality on elements, equal eq xs ys determines whether the sequences xs and ys are pointwise equal.

At least one of the sequences xs and ys must be finite.

  • since 4.14
val compare : ('a -> 'b -> int) -> 'a t -> 'b t -> int

Provided the function cmp defines a preorder on elements, compare cmp xs ys compares the sequences xs and ys according to the lexicographic preorder.

For more details on comparison functions, see Array.sort.

At least one of the sequences xs and ys must be finite.

  • since 4.14

Constructing sequences

The functions in this section are lazy: that is, they return sequences whose elements are computed only when demanded.

val empty : 'a t

empty is the empty sequence. It has no elements. Its length is 0.

val return : 'a -> 'a t

return x is the sequence whose sole element is x. Its length is 1.

val cons : 'a -> 'a t -> 'a t

cons x xs is the sequence that begins with the element x, followed with the sequence xs.

Writing cons (f()) xs causes the function call f() to take place immediately. For this call to be delayed until the sequence is queried, one must instead write (fun () -> Cons(f(), xs)).

  • since 4.11
val init : int -> (int -> 'a) -> 'a t

init n f is the sequence f 0; f 1; ...; f (n-1).

n must be nonnegative.

If desired, the infinite sequence f 0; f 1; ... can be defined as map f (ints 0).

  • since 4.14
val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t

unfold constructs a sequence out of a step function and an initial state.

If f u is None then unfold f u is the empty sequence. If f u is Some (x, u') then unfold f u is the nonempty sequence cons x (unfold f u').

For example, unfold (function [] -> None | h :: t -> Some (h, t)) l is equivalent to List.to_seq l.

  • since 4.11
val repeat : 'a -> 'a t

repeat x is the infinite sequence where the element x is repeated indefinitely.

repeat x is equivalent to cycle (return x).

  • since 4.14
val forever : (unit -> 'a) -> 'a t

forever f is an infinite sequence where every element is produced (on demand) by the function call f().

For instance, forever Random.bool is an infinite sequence of random bits.

forever f is equivalent to map f (repeat ()).

  • since 4.14
val cycle : 'a t -> 'a t

cycle xs is the infinite sequence that consists of an infinite number of repetitions of the sequence xs.

If xs is an empty sequence, then cycle xs is empty as well.

Consuming (a prefix of) the sequence cycle xs once can cause the sequence xs to be consumed more than once. Therefore, xs must be persistent.

  • since 4.14
val iterate : ('a -> 'a) -> 'a -> 'a t

iterate f x is the infinite sequence whose elements are x, f x, f (f x), and so on.

In other words, it is the orbit of the function f, starting at x.

  • since 4.14

Transforming sequences

The functions in this section are lazy: that is, they return sequences whose elements are computed only when demanded.

val map : ('a -> 'b) -> 'a t -> 'b t

map f xs is the image of the sequence xs through the transformation f.

If xs is the sequence x0; x1; ... then map f xs is the sequence f x0; f x1; ....

val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t

mapi is analogous to map, but applies the function f to an index and an element.

mapi f xs is equivalent to map2 f (ints 0) xs.

  • since 4.14
val filter : ('a -> bool) -> 'a t -> 'a t

filter p xs is the sequence of the elements x of xs that satisfy p x.

In other words, filter p xs is the sequence xs, deprived of the elements x such that p x is false.

val filter_map : ('a -> 'b option) -> 'a t -> 'b t

filter_map f xs is the sequence of the elements y such that f x = Some y, where x ranges over xs.

filter_map f xs is equivalent to map Option.get (filter Option.is_some (map f xs)).

val scan : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t

If xs is a sequence [x0; x1; x2; ...], then scan f a0 xs is a sequence of accumulators [a0; a1; a2; ...] where a1 is f a0 x0, a2 is f a1 x1, and so on.

Thus, scan f a0 xs is conceptually related to fold_left f a0 xs. However, instead of performing an eager iteration and immediately returning the final accumulator, it returns a sequence of accumulators.

For instance, scan (+) 0 transforms a sequence of integers into the sequence of its partial sums.

If xs has length n then scan f a0 xs has length n+1.

  • since 4.14
val take : int -> 'a t -> 'a t

take n xs is the sequence of the first n elements of xs.

If xs has fewer than n elements, then take n xs is equivalent to xs.

n must be nonnegative.

  • since 4.14
val drop : int -> 'a t -> 'a t

drop n xs is the sequence xs, deprived of its first n elements.

If xs has fewer than n elements, then drop n xs is empty.

n must be nonnegative.

drop is lazy: the first n+1 elements of the sequence xs are demanded only when the first element of drop n xs is demanded. For this reason, drop 1 xs is not equivalent to tail xs, which queries xs immediately.

  • since 4.14
val take_while : ('a -> bool) -> 'a t -> 'a t

take_while p xs is the longest prefix of the sequence xs where every element x satisfies p x.

  • since 4.14
val drop_while : ('a -> bool) -> 'a t -> 'a t

drop_while p xs is the sequence xs, deprived of the prefix take_while p xs.

  • since 4.14
val group : ('a -> 'a -> bool) -> 'a t -> 'a t t

Provided the function eq defines an equality on elements, group eq xs is the sequence of the maximal runs of adjacent duplicate elements of the sequence xs.

Every element of group eq xs is a nonempty sequence of equal elements.

The concatenation concat (group eq xs) is equal to xs.

Consuming group eq xs, and consuming the sequences that it contains, can cause xs to be consumed more than once. Therefore, xs must be persistent.

  • since 4.14
val memoize : 'a t -> 'a t

The sequence memoize xs has the same elements as the sequence xs.

Regardless of whether xs is ephemeral or persistent, memoize xs is persistent: even if it is queried several times, xs is queried at most once.

The construction of the sequence memoize xs internally relies on suspensions provided by the module Lazy. These suspensions are not thread-safe. Therefore, the sequence memoize xs must not be queried by multiple threads concurrently.

  • since 4.14
exception Forced_twice

This exception is raised when a sequence returned by once (or a suffix of it) is queried more than once.

  • since 4.14
val once : 'a t -> 'a t

The sequence once xs has the same elements as the sequence xs.

Regardless of whether xs is ephemeral or persistent, once xs is an ephemeral sequence: it can be queried at most once. If it (or a suffix of it) is queried more than once, then the exception Forced_twice is raised. This can be useful, while debugging or testing, to ensure that a sequence is consumed at most once.

  • raises Forced_twice

    if once xs, or a suffix of it, is queried more than once.

  • since 4.14
val transpose : 'a t t -> 'a t t

If xss is a matrix (a sequence of rows), then transpose xss is the sequence of the columns of the matrix xss.

The rows of the matrix xss are not required to have the same length.

The matrix xss is not required to be finite (in either direction).

The matrix xss must be persistent.

  • since 4.14

Combining sequences

val append : 'a t -> 'a t -> 'a t

append xs ys is the concatenation of the sequences xs and ys.

Its elements are the elements of xs, followed by the elements of ys.

  • since 4.11
val concat : 'a t t -> 'a t

If xss is a sequence of sequences, then concat xss is its concatenation.

If xss is the sequence xs0; xs1; ... then concat xss is the sequence xs0 @ xs1 @ ....

  • since 4.13
val flat_map : ('a -> 'b t) -> 'a t -> 'b t

flat_map f xs is equivalent to concat (map f xs).

val concat_map : ('a -> 'b t) -> 'a t -> 'b t

concat_map f xs is equivalent to concat (map f xs).

concat_map is an alias for flat_map.

  • since 4.13
val zip : 'a t -> 'b t -> ('a * 'b) t

zip xs ys is the sequence of pairs (x, y) drawn synchronously from the sequences xs and ys.

If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

zip xs ys is equivalent to map2 (fun a b -> (a, b)) xs ys.

  • since 4.14
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

map2 f xs ys is the sequence of the elements f x y, where the pairs (x, y) are drawn synchronously from the sequences xs and ys.

If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

map2 f xs ys is equivalent to map (fun (x, y) -> f x y) (zip xs ys).

  • since 4.14
val interleave : 'a t -> 'a t -> 'a t

interleave xs ys is the sequence that begins with the first element of xs, continues with the first element of ys, and so on.

When one of the sequences xs and ys is exhausted, interleave xs ys continues with the rest of the other sequence.

  • since 4.14
val sorted_merge : ('a -> 'a -> int) -> 'a t -> 'a t -> 'a t

If the sequences xs and ys are sorted according to the total preorder cmp, then sorted_merge cmp xs ys is the sorted sequence obtained by merging the sequences xs and ys.

For more details on comparison functions, see Array.sort.

  • since 4.14
val product : 'a t -> 'b t -> ('a * 'b) t

product xs ys is the Cartesian product of the sequences xs and ys.

For every element x of xs and for every element y of ys, the pair (x, y) appears once as an element of product xs ys.

The order in which the pairs appear is unspecified.

The sequences xs and ys are not required to be finite.

The sequences xs and ys must be persistent.

  • since 4.14
val map_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

The sequence map_product f xs ys is the image through f of the Cartesian product of the sequences xs and ys.

For every element x of xs and for every element y of ys, the element f x y appears once as an element of map_product f xs ys.

The order in which these elements appear is unspecified.

The sequences xs and ys are not required to be finite.

The sequences xs and ys must be persistent.

map_product f xs ys is equivalent to map (fun (x, y) -> f x y) (product xs ys).

  • since 4.14

Splitting a sequence into two sequences

val unzip : ('a * 'b) t -> 'a t * 'b t

unzip transforms a sequence of pairs into a pair of sequences.

unzip xs is equivalent to (map fst xs, map snd xs).

Querying either of the sequences returned by unzip xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use unzip (memoize xs).

  • since 4.14
val split : ('a * 'b) t -> 'a t * 'b t

split is an alias for unzip.

  • since 4.14
val partition_map : ('a -> ('b, 'c) Either.t) -> 'a t -> 'b t * 'c t

partition_map f xs returns a pair of sequences (ys, zs), where:

  • ys is the sequence of the elements y such that f x = Left y, where x ranges over xs;
  • zs is the sequence of the elements z such that f x = Right z, where x ranges over xs.

partition_map f xs is equivalent to a pair of filter_map Either.find_left (map f xs) and filter_map Either.find_right (map f xs).

Querying either of the sequences returned by partition_map f xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use partition_map f (memoize xs).

  • since 4.14
val partition : ('a -> bool) -> 'a t -> 'a t * 'a t

partition p xs returns a pair of the subsequence of the elements of xs that satisfy p and the subsequence of the elements of xs that do not satisfy p.

partition p xs is equivalent to filter p xs, filter (fun x -> not (p x)) xs.

Consuming both of the sequences returned by partition p xs causes xs to be consumed twice and causes the function f to be applied twice to each element of the list. Therefore, f should be pure and cheap. Furthermore, xs should be persistent and cheap. If that is not the case, use partition p (memoize xs).

  • since 4.14

Converting between sequences and dispensers

A dispenser is a representation of a sequence as a function of type unit -> 'a option. Every time this function is invoked, it returns the next element of the sequence. When there are no more elements, it returns None. A dispenser has mutable internal state, therefore is ephemeral: the sequence that it represents can be consumed at most once.

val of_dispenser : (unit -> 'a option) -> 'a t

of_dispenser it is the sequence of the elements produced by the dispenser it. It is an ephemeral sequence: it can be consumed at most once. If a persistent sequence is needed, use memoize (of_dispenser it).

  • since 4.14
val to_dispenser : 'a t -> unit -> 'a option

to_dispenser xs is a fresh dispenser on the sequence xs.

This dispenser has mutable internal state, which is not protected by a lock; so, it must not be used by several threads concurrently.

  • since 4.14

Sequences of integers

val ints : int -> int t

ints i is the infinite sequence of the integers beginning at i and counting up.

  • since 4.14
diff --git a/stdlib/Stdlib/Set/Make/argument-1-Ord/index.html b/stdlib/Stdlib/Set/Make/argument-1-Ord/index.html new file mode 100644 index 000000000..9206d28f2 --- /dev/null +++ b/stdlib/Stdlib/Set/Make/argument-1-Ord/index.html @@ -0,0 +1,2 @@ + +Ord (docs.stdlib.Stdlib.Set.Make.Ord)

Parameter Make.Ord

type t

The type of the set elements.

val compare : t -> t -> int

A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/stdlib/Stdlib/Set/Make/index.html b/stdlib/Stdlib/Set/Make/index.html new file mode 100644 index 000000000..27bff9784 --- /dev/null +++ b/stdlib/Stdlib/Set/Make/index.html @@ -0,0 +1,3 @@ + +Make (docs.stdlib.Stdlib.Set.Make)

Module Set.Make

Functor building an implementation of the set structure given a totally ordered type.

Parameters

module Ord : OrderedType

Signature

Sets

type elt = Ord.t

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/stdlib/Stdlib/Set/index.html b/stdlib/Stdlib/Set/index.html new file mode 100644 index 000000000..4016f6a7c --- /dev/null +++ b/stdlib/Stdlib/Set/index.html @@ -0,0 +1,13 @@ + +Set (docs.stdlib.Stdlib.Set)

Module Stdlib.Set

Sets over ordered types.

This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance.

The Make functor constructs implementations for any type, given a compare function. For instance:

module IntPairs =
+  struct
+    type t = int * int
+    let compare (x0,y0) (x1,y1) =
+      match Stdlib.compare x0 x1 with
+          0 -> Stdlib.compare y0 y1
+        | c -> c
+  end
+
+module PairsSet = Set.Make(IntPairs)
+
+let m = PairsSet.(empty |> add (2,3) |> add (5,7) |> add (11,13))

This creates a new module PairsSet, with a new type PairsSet.t of sets of int * int.

module type OrderedType = sig ... end

Input signature of the functor Make.

module type S = sig ... end

Output signature of the functor Make.

module Make (Ord : OrderedType) : S with type elt = Ord.t

Functor building an implementation of the set structure given a totally ordered type.

diff --git a/stdlib/Stdlib/Set/module-type-OrderedType/index.html b/stdlib/Stdlib/Set/module-type-OrderedType/index.html new file mode 100644 index 000000000..29e67b994 --- /dev/null +++ b/stdlib/Stdlib/Set/module-type-OrderedType/index.html @@ -0,0 +1,2 @@ + +OrderedType (docs.stdlib.Stdlib.Set.OrderedType)

Module type Set.OrderedType

Input signature of the functor Make.

type t

The type of the set elements.

val compare : t -> t -> int

A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

diff --git a/stdlib/Stdlib/Set/module-type-S/index.html b/stdlib/Stdlib/Set/module-type-S/index.html new file mode 100644 index 000000000..6cdb3dda1 --- /dev/null +++ b/stdlib/Stdlib/Set/module-type-S/index.html @@ -0,0 +1,3 @@ + +S (docs.stdlib.Stdlib.Set.S)

Module type Set.S

Output signature of the functor Make.

Sets

type elt

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val add : elt -> t -> t

add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val singleton : elt -> t

singleton x returns the one-element set containing only x.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val elements : t -> elt list

Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f + aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val mem : elt -> t -> bool

mem x s tests whether x belongs to the set s.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

val exists : (elt -> bool) -> t -> bool

exists f s checks if at least one element of the set satisfies the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Seq.t -> t

Build a set from the given bindings

  • since 4.07
diff --git a/stdlib/Stdlib/Stack/index.html b/stdlib/Stdlib/Stack/index.html new file mode 100644 index 000000000..6aa957f17 --- /dev/null +++ b/stdlib/Stdlib/Stack/index.html @@ -0,0 +1,2 @@ + +Stack (docs.stdlib.Stdlib.Stack)

Module Stdlib.Stack

Last-in first-out stacks.

This module implements stacks (LIFOs), with in-place modification.

Unsynchronized accesses

Unsynchronized accesses to a stack may lead to an invalid queue state. Thus, concurrent accesses to stacks must be synchronized (for instance with a Mutex.t).

type !'a t

The type of stacks containing elements of type 'a.

exception Empty

Raised when Stack.pop or Stack.top is applied to an empty stack.

val create : unit -> 'a t

Return a new stack, initially empty.

val push : 'a -> 'a t -> unit

push x s adds the element x at the top of stack s.

val pop : 'a t -> 'a

pop s removes and returns the topmost element in stack s, or raises Empty if the stack is empty.

val pop_opt : 'a t -> 'a option

pop_opt s removes and returns the topmost element in stack s, or returns None if the stack is empty.

  • since 4.08
val drop : 'a t -> unit

drop s removes the topmost element in stack s, or raises Empty if the stack is empty.

  • since 5.1
val top : 'a t -> 'a

top s returns the topmost element in stack s, or raises Empty if the stack is empty.

val top_opt : 'a t -> 'a option

top_opt s returns the topmost element in stack s, or None if the stack is empty.

  • since 4.08
val clear : 'a t -> unit

Discard all elements from a stack.

val copy : 'a t -> 'a t

Return a copy of the given stack.

val is_empty : 'a t -> bool

Return true if the given stack is empty, false otherwise.

val length : 'a t -> int

Return the number of elements in a stack. Time complexity O(1)

val iter : ('a -> unit) -> 'a t -> unit

iter f s applies f in turn to all elements of s, from the element at the top of the stack to the element at the bottom of the stack. The stack itself is unchanged.

val fold : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

fold f accu s is (f (... (f (f accu x1) x2) ...) xn) where x1 is the top of the stack, x2 the second element, and xn the bottom element. The stack is unchanged.

  • since 4.03

Stacks and Sequences

val to_seq : 'a t -> 'a Seq.t

Iterate on the stack, top to bottom. It is safe to modify the stack during iteration.

  • since 4.07
val add_seq : 'a t -> 'a Seq.t -> unit

Add the elements from the sequence on the top of the stack.

  • since 4.07
val of_seq : 'a Seq.t -> 'a t

Create a stack from the sequence.

  • since 4.07
diff --git a/stdlib/Stdlib/StdLabels/index.html b/stdlib/Stdlib/StdLabels/index.html new file mode 100644 index 000000000..9f9fc2157 --- /dev/null +++ b/stdlib/Stdlib/StdLabels/index.html @@ -0,0 +1,6 @@ + +StdLabels (docs.stdlib.Stdlib.StdLabels)

Module Stdlib.StdLabels

Standard labeled libraries.

This meta-module provides versions of the Array, Bytes, List and String modules where function arguments are systematically labeled. It is intended to be opened at the top of source files, as shown below.

open StdLabels
+
+let to_upper = String.map ~f:Char.uppercase_ascii
+let seq len = List.init ~f:(fun i -> i) ~len
+let everything = Array.create_matrix ~dimx:42 ~dimy:42 42
module Array = ArrayLabels
module Bytes = BytesLabels
module List = ListLabels
module String = StringLabels
diff --git a/stdlib/Stdlib/String/index.html b/stdlib/Stdlib/String/index.html new file mode 100644 index 000000000..e1eec548b --- /dev/null +++ b/stdlib/Stdlib/String/index.html @@ -0,0 +1,6 @@ + +String (docs.stdlib.Stdlib.String)

Module Stdlib.String

Strings.

A string s of length n is an indexable and immutable sequence of n bytes. For historical reasons these bytes are referred to as characters.

The semantics of string functions is defined in terms of indices and positions. These are depicted and described as follows.

positions  0   1   2   3   4    n-1    n
+           +---+---+---+---+     +-----+
+  indices  | 0 | 1 | 2 | 3 | ... | n-1 |
+           +---+---+---+---+     +-----+
  • An index i of s is an integer in the range [0;n-1]. It represents the ith byte (character) of s which can be accessed using the constant time string indexing operator s.[i].
  • A position i of s is an integer in the range [0;n]. It represents either the point at the beginning of the string, or the point between two indices, or the point at the end of the string. The ith byte index is between position i and i+1.

Two integers start and len are said to define a valid substring of s if len >= 0 and start, start+len are positions of s.

Unicode text. Strings being arbitrary sequences of bytes, they can hold any kind of textual encoding. However the recommended encoding for storing Unicode text in OCaml strings is UTF-8. This is the encoding used by Unicode escapes in string literals. For example the string "\u{1F42B}" is the UTF-8 encoding of the Unicode character U+1F42B.

Past mutability. Before OCaml 4.02, strings used to be modifiable in place like Bytes.t mutable sequences of bytes. OCaml 4 had various compiler flags and configuration options to support the transition period from mutable to immutable strings. Those options are no longer available, and strings are now always immutable.

The labeled version of this module can be used as described in the StdLabels module.

Strings

type t = string

The type for strings.

val make : int -> char -> string

make n c is a string of length n with each index holding the character c.

val init : int -> (int -> char) -> string

init n f is a string of length n with index i holding the character f i (called in increasing index order).

  • since 4.02
val empty : string

The empty string.

  • since 4.13
val length : string -> int

length s is the length (number of bytes/characters) of s.

val get : string -> int -> char

get s i is the character at index i in s. This is the same as writing s.[i].

val of_bytes : bytes -> string

Return a new string that contains the same bytes as the given byte sequence.

  • since 4.13
val to_bytes : string -> bytes

Return a new byte sequence that contains the same bytes as the given string.

  • since 4.13
val blit : string -> int -> bytes -> int -> int -> unit

Same as Bytes.blit_string which should be preferred.

Concatenating

Note. The Stdlib.(^) binary operator concatenates two strings.

val concat : string -> string list -> string

concat sep ss concatenates the list of strings ss, inserting the separator string sep between each.

val cat : string -> string -> string

cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

  • since 4.13

Predicates and comparisons

val equal : t -> t -> bool

equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

  • since 4.03 (4.05 in StringLabels)
val compare : t -> t -> int

compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

val starts_with : prefix:string -> string -> bool

starts_with ~prefix s is true if and only if s starts with prefix.

  • since 4.13
val ends_with : suffix:string -> string -> bool

ends_with ~suffix s is true if and only if s ends with suffix.

  • since 4.13
val contains_from : string -> int -> char -> bool

contains_from s start c is true if and only if c appears in s after position start.

val rcontains_from : string -> int -> char -> bool

rcontains_from s stop c is true if and only if c appears in s before position stop+1.

val contains : string -> char -> bool

contains s c is String.contains_from s 0 c.

Extracting substrings

val sub : string -> int -> int -> string

sub s pos len is a string of length len, containing the substring of s that starts at position pos and has length len.

val split_on_char : char -> string -> string list

split_on_char sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

The function's result is specified by the following invariants:

  • The list is not empty.
  • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) + (split_on_char sep s) = s).
  • No string in the result contains the sep character.
  • since 4.04 (4.05 in StringLabels)

Transforming

val map : (char -> char) -> string -> string

map f s is the string resulting from applying f to all the characters of s in increasing order.

  • since 4.00
val mapi : (int -> char -> char) -> string -> string

mapi f s is like map but the index of the character is also passed to f.

  • since 4.02
val fold_left : ('acc -> char -> 'acc) -> 'acc -> string -> 'acc

fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

  • since 4.13
val fold_right : (char -> 'acc -> 'acc) -> string -> 'acc -> 'acc

fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

  • since 4.13
val for_all : (char -> bool) -> string -> bool

for_all p s checks if all characters in s satisfy the predicate p.

  • since 4.13
val exists : (char -> bool) -> string -> bool

exists p s checks if at least one character of s satisfies the predicate p.

  • since 4.13
val trim : string -> string

trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

  • since 4.00
val escaped : string -> string

escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

val uppercase_ascii : string -> string

uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

  • since 4.03 (4.05 in StringLabels)
val lowercase_ascii : string -> string

lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

  • since 4.03 (4.05 in StringLabels)
val capitalize_ascii : string -> string

capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

  • since 4.03 (4.05 in StringLabels)
val uncapitalize_ascii : string -> string

uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

  • since 4.03 (4.05 in StringLabels)

Traversing

val iter : (char -> unit) -> string -> unit

iter f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

val iteri : (int -> char -> unit) -> string -> unit

iteri is like iter, but the function is also given the corresponding character index.

  • since 4.00

Searching

val index_from : string -> int -> char -> int

index_from s i c is the index of the first occurrence of c in s after position i.

  • raises Not_found

    if c does not occur in s after position i.

val index_from_opt : string -> int -> char -> int option

index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

  • since 4.05
val rindex_from : string -> int -> char -> int

rindex_from s i c is the index of the last occurrence of c in s before position i+1.

  • raises Not_found

    if c does not occur in s before position i+1.

val rindex_from_opt : string -> int -> char -> int option

rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

  • since 4.05
val index : string -> char -> int

index s c is String.index_from s 0 c.

val index_opt : string -> char -> int option

index_opt s c is String.index_from_opt s 0 c.

  • since 4.05
val rindex : string -> char -> int

rindex s c is String.rindex_from s (length s - 1) c.

val rindex_opt : string -> char -> int option

rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

  • since 4.05

Strings and Sequences

val to_seq : t -> char Seq.t

to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

  • since 4.07
val to_seqi : t -> (int * char) Seq.t

to_seqi s is like to_seq but also tuples the corresponding index.

  • since 4.07
val of_seq : char Seq.t -> t

of_seq s is a string made of the sequence's characters.

  • since 4.07

UTF decoding and validations

  • since 4.14

UTF-8

val get_utf_8_uchar : t -> int -> Uchar.utf_decode

get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

val is_valid_utf_8 : t -> bool

is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

UTF-16BE

val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

val is_valid_utf_16be : t -> bool

is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

UTF-16LE

val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

val is_valid_utf_16le : t -> bool

is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

Binary decoding of integers

The functions in this section binary decode integers from strings.

All following functions raise Invalid_argument if the characters needed at index i to decode the integer are not available.

Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are sign-extended (or zero-extended) for functions which decode 8-bit or 16-bit integers and represented them with int values.

val get_uint8 : string -> int -> int

get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

  • since 4.13
val get_int8 : string -> int -> int

get_int8 b i is b's signed 8-bit integer starting at character index i.

  • since 4.13
val get_uint16_ne : string -> int -> int

get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_uint16_be : string -> int -> int

get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_uint16_le : string -> int -> int

get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_int16_ne : string -> int -> int

get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int16_be : string -> int -> int

get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int16_le : string -> int -> int

get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int32_ne : string -> int -> int32

get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

  • since 4.13
val hash : t -> int

An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.0
val seeded_hash : int -> t -> int

A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.0
val get_int32_be : string -> int -> int32

get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

  • since 4.13
val get_int32_le : string -> int -> int32

get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

  • since 4.13
val get_int64_ne : string -> int -> int64

get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

  • since 4.13
val get_int64_be : string -> int -> int64

get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

  • since 4.13
val get_int64_le : string -> int -> int64

get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

  • since 4.13
diff --git a/stdlib/Stdlib/StringLabels/index.html b/stdlib/Stdlib/StringLabels/index.html new file mode 100644 index 000000000..24c467a23 --- /dev/null +++ b/stdlib/Stdlib/StringLabels/index.html @@ -0,0 +1,12 @@ + +StringLabels (docs.stdlib.Stdlib.StringLabels)

Module Stdlib.StringLabels

Strings.

A string s of length n is an indexable and immutable sequence of n bytes. For historical reasons these bytes are referred to as characters.

The semantics of string functions is defined in terms of indices and positions. These are depicted and described as follows.

positions  0   1   2   3   4    n-1    n
+           +---+---+---+---+     +-----+
+  indices  | 0 | 1 | 2 | 3 | ... | n-1 |
+           +---+---+---+---+     +-----+
  • An index i of s is an integer in the range [0;n-1]. It represents the ith byte (character) of s which can be accessed using the constant time string indexing operator s.[i].
  • A position i of s is an integer in the range [0;n]. It represents either the point at the beginning of the string, or the point between two indices, or the point at the end of the string. The ith byte index is between position i and i+1.

Two integers start and len are said to define a valid substring of s if len >= 0 and start, start+len are positions of s.

Unicode text. Strings being arbitrary sequences of bytes, they can hold any kind of textual encoding. However the recommended encoding for storing Unicode text in OCaml strings is UTF-8. This is the encoding used by Unicode escapes in string literals. For example the string "\u{1F42B}" is the UTF-8 encoding of the Unicode character U+1F42B.

Past mutability. Before OCaml 4.02, strings used to be modifiable in place like Bytes.t mutable sequences of bytes. OCaml 4 had various compiler flags and configuration options to support the transition period from mutable to immutable strings. Those options are no longer available, and strings are now always immutable.

The labeled version of this module can be used as described in the StdLabels module.

Strings

type t = string

The type for strings.

val make : int -> char -> string

make n c is a string of length n with each index holding the character c.

val init : int -> f:(int -> char) -> string

init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

  • since 4.02
val empty : string

The empty string.

  • since 4.13
val length : string -> int

length s is the length (number of bytes/characters) of s.

val get : string -> int -> char

get s i is the character at index i in s. This is the same as writing s.[i].

val of_bytes : bytes -> string

Return a new string that contains the same bytes as the given byte sequence.

  • since 4.13
val to_bytes : string -> bytes

Return a new byte sequence that contains the same bytes as the given string.

  • since 4.13
val blit : + src:string -> + src_pos:int -> + dst:bytes -> + dst_pos:int -> + len:int -> + unit

Same as Bytes.blit_string which should be preferred.

Concatenating

Note. The Stdlib.(^) binary operator concatenates two strings.

val concat : sep:string -> string list -> string

concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

val cat : string -> string -> string

cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

  • since 4.13

Predicates and comparisons

val equal : t -> t -> bool

equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

  • since 4.05
val compare : t -> t -> int

compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

val starts_with : prefix:string -> string -> bool

starts_with ~prefix s is true if and only if s starts with prefix.

  • since 4.13
val ends_with : suffix:string -> string -> bool

ends_with ~suffix s is true if and only if s ends with suffix.

  • since 4.13
val contains_from : string -> int -> char -> bool

contains_from s start c is true if and only if c appears in s after position start.

val rcontains_from : string -> int -> char -> bool

rcontains_from s stop c is true if and only if c appears in s before position stop+1.

val contains : string -> char -> bool

contains s c is String.contains_from s 0 c.

Extracting substrings

val sub : string -> pos:int -> len:int -> string

sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

val split_on_char : sep:char -> string -> string list

split_on_char ~sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

The function's result is specified by the following invariants:

  • The list is not empty.
  • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) + (split_on_char sep s) = s).
  • No string in the result contains the sep character.
  • since 4.05

Transforming

val map : f:(char -> char) -> string -> string

map f s is the string resulting from applying f to all the characters of s in increasing order.

  • since 4.00
val mapi : f:(int -> char -> char) -> string -> string

mapi ~f s is like map but the index of the character is also passed to f.

  • since 4.02
val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> string -> 'acc

fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

  • since 4.13
val fold_right : f:(char -> 'acc -> 'acc) -> string -> init:'acc -> 'acc

fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

  • since 4.13
val for_all : f:(char -> bool) -> string -> bool

for_all p s checks if all characters in s satisfy the predicate p.

  • since 4.13
val exists : f:(char -> bool) -> string -> bool

exists p s checks if at least one character of s satisfies the predicate p.

  • since 4.13
val trim : string -> string

trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

  • since 4.00
val escaped : string -> string

escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

val uppercase_ascii : string -> string

uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

  • since 4.05
val lowercase_ascii : string -> string

lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

  • since 4.05
val capitalize_ascii : string -> string

capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

  • since 4.05
val uncapitalize_ascii : string -> string

uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

  • since 4.05

Traversing

val iter : f:(char -> unit) -> string -> unit

iter ~f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

val iteri : f:(int -> char -> unit) -> string -> unit

iteri is like iter, but the function is also given the corresponding character index.

  • since 4.00

Searching

val index_from : string -> int -> char -> int

index_from s i c is the index of the first occurrence of c in s after position i.

  • raises Not_found

    if c does not occur in s after position i.

val index_from_opt : string -> int -> char -> int option

index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

  • since 4.05
val rindex_from : string -> int -> char -> int

rindex_from s i c is the index of the last occurrence of c in s before position i+1.

  • raises Not_found

    if c does not occur in s before position i+1.

val rindex_from_opt : string -> int -> char -> int option

rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

  • since 4.05
val index : string -> char -> int

index s c is String.index_from s 0 c.

val index_opt : string -> char -> int option

index_opt s c is String.index_from_opt s 0 c.

  • since 4.05
val rindex : string -> char -> int

rindex s c is String.rindex_from s (length s - 1) c.

val rindex_opt : string -> char -> int option

rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

  • since 4.05

Strings and Sequences

val to_seq : t -> char Seq.t

to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

  • since 4.07
val to_seqi : t -> (int * char) Seq.t

to_seqi s is like to_seq but also tuples the corresponding index.

  • since 4.07
val of_seq : char Seq.t -> t

of_seq s is a string made of the sequence's characters.

  • since 4.07

UTF decoding and validations

  • since 4.14

UTF-8

val get_utf_8_uchar : t -> int -> Uchar.utf_decode

get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

val is_valid_utf_8 : t -> bool

is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

UTF-16BE

val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

val is_valid_utf_16be : t -> bool

is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

UTF-16LE

val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

val is_valid_utf_16le : t -> bool

is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

Binary decoding of integers

The functions in this section binary decode integers from strings.

All following functions raise Invalid_argument if the characters needed at index i to decode the integer are not available.

Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are sign-extended (or zero-extended) for functions which decode 8-bit or 16-bit integers and represented them with int values.

val get_uint8 : string -> int -> int

get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

  • since 4.13
val get_int8 : string -> int -> int

get_int8 b i is b's signed 8-bit integer starting at character index i.

  • since 4.13
val get_uint16_ne : string -> int -> int

get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_uint16_be : string -> int -> int

get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_uint16_le : string -> int -> int

get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

  • since 4.13
val get_int16_ne : string -> int -> int

get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int16_be : string -> int -> int

get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int16_le : string -> int -> int

get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

  • since 4.13
val get_int32_ne : string -> int -> int32

get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

  • since 4.13
val hash : t -> int

An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

  • since 5.0
val seeded_hash : int -> t -> int

A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

  • since 5.0
val get_int32_be : string -> int -> int32

get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

  • since 4.13
val get_int32_le : string -> int -> int32

get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

  • since 4.13
val get_int64_ne : string -> int -> int64

get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

  • since 4.13
val get_int64_be : string -> int -> int64

get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

  • since 4.13
val get_int64_le : string -> int -> int64

get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

  • since 4.13
diff --git a/stdlib/Stdlib/Sys/Immediate64/Make/argument-1-Immediate/index.html b/stdlib/Stdlib/Sys/Immediate64/Make/argument-1-Immediate/index.html new file mode 100644 index 000000000..027e043bc --- /dev/null +++ b/stdlib/Stdlib/Sys/Immediate64/Make/argument-1-Immediate/index.html @@ -0,0 +1,2 @@ + +Immediate (docs.stdlib.Stdlib.Sys.Immediate64.Make.Immediate)

Parameter Make.Immediate

type t
diff --git a/stdlib/Stdlib/Sys/Immediate64/Make/argument-2-Non_immediate/index.html b/stdlib/Stdlib/Sys/Immediate64/Make/argument-2-Non_immediate/index.html new file mode 100644 index 000000000..414004df0 --- /dev/null +++ b/stdlib/Stdlib/Sys/Immediate64/Make/argument-2-Non_immediate/index.html @@ -0,0 +1,2 @@ + +Non_immediate (docs.stdlib.Stdlib.Sys.Immediate64.Make.Non_immediate)

Parameter Make.Non_immediate

type t
diff --git a/stdlib/Stdlib/Sys/Immediate64/Make/index.html b/stdlib/Stdlib/Sys/Immediate64/Make/index.html new file mode 100644 index 000000000..c1a16281c --- /dev/null +++ b/stdlib/Stdlib/Sys/Immediate64/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.stdlib.Stdlib.Sys.Immediate64.Make)

Module Immediate64.Make

Parameters

Signature

type t
type 'a repr =
  1. | Immediate : Immediate.t repr
  2. | Non_immediate : Non_immediate.t repr
val repr : t repr
diff --git a/stdlib/Stdlib/Sys/Immediate64/index.html b/stdlib/Stdlib/Sys/Immediate64/index.html new file mode 100644 index 000000000..f0f5a800f --- /dev/null +++ b/stdlib/Stdlib/Sys/Immediate64/index.html @@ -0,0 +1,5 @@ + +Immediate64 (docs.stdlib.Stdlib.Sys.Immediate64)

Module Sys.Immediate64

This module allows to define a type t with the immediate64 attribute. This attribute means that the type is immediate on 64 bit architectures. On other architectures, it might or might not be immediate.

  • since 4.10
module type Non_immediate = sig ... end
module type Immediate = sig ... end
module Make + (Immediate : Immediate) + (Non_immediate : Non_immediate) : + sig ... end
diff --git a/stdlib/Stdlib/Sys/Immediate64/module-type-Immediate/index.html b/stdlib/Stdlib/Sys/Immediate64/module-type-Immediate/index.html new file mode 100644 index 000000000..0c79032ce --- /dev/null +++ b/stdlib/Stdlib/Sys/Immediate64/module-type-Immediate/index.html @@ -0,0 +1,2 @@ + +Immediate (docs.stdlib.Stdlib.Sys.Immediate64.Immediate)

Module type Immediate64.Immediate

type t
diff --git a/stdlib/Stdlib/Sys/Immediate64/module-type-Non_immediate/index.html b/stdlib/Stdlib/Sys/Immediate64/module-type-Non_immediate/index.html new file mode 100644 index 000000000..10a489ada --- /dev/null +++ b/stdlib/Stdlib/Sys/Immediate64/module-type-Non_immediate/index.html @@ -0,0 +1,2 @@ + +Non_immediate (docs.stdlib.Stdlib.Sys.Immediate64.Non_immediate)

Module type Immediate64.Non_immediate

type t
diff --git a/stdlib/Stdlib/Sys/index.html b/stdlib/Stdlib/Sys/index.html new file mode 100644 index 000000000..52935e575 --- /dev/null +++ b/stdlib/Stdlib/Sys/index.html @@ -0,0 +1,4 @@ + +Sys (docs.stdlib.Stdlib.Sys)

Module Stdlib.Sys

System interface.

Every function in this module raises Sys_error with an informative message when the underlying system call signal an error.

val argv : string array

The command line arguments given to the process. The first element is the command name used to invoke the program. The following elements are the command-line arguments given to the program.

val executable_name : string

The name of the file containing the executable currently running. This name may be absolute or relative to the current directory, depending on the platform and whether the program was compiled to bytecode or a native executable.

val file_exists : string -> bool

Test if a file with the given name exists.

val is_directory : string -> bool

Returns true if the given name refers to a directory, false if it refers to another kind of file.

  • raises Sys_error

    if no file exists with the given name.

  • since 3.10
val is_regular_file : string -> bool

Returns true if the given name refers to a regular file, false if it refers to another kind of file.

  • raises Sys_error

    if no file exists with the given name.

  • since 5.1
val remove : string -> unit

Remove the given file name from the file system.

val rename : string -> string -> unit

Rename a file or directory. rename oldpath newpath renames the file or directory called oldpath, giving it newpath as its new name, moving it between (parent) directories if needed. If a file named newpath already exists, its contents will be replaced with those of oldpath. Depending on the operating system, the metadata (permissions, owner, etc) of newpath can either be preserved or be replaced by those of oldpath.

  • since 4.06 concerning the "replace existing file" behavior
val getenv : string -> string

Return the value associated to a variable in the process environment.

val getenv_opt : string -> string option

Return the value associated to a variable in the process environment or None if the variable is unbound.

  • since 4.05
val command : string -> int

Execute the given shell command and return its exit code.

The argument of Sys.command is generally the name of a command followed by zero, one or several arguments, separated by whitespace. The given argument is interpreted by a shell: either the Windows shell cmd.exe for the Win32 ports of OCaml, or the POSIX shell sh for other ports. It can contain shell builtin commands such as echo, and also special characters such as file redirections > and <, which will be honored by the shell.

Conversely, whitespace or special shell characters occurring in command names or in their arguments must be quoted or escaped so that the shell does not interpret them. The quoting rules vary between the POSIX shell and the Windows shell. The Filename.quote_command performs the appropriate quoting given a command name, a list of arguments, and optional file redirections.

val time : unit -> float

Return the processor time, in seconds, used by the program since the beginning of execution.

val chdir : string -> unit

Change the current working directory of the process.

val mkdir : string -> int -> unit

Create a directory with the given permissions.

  • since 4.12
val rmdir : string -> unit

Remove an empty directory.

  • since 4.12
val getcwd : unit -> string

Return the current working directory of the process.

val readdir : string -> string array

Return the names of all files present in the given directory. Names denoting the current directory and the parent directory ("." and ".." in Unix) are not returned. Each string in the result is a file name rather than a complete path. There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order.

val interactive : bool ref

This reference is initially set to false in standalone programs and to true if the code is being executed under the interactive toplevel system ocaml.

  • alert unsynchronized_access The interactive status is a mutable global state.
val os_type : string

Operating system currently executing the OCaml program. One of

  • "Unix" (for all Unix versions, including Linux and Mac OS X),
  • "Win32" (for MS-Windows, OCaml compiled with MSVC++ or MinGW-w64),
  • "Cygwin" (for MS-Windows, OCaml compiled with Cygwin).
type backend_type =
  1. | Native
  2. | Bytecode
  3. | Other of string

Currently, the official distribution only supports Native and Bytecode, but it can be other backends with alternative compilers, for example, javascript.

  • since 4.04
val backend_type : backend_type

Backend type currently executing the OCaml program.

  • since 4.04
val unix : bool

True if Sys.os_type = "Unix".

  • since 4.01
val win32 : bool

True if Sys.os_type = "Win32".

  • since 4.01
val cygwin : bool

True if Sys.os_type = "Cygwin".

  • since 4.01
val word_size : int

Size of one word on the machine currently executing the OCaml program, in bits: 32 or 64.

val int_size : int

Size of int, in bits. It is 31 (resp. 63) when using OCaml on a 32-bit (resp. 64-bit) platform. It may differ for other implementations, e.g. it can be 32 bits when compiling to JavaScript.

  • since 4.03
val big_endian : bool

Whether the machine currently executing the Caml program is big-endian.

  • since 4.00
val max_string_length : int

Maximum length of strings and byte sequences.

val max_array_length : int

Maximum length of a normal array (i.e. any array whose elements are not of type float). The maximum length of a float array is max_floatarray_length if OCaml was configured with --enable-flat-float-array and max_array_length if configured with --disable-flat-float-array.

val max_floatarray_length : int

Maximum length of a floatarray. This is also the maximum length of a float array when OCaml is configured with --enable-flat-float-array.

val runtime_variant : unit -> string

Return the name of the runtime variant the program is running on. This is normally the argument given to -runtime-variant at compile time, but for byte-code it can be changed after compilation.

  • since 4.03
val runtime_parameters : unit -> string

Return the value of the runtime parameters, in the same format as the contents of the OCAMLRUNPARAM environment variable.

  • since 4.03

Signal handling

type signal_behavior =
  1. | Signal_default
  2. | Signal_ignore
  3. | Signal_handle of int -> unit

What to do when receiving a signal:

  • Signal_default: take the default behavior (usually: abort the program)
  • Signal_ignore: ignore the signal
  • Signal_handle f: call function f, giving it the signal number as argument.
val signal : int -> signal_behavior -> signal_behavior

Set the behavior of the system on receipt of a given signal. The first argument is the signal number. Return the behavior previously associated with the signal. If the signal number is invalid (or not available on your system), an Invalid_argument exception is raised.

val set_signal : int -> signal_behavior -> unit

Same as Sys.signal but return value is ignored.

Signal numbers for the standard POSIX signals.

val sigabrt : int

Abnormal termination

val sigalrm : int

Timeout

val sigfpe : int

Arithmetic exception

val sighup : int

Hangup on controlling terminal

val sigill : int

Invalid hardware instruction

val sigint : int

Interactive interrupt (ctrl-C)

val sigkill : int

Termination (cannot be ignored)

val sigpipe : int

Broken pipe

val sigquit : int

Interactive termination

val sigsegv : int

Invalid memory reference

val sigterm : int

Termination

val sigusr1 : int

Application-defined signal 1

val sigusr2 : int

Application-defined signal 2

val sigchld : int

Child process terminated

val sigcont : int

Continue

val sigstop : int

Stop

val sigtstp : int

Interactive stop

val sigttin : int

Terminal read from background process

val sigttou : int

Terminal write from background process

val sigvtalrm : int

Timeout in virtual time

val sigprof : int

Profiling interrupt

val sigbus : int

Bus error

  • since 4.03
val sigpoll : int

Pollable event

  • since 4.03
val sigsys : int

Bad argument to routine

  • since 4.03
val sigtrap : int

Trace/breakpoint trap

  • since 4.03
val sigurg : int

Urgent condition on socket

  • since 4.03
val sigxcpu : int

Timeout in cpu time

  • since 4.03
val sigxfsz : int

File size limit exceeded

  • since 4.03
exception Break

Exception raised on interactive interrupt if Sys.catch_break is on.

val catch_break : bool -> unit

catch_break governs whether interactive interrupt (ctrl-C) terminates the program or raises the Break exception. Call catch_break true to enable raising Break, and catch_break false to let the system terminate the program on user interrupt.

val ocaml_version : string

ocaml_version is the version of OCaml. It is a string of the form "major.minor[.patchlevel][(+|~)additional-info]", where major, minor, and patchlevel are integers, and additional-info is an arbitrary string. The [.patchlevel] part was absent before version 3.08.0 and became mandatory from 3.08.0 onwards. The [(+|~)additional-info] part may be absent.

val development_version : bool

true if this is a development version, false otherwise.

  • since 4.14
type extra_prefix =
  1. | Plus
  2. | Tilde
    (*
    • since 4.14
    *)
type extra_info = extra_prefix * string
  • since 4.14
type ocaml_release_info = {
  1. major : int;
  2. minor : int;
  3. patchlevel : int;
  4. extra : extra_info option;
}
  • since 4.14
val ocaml_release : ocaml_release_info

ocaml_release is the version of OCaml.

  • since 4.14
val enable_runtime_warnings : bool -> unit

Control whether the OCaml runtime system can emit warnings on stderr. Currently, the only supported warning is triggered when a channel created by open_* functions is finalized without being closed. Runtime warnings are disabled by default.

  • since 4.03
  • alert unsynchronized_access The status of runtime warnings is a mutable global state.
val runtime_warnings_enabled : unit -> bool

Return whether runtime warnings are currently enabled.

  • since 4.03
  • alert unsynchronized_access The status of runtime warnings is a mutable global state.

Optimization

val opaque_identity : 'a -> 'a

For the purposes of optimization, opaque_identity behaves like an unknown (and thus possibly side-effecting) function.

At runtime, opaque_identity disappears altogether.

A typical use of this function is to prevent pure computations from being optimized away in benchmarking loops. For example:

for _round = 1 to 100_000 do
+  ignore (Sys.opaque_identity (my_pure_computation ()))
+done
  • since 4.03
module Immediate64 : sig ... end

This module allows to define a type t with the immediate64 attribute. This attribute means that the type is immediate on 64 bit architectures. On other architectures, it might or might not be immediate.

diff --git a/stdlib/Stdlib/Type/Id/index.html b/stdlib/Stdlib/Type/Id/index.html new file mode 100644 index 000000000..4adc53987 --- /dev/null +++ b/stdlib/Stdlib/Type/Id/index.html @@ -0,0 +1,40 @@ + +Id (docs.stdlib.Stdlib.Type.Id)

Module Type.Id

Type identifiers.

A type identifier is a value that denotes a type. Given two type identifiers, they can be tested for equality to prove they denote the same type. Note that:

  • Unequal identifiers do not imply unequal types: a given type can be denoted by more than one identifier.
  • Type identifiers can be marshalled, but they get a new, distinct, identity on unmarshalling, so the equalities are lost.

See an example of use.

Type identifiers

type !'a t

The type for identifiers for type 'a.

val make : unit -> 'a t

make () is a new type identifier.

val uid : 'a t -> int

uid id is a runtime unique identifier for id.

val provably_equal : 'a t -> 'b t -> ('a, 'b) eq option

provably_equal i0 i1 is Some Equal if identifier i0 is equal to i1 and None otherwise.

Example

The following shows how type identifiers can be used to implement a simple heterogeneous key-value dictionary. In contrast to Stdlib.Map values whose keys map to a single, homogeneous type of values, this dictionary can associate a different type of value to each key.

(** Heterogeneous dictionaries. *)
+module Dict : sig
+  type t
+  (** The type for dictionaries. *)
+
+  type 'a key
+  (** The type for keys binding values of type ['a]. *)
+
+  val key : unit -> 'a key
+  (** [key ()] is a new dictionary key. *)
+
+  val empty : t
+  (** [empty] is the empty dictionary. *)
+
+  val add : 'a key -> 'a -> t -> t
+  (** [add k v d] is [d] with [k] bound to [v]. *)
+
+  val remove : 'a key -> t -> t
+  (** [remove k d] is [d] with the last binding of [k] removed. *)
+
+  val find : 'a key -> t -> 'a option
+  (** [find k d] is the binding of [k] in [d], if any. *)
+end = struct
+  type 'a key = 'a Type.Id.t
+  type binding = B : 'a key * 'a -> binding
+  type t = (int * binding) list
+
+  let key () = Type.Id.make ()
+  let empty = []
+  let add k v d = (Type.Id.uid k, B (k, v)) :: d
+  let remove k d = List.remove_assoc (Type.Id.uid k) d
+  let find : type a. a key -> t -> a option = fun k d ->
+    match List.assoc_opt (Type.Id.uid k) d with
+    | None -> None
+    | Some (B (k', v)) ->
+        match Type.Id.provably_equal k k' with
+        | Some Type.Equal -> Some v
+        | None -> assert false
+end
diff --git a/stdlib/Stdlib/Type/index.html b/stdlib/Stdlib/Type/index.html new file mode 100644 index 000000000..da292d714 --- /dev/null +++ b/stdlib/Stdlib/Type/index.html @@ -0,0 +1,2 @@ + +Type (docs.stdlib.Stdlib.Type)

Module Stdlib.Type

Type introspection.

  • since 5.1

Type equality witness

type (_, _) eq =
  1. | Equal : ('a, 'a) eq

The purpose of eq is to represent type equalities that may not otherwise be known by the type checker (e.g. because they may depend on dynamic data).

A value of type (a, b) eq represents the fact that types a and b are equal.

If one has a value eq : (a, b) eq that proves types a and b are equal, one can use it to convert a value of type a to a value of type b by pattern matching on Equal:

let cast (type a) (type b) (Equal : (a, b) Type.eq) (a : a) : b = a

At runtime, this function simply returns its second argument unchanged.

Type identifiers

module Id : sig ... end

Type identifiers.

diff --git a/stdlib/Stdlib/Uchar/index.html b/stdlib/Stdlib/Uchar/index.html new file mode 100644 index 000000000..6ab867826 --- /dev/null +++ b/stdlib/Stdlib/Uchar/index.html @@ -0,0 +1,2 @@ + +Uchar (docs.stdlib.Stdlib.Uchar)

Module Stdlib.Uchar

Unicode characters.

  • since 4.03
type t

The type for Unicode characters.

A value of this type represents a Unicode scalar value which is an integer in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF.

val min : t

min is U+0000.

val max : t

max is U+10FFFF.

val bom : t

bom is U+FEFF, the byte order mark (BOM) character.

  • since 4.06
val rep : t

rep is U+FFFD, the replacement character.

  • since 4.06
val succ : t -> t

succ u is the scalar value after u in the set of Unicode scalar values.

val pred : t -> t

pred u is the scalar value before u in the set of Unicode scalar values.

val is_valid : int -> bool

is_valid n is true if and only if n is a Unicode scalar value (i.e. in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF).

val of_int : int -> t

of_int i is i as a Unicode character.

val to_int : t -> int

to_int u is u as an integer.

val is_char : t -> bool

is_char u is true if and only if u is a latin1 OCaml character.

val of_char : char -> t

of_char c is c as a Unicode character.

val to_char : t -> char

to_char u is u as an OCaml latin1 character.

val equal : t -> t -> bool

equal u u' is u = u'.

val compare : t -> t -> int

compare u u' is Stdlib.compare u u'.

val hash : t -> int

hash u associates a non-negative integer to u.

UTF codecs tools

  • since 4.14
type utf_decode

The type for UTF decode results. Values of this type represent the result of a Unicode Transformation Format decoding attempt.

val utf_decode_is_valid : utf_decode -> bool

utf_decode_is_valid d is true if and only if d holds a valid decode.

val utf_decode_uchar : utf_decode -> t

utf_decode_uchar d is the Unicode character decoded by d if utf_decode_is_valid d is true and Uchar.rep otherwise.

val utf_decode_length : utf_decode -> int

utf_decode_length d is the number of elements from the source that were consumed by the decode d. This is always strictly positive and smaller or equal to 4. The kind of source elements depends on the actual decoder; for the decoders of the standard library this function always returns a length in bytes.

val utf_decode : int -> t -> utf_decode

utf_decode n u is a valid UTF decode for u that consumed n elements from the source for decoding. n must be positive and smaller or equal to 4 (this is not checked by the module).

val utf_decode_invalid : int -> utf_decode

utf_decode_invalid n is an invalid UTF decode that consumed n elements from the source to error. n must be positive and smaller or equal to 4 (this is not checked by the module). The resulting decode has rep as the decoded Unicode character.

val utf_8_byte_length : t -> int

utf_8_byte_length u is the number of bytes needed to encode u in UTF-8.

val utf_16_byte_length : t -> int

utf_16_byte_length u is the number of bytes needed to encode u in UTF-16.

diff --git a/stdlib/Stdlib/Unit/index.html b/stdlib/Stdlib/Unit/index.html new file mode 100644 index 000000000..265ffdb0f --- /dev/null +++ b/stdlib/Stdlib/Unit/index.html @@ -0,0 +1,2 @@ + +Unit (docs.stdlib.Stdlib.Unit)

Module Stdlib.Unit

Unit values.

  • since 4.08

The unit type

type t = unit =
  1. | ()

The unit type.

The constructor () is included here so that it has a path, but it is not intended to be used in user-defined data types.

val equal : t -> t -> bool

equal u1 u2 is true.

val compare : t -> t -> int

compare u1 u2 is 0.

val to_string : t -> string

to_string b is "()".

diff --git a/stdlib/Stdlib/Weak/Make/argument-1-H/index.html b/stdlib/Stdlib/Weak/Make/argument-1-H/index.html new file mode 100644 index 000000000..b87137484 --- /dev/null +++ b/stdlib/Stdlib/Weak/Make/argument-1-H/index.html @@ -0,0 +1,2 @@ + +H (docs.stdlib.Stdlib.Weak.Make.H)

Parameter Make.H

type t

The type of the hashtable keys.

val equal : t -> t -> bool

The equality predicate used to compare keys.

val hash : t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
diff --git a/stdlib/Stdlib/Weak/Make/index.html b/stdlib/Stdlib/Weak/Make/index.html new file mode 100644 index 000000000..04e7a3614 --- /dev/null +++ b/stdlib/Stdlib/Weak/Make/index.html @@ -0,0 +1,2 @@ + +Make (docs.stdlib.Stdlib.Weak.Make)

Module Weak.Make

Functor building an implementation of the weak hash set structure. H.equal can't be the physical equality, since only shallow copies of the elements in the set are given to it.

Parameters

Signature

type data = H.t

The type of the elements stored in the table.

type t

The type of tables that contain elements of type data. Note that weak hash sets cannot be marshaled using Stdlib.output_value or the functions of the Marshal module.

val create : int -> t

create n creates a new empty weak hash set, of initial size n. The table will grow as needed.

val clear : t -> unit

Remove all elements from the table.

val merge : t -> data -> data

merge t x returns an instance of x found in t if any, or else adds x to t and return x.

val add : t -> data -> unit

add t x adds x to t. If there is already an instance of x in t, it is unspecified which one will be returned by subsequent calls to find and merge.

val remove : t -> data -> unit

remove t x removes from t one instance of x. Does nothing if there is no instance of x in t.

val find : t -> data -> data

find t x returns an instance of x found in t.

  • raises Not_found

    if there is no such element.

val find_opt : t -> data -> data option

find_opt t x returns an instance of x found in t or None if there is no such element.

  • since 4.05
val find_all : t -> data -> data list

find_all t x returns a list of all the instances of x found in t.

val mem : t -> data -> bool

mem t x returns true if there is at least one instance of x in t, false otherwise.

val iter : (data -> unit) -> t -> unit

iter f t calls f on each element of t, in some unspecified order. It is not specified what happens if f tries to change t itself.

val fold : (data -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f t init computes (f d1 (... (f dN init))) where d1 ... dN are the elements of t in some unspecified order. It is not specified what happens if f tries to change t itself.

val count : t -> int

Count the number of elements in the table. count t gives the same result as fold (fun _ n -> n+1) t 0 but does not delay the deallocation of the dead elements.

val stats : t -> int * int * int * int * int * int

Return statistics on the table. The numbers are, in order: table length, number of entries, sum of bucket lengths, smallest bucket length, median bucket length, biggest bucket length.

diff --git a/stdlib/Stdlib/Weak/index.html b/stdlib/Stdlib/Weak/index.html new file mode 100644 index 000000000..ab758bb98 --- /dev/null +++ b/stdlib/Stdlib/Weak/index.html @@ -0,0 +1,2 @@ + +Weak (docs.stdlib.Stdlib.Weak)

Module Stdlib.Weak

Arrays of weak pointers and hash sets of weak pointers.

Low-level functions

type !'a t

The type of arrays of weak pointers (weak arrays). A weak pointer is a value that the garbage collector may erase whenever the value is not used any more (through normal pointers) by the program. Note that finalisation functions are run before the weak pointers are erased, because the finalisation functions can make values alive again (before 4.03 the finalisation functions were run after).

A weak pointer is said to be full if it points to a value, empty if the value was erased by the GC.

Notes:

  • Integers are not allocated and cannot be stored in weak arrays.
  • Weak arrays cannot be marshaled using Stdlib.output_value nor the functions of the Marshal module.
val create : int -> 'a t

Weak.create n returns a new weak array of length n. All the pointers are initially empty.

val length : 'a t -> int

Weak.length ar returns the length (number of elements) of ar.

val set : 'a t -> int -> 'a option -> unit

Weak.set ar n (Some el) sets the nth cell of ar to be a (full) pointer to el; Weak.set ar n None sets the nth cell of ar to empty.

val get : 'a t -> int -> 'a option

Weak.get ar n returns None if the nth cell of ar is empty, Some x (where x is the value) if it is full.

val get_copy : 'a t -> int -> 'a option

Weak.get_copy ar n returns None if the nth cell of ar is empty, Some x (where x is a (shallow) copy of the value) if it is full. In addition to pitfalls with mutable values, the interesting difference with get is that get_copy does not prevent the incremental GC from erasing the value in its current cycle (get may delay the erasure to the next GC cycle).

val check : 'a t -> int -> bool

Weak.check ar n returns true if the nth cell of ar is full, false if it is empty. Note that even if Weak.check ar n returns true, a subsequent Weak.get ar n can return None.

val fill : 'a t -> int -> int -> 'a option -> unit

Weak.fill ar ofs len el sets to el all pointers of ar from ofs to ofs + len - 1.

val blit : 'a t -> int -> 'a t -> int -> int -> unit

Weak.blit ar1 off1 ar2 off2 len copies len weak pointers from ar1 (starting at off1) to ar2 (starting at off2). It works correctly even if ar1 and ar2 are the same.

  • raises Invalid_argument

    if off1 and len do not designate a valid subarray of ar1, or if off2 and len do not designate a valid subarray of ar2.

Weak hash sets

A weak hash set is a hashed set of values. Each value may magically disappear from the set when it is not used by the rest of the program any more. This is normally used to share data structures without inducing memory leaks. Weak hash sets are defined on values from a Hashtbl.HashedType module; the equal relation and hash function are taken from that module. We will say that v is an instance of x if equal x v is true.

The equal relation must be able to work on a shallow copy of the values and give the same result as with the values themselves.

Unsynchronized accesses

Unsynchronized accesses to weak hash sets are a programming error. Unsynchronized accesses to a weak hash set may lead to an invalid weak hash set state. Thus, concurrent accesses to weak hash sets must be synchronized (for instance with a Mutex.t).

module type S = sig ... end

The output signature of the functor Weak.Make.

module Make (H : Hashtbl.HashedType) : S with type data = H.t

Functor building an implementation of the weak hash set structure. H.equal can't be the physical equality, since only shallow copies of the elements in the set are given to it.

diff --git a/stdlib/Stdlib/Weak/module-type-S/index.html b/stdlib/Stdlib/Weak/module-type-S/index.html new file mode 100644 index 000000000..f1fe9834e --- /dev/null +++ b/stdlib/Stdlib/Weak/module-type-S/index.html @@ -0,0 +1,2 @@ + +S (docs.stdlib.Stdlib.Weak.S)

Module type Weak.S

The output signature of the functor Weak.Make.

type data

The type of the elements stored in the table.

type t

The type of tables that contain elements of type data. Note that weak hash sets cannot be marshaled using Stdlib.output_value or the functions of the Marshal module.

val create : int -> t

create n creates a new empty weak hash set, of initial size n. The table will grow as needed.

val clear : t -> unit

Remove all elements from the table.

val merge : t -> data -> data

merge t x returns an instance of x found in t if any, or else adds x to t and return x.

val add : t -> data -> unit

add t x adds x to t. If there is already an instance of x in t, it is unspecified which one will be returned by subsequent calls to find and merge.

val remove : t -> data -> unit

remove t x removes from t one instance of x. Does nothing if there is no instance of x in t.

val find : t -> data -> data

find t x returns an instance of x found in t.

  • raises Not_found

    if there is no such element.

val find_opt : t -> data -> data option

find_opt t x returns an instance of x found in t or None if there is no such element.

  • since 4.05
val find_all : t -> data -> data list

find_all t x returns a list of all the instances of x found in t.

val mem : t -> data -> bool

mem t x returns true if there is at least one instance of x in t, false otherwise.

val iter : (data -> unit) -> t -> unit

iter f t calls f on each element of t, in some unspecified order. It is not specified what happens if f tries to change t itself.

val fold : (data -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f t init computes (f d1 (... (f dN init))) where d1 ... dN are the elements of t in some unspecified order. It is not specified what happens if f tries to change t itself.

val count : t -> int

Count the number of elements in the table. count t gives the same result as fold (fun _ n -> n+1) t 0 but does not delay the deallocation of the dead elements.

val stats : t -> int * int * int * int * int * int

Return statistics on the table. The numbers are, in order: table length, number of entries, sum of bucket lengths, smallest bucket length, median bucket length, biggest bucket length.

diff --git a/stdlib/Stdlib/index.html b/stdlib/Stdlib/index.html new file mode 100644 index 000000000..450d1196a --- /dev/null +++ b/stdlib/Stdlib/index.html @@ -0,0 +1,8 @@ + +Stdlib (docs.stdlib.Stdlib)

Module Stdlib

The OCaml Standard library.

This module is automatically opened at the beginning of each compilation. All components of this module can therefore be referred by their short name, without prefixing them by Stdlib.

In particular, it provides the basic operations over the built-in types (numbers, booleans, byte sequences, strings, exceptions, references, lists, arrays, input-output channels, ...) and the standard library modules.

Exceptions

val raise : exn -> 'a

Raise the given exception value

val raise_notrace : exn -> 'a

A faster version raise which does not record the backtrace.

  • since 4.02
val invalid_arg : string -> 'a

Raise exception Invalid_argument with the given string.

val failwith : string -> 'a

Raise exception Failure with the given string.

exception Exit

The Exit exception is not raised by any library function. It is provided for use in your programs.

exception Match_failure of string * int * int

Exception raised when none of the cases of a pattern-matching apply. The arguments are the location of the match keyword in the source code (file name, line number, column number).

exception Assert_failure of string * int * int

Exception raised when an assertion fails. The arguments are the location of the assert keyword in the source code (file name, line number, column number).

exception Invalid_argument of string

Exception raised by library functions to signal that the given arguments do not make sense. The string gives some information to the programmer. As a general rule, this exception should not be caught, it denotes a programming error and the code should be modified not to trigger it.

exception Failure of string

Exception raised by library functions to signal that they are undefined on the given arguments. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Failure _ instead).

exception Not_found

Exception raised by search functions when the desired object could not be found.

exception Out_of_memory

Exception raised by the garbage collector when there is insufficient memory to complete the computation. (Not reliable for allocations on the minor heap.)

exception Stack_overflow

Exception raised by the bytecode interpreter when the evaluation stack reaches its maximal size. This often indicates infinite or excessively deep recursion in the user's program.

Before 4.10, it was not fully implemented by the native-code compiler.

exception Sys_error of string

Exception raised by the input/output functions to report an operating system error. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Sys_error _ instead).

exception End_of_file

Exception raised by input functions to signal that the end of file has been reached.

exception Division_by_zero

Exception raised by integer division and remainder operations when their second argument is zero.

exception Sys_blocked_io

A special case of Sys_error raised when no I/O is possible on a non-blocking I/O channel.

exception Undefined_recursive_module of string * int * int

Exception raised when an ill-founded recursive module definition is evaluated. The arguments are the location of the definition in the source code (file name, line number, column number).

Comparisons

val (=) : 'a -> 'a -> bool

e1 = e2 tests for structural equality of e1 and e2. Mutable structures (e.g. references and arrays) are equal if and only if their current contents are structurally equal, even if the two mutable objects are not the same physical object. Equality between functional values raises Invalid_argument. Equality between cyclic data structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

val (<>) : 'a -> 'a -> bool

Negation of Stdlib.(=). Left-associative operator, see Ocaml_operators for more information.

val (<) : 'a -> 'a -> bool

See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

val (>) : 'a -> 'a -> bool

See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

val (<=) : 'a -> 'a -> bool

See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

val (>=) : 'a -> 'a -> bool

Structural ordering functions. These functions coincide with the usual orderings over integers, characters, strings, byte sequences and floating-point numbers, and extend them to a total ordering over all types. The ordering is compatible with ( = ). As in the case of ( = ), mutable structures are compared by contents. Comparison between functional values raises Invalid_argument. Comparison between cyclic structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

val compare : 'a -> 'a -> int

compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. The ordering implemented by compare is compatible with the comparison predicates =, < and > defined above, with one difference on the treatment of the float value Stdlib.nan. Namely, the comparison predicates treat nan as different from any other float value, including itself; while compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

compare applied to functional values may raise Invalid_argument. compare applied to cyclic structures may not terminate.

The compare function can be used as the comparison function required by the Set.Make and Map.Make functors, as well as the List.sort and Array.sort functions.

val min : 'a -> 'a -> 'a

Return the smaller of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

val max : 'a -> 'a -> 'a

Return the greater of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

val (==) : 'a -> 'a -> bool

e1 == e2 tests for physical equality of e1 and e2. On mutable types such as references, arrays, byte sequences, records with mutable fields and objects with mutable instance variables, e1 == e2 is true if and only if physical modification of e1 also affects e2. On non-mutable types, the behavior of ( == ) is implementation-dependent; however, it is guaranteed that e1 == e2 implies compare e1 e2 = 0. Left-associative operator, see Ocaml_operators for more information.

val (!=) : 'a -> 'a -> bool

Negation of Stdlib.(==). Left-associative operator, see Ocaml_operators for more information.

Boolean operations

val not : bool -> bool

The boolean negation.

val (&&) : bool -> bool -> bool

The boolean 'and'. Evaluation is sequential, left-to-right: in e1 && e2, e1 is evaluated first, and if it returns false, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

val (||) : bool -> bool -> bool

The boolean 'or'. Evaluation is sequential, left-to-right: in e1 || e2, e1 is evaluated first, and if it returns true, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

Debugging

val __LOC__ : string

__LOC__ returns the location at which this expression appears in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

  • since 4.02
val __FILE__ : string

__FILE__ returns the name of the file currently being parsed by the compiler.

  • since 4.02
val __LINE__ : int

__LINE__ returns the line number at which this expression appears in the file currently being parsed by the compiler.

  • since 4.02
val __MODULE__ : string

__MODULE__ returns the module name of the file being parsed by the compiler.

  • since 4.02
val __POS__ : string * int * int * int

__POS__ returns a tuple (file,lnum,cnum,enum), corresponding to the location at which this expression appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

  • since 4.02
val __FUNCTION__ : string

__FUNCTION__ returns the name of the current function or method, including any enclosing modules or classes.

  • since 4.12
val __LOC_OF__ : 'a -> string * 'a

__LOC_OF__ expr returns a pair (loc, expr) where loc is the location of expr in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

  • since 4.02
val __LINE_OF__ : 'a -> int * 'a

__LINE_OF__ expr returns a pair (line, expr), where line is the line number at which the expression expr appears in the file currently being parsed by the compiler.

  • since 4.02
val __POS_OF__ : 'a -> (string * int * int * int) * 'a

__POS_OF__ expr returns a pair (loc,expr), where loc is a tuple (file,lnum,cnum,enum) corresponding to the location at which the expression expr appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

  • since 4.02

Composition operators

val (|>) : 'a -> ('a -> 'b) -> 'b

Reverse-application operator: x |> f |> g is exactly equivalent to g (f (x)). Left-associative operator, see Ocaml_operators for more information.

  • since 4.01
val (@@) : ('a -> 'b) -> 'a -> 'b

Application operator: g @@ f @@ x is exactly equivalent to g (f (x)). Right-associative operator, see Ocaml_operators for more information.

  • since 4.01

Integer arithmetic

Integers are Sys.int_size bits wide. All operations are taken modulo 2Sys.int_size. They do not fail on overflow.

val (~-) : int -> int

Unary negation. You can also write - e instead of ~- e. Unary operator, see Ocaml_operators for more information.

val (~+) : int -> int

Unary addition. You can also write + e instead of ~+ e. Unary operator, see Ocaml_operators for more information.

  • since 3.12
val succ : int -> int

succ x is x + 1.

val pred : int -> int

pred x is x - 1.

val (+) : int -> int -> int

Integer addition. Left-associative operator, see Ocaml_operators for more information.

val (-) : int -> int -> int

Integer subtraction. Left-associative operator, , see Ocaml_operators for more information.

val (*) : int -> int -> int

Integer multiplication. Left-associative operator, see Ocaml_operators for more information.

val (/) : int -> int -> int

Integer division. Integer division rounds the real quotient of its arguments towards zero. More precisely, if x >= 0 and y > 0, x / y is the greatest integer less than or equal to the real quotient of x by y. Moreover, (- x) / y = x / (- y) = - (x / y). Left-associative operator, see Ocaml_operators for more information.

val (mod) : int -> int -> int

Integer remainder. If y is not zero, the result of x mod y satisfies the following properties: x = (x / y) * y + x mod y and abs(x mod y) <= abs(y) - 1. If y = 0, x mod y raises Division_by_zero. Note that x mod y is negative only if x < 0. Left-associative operator, see Ocaml_operators for more information.

val abs : int -> int

abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

val max_int : int

The greatest representable integer.

val min_int : int

The smallest representable integer.

Bitwise operations

val (land) : int -> int -> int

Bitwise logical and. Left-associative operator, see Ocaml_operators for more information.

val (lor) : int -> int -> int

Bitwise logical or. Left-associative operator, see Ocaml_operators for more information.

val (lxor) : int -> int -> int

Bitwise logical exclusive or. Left-associative operator, see Ocaml_operators for more information.

val lnot : int -> int

Bitwise logical negation.

val (lsl) : int -> int -> int

n lsl m shifts n to the left by m bits. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

val (lsr) : int -> int -> int

n lsr m shifts n to the right by m bits. This is a logical shift: zeroes are inserted regardless of the sign of n. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

val (asr) : int -> int -> int

n asr m shifts n to the right by m bits. This is an arithmetic shift: the sign bit of n is replicated. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

Floating-point arithmetic

OCaml's floating-point numbers follow the IEEE 754 standard, using double precision (64 bits) numbers. Floating-point operations never raise an exception on overflow, underflow, division by zero, etc. Instead, special IEEE numbers are returned as appropriate, such as infinity for 1.0 /. 0.0, neg_infinity for -1.0 /. 0.0, and nan ('not a number') for 0.0 /. 0.0. These special numbers then propagate through floating-point computations as expected: for instance, 1.0 /. infinity is 0.0, basic arithmetic operations (+., -., *., /.) with nan as an argument return nan, ...

val (~-.) : float -> float

Unary negation. You can also write -. e instead of ~-. e. Unary operator, see Ocaml_operators for more information.

val (~+.) : float -> float

Unary addition. You can also write +. e instead of ~+. e. Unary operator, see Ocaml_operators for more information.

  • since 3.12
val (+.) : float -> float -> float

Floating-point addition. Left-associative operator, see Ocaml_operators for more information.

val (-.) : float -> float -> float

Floating-point subtraction. Left-associative operator, see Ocaml_operators for more information.

val (*.) : float -> float -> float

Floating-point multiplication. Left-associative operator, see Ocaml_operators for more information.

val (/.) : float -> float -> float

Floating-point division. Left-associative operator, see Ocaml_operators for more information.

val (**) : float -> float -> float

Exponentiation. Right-associative operator, see Ocaml_operators for more information.

val sqrt : float -> float

Square root.

val exp : float -> float

Exponential.

val log : float -> float

Natural logarithm.

val log10 : float -> float

Base 10 logarithm.

val expm1 : float -> float

expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

  • since 3.12
val log1p : float -> float

log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

  • since 3.12
val cos : float -> float

Cosine. Argument is in radians.

val sin : float -> float

Sine. Argument is in radians.

val tan : float -> float

Tangent. Argument is in radians.

val acos : float -> float

Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

val asin : float -> float

Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

val atan : float -> float

Arc tangent. Result is in radians and is between -pi/2 and pi/2.

val atan2 : float -> float -> float

atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

val hypot : float -> float -> float

hypot x y returns sqrt(x *. x + y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

  • since 4.00
val cosh : float -> float

Hyperbolic cosine. Argument is in radians.

val sinh : float -> float

Hyperbolic sine. Argument is in radians.

val tanh : float -> float

Hyperbolic tangent. Argument is in radians.

val acosh : float -> float

Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

  • since 4.13
val asinh : float -> float

Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

  • since 4.13
val atanh : float -> float

Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

  • since 4.13
val ceil : float -> float

Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

val floor : float -> float

Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

val abs_float : float -> float

abs_float f returns the absolute value of f.

val copysign : float -> float -> float

copysign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

  • since 4.00
val mod_float : float -> float -> float

mod_float a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

val frexp : float -> float * int

frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

val ldexp : float -> int -> float

ldexp x n returns x *. 2 ** n.

val modf : float -> float * float

modf f returns the pair of the fractional and integral part of f.

val float : int -> float
val float_of_int : int -> float

Convert an integer to floating-point.

val truncate : float -> int
val int_of_float : float -> int

Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

val infinity : float

Positive infinity.

val neg_infinity : float

Negative infinity.

val nan : float

A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

nan is a quiet NaN since 5.1; it was a signaling NaN before.

val max_float : float

The largest positive finite value of type float.

val min_float : float

The smallest positive, non-zero, non-denormalized value of type float.

val epsilon_float : float

The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

type fpclass =
  1. | FP_normal
    (*

    Normal number, none of the below

    *)
  2. | FP_subnormal
    (*

    Number very close to 0.0, has reduced precision

    *)
  3. | FP_zero
    (*

    Number is 0.0 or -0.0

    *)
  4. | FP_infinite
    (*

    Number is positive or negative infinity

    *)
  5. | FP_nan
    (*

    Not a number: result of an undefined operation

    *)

The five classes of floating-point numbers, as determined by the Stdlib.classify_float function.

val classify_float : float -> fpclass

Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

String operations

More string operations are provided in module String.

val (^) : string -> string -> string

String concatenation. Right-associative operator, see Ocaml_operators for more information.

Character operations

More character operations are provided in module Char.

val int_of_char : char -> int

Return the ASCII code of the argument.

val char_of_int : int -> char

Return the character with the given ASCII code.

Unit operations

val ignore : 'a -> unit

Discard the value of its argument and return (). For instance, ignore(f x) discards the result of the side-effecting function f. It is equivalent to f x; (), except that the latter may generate a compiler warning; writing ignore(f x) instead avoids the warning.

String conversion functions

val string_of_bool : bool -> string

Return the string representation of a boolean. As the returned values may be shared, the user should not modify them directly.

val bool_of_string_opt : string -> bool option

Convert the given string to a boolean.

Return None if the string is not "true" or "false".

  • since 4.05
val bool_of_string : string -> bool

Same as Stdlib.bool_of_string_opt, but raise Invalid_argument "bool_of_string" instead of returning None.

val string_of_int : int -> string

Return the string representation of an integer, in decimal.

val int_of_string_opt : string -> int option

Convert the given string to an integer. The string is read in decimal (by default, or if the string begins with 0u), in hexadecimal (if it begins with 0x or 0X), in octal (if it begins with 0o or 0O), or in binary (if it begins with 0b or 0B).

The 0u prefix reads the input as an unsigned integer in the range [0, 2*max_int+1]. If the input exceeds max_int it is converted to the signed integer min_int + input - max_int - 1.

The _ (underscore) character can appear anywhere in the string and is ignored.

Return None if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int.

  • since 4.05
val int_of_string : string -> int

Same as Stdlib.int_of_string_opt, but raise Failure "int_of_string" instead of returning None.

val string_of_float : float -> string

Return a string representation of a floating-point number.

This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

val float_of_string_opt : string -> float option

Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X).

The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit.

The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit.

In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional.

The _ (underscore) character can appear anywhere in the string and is ignored.

Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

Return None if the given string is not a valid representation of a float.

  • since 4.05
val float_of_string : string -> float

Same as Stdlib.float_of_string_opt, but raise Failure "float_of_string" instead of returning None.

Pair operations

val fst : ('a * 'b) -> 'a

Return the first component of a pair.

val snd : ('a * 'b) -> 'b

Return the second component of a pair.

List operations

More list operations are provided in module List.

val (@) : 'a list -> 'a list -> 'a list

l0 @ l1 appends l1 to l0. Same function as List.append. Right-associative operator, see Ocaml_operators for more information.

  • since 5.1 this function is tail-recursive.

Input/output

Note: all input/output functions can raise Sys_error when the system calls they invoke fail.

type in_channel

The type of input channel.

type out_channel

The type of output channel.

val stdin : in_channel

The standard input for the process.

val stdout : out_channel

The standard output for the process.

val stderr : out_channel

The standard error output for the process.

Output functions on standard output

val print_char : char -> unit

Print a character on standard output.

val print_string : string -> unit

Print a string on standard output.

val print_bytes : bytes -> unit

Print a byte sequence on standard output.

  • since 4.02
val print_int : int -> unit

Print an integer, in decimal, on standard output.

val print_float : float -> unit

Print a floating-point number, in decimal, on standard output.

The conversion of the number to a string uses string_of_float and can involve a loss of precision.

val print_endline : string -> unit

Print a string, followed by a newline character, on standard output and flush standard output.

val print_newline : unit -> unit

Print a newline character on standard output, and flush standard output. This can be used to simulate line buffering of standard output.

Output functions on standard error

val prerr_char : char -> unit

Print a character on standard error.

val prerr_string : string -> unit

Print a string on standard error.

val prerr_bytes : bytes -> unit

Print a byte sequence on standard error.

  • since 4.02
val prerr_int : int -> unit

Print an integer, in decimal, on standard error.

val prerr_float : float -> unit

Print a floating-point number, in decimal, on standard error.

The conversion of the number to a string uses string_of_float and can involve a loss of precision.

val prerr_endline : string -> unit

Print a string, followed by a newline character on standard error and flush standard error.

val prerr_newline : unit -> unit

Print a newline character on standard error, and flush standard error.

Input functions on standard input

val read_line : unit -> string

Flush standard output, then read characters from standard input until a newline character is encountered.

Return the string of all characters read, without the newline character at the end.

  • raises End_of_file

    if the end of the file is reached at the beginning of line.

val read_int_opt : unit -> int option

Flush standard output, then read one line from standard input and convert it to an integer.

Return None if the line read is not a valid representation of an integer.

  • since 4.05
val read_int : unit -> int

Same as Stdlib.read_int_opt, but raise Failure "int_of_string" instead of returning None.

val read_float_opt : unit -> float option

Flush standard output, then read one line from standard input and convert it to a floating-point number.

Return None if the line read is not a valid representation of a floating-point number.

  • since 4.05
val read_float : unit -> float

Same as Stdlib.read_float_opt, but raise Failure "float_of_string" instead of returning None.

General output functions

type open_flag =
  1. | Open_rdonly
    (*

    open for reading.

    *)
  2. | Open_wronly
    (*

    open for writing.

    *)
  3. | Open_append
    (*

    open for appending: always write at end of file.

    *)
  4. | Open_creat
    (*

    create the file if it does not exist.

    *)
  5. | Open_trunc
    (*

    empty the file if it already exists.

    *)
  6. | Open_excl
    (*

    fail if Open_creat and the file already exists.

    *)
  7. | Open_binary
    (*

    open in binary mode (no conversion).

    *)
  8. | Open_text
    (*

    open in text mode (may perform conversions).

    *)
  9. | Open_nonblock
    (*

    open in non-blocking mode.

    *)
val open_out : string -> out_channel

Open the named file for writing, and return a new output channel on that file, positioned at the beginning of the file. The file is truncated to zero length if it already exists. It is created if it does not already exists.

val open_out_bin : string -> out_channel

Same as Stdlib.open_out, but the file is opened in binary mode, so that no translation takes place during writes. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_out.

val open_out_gen : open_flag list -> int -> string -> out_channel

open_out_gen mode perm filename opens the named file for writing, as described above. The extra argument mode specifies the opening mode. The extra argument perm specifies the file permissions, in case the file must be created. Stdlib.open_out and Stdlib.open_out_bin are special cases of this function.

val flush : out_channel -> unit

Flush the buffer associated with the given output channel, performing all pending writes on that channel. Interactive programs must be careful about flushing standard output and standard error at the right time.

val flush_all : unit -> unit

Flush all open output channels; ignore errors.

val output_char : out_channel -> char -> unit

Write the character on the given output channel.

val output_string : out_channel -> string -> unit

Write the string on the given output channel.

val output_bytes : out_channel -> bytes -> unit

Write the byte sequence on the given output channel.

  • since 4.02
val output : out_channel -> bytes -> int -> int -> unit

output oc buf pos len writes len characters from byte sequence buf, starting at offset pos, to the given output channel oc.

val output_substring : out_channel -> string -> int -> int -> unit

Same as output but take a string as argument instead of a byte sequence.

  • since 4.02
val output_byte : out_channel -> int -> unit

Write one 8-bit integer (as the single character with that code) on the given output channel. The given integer is taken modulo 256.

val output_binary_int : out_channel -> int -> unit

Write one integer in binary format (4 bytes, big-endian) on the given output channel. The given integer is taken modulo 232. The only reliable way to read it back is through the Stdlib.input_binary_int function. The format is compatible across all machines for a given version of OCaml.

val output_value : out_channel -> 'a -> unit

Write the representation of a structured value of any type to a channel. Circularities and sharing inside the value are detected and preserved. The object can be read back, by the function Stdlib.input_value. See the description of module Marshal for more information. Stdlib.output_value is equivalent to Marshal.to_channel with an empty list of flags.

val seek_out : out_channel -> int -> unit

seek_out chan pos sets the current writing position to pos for channel chan. This works only for regular files. On files of other kinds (such as terminals, pipes and sockets), the behavior is unspecified.

val pos_out : out_channel -> int

Return the current writing position for the given channel. Does not work on channels opened with the Open_append flag (returns unspecified results). For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_out, then going back to this position using seek_out will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

val out_channel_length : out_channel -> int

Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless.

val close_out : out_channel -> unit

Close the given channel, flushing all buffered write operations. Output functions raise a Sys_error exception when they are applied to a closed output channel, except close_out and flush, which do nothing when applied to an already closed channel. Note that close_out may raise Sys_error if the operating system signals an error when flushing or closing.

val close_out_noerr : out_channel -> unit

Same as close_out, but ignore all errors.

val set_binary_mode_out : out_channel -> bool -> unit

set_binary_mode_out oc true sets the channel oc to binary mode: no translations take place during output. set_binary_mode_out oc false sets the channel oc to text mode: depending on the operating system, some translations may take place during output. For instance, under Windows, end-of-lines will be translated from \n to \r\n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

General input functions

val open_in : string -> in_channel

Open the named file for reading, and return a new input channel on that file, positioned at the beginning of the file.

val open_in_bin : string -> in_channel

Same as Stdlib.open_in, but the file is opened in binary mode, so that no translation takes place during reads. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_in.

val open_in_gen : open_flag list -> int -> string -> in_channel

open_in_gen mode perm filename opens the named file for reading, as described above. The extra arguments mode and perm specify the opening mode and file permissions. Stdlib.open_in and Stdlib.open_in_bin are special cases of this function.

val input_char : in_channel -> char

Read one character from the given input channel.

  • raises End_of_file

    if there are no more characters to read.

val input_line : in_channel -> string

Read characters from the given input channel, until a newline character is encountered. Return the string of all characters read, without the newline character at the end.

  • raises End_of_file

    if the end of the file is reached at the beginning of line.

val input : in_channel -> bytes -> int -> int -> int

input ic buf pos len reads up to len characters from the given channel ic, storing them in byte sequence buf, starting at character number pos. It returns the actual number of characters read, between 0 and len (inclusive). A return value of 0 means that the end of file was reached. A return value between 0 and len exclusive means that not all requested len characters were read, either because no more characters were available at that time, or because the implementation found it convenient to do a partial read; input must be called again to read the remaining characters, if desired. (See also Stdlib.really_input for reading exactly len characters.) Exception Invalid_argument "input" is raised if pos and len do not designate a valid range of buf.

val really_input : in_channel -> bytes -> int -> int -> unit

really_input ic buf pos len reads len characters from channel ic, storing them in byte sequence buf, starting at character number pos.

  • raises End_of_file

    if the end of file is reached before len characters have been read.

val really_input_string : in_channel -> int -> string

really_input_string ic len reads len characters from channel ic and returns them in a new string.

  • raises End_of_file

    if the end of file is reached before len characters have been read.

  • since 4.02
val input_byte : in_channel -> int

Same as Stdlib.input_char, but return the 8-bit integer representing the character.

val input_binary_int : in_channel -> int

Read an integer encoded in binary format (4 bytes, big-endian) from the given input channel. See Stdlib.output_binary_int.

  • raises End_of_file

    if the end of file was reached while reading the integer.

val input_value : in_channel -> 'a

Read the representation of a structured value, as produced by Stdlib.output_value, and return the corresponding value. This function is identical to Marshal.from_channel; see the description of module Marshal for more information, in particular concerning the lack of type safety.

val seek_in : in_channel -> int -> unit

seek_in chan pos sets the current reading position to pos for channel chan. This works only for regular files. On files of other kinds, the behavior is unspecified.

val pos_in : in_channel -> int

Return the current reading position for the given channel. For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_in, then going back to this position using seek_in will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

val in_channel_length : in_channel -> int

Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless. The returned size does not take into account the end-of-line translations that can be performed when reading from a channel opened in text mode.

val close_in : in_channel -> unit

Close the given channel. Input functions raise a Sys_error exception when they are applied to a closed input channel, except close_in, which does nothing when applied to an already closed channel.

val close_in_noerr : in_channel -> unit

Same as close_in, but ignore all errors.

val set_binary_mode_in : in_channel -> bool -> unit

set_binary_mode_in ic true sets the channel ic to binary mode: no translations take place during input. set_binary_mode_out ic false sets the channel ic to text mode: depending on the operating system, some translations may take place during input. For instance, under Windows, end-of-lines will be translated from \r\n to \n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

Operations on large files

module LargeFile : sig ... end

Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

References

type 'a ref = {
  1. mutable contents : 'a;
}

The type of references (mutable indirection cells) containing a value of type 'a.

val ref : 'a -> 'a ref

Return a fresh reference containing the given value.

val (!) : 'a ref -> 'a

!r returns the current contents of reference r. Equivalent to fun r -> r.contents. Unary operator, see Ocaml_operators for more information.

val (:=) : 'a ref -> 'a -> unit

r := a stores the value of a in reference r. Equivalent to fun r v -> r.contents <- v. Right-associative operator, see Ocaml_operators for more information.

val incr : int ref -> unit

Increment the integer contained in the given reference. Equivalent to fun r -> r := succ !r.

val decr : int ref -> unit

Decrement the integer contained in the given reference. Equivalent to fun r -> r := pred !r.

Result type

type ('a, 'b) result =
  1. | Ok of 'a
  2. | Error of 'b
  • since 4.03

Operations on format strings

Format strings are character strings with special lexical conventions that defines the functionality of formatted input/output functions. Format strings are used to read data with formatted input functions from module Scanf and to print data with formatted output functions from modules Printf and Format.

Format strings are made of three kinds of entities:

  • conversions specifications, introduced by the special character '%' followed by one or more characters specifying what kind of argument to read or print,
  • formatting indications, introduced by the special character '@' followed by one or more characters specifying how to read or print the argument,
  • plain characters that are regular characters with usual lexical conventions. Plain characters specify string literals to be read in the input or printed in the output.

There is an additional lexical rule to escape the special characters '%' and '@' in format strings: if a special character follows a '%' character, it is treated as a plain character. In other words, "%%" is considered as a plain '%' and "%@" as a plain '@'.

For more information about conversion specifications and formatting indications available, read the documentation of modules Scanf, Printf and Format.

Format strings have a general and highly polymorphic type ('a, 'b, 'c, 'd, 'e, 'f) format6. The two simplified types, format and format4 below are included for backward compatibility with earlier releases of OCaml.

The meaning of format string type parameters is as follows:

  • 'a is the type of the parameters of the format for formatted output functions (printf-style functions); 'a is the type of the values read by the format for formatted input functions (scanf-style functions).
  • 'b is the type of input source for formatted input functions and the type of output target for formatted output functions. For printf-style functions from module Printf, 'b is typically out_channel; for printf-style functions from module Format, 'b is typically Format.formatter; for scanf-style functions from module Scanf, 'b is typically Scanf.Scanning.in_channel.

Type argument 'b is also the type of the first argument given to user's defined printing functions for %a and %t conversions, and user's defined reading functions for %r conversion.

  • 'c is the type of the result of the %a and %t printing functions, and also the type of the argument transmitted to the first argument of kprintf-style functions or to the kscanf-style functions.
  • 'd is the type of parameters for the scanf-style functions.
  • 'e is the type of the receiver function for the scanf-style functions.
  • 'f is the final result type of a formatted input/output function invocation: for the printf-style functions, it is typically unit; for the scanf-style functions, it is typically the result type of the receiver function.
type ('a, 'b, 'c, 'd, 'e, 'f) format6 = + ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.format6
type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6
type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4
val string_of_format : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> string

Converts a format string into a string.

val format_of_string : + ('a, 'b, 'c, 'd, 'e, 'f) format6 -> + ('a, 'b, 'c, 'd, 'e, 'f) format6

format_of_string s returns a format string read from the string literal s. Note: format_of_string can not convert a string argument that is not a literal. If you need this functionality, use the more general Scanf.format_from_string function.

val (^^) : + ('a, 'b, 'c, 'd, 'e, 'f) format6 -> + ('f, 'b, 'c, 'e, 'g, 'h) format6 -> + ('a, 'b, 'c, 'd, 'g, 'h) format6

f1 ^^ f2 catenates format strings f1 and f2. The result is a format string that behaves as the concatenation of format strings f1 and f2: in case of formatted output, it accepts arguments from f1, then arguments from f2; in case of formatted input, it returns results from f1, then results from f2. Right-associative operator, see Ocaml_operators for more information.

Program termination

val exit : int -> 'a

Terminate the process, returning the given status code to the operating system: usually 0 to indicate no errors, and a small positive integer to indicate failure. All open output channels are flushed with flush_all. The callbacks registered with Domain.at_exit are called followed by those registered with Stdlib.at_exit.

An implicit exit 0 is performed each time a program terminates normally. An implicit exit 2 is performed if the program terminates early because of an uncaught exception.

val at_exit : (unit -> unit) -> unit

Register the given function to be called at program termination time. The functions registered with at_exit will be called when the program does any of the following:

  • executes Stdlib.exit
  • terminates, either normally or because of an uncaught exception
  • executes the C function caml_shutdown. The functions are called in 'last in, first out' order: the function most recently added with at_exit is called first.

Standard library modules

module Arg : sig ... end

Parsing of command line arguments.

module Array : sig ... end

Array operations.

module ArrayLabels : sig ... end

Array operations.

module Atomic : sig ... end

Atomic references.

module Bigarray : sig ... end

Large, multi-dimensional, numerical arrays.

module Bool : sig ... end

Boolean values.

module Buffer : sig ... end

Extensible buffers.

module Bytes : sig ... end

Byte sequence operations.

module BytesLabels : sig ... end

Byte sequence operations.

module Callback : sig ... end

Registering OCaml values with the C runtime.

module Char : sig ... end

Character operations.

module Complex : sig ... end

Complex numbers.

module Condition : sig ... end

Condition variables.

module Digest : sig ... end

MD5 message digest.

module Domain : sig ... end
module Effect : sig ... end
module Either : sig ... end

Either type.

module Ephemeron : sig ... end

Ephemerons and weak hash tables.

module Filename : sig ... end

Operations on file names.

module Float : sig ... end

Floating-point arithmetic.

module Format : sig ... end

Pretty-printing.

module Fun : sig ... end

Function manipulation.

module Gc : sig ... end

Memory management control and statistics; finalised values.

module Hashtbl : sig ... end

Hash tables and hash functions.

module In_channel : sig ... end

Input channels.

module Int : sig ... end

Integer values.

module Int32 : sig ... end

32-bit integers.

module Int64 : sig ... end

64-bit integers.

module Lazy : sig ... end

Deferred computations.

module Lexing : sig ... end

The run-time library for lexers generated by ocamllex.

module List : sig ... end

List operations.

module ListLabels : sig ... end

List operations.

module Map : sig ... end

Association tables over ordered types.

module Marshal : sig ... end

Marshaling of data structures.

module MoreLabels : sig ... end

Extra labeled libraries.

module Mutex : sig ... end

Locks for mutual exclusion.

module Nativeint : sig ... end

Processor-native integers.

module Obj : sig ... end

Operations on internal representations of values.

module Oo : sig ... end

Operations on objects

module Option : sig ... end

Option values.

module Out_channel : sig ... end

Output channels.

module Parsing : sig ... end

The run-time library for parsers generated by ocamlyacc.

module Printexc : sig ... end

Facilities for printing exceptions and inspecting current call stack.

module Printf : sig ... end

Formatted output functions.

module Queue : sig ... end

First-in first-out queues.

module Random : sig ... end

Pseudo-random number generators (PRNG).

module Result : sig ... end

Result values.

module Scanf : sig ... end

Formatted input functions.

module Semaphore : sig ... end

Semaphores

module Seq : sig ... end

Sequences.

module Set : sig ... end

Sets over ordered types.

module Stack : sig ... end

Last-in first-out stacks.

module StdLabels : sig ... end

Standard labeled libraries.

module String : sig ... end

Strings.

module StringLabels : sig ... end

Strings.

module Sys : sig ... end

System interface.

module Type : sig ... end

Type introspection.

module Uchar : sig ... end

Unicode characters.

module Unit : sig ... end

Unit values.

module Weak : sig ... end

Arrays of weak pointers and hash sets of weak pointers.

diff --git a/stdlib/index.html b/stdlib/index.html new file mode 100644 index 000000000..4e0dfcfca --- /dev/null +++ b/stdlib/index.html @@ -0,0 +1,2 @@ + +stdlib (docs.stdlib)

Packages located relative to stdlib

Libraries

The following libraries are found in this directory.

  • stdlib

Modules

The following is a list of all of the modules found at this filesystem path.